# Authentication

Choose the right credential for the REST API, email previews, or MCP.

## REST API keys

| Operation | Header | Notes |
| --- | --- | --- |
| POST upload with an account, PUT upload, GET profile, DELETE project | `x-api-key: <key>` | Generate in [Manage Account → API Key](https://tiiny.host/manage). Dashboard API-key access starts on Solo. |
| POST upload for an address without an account | `x-email: <address>` | Use only one of the two upload credential headers. |
| POST request or verify sign-in code | JSON `email` or `x-email: <address>` | Email identifies the account. Verification also requires the one-time code. |

`401` can mean a missing key. `403` means the key is unknown or its API access is disabled. Rotating a key invalidates the previous key. Keep the key in an environment variable or secret manager. Redact it from logs and profile responses.

## Email preview and sign-in

[Publish a temporary preview](../guides/email-previews/) for a new address. Exchange a verified four-character email code for a key via [Request a sign-in code](../reference/request-sign-in-code/) and [Verify a sign-in code](../reference/verify-sign-in-code/).

## MCP authentication

[Choose an MCP endpoint](../guides/mcp/#choose-an-endpoint) for email sign-in, a key in your client settings, or OAuth for the ChatGPT connector.
