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

# Authentication

> Authenticate API requests with TeamAI API keys.

## API keys

Every request to the TeamAI API must include an API key in the `x-teamai-api-key` header:

```bash theme={null}
curl https://app.teamai.com/api/v1/projects \
  -H "x-teamai-api-key: YOUR_API_KEY"
```

API keys are created in your workspace under **Settings → API Keys**. Each key is scoped to the workspace it was created in and grants access to that workspace's resources — agents, chats, projects, and skills.

<Warning>
  API keys are secrets. Never expose them in client-side code, mobile apps, or
  public repositories. Requests should always be made from your server.
</Warning>

<Note>
  Publishable chatbot embed keys used by the [Embed SDK](/sdks/embed-sdk/overview)
  are not valid for the REST API and are rejected with `401 not_authenticated`.
</Note>

## Key lifecycle

* Keys do not expire, but they stop working if the member they belong to is removed from the workspace.
* Revoke a key at any time by deleting it from the same settings page where it was created.
* Rotate keys by creating a replacement key first, migrating your integration, then deleting the old key.
