> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shilo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel a Pending Invitation — Shilo Invitations API

> Cancel a pending invitation in Shilo so it can no longer be accepted. Returns 204 No Content on success. Requires a write-enabled API key.

Use this endpoint to cancel a pending invitation, preventing the recipient from using it to join your Shilo organization. This is useful when an agent should no longer be onboarded, or when you need to re-invite them with different details — for example, a corrected email address or a different `external_user_id`.

## Endpoint

```
DELETE https://api.shilo.ai/api/v1/invitations/{id}
```

## Authentication

This endpoint requires a **write-enabled** API key:

```
x-api-key: YOUR_API_KEY
```

## Path Parameters

<ParamField path="id" type="string" required>
  The unique identifier (UUID) of the invitation to cancel. You can obtain this from the [List Invitations](/api-reference/invitations/list-invitations) or [Create Invitation](/api-reference/invitations/create-invitation) endpoints.
</ParamField>

## Response

### 204 — No Content

The invitation was successfully cancelled. No response body is returned.

### 403 — Forbidden

Your API key does not have write permissions.

### 404 — Not Found

No invitation with the given `id` exists in your organization.

## Example Request

```bash theme={null}
curl --request DELETE \
  --url "https://api.shilo.ai/api/v1/invitations/ee6f2136-b94a-4438-9335-3acf5b2a0d31" \
  --header "x-api-key: YOUR_API_KEY"
```

A successful cancellation returns HTTP `204 No Content` with an empty response body.
