Organization Members
REST endpoints for organization members. Bearer-auth required.
GET /api/organization-members
List organization members.
Query parameters
limit(optional): Page size (1–100, default 100).after(optional): Keyset cursor — return the page after this row (next page).before(optional): Keyset cursor — return the page before this row (prev page).ids(optional): Comma-separated list of IDs. Narrows results to these IDs within the caller's accessible scope (does not bypass access checks).filter(optional): Nested filter expression (<Entity>Filter): AND/OR/NOT + per-field comparison operators + relation traversal. JSON-encoded on the query string.orderBy(optional): Multi-key sort (<Entity>OrderBy[]): array of{ field: direction }applied in order. Directions: asc/desc plus the four explicit nulls variants. JSON-encoded on the query string.organization_id(required): Organization whose members to list.user_id(optional): Shorthand: filter whereuserIdequals this value.role(optional): Shorthand: filter whereroleequals this value.
Response
JSON
{
"data": [
{
"id": "<...>",
"organizationId": "<...>",
"userId": "<...>",
"role": "<...>",
"createdAt": "<...>"
}
],
"pageInfo": {
"total": "number",
"hasNextPage": "boolean",
"hasPreviousPage": "boolean",
"startCursor": "string",
"endCursor": "string"
}
}POST /api/organization-members
Add organization member
Request body
JSON
{
"organizationId": "string",
"userId": "string",
"role?": "viewer | editor | admin"
}Response
JSON
{
"id": "string",
"organizationId": "string",
"userId": "string",
"role": "viewer | editor | admin",
"createdAt": "string"
}GET /api/organization-members/{id}
Get an organization member by ID.
Path parameters
id(required): Membership to retrieve.
Response
JSON
{
"id": "string",
"organizationId": "string",
"userId": "string",
"role": "viewer | editor | admin",
"createdAt": "string"
}PATCH /api/organization-members/{id}
Update organization member role
Path parameters
id(required): The organization member's prefixed ID.
Request body
JSON
{
"role": "viewer | editor | admin"
}Response
JSON
{
"id": "string",
"organizationId": "string",
"userId": "string",
"role": "viewer | editor | admin",
"createdAt": "string"
}DELETE /api/organization-members/{id}
Remove an organization member.
Path parameters
id(required): Membership to remove.
Response
JSON
{
"success": "boolean"
}