Skip to content

Members

A workspace member links a user to a workspace with a role. Roles are hierarchical:

  • owner — the workspace creator. Exactly one per workspace; cannot be removed.
  • admin — full management of the workspace, its projects, and its members.
  • member — works in the workspace, scoped to the projects they belong to.

Owners and admins manage every project in the workspace; plain members are limited by project membership (see Projects). Members are nested under a workspace, so every endpoint path begins with /api/v1/workspaces/:id.

Field Type Description
workspaceId string Owning workspace.
userId string The member’s user id.
role string owner, admin, or member.
name string The member’s display name.
email string The member’s email address.
imageUrl string | null Ready-to-use avatar URL, or null when the member has no avatar.
createdAt string ISO 8601 instant the membership was created.

GET /api/v1/workspaces/:id/members scope: read

Returns every member of the workspace. Requires membership.

curl "https://<your-instance>/api/v1/workspaces/wrk_demo/members" \
  -H "Authorization: Bearer spantail_pat_yourtoken"

POST /api/v1/workspaces/:id/members scope: admin

Adds an existing user to the workspace by email. Workspace admins only. The user must already have an account on the instance — there is no registered user with the email returns 404 not_found. Adding someone who is already a member returns 409 conflict.

Request body

Field Type Required Description
email string yes Email of an existing user to add.
role string no admin or member (default member). owner is not allowed.
curl -X POST "https://<your-instance>/api/v1/workspaces/wrk_demo/members" \
  -H "Authorization: Bearer spantail_pat_yourtoken" \
  -H "Content-Type: application/json" \
  -d '{ "email": "ben@example.com", "role": "member" }'

Returns 201 Created with the new member object.

DELETE /api/v1/workspaces/:id/members/:userId scope: admin

Removes a member from the workspace. Workspace admins only. Their project memberships in this workspace are dropped as well. Returns 204 No Content.

curl -X DELETE "https://<your-instance>/api/v1/workspaces/wrk_demo/members/usr_ben" \
  -H "Authorization: Bearer spantail_pat_yourtoken"