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

# Authentication & API Keys

> Scoped API keys for agents/services and session tokens for Console operators.

Attexra supports two authentication mechanisms depending on whether the caller is a machine integration or an interactive Console operator.

## Service & Agent API Keys (`X-API-Key`)

Machine integrations authenticate using an `X-API-Key` header issued for a specific role and permission set:

```bash theme={null}
curl -sS http://localhost:8080/v1/agents \
  -H "X-API-Key: atx_live_..."
```

Keys are hashed before storage; plaintext secrets are displayed only once upon organisation bootstrap (`POST /v1/organisations`) or key creation (`POST /v1/api-keys`). Keys can carry explicit scopes (`agents:write`, `authorizations:verify`, `financial:write`, `events:read`) and can be revoked immediately (`POST /v1/api-keys/:id/revoke`).

## Interactive Console Sessions (`Bearer`)

Human operators authenticate via `/v1/auth/register` and `/v1/auth/login` to receive a session token scoped to their organisation and user role.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.