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

# API authentication

> Authenticate LayerRail API requests with personal access tokens, including how to mint, scope, rotate, and revoke tokens for scripts and CI.

LayerRail API requests require a personal access token.

## Header

Send the token in the `Authorization` header:

```bash theme={null}
Authorization: Bearer $LAYERRAIL_TOKEN
```

Example:

```bash theme={null}
curl https://console.layerrail.com/api/project \
  -H "Authorization: Bearer $LAYERRAIL_TOKEN"
```

## Token scope

Tokens inherit access from the account and project permissions used to create them.

Use separate tokens for:

* Local development.
* CI.
* Production automation.
* Temporary scripts.

## Rotate tokens

Rotate a token when:

* A teammate leaves.
* A laptop is lost.
* A CI provider is changed.
* A token may have been exposed.

<Warning>
  Never paste API tokens into public issues, screenshots, browser recordings, or support messages.
</Warning>
