# api_key.revoked

HTML: https://www.app2email.com/docs/api/webhooks/api_key.revoked · Index: https://www.app2email.com/docs/api/llms.txt

A key of a number was revoked.

Group: Partner. Header `X-App2email-Event: api_key.revoked`. Inside the envelope `{id, type, created, number, test?, data}` ([envelope, headers, signature](https://www.app2email.com/docs/api/webhooks.md)). Account and partner webhooks only (`/v1/account/webhooks`, `/v1/partner/webhooks`): a number's webhooks never get it.

## data

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `data.number` | string | yes |  |
| `data.client_id` | string |  | The reseller's client (partner webhooks). |
| `data.timestamp` | string |  |  |
| `data.key` | object | yes |  |
| `data.key.id` | integer |  |  |
| `data.key.name` | string |  |  |
| `data.revoked_by` | string |  |  |

## Samples

### partner api

```json
{
  "id": "evt_Pt16k9m2Lw8Rt5Yp1Zs0",
  "type": "api_key.revoked",
  "created": "2026-11-06T09:00:00.000Z",
  "number": "4976659348270",
  "data": {
    "number": "4976659348270",
    "client_id": "k3x9q2m7v8w1r4t",
    "key": {
      "id": 812,
      "name": "CRM"
    },
    "revoked_by": "partner_api",
    "timestamp": "2026-11-06T09:00:00.000Z"
  }
}
```

Test it on an account or partner webhook:

- [Send a test event to a partner webhook](https://www.app2email.com/docs/api/partner/test-partner-webhook.md): `POST /v1/partner/webhooks/{id}/test`
- [Send a test event to an account webhook](https://www.app2email.com/docs/api/account-management/test-account-webhook.md): `POST /v1/account/webhooks/{id}/test`
