# Cancel a scheduled email

> Cancels a scheduled email that has not been sent yet.

Source: https://docs.pidgely.com/api-reference/v1/emails/cancel/

`POST https://api.pidgely.com/v1/emails/{id}/cancel`

Cancels a scheduled email that has not been sent yet.

**Authorization:** `Bearer pdg_…`. An API key with the `full` scope.

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string | Yes | Resource id UUID. |

## Request

```bash tab="cURL"
curl -X POST 'https://api.pidgely.com/v1/emails/0199d8a2-6f3c-7c51-9e2a-3b1f0c6d4e21/cancel' \
  -H "Authorization: Bearer $PIDGELY_API_KEY"
```

## Response

`200 OK`

```json
{
  "id": "0199d8a2-6f3c-7c51-9e2a-3b1f0c6d4e21",
  "status": "canceled"
}
```

## Errors

Native routes return `{"error": {"code", "message", "field", "request_id"}}`. See [Errors](https://docs.pidgely.com/errors/#native-api-errors).

| Status | Code | When |
|---|---|---|
| 401 | `missing_api_key` | No `Authorization: Bearer` header. |
| 403 | `invalid_api_key`, `insufficient_scope` | The key is invalid or lacks the scope. |
| 404 | `not_found` | The resource does not exist in this account. |
| 422 | `validation_error` | A field is missing or invalid; `field` names it. |
| 429 | `rate_limited`, `daily_quota_exceeded` | Too many requests, or the quota is used up. |
