Authentication
API keys
Section titled “API keys”Send the key in the X-API-Key header:
curl https://api.uavcrew.ai/v1/auth/validate -H "X-API-Key: uav_..."Keys start with uav_. Keep them on your server; never embed them in a web page or mobile app.
Which key to use
Section titled “Which key to use”| Calling | Use |
|---|---|
| Chat, stream, proposals, documents | The tenant chat key for that customer |
| Tenants | The platform key from your MCP connection |
| Answers | An organization key with answers:regulations |
| Location | An organization key with location:read |
| MCP registration | An organization key with mcp:register |
Scopes
Section titled “Scopes”Each key has scopes that limit what it can call. A call without the right scope returns 403. See the scope list.
Access tokens
Section titled “Access tokens”If you prefer not to send the key on every request, exchange it for a short-lived token:
POST /v1/auth/token
{ "api_key": "uav_..." }{ "access_token": "eyJ...", "refresh_token": "eyJ...", "token_type": "bearer", "expires_in": 3600}Send it as Authorization: Bearer <access_token>. Before it expires, call POST /v1/auth/refresh with { "refresh_token": "..." } for a new one. If a request carries both a key and a token, the key is used.
Check a key
Section titled “Check a key”GET /v1/auth/validate— whether the key is valid, and its scopes.GET /v1/auth/me— who the current key or token belongs to.
