Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.batchrelay.com/llms.txt

Use this file to discover all available pages before exploring further.

Every request you send to the Batch Relay API must include a bearer token in the Authorization header. You create and manage your API keys from the developer dashboard, and you control exactly what each key is allowed to do through scopes. This page explains how the authentication model works and what to expect when something goes wrong.

Sending your API key

Include your API key as a bearer token on every request:
Authorization: Bearer br_your_key
You can create, view, and revoke API keys at any time from the developer dashboard:
https://app.batchrelay.com/developers

Scopes

When you create an API key, you assign it one or more scopes. Each scope grants permission to a specific group of actions. Follow the principle of least privilege—only assign the scopes your integration actually needs.
ScopePurpose
print_orders:writeCreate new print orders.
print_orders:readRead print-order status and details.
usage:readRead your account’s usage summary.
webhooks:readRead your webhook configuration.
webhooks:writeCreate or update webhook configuration.
For a typical print order integration, you only need print_orders:write and print_orders:read. Add other scopes only when your integration requires them.

Missing keys

If you send a request without an Authorization header, the API returns a structured error response you can parse and act on:
{
  "error": {
    "code": "api_key_required",
    "message": "Supply a Batch Relay API key using Authorization: Bearer <key>.",
    "docs_url": "https://docs.batchrelay.com/errors#api_key_required",
    "action_url": "https://app.batchrelay.com/developers"
  },
  "request_id": "req..."
}
Every error response includes a request_id. Keep this value when reporting issues—it lets the Batch Relay team trace the exact request in their systems.

Key revocation

Revoked keys stop working immediately. If a bearer token is ever exposed—in a log file, a public repository, or anywhere else—revoke it right away from the developer dashboard and create a replacement key.
Batch Relay stores only a hash, a short prefix, and a masked display value for each key. The full key is shown exactly once at creation time, so there is no way to retrieve it later. Treat your API keys like passwords and store them in environment variables or a secrets manager rather than hardcoding them in your application.