The Hasp AI API authenticates every request via an API key. No OAuth flow, no session cookies — just a Bearer token.Documentation Index
Fetch the complete documentation index at: https://docs.usehasp.com/llms.txt
Use this file to discover all available pages before exploring further.
API key format
wa_live_ and are globally unique. The full token is shown exactly once on creation. Hasp stores only a SHA-256 hash — if you lose the token, revoke it and issue a new one.
Sending the token
Pass the key in theAuthorization header on every request:
Scopes
Every API key has one or more scopes. A request to a route protected by a scope the key does not have returns403 MISSING_SCOPE.
| Scope | Grants access to |
|---|---|
ai:chat | POST /v1/ai/chat, POST /v1/messages |
ai:documents | Document upload and retrieval endpoints |
ai:embeddings | Embeddings endpoint |
ai:summarize | Summarize endpoint |
control:read | GET /v1/api_keys, GET /v1/usage, GET /v1/usage/budget, PUT /v1/usage/budget, GET /v1/audit |
control:webhooks | GET /v1/webhooks, POST /v1/webhooks, DELETE /v1/webhooks/{id} |
ai:chat.
Creating keys
Via the dashboard: Settings → API Keys → New Key. Via the API (requires a key withcontrol:read):
BAA requirement
All requests additionally require an active Business Associate Agreement (BAA) on your organization. If your org has no active BAA, every request — regardless of key validity — returns:Error responses
| Code | HTTP | Meaning |
|---|---|---|
INVALID_API_KEY | 401 | Token not found, malformed, or revoked |
BAA_REQUIRED | 402 | No active BAA on the org |
MISSING_SCOPE | 403 | Key exists but lacks the required scope |