---
title: "Remove a website editor or cancel an invitation"
method: DELETE
path: "/websites/{websiteId}/editors"
tags: ["Website editors"]
---

# Remove a website editor or cancel an invitation

`DELETE /websites/{websiteId}/editors`

## Request

- Base URL: `https://api.cactal.ai/v1`
- URL: `https://api.cactal.ai/v1/websites/{websiteId}/editors`
- Auth: HTTP bearer

Revokes a website-scoped editor grant when called with `principalId`, or cancels a pending invitation (so its emailed link stops working) when called with `invitationId` — provide exactly one. Returns 404 when the principal has no direct grant or the invitation does not exist; canceling an invitation that was already accepted or canceled returns 409. Access inherited from an organization role is unaffected. Grants are listed by `websites.editors.list`; invitations are listed by `websites.editorInvitations.list`.

## Path parameters

- `websiteId` string, required

## Request body

- object
  - `principalId` string: Principal whose direct editor grant should be revoked. Provide either this or `invitationId`.
  - `invitationId` string: Pending invitation to cancel so its emailed link stops working. Provide either this or `principalId`.

## Response `200`

The removed editor grant or the canceled invitation.

- union
  - object
    - `status` 'removed', required: The principal’s direct editor grant was revoked.
    - `grant` object, required
      - `websiteId` string, required: Id of the website the grant applies to.
      - `principalId` string, required: Id of the principal holding the grant.
      - `role` 'full' | 'content', required: `full` allows full website editing; `content` allows content editing only.
      - `createdAt` string, date-time, required: When the grant was created.
  - object
    - `status` 'canceled', required: The pending invitation was canceled; its emailed link no longer works.
    - `invitation` object, required
      - `id` string, required: Unique invitation id.
      - `email` string, required: Invited email address, normalized to lowercase.
      - `role` 'full' | 'content', required: Editor role granted when the invitation is accepted.
      - `status` 'pending' | 'accepted' | 'canceled', required: Lifecycle status of the invitation.
      - `expiresAt` string, date-time, required: When the invitation can no longer be accepted.
      - `createdAt` string, date-time, required: When the invitation was created.

## Other responses

- `400`: Validation failed. The response `message` names the first invalid field.
- `401`: Missing, invalid, expired, or revoked API key.
- `403`: The authenticated principal lacks the required capability.
- `404`: The resource does not exist or is outside the principal’s access scope.
- `409`: The request conflicts with the current state of the resource.
- `429`: Rate limit exceeded. Retry after the number of seconds in the `Retry-After` header.

---

[API](https://skmtc.dev/cactal/apis/cactal-api.md) · [All operations](https://skmtc.dev/cactal/apis/cactal-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cactal/apis/cactal-api/revisions/9cd0fb5eacdd?raw)
