Skip to content
Docs
English
Esc
↑↓navigate↵open⌘Jpreview

Enroll users in a course

Enrolls one or more users with per-user roles. Body: { users: [{ userId, roleId }] }. Scoped to your integration’s institution via Basic Auth credentials.

POST/courses/{id}/users
Authorization
AuthorizationBasic auth · headerrequired

Basic Auth with clientId as username and clientSecret as password

Path parameters
idstringrequired

Course ID

Request body
requiredapplication/json
usersobject[]required
min items 1 · max items 1000
Show properties
Array of object
userIdstringrequired
roleIdstringrequired
Responses
200

Users enrolled

dataMessageResultrequired
Show properties
messagestringrequired
metaResponseMetarequired
Show properties
requestIdstringrequired
timestampstring<date-time>required
versionstringrequired
Allowed:v4
400

Bad Request

typestringrequired
Allowed:error
codestringrequired
Allowed:bad_requestunauthorizedforbiddenresource_not_foundconflictvalidation_failedidempotency_key_reusedrate_limit_exceededinternal_error
titlestringrequired
statusintegerrequired
detailstringrequired
instancestring
errorsobject[]
Show properties
Array of object
fieldstring
messagestring
401

Unauthorized

typestringrequired
Allowed:error
codestringrequired
Allowed:bad_requestunauthorizedforbiddenresource_not_foundconflictvalidation_failedidempotency_key_reusedrate_limit_exceededinternal_error
titlestringrequired
statusintegerrequired
detailstringrequired
instancestring
errorsobject[]
Show properties
Array of object
fieldstring
messagestring
403

Forbidden

typestringrequired
Allowed:error
codestringrequired
Allowed:bad_requestunauthorizedforbiddenresource_not_foundconflictvalidation_failedidempotency_key_reusedrate_limit_exceededinternal_error
titlestringrequired
statusintegerrequired
detailstringrequired
instancestring
errorsobject[]
Show properties
Array of object
fieldstring
messagestring
404

Not Found

typestringrequired
Allowed:error
codestringrequired
Allowed:bad_requestunauthorizedforbiddenresource_not_foundconflictvalidation_failedidempotency_key_reusedrate_limit_exceededinternal_error
titlestringrequired
statusintegerrequired
detailstringrequired
instancestring
errorsobject[]
Show properties
Array of object
fieldstring
messagestring
429

Too Many Requests

typestringrequired
Allowed:error
codestringrequired
Allowed:bad_requestunauthorizedforbiddenresource_not_foundconflictvalidation_failedidempotency_key_reusedrate_limit_exceededinternal_error
titlestringrequired
statusintegerrequired
detailstringrequired
instancestring
errorsobject[]
Show properties
Array of object
fieldstring
messagestring
500

Internal Server Error

typestringrequired
Allowed:error
codestringrequired
Allowed:bad_requestunauthorizedforbiddenresource_not_foundconflictvalidation_failedidempotency_key_reusedrate_limit_exceededinternal_error
titlestringrequired
statusintegerrequired
detailstringrequired
instancestring
errorsobject[]
Show properties
Array of object
fieldstring
messagestring
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://fuxam.app/api/v4/courses/string/users' \
  -H 'Authorization: Basic YOUR_CREDENTIALS' \
  -H 'Content-Type: application/json' \
  -d '{
  "users": [
    {
      "userId": "user_123",
      "roleId": "role_student_id"
    }
  ]
}'
Response
{
  "data": {
    "message": "Operation completed successfully"
  },
  "meta": {
    "requestId": "req_1234567890_abc",
    "timestamp": "2026-06-02T07:00:00.000Z",
    "version": "v4"
  }
}