Workspace Members

REST endpoints for workspace members. Bearer-auth required.

GET /api/workspace-members

List workspace 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.
  • workspace_id (required): Workspace whose members to list.
  • user_id (optional): Shorthand: filter where userId equals this value.
  • role (optional): Shorthand: filter where role equals this value.

Response

JSON
{
  "data": [
    {
      "id": "<...>",
      "workspaceId": "<...>",
      "userId": "<...>",
      "role": "<...>",
      "createdAt": "<...>",
      "userName?": "<...>",
      "userEmail?": "<...>",
      "userRole?": "<...>"
    }
  ],
  "pageInfo": {
    "total": "number",
    "hasNextPage": "boolean",
    "hasPreviousPage": "boolean",
    "startCursor": "string",
    "endCursor": "string"
  }
}

POST /api/workspace-members

Add workspace member

Request body

JSON
{
  "workspaceId": "string",
  "userId": "string",
  "role?": "viewer | editor | admin"
}

Response

JSON
{
  "id": "string",
  "workspaceId": "string",
  "userId": "string",
  "role": "viewer | editor | admin",
  "createdAt": "string",
  "userName?": "string",
  "userEmail?": "string",
  "userRole?": "string"
}

GET /api/workspace-members/{id}

Get a workspace member by ID.

Path parameters

  • id (required): Membership to retrieve.

Response

JSON
{
  "id": "string",
  "workspaceId": "string",
  "userId": "string",
  "role": "viewer | editor | admin",
  "createdAt": "string",
  "userName?": "string",
  "userEmail?": "string",
  "userRole?": "string"
}

PATCH /api/workspace-members/{id}

Update workspace member role

Path parameters

  • id (required): The workspace member's prefixed ID.

Request body

JSON
{
  "role": "viewer | editor | admin"
}

Response

JSON
{
  "id": "string",
  "workspaceId": "string",
  "userId": "string",
  "role": "viewer | editor | admin",
  "createdAt": "string",
  "userName?": "string",
  "userEmail?": "string",
  "userRole?": "string"
}

DELETE /api/workspace-members/{id}

Remove a workspace member.

Path parameters

  • id (required): Membership to remove.

Response

JSON
{
  "success": "boolean"
}