Program Enrollment OpenAPI Spec
Enrolls a list of Canvas users into a single Journey Program using the
batchEnrollUserToProgram GraphQL mutation.
Idempotency: already-enrolled users are silently skipped and returned without error — it is safe to retry a failed batch with the same user list.
Rate limiting: the API may return a "Too Many Requests" error (HTTP 429
surfaced as a GraphQL error). Read the retryAfter value from the error
extensions and wait that many seconds before retrying.
Journey JWT obtained from Canvas (POST /api/v1/jwts?audience=Instructure&workflows[]=journey, then base64-decode the token field).
GraphQL mutation string.
mutation BatchEnrollUsers($programId: String!, $userIds: [String!]!, $accountId: String!) { batchEnrollUserToProgram(programId: $programId, userIds: $userIds, accountId: $accountId) { id enrollee createdAt } }GraphQL always returns HTTP 200. Check the errors field in the response
body to determine whether the operation succeeded.
Invalid or expired JWT, or caller's read_as_admin permission is false.
Canvas denied the permission lookup for the given account.
POST /graphql HTTP/1.1
Host: your-journey-host.instructure.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 424
{
"query": "mutation BatchEnrollUsers($programId: String!, $userIds: [String!]!, $accountId: String!) {\n batchEnrollUserToProgram(programId: $programId, userIds: $userIds, accountId: $accountId) {\n id\n enrollee\n createdAt\n }\n}\n",
"variables": {
"programId": "3cd6bb00-4f03-437a-8659-8997de0b0c0d",
"userIds": [
"daDdICJBPnNOQEw8UXQEFJu0civhUYjqTOan3KOk",
"bXCJd5bFRf7A84qdMIvsMa0qC2g7s7g2RxznllVj"
],
"accountId": "1"
}
}{
"data": {
"batchEnrollUserToProgram": [
{
"id": "a1b2c3d4-0000-0000-0000-000000000001",
"enrollee": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"createdAt": "2026-06-08T20:00:00.000Z"
},
{
"id": "a1b2c3d4-0000-0000-0000-000000000002",
"enrollee": "3f1a9c22-8d4e-4b7a-b1c0-6e2f5a9d8c31",
"createdAt": "2026-06-08T20:00:00.000Z"
}
]
}
}Last updated
Was this helpful?