# Batch Relay API authentication

Batch Relay v1 uses scoped bearer API keys, not OAuth. Staging and production keys are separate. Keep keys on a server and send them in the `Authorization: Bearer <api-key>` header.

## Get and manage keys

Use the [Batch Relay developer dashboard](https://developers.batchrelay.com/) for API account and key management. Build and test with a staging key before using production. Never place an API key in browser code, public files, prompts, or logs.

## Scope and current documentation

Request only the permissions the integration needs. Read the current [authentication and API-key scope documentation](https://docs.batchrelay.com/authentication) before making requests, and use the [OpenAPI 3.1 description](https://api.batchrelay.com/openapi.json) as the machine-readable contract.

## Errors

Stop on authentication or authorization errors rather than retrying with broader access. Preserve the response request ID and follow the [error documentation](https://docs.batchrelay.com/errors). Do not invent credentials or infer permission from a failed request.
