Skip to main content
POST
/
api
/
content
/
coursemembers
{
  "Status": 123,
  "Message": "<string>",
  "Value": "<any>",
  "WasSuccessful": true,
  "Errors": [
    {
      "AttemptedValue": "<any>",
      "Message": "<string>",
      "PropertyName": "<string>"
    }
  ]
}
A CourseMember represents a customer’s enrolment in a Course. When a customer signs up to a course through the Members Portal they are automatically added as a CourseMember. Members can also be added manually via the Admin Panel or the API. Each CourseMember record tracks the member’s progress (LastCompletedLessonId, LastAccess) and their access status:
  • Approved — the member has been approved to access the course content. For public courses this is set automatically on sign-up; for private or paid courses an administrator may need to approve the enrolment.
  • Blocked — the member has been blocked from accessing the course.
Use CourseCompletedLesson records to query which individual lessons a member has completed.

Authentication

This endpoint requires OAuth2 authentication. Include a valid bearer token in the Authorization header. The authenticated user must be a full unrestricted administrator or have the CourseMember-Create role.

Request Body

Required Fields

CourseId
integer
required
ID of the course the member is enrolled in.
CoworkerId
integer
required
ID of the customer enrolled in the course.

Optional Fields

Approved
boolean
Whether the member has been approved to access the course content.
Blocked
boolean
Whether the member has been blocked from accessing the course.

Code Examples

curl -X POST \
  "https://spaces.nexudus.com/api/content/coursemembers" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "CourseId": 0,
    "CoworkerId": 0
}'

Response

200

Status
integer
HTTP status code. 200 on success.
Message
string
A human-readable message confirming the creation.
Value
object
Contains the Id of the newly created record.
WasSuccessful
boolean
true if the coursemember was created successfully.
Errors
array
null on success.
Example Response
{
  "Status": 200,
  "Message": "CourseMember was successfully created.",
  "Value": {
    "Id": 87654321
  },
  "OpenInDialog": false,
  "OpenInWindow": false,
  "RedirectURL": null,
  "JavaScript": null,
  "UpdatedOn": "2025-01-15T10:30:00Z",
  "UpdatedBy": "admin@example.com",
  "Errors": null,
  "WasSuccessful": true
}

400

Message
string
A summary of the validation error(s), in the format PropertyName: error message.
Value
any
null on validation failure.
Errors
object[]
Array of validation errors.
WasSuccessful
boolean
false when the request fails validation.
Example Response
{
  "Message": "Name: is a required field",
  "Value": null,
  "Errors": [
    {
      "AttemptedValue": null,
      "Message": "is a required field",
      "PropertyName": "Name"
    }
  ],
  "WasSuccessful": false
}