# Revoke API key

`opensend api-keys remove`

Revokes an API key at once. Requests that use it are refused from then on.

Needs the scope: `api_keys:write`

## Flags

- `<id>` (string, required): The id of the item. Up to 64 characters.

## Returns

The command prints the answer: as JSON when its output goes to a file or another program, and as a table or a list of fields in a terminal. When the API refuses, the error goes to the error stream and the command ends with a code that names the failure. [Output and scripts](https://opensend.sh/docs/scripting) lists the codes.

- `object` (string): What kind of thing was removed. One of: `list`, `email`, `broadcast`, `audience`, `template`, `template_version`, `template_starter`, `automation`, `metrics`, `domain`, `api_key`, `webhook`, `log`, `workspace`, `member`, `method`, `account`, `inbound_email`, `webhook_delivery`, `contact`, `plan`, `checkout`, `invoice`, `ask_answer`, `suppression`, `chat`, `automation_run`, `event`, `event_receipt`, `import`, `import_inventory`, `topic`, `contact_property`, `image`, `server`.
- `id` (string): The id of what was removed.
- `deleted` (true): Always `true`: it is gone for good.

## Example

CLI:

```bash
opensend api-keys remove key_03 --yes
```

Answer:

```json
{
  "object": "api_key",
  "id": "key_03",
  "deleted": true
}
```
