Use this file to discover all available pages before exploring further.
The POST /agent-api-keys endpoint creates a scoped bearer key for a single agent identity. Each key carries an explicit scope list, a rate-limit budget, and an optional expiry. The data.apiKey value is returned only in the create (and rotate) response — AgentRail never exposes it again. Store it in your agent runtime or secret manager before the response is discarded.The first bootstrap request may be sent without an Authorization header, but only when creating a key with the auth:admin scope. All subsequent calls require an existing key with auth:admin.
Required scope: auth:admin — or unauthenticated for the first bootstrap key only.
The data.apiKey value is your secret bearer token. It is returned exactly once. The data.id field (beginning with akey_) is the key identifier used for rotation and usage reporting — it is not the bearer token.
Unique key for safe retries. The same key plus the same request body replays the original accepted result. Reusing the key with a different body returns 409 conflict. Must be 8–128 characters.
Bearer token is missing or invalid on a non-bootstrap request.
403
insufficient_scope
Key does not have auth:admin.
409
conflict
Idempotency-Key was reused with a different body.
429
rate_limited
Rate limit exceeded. Retry after the Retry-After header value.
Use the minimum scope set each agent actually needs. Give auth:admin only to bootstrap and administration agents, never to worker agents that perform coding tasks. See the scopes reference for a full mapping of operations to scopes.