Management API — Members

Manage the members of a shared folder and their roles. All endpoints require a Management API Key and are scoped to its organization — see the Overview for authentication and error conventions.

Membership is managed only on shared folders you create. The organization folder (whose membership is maintained automatically) and personal folders reject member operations with 400.

A member’s role is one of viewer, member, or admin. A folder always keeps at least one admin: demoting or removing the last admin is rejected with 400.

List organization members

GET /management/members

Lists the distinct users who belong to at least one folder in the organization, across all folders, in ascending userId order. Use it to discover a user’s userId before adding them to a folder. This is organization-scoped, not folder-scoped: a user appears once regardless of how many folders they belong to, and folder association and role are reported per folder by List members below.

Query parameterTypeNotes
limitnumberMaximum members to return. Default 100, capped at 500.
afterstringReturn members whose userId sorts after this one — the nextCursor from the previous page.
$curl -H "Authorization: Bearer $LAKERA_MANAGEMENT_KEY" \
> "https://$LAKERA_RED_HOST/management/members?limit=100"

Each member carries its userId plus the email and name resolved from the organization’s identity provider. When a user’s profile cannot be resolved, email and name are null and the member is still listed, so no folder member is ever omitted.

1{
2 "members": [
3 { "userId": "...", "email": "alice@example.com", "name": "Alice Admin" },
4 { "userId": "...", "email": null, "name": null }
5 ],
6 "nextCursor": "..."
7}

nextCursor is the after value to pass to fetch the next page, or null when the last page has been reached. Keep requesting with it until it comes back null:

$curl -H "Authorization: Bearer $LAKERA_MANAGEMENT_KEY" \
> "https://$LAKERA_RED_HOST/management/members?limit=100&after={nextCursor}"

List members

GET /management/folders/{folderId}/members

$curl -H "Authorization: Bearer $LAKERA_MANAGEMENT_KEY" \
> https://$LAKERA_RED_HOST/management/folders/{folderId}/members
1{
2 "members": [{ "userId": "...", "role": "admin" }]
3}

Add a member

POST /management/folders/{folderId}/members

FieldTypeRequiredNotes
userIdstringyesMust be a user in the folder’s organization.
rolestringyesviewer, member, or admin.
$curl -X POST -H "Authorization: Bearer $LAKERA_MANAGEMENT_KEY" \
> -H "Content-Type: application/json" \
> -d '{"userId": "{userId}", "role": "member"}' \
> https://$LAKERA_RED_HOST/management/folders/{folderId}/members

Responds 204. Adding a user who is not in the organization, or who is already a member, is rejected with 400.

Change a member’s role

PATCH /management/folders/{folderId}/members/{userId}

$curl -X PATCH -H "Authorization: Bearer $LAKERA_MANAGEMENT_KEY" \
> -H "Content-Type: application/json" \
> -d '{"role": "admin"}' \
> https://$LAKERA_RED_HOST/management/folders/{folderId}/members/{userId}

Responds 204.

Remove a member

DELETE /management/folders/{folderId}/members/{userId}

$curl -X DELETE -H "Authorization: Bearer $LAKERA_MANAGEMENT_KEY" \
> https://$LAKERA_RED_HOST/management/folders/{folderId}/members/{userId}

Responds 204.