Users
Users in Coassemble refer to all members in your workspace, regardless of their role.
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
Field | Type | Description | Required | Default | Pattern |
---|
search | string | Search name & email | No | null | N/A |
sort | string | Sort order for results. | No | "namelastfirst" | (name|namelastfirst|username|email|created|added) |
state | string | Filter members by activation status. | No | null | (active|pending|inactive) |
page | string | Which page of items to display, starting with zero | No | "0" | \d+ |
limit | string | Number of items per page (0 - 100) | No | "5" | \d+ |
reverse | string | Should sort order be reversed | No | "0" | (0|1) |
Responses
Code | Description |
---|
200 | Returned when successful |
POST /api/v1/members
Create a user as a member of your campus or add an existing user to it.
Body properties
Field | Type | Description | Required |
---|
email | string | The user's email address. | Yes |
userType | string | Add this user to either your learners (student) or trainers (team). | No |
username | string | A username for the new user. If omitted, their email address will be used instead. | No |
password | string | New user's password. If omitted, they will be prompted to set a password on first login. | No |
firstname | string | The new user's first name. If omitted, their email address will be used instead. | No |
lastname | string | The new user's last name, if they have one. This is completely optional. | No |
timezone | string | The new user's timezone. Will be automatically detected if not provided. | No |
avatar | string | URL pointing to the new user's avatar. They can set this later, or not at all, if desired. | No |
email_verified | string | Whether you'd like to skip the email verification process for this user. | No |
locale | string | The user's locale (language and region). Will be automatically detected if not provided. | No |
active | boolean | Whether you'd like to skip activation for this user. Recommended for SSO usage. | No |
disable_course_enrolment_notification | boolean | Prevent this user from receiving notification emails when enrolled in a course. | No |
Responses
Code | Description |
---|
200 | Returned when successful |
400 | Returned when no email address, or an invalid email address, is provided |
403 | Returned when the user is not authorized to manage members |
422 | Returned when there is a collision of username with another user, or when workspace has hit user limit |
GET /api/v1/members/{id}
Search for a user using the User ID.
Path variables
Field | Description |
---|
user | User ID |
id | |
Responses
Code | Description |
---|
200 | Returned when successful |
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
Field | Type | Description | Required | Default | Pattern |
---|
userType | string | userType from frontend | No | null | student|team |
Body properties
Field | Type | Description | Required |
---|
emails | string[] | | No |
Responses
Code | Description |
---|
200 | Basic info about the enrolled members |
403 | Returned when workspace has hit user limit |
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
Field | Description |
---|
user | User ID |
id | |
Query parameters
Field | Type | Description | Required | Default | Pattern |
---|
type | string | Filter to groups where this user is a student or a teacher. | No | null | (student|teacher) |
action | string | Deprecated alias for 'type'. | No | null | (study|teach) |
Responses
Code | Description |
---|
200 | Returned when successful |
PATCH /api/v1/members/unlink/{user}
Deactivate a user from your workspace using their User ID.
Path variables
Field | Description |
---|
user | User ID |
Responses
Code | Description |
---|
204 | Returned when successful |
DELETE /api/v1/members/{user}
Delete a user from your workspace using their User ID.
Path variables
Field | Description |
---|
user | User ID |
Responses
Code | Description |
---|
201 | Returned when successful |