Community members and org units
Listing members
GET /v1/communities/{communityId}/members
| Query parameter | Description |
|---|---|
role | Filter by member role: admin, moderator, or member. |
q | Substring match on name or email. |
limit | Page size. |
offset | Zero-based offset for pagination. |
Each item in the response includes:
| Field | Type | Description |
|---|---|---|
id | long | Membership record identifier. |
userId | long | User identifier. |
email | string | User's email address. |
firstName | string | First name. |
lastName | string | Last name. |
role | string | Role within the community (admin, moderator, or member). |
createdAt | datetime | When the user joined the community. |
Adding members
POST /v1/communities/{communityId}/members
Adds one or more users with a specified role. Duplicate entries (same userId already in the community) are silently skipped — this is not an error.
Request body
{
"members": [
{ "userId": "ID-1001", "role": "admin" },
{ "userId": "EMAIL-alice@example.com", "role": "member" },
{ "userId": "EXT-emp123", "role": "moderator" }
]
}
userId format
The userId field supports three identifier schemes — prefix is part of the value:
| Prefix | Example | Resolves to |
|---|---|---|
ID- | ID-1001 | Cornerstone internal user ID |
EMAIL- | EMAIL-alice@example.com | User looked up by email address |
EXT- | EXT-emp123 | User looked up by external reference |
Allowed roles
| Role | Permissions |
|---|---|
admin | Full community management, can moderate content and members. |
moderator | Can moderate posts and comments. |
member | Standard read and post access. |
Returns { "message": "..." } on success.
Removing a member
DELETE /v1/communities/{communityId}/members/{memberId}
Removes the membership identified by memberId (the membership record id, not the userId). Returns { "message": "..." } on success.
Adding an organisational unit
POST /v1/communities/{communityId}/ou
Enrols all users in an OU. This is applied as a query-string operation (the request body is not used for routing parameters).
Request body
{
"ouId": 10,
"ouTypeId": 2,
"ouTypeString": "Department",
"includeSubOus": false
}
| Field | Required | Description |
|---|---|---|
ouId | Yes | Identifier of the organisational unit. |
ouTypeId | Yes | Identifier of the OU type. |
ouTypeString | Yes | Name of the OU type (e.g. "Department"). |
includeSubOus | No | Whether to include subordinate OUs. Defaults to false. |
Returns { "message": "..." } on success.
Removing an organisational unit
DELETE /v1/communities/{communityId}/ou/{ouId}
Removes the OU membership rule for the given ouId. Does not remove individual users who joined through the OU before removal. Returns { "message": "..." } on success.