Skip to content

Workspace API

Remove a Member

Remove a member from the workspace with DELETE /workspace/members/{userId}.

Endpoint
DELETE https://api.parcelengineering.com/api/v1/workspace/members/{userId}

Removes a user from the workspace. The caller must be an owner or admin (for user-token requests). API key callers are admin-equivalent.

This operation is idempotent. If the user is not a member of the workspace, the response returns { "deleted": false } with status 200 rather than an error.

The workspace must always have at least one owner. Removing the last owner returns 409 last_owner.

Remove a member costs 0 credits.

Path parameters

ParameterDescription
userIdUUID of the member to remove. Returned as id in the List Members response.

Errors

CodeStatusDescription
cannot_self_remove400The caller tried to remove their own membership (user-token requests). Use a different owner or admin to remove yourself.
forbidden403The caller is not an owner or admin in this workspace.
last_owner409Cannot remove the only remaining owner. Transfer ownership to another member first.

Example

Remove a member
curl -X DELETE \
"https://api.parcelengineering.com/api/v1/workspace/members/d1e2f3a4-0002-4b7c-9e5d-000000000002" \
-H "Authorization: Bearer pcl_your_api_key"

Response

Response
{
"data": { "deleted": true },
"metadata": { "credits": 0 }
}

When the user was not a member of the workspace:

Response (not a member)
{
"data": { "deleted": false },
"metadata": { "credits": 0 }
}

Response fields

FieldTypeDescription
data.deletedbooleantrue if the member was removed; false if the user was not in the workspace.
metadata.creditsintegerAlways 0.