# Create and manage API keys

> Permissions, expiry, turning a key off and revoking it.

Every request to the API and the MCP server carries a workspace API key in the `x-api-key` header. A key belongs to one workspace, spends that workspace's credits and acts as the member who created it. There is no OAuth flow.

## Create a key

1. Open **API keys** in your workspace sidebar and create a key.
2. Fill in:
   - **Name**: what it is for, such as "Production API Key".
   - **Permission**: what the key may do, up to your own role.
   - **Note** (optional).
   - **Expiration** (optional): leave it empty for no expiration.
3. Save and copy the key. It is shown once.

| Permission | Can |
| --- | --- |
| `read` | Call the phone lookups and read the workspace's usage and activity |
| `write` | Everything `read` can, plus make changes, like a workspace member |
| `admin` | Everything the key's owner can do in the workspace, including managing API keys |

A request a key may not make answers `403`.

## Keep keys safe

- Keep keys on your server, never in browser code, analytics events or shared spreadsheets.
- Use one key per app or environment, so you can turn one off without touching the others.
- Never paste a key into a chat or an email, including to Phone-Check.app support.

## Turn a key off or revoke it

- Switch **Enabled** off on the key to pause it without deleting it.
- Delete the key to revoke it: it stops working at once.

To rotate a key, create the new one, deploy it, then delete the old one. If a key leaks, delete it straight away and create a new one.

**Usage** shows the credits each API key spent; see [Track your credit usage](https://support.phone-check.app/plans-and-billing/track-your-credit-usage).
