Workspace API
Revoke an Invitation
Revoke a pending workspace invitation with DELETE /workspace/invitations/{id}.
DELETE https://api.parcelengineering.com/api/v1/workspace/invitations/{id}Revokes a pending workspace invitation by setting its revoked_at timestamp. The invitation link becomes invalid immediately. The caller must be an owner or admin (for user-token requests). API key callers are admin-equivalent.
This is a soft revoke: the invitation record is retained with revoked_at set. Returns 404 not_found if the invitation does not exist in this workspace, or if it was already accepted or revoked.
Revoke an invitation costs 0 credits.
The Workspace API requires the Pro plan. A request from a non-Pro workspace receives 403 forbidden.
Path parameters
| Parameter | Description |
|---|---|
id | UUID of the invitation to revoke. Returned as id in the List Invitations or Invite a User responses. |
Errors
| Code | Status | Description |
|---|---|---|
forbidden | 403 | The caller is not an owner or admin in this workspace. |
not_found | 404 | No open invitation with this id was found in the workspace. The invitation may not exist, may belong to a different workspace, or may have already been accepted or revoked. |
Example
curl -X DELETE \ "https://api.parcelengineering.com/api/v1/workspace/invitations/9f8e7d6c-0001-4a3b-8c2d-000000000001" \ -H "Authorization: Bearer pcl_your_api_key"const response = await fetch( 'https://api.parcelengineering.com/api/v1/workspace/invitations/9f8e7d6c-0001-4a3b-8c2d-000000000001', { method: 'DELETE', headers: { 'Authorization': 'Bearer pcl_your_api_key', }, });
const { data, metadata } = await response.json();Response
{ "data": { "deleted": true, "id": "9f8e7d6c-0001-4a3b-8c2d-000000000001", "email": "new.teammate@example.com" }, "metadata": { "credits": 0 }}Response fields
| Field | Type | Description |
|---|---|---|
data.deleted | boolean | Always true on a 200 response from this endpoint. |
data.id | string (UUID) | The id of the revoked invitation. |
data.email | string | The email address of the revoked invitation. |
metadata.credits | integer | Always 0. |