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

# Revoke API Key

> Immediately and permanently revoke a child's API key.

Revokes an API key immediately. The key stops authenticating at once and cannot be restored — mint a new one if needed. Use your **parent** key with `accounts.write`.

## Path Parameters

<ParamField path="child_id" type="integer" required>
  The child account's `accountId`.
</ParamField>

<ParamField path="key_id" type="string" required>
  The `id` of the key to revoke.
</ParamField>

## Examples

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.tracklysms.com/api/v2/accounts/children/1042/api-keys/66b0f7c84a1d4b2e9c3a1f2e/revoke \
    -H "X-Api-Key: trk_your_parent_key"
  ```
</RequestExample>

<ResponseExample>
  ```json Success (200) theme={null}
  { "success": true }
  ```
</ResponseExample>

## Error Codes

| HTTP Status | Error Code                                                          | Description                                                      |
| ----------- | ------------------------------------------------------------------- | ---------------------------------------------------------------- |
| 404         | `child_not_found` / `key_not_found`                                 | No such child or key.                                            |
| 403         | `not_a_parent_account` / `insufficient_scope` / `sandbox_read_only` | See [Accounts & Hierarchy](/api-reference/v2/accounts/overview). |

<Note>
  Revoking is permanent. To temporarily pause a whole child (all its keys at once) without revoking, [suspend the child](/api-reference/v2/accounts/suspend-child) instead.
</Note>
