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

mutation {
  updateUserProgram(
    programId: "UHJvZ3JhbTowYWQ0ZTc3YS04ZWRhLTRlOWItYWM4ZS0xYzg0YTJlOGJiNDI="
  ) {
    success
    message
  }
}

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 -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 } }"}

Last updated