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

# Delete API Token

> Revoke and delete API tokens

## Delete API Token

Revoke access by deleting API tokens using the `delete_api_token()` method. Pass the **token value** (the `sk-mira-...` string), not the token's `id`.

### Example

```python theme={null}
from mira_network import MiraClient

async def delete_token():
    async with MiraClient(api_key="your-api-key") as client:
        # Pass the full token string (from create_api_token / list_api_tokens)
        await client.delete_api_token("sk-mira-xxxx...")
        print("Token successfully deleted")
```

### Error Handling

```python theme={null}
try:
    await client.delete_api_token("sk-mira-xxxx...")
except Exception as e:
    print(f"Error deleting token: {e}")
```

### Usage Notes

* Pass the `token` value (`sk-mira-...`), not the `id` — deleting by `id` returns `404`
* Deletion is permanent and cannot be undone
* Plan for service disruption if deleting active tokens
