Login

Users

Users in Coassemble refer to all members in your workspace, regardless of their role.

Endpoints

Get users

GET /api/v1/members

Returns a list of all the users that are members of your workspace. The users are returned sorted by namelastfirst. Filter users using the query parameters listed in the table.

Query parameters

FieldTypeDescriptionRequiredDefaultPattern
searchstringSearch name & emailNonull N/A
sortstringSort order for results.No"namelastfirst"(name|namelastfirst|username|email|created|added)
statestringFilter members by activation status.Nonull(active|pending|inactive)
pagestringWhich page of items to display, starting with zeroNo"0"\d+
limitstringNumber of items per page (0 - 100)No"5"\d+
reversestringShould sort order be reversedNo"0"(0|1)

Responses

CodeDescription
200Returned when successful

Add users

POST /api/v1/members

Create a user as a member of your campus or add an existing user to it.

Body properties

FieldTypeDescriptionRequired
emailstringThe user's email address.Yes
userTypestringAdd this user to either your learners (student) or trainers (team).No
usernamestringA username for the new user. If omitted, their email address will be used instead.No
passwordstringNew user's password. If omitted, they will be prompted to set a password on first login.No
firstnamestringThe new user's first name. If omitted, their email address will be used instead.No
lastnamestringThe new user's last name, if they have one. This is completely optional.No
timezonestringThe new user's timezone. Will be automatically detected if not provided.No
avatarstringURL pointing to the new user's avatar. They can set this later, or not at all, if desired.No
email_verifiedstringWhether you'd like to skip the email verification process for this user.No
localestringThe user's locale (language and region). Will be automatically detected if not provided.No
activebooleanWhether you'd like to skip activation for this user. Recommended for SSO usage.No
disable_course_enrolment_notificationbooleanPrevent this user from receiving notification emails when enrolled in a course.No

Responses

CodeDescription
200Returned when successful
400Returned when no email address, or an invalid email address, is provided
403Returned when the user is not authorized to manage members
422Returned when there is a collision of username with another user, or when workspace has hit user limit

Search for a specific user

GET /api/v1/members/{id}

Search for a user using the User ID.

Path variables

FieldDescription
userUser ID
id

Responses

CodeDescription
200Returned when successful

Batch add users

POST /api/v1/members/batch

Add multiple users to your workspace using an email address. This method does not apply roles to these users, or enroll them into courses.

Query parameters

FieldTypeDescriptionRequiredDefaultPattern
userTypestringuserType from frontendNonullstudent|team

Body properties

FieldTypeDescriptionRequired
emailsstring[]No

Responses

CodeDescription
200Basic info about the enrolled members
403Returned when workspace has hit user limit

Search the groups a user is enrolled in

GET /api/v1/members/{id}/groups

Both learners and trainers can be enrolled into groups. Use this endpoint to find what groups a user belongs to.

Path variables

FieldDescription
userUser ID
id

Query parameters

FieldTypeDescriptionRequiredDefaultPattern
typestringFilter to groups where this user is a student or a teacher.Nonull(student|teacher)
actionstringDeprecated alias for 'type'.Nonull(study|teach)

Responses

CodeDescription
200Returned when successful

Deactivate users

PATCH /api/v1/members/unlink/{user}

Deactivate a user from your workspace using their User ID.

Path variables

FieldDescription
userUser ID

Responses

CodeDescription
204Returned when successful

Delete users

DELETE /api/v1/members/{user}

Delete a user from your workspace using their User ID.

Path variables

FieldDescription
userUser ID

Responses

CodeDescription
201Returned when successful