Mutation used to set the current user to a desired program
Last updated 3 years ago
Was this helpful?
Use the updateUserProgram mutation to update the information of the user's program.
updateUserProgram
A list of all programs can be obtained using the query.
Argument
Type
Description
programId
ID
mutation { updateUserProgram( programId: "UHJvZ3JhbTowYWQ0ZTc3YS04ZWRhLTRlOWItYWM4ZS0xYzg0YTJlOGJiNDI=" ) { success message } }
{ "data": { "updateUserProgram": { "success": true, "message": "User's program was successfully updated" } } }
curl/-XPOST 'https://production.suggestic.com/graphql' \ -H 'Authorization: Token <API-Token>' \ -H 'SG-User: <user-id>' \ -H 'Content-Type: application/json' \ --data-raw {"query":"mutation {updateUserProgram(programId:\"<PROGRAM ID>\"){ success message } }"}
curl -XPOST 'https://production.suggestic.com/graphql' \ -H 'Authorization: Bearer <User-JWT>' \ -H 'Content-Type: application/json' \ --data-raw {"query":"mutation {updateUserProgram(programId:\"<PROGRAM ID>\"){ success message } }"}
The ID of a