On this page

Workspace members are the user roster for a specific workspace. A user must already be an org member (tenant_members row) before they can be added to a workspace. The last owner in a workspace cannot be removed until another member is promoted to owner.

Base path: /api/v1/workspaces/:id/members


Endpoints

MethodPathDescription
GET/workspaces/{id}/membersList workspace members
POST/workspaces/{id}/membersAdd an existing org member to the workspace
PATCH/workspaces/{id}/members/{user_id}Update a member’s role
DELETE/workspaces/{id}/members/{user_id}Remove a member

Roles

RoleDescription
ownerFull admin including transfer and deletion
adminCan manage members and resources
memberCan create and manage resources
viewerRead-only access

List Members

GET /api/v1/workspaces/{id}/members

Returns all members of the workspace.

Response — 200 OK

{
  "data": [
    {
      "user_id": "usr_abc123",
      "email": "alice@example.com",
      "name": "Alice",
      "avatar_url": null,
      "role": "owner",
      "joined_at": "2026-05-01T10:00:00Z",
      "added_by": null
    },
    {
      "user_id": "usr_def456",
      "email": "bob@example.com",
      "name": "Bob",
      "avatar_url": null,
      "role": "member",
      "joined_at": "2026-05-10T14:00:00Z",
      "added_by": "usr_abc123"
    }
  ]
}

Add Member

POST /api/v1/workspaces/{id}/members

Adds an existing org member to the workspace with the given role.

Request Body

FieldTypeRequiredDescription
user_idUUIDYesThe user’s ID — must already be a tenant member
rolestringYesowner, admin, member, or viewer

Response — 201 Created

{
  "data": {
    "user_id": "usr_def456",
    "workspace_id": "ws-uuid",
    "role": "member",
    "joined_at": "2026-05-22T09:00:00Z",
    "added_by": "usr_abc123"
  }
}

Errors

StatusCodeCause
422NOT_TENANT_MEMBERUser is not a member of the parent org
422MISSING_USER_IDuser_id field missing
422MISSING_ROLErole field missing
409User is already a workspace member

Update Member Role

PATCH /api/v1/workspaces/{id}/members/{user_id}

Changes a workspace member’s role.

Request Body

FieldTypeRequiredDescription
rolestringYesNew role: owner, admin, member, or viewer

Response — 200 OK

Updated workspace member record (same shape as the add response).

Errors

StatusCodeCause
404User is not a member of this workspace
422MISSING_ROLErole field missing

Remove Member

DELETE /api/v1/workspaces/{id}/members/{user_id}

Removes a user from the workspace. This does not remove them from the parent org.

Response — 200 OK

{ "deleted": true }

Errors

StatusCodeCause
404User is not a member of this workspace
409LAST_OWNERCannot remove the last workspace owner — promote another member first

Common Errors

StatusCodeCause
403Workspace belongs to a different tenant
404Workspace or user not found
409LAST_OWNERRefusing to remove the sole workspace owner
422NOT_TENANT_MEMBERUser must join the org before joining the workspace
422MISSING_USER_IDuser_id body field is required
422MISSING_ROLErole body field is required

See also

Was this helpful?