Technical Docs
Search…
⌃K

Update User's Program

Mutation used to set the current user to a desired program
Use the updateUserProgram mutation to update the information of the user's program.
A list of all programs can be obtained using the program query.

Required Argument

Argument
Type
Description
programId
ID
The ID of a program​

Examples

GraphQL Example

Query
Response
mutation {
updateUserProgram(
programId: "UHJvZ3JhbTowYWQ0ZTc3YS04ZWRhLTRlOWItYWM4ZS0xYzg0YTJlOGJiNDI="
) {
success
message
}
}
{
"data": {
"updateUserProgram": {
"success": true,
"message": "User's program was successfully updated"
}
}
}

cURL Example (with API Token)

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 Example (with Bearer Token)

curl Example
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 } }"}
​