Skip to content

Remove a member

DELETE/v1/workspaces/{workspace_uid}/members/{member_uid}

Removes a member from the workspace. They lose access immediately. Resources they created stay in the workspace.

Requires the owner or admin role. You cannot remove yourself or the owner, and admins cannot remove another admin.

The response contains the member as they were before removal.

Authentication

Send your API key as Authorization: Bearer <token>. The request is scoped to the workspace in X-Workspace-Slug.

Path parameters

workspace_uidstringRequired

The workspace's uid. When the route also takes X-Workspace-Slug, both must name the same workspace.

member_uidstringRequired

The membership's uid from List members. This is not the member's user_uid.

Headers

X-Workspace-SlugstringRequired

Slug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.

Response

200

The member was removed.

successbooleanRequired

true when the request succeeded.

messagestringRequired

Human-readable status message.

dataobject
Show attributes
uidstringRequired

Unique identifier of the membership. Use it in /members/{member_uid} paths.

user_uidstringRequired

The member's user ID.

usernamestringRequired

The member's username.

emailstringRequired

The member's email address.

avatar_urlstring

API-relative path of the member's profile picture. Omitted when they have none.

rolestringRequired

The member's role.

One ofowneradmindeveloperviewer

permissionsarray of stringsRequired

The permissions the role grants.

One ofworkspace.readworkspace.manageresource.writeruntime.connectsecrets.readsecrets.managemembers.manageaudit.readbilling.readbilling.manageworkspace.transferworkspace.delete

statusstringRequired

Membership status. Only active members can access the workspace.

One ofactivesuspended

joined_atstring (date-time)Required

When the member joined.

invited_byobject

Who invited the member. Omitted for the owner and when unknown.

Show attributes
uidstringRequired

The user's ID.

usernamestringRequired

The user's username.

is_current_userbooleanRequired

true for your own membership.

Errors

StatusMeaning
400The request was malformed or failed validation.
401The API key is missing, invalid, expired or revoked.
403Not allowed: your role cannot manage members, you cannot remove yourself from the workspace, the workspace owner cannot be removed, or admins cannot remove another admin.
404No member with this uid in the workspace (workspace member not found).

Errors use the standard error format.