Skip to main content

API keys and scopes

What a call needs from the key depends on the kind of API. Using one of the libraries? Keys lists which key each package needs.

Get a key​

  • Fastest: Get a free API key. One click. Includes $100 of free credits for your first month, no card needed.
  • In the Builder: Developer → API keys → Create API Key. Use this when you want to pick scopes, limits, and allowed origins. See API Keys.

Send the key in the Authorization header, with no Bearer prefix:

curl https://api.autessa.com/clients/aaf/dashboard -H "Authorization: $AUTESSA_API_KEY"

Keep keys on your server. Never put a key in browser or mobile code.

Two kinds of API​

KindAPIsWhat the key needs
Company-scopedSecurePass, AI Application Firewall, Evaluations, Synthetic data, Agent tools, PhoneAny enabled key from your company. No resourceId. Results belong to your company.
Resource-scopedAutessaDB tables, Drive, Agents, ToolsA key that can reach that table, drive, agent, or tool. Send its ID as ?resourceId=.

Company-scoped APIs are products you call directly. A key's resource scope (the tools, agents, and tables you pick when you create it) does not limit them. Every enabled key from your company can call them. Their usage is billed to your company.

Resource-scoped APIs run things you keep in Autessa. The key must include the resource, and the call names it. A developer key from Get a free API key includes every resource you can open:

curl -X POST "https://api.autessa.com/clients/autessadb-drive/search?resourceId=V1StGXR8Z5" \
-H "Authorization: $AUTESSA_API_KEY" -H "Content-Type: application/json" \
-d '{"tableId": "V1StGXR8Z5", "query": "refund policy"}'

The resourceId must match the table or agent ID in the body.

Extra permissions​

A few calls need a permission turned on for the key:

PermissionNeeded for
Word of the dayGET /clients/aaf/word-of-day. Only give it to keys that show the word to your own staff.
Phone numbers (PHONE_MANAGE) PreviewBuying numbers with POST /clients/phone/numbers/purchase. Company admins only.
Run agents locally (AGENT_MODEL_TURN) PreviewRunning a project's agents on your machine with Autessa's models (chat in the Autessa CDK). Only a company admin can give a key this permission.

A key without a needed permission gets 403.

Deploy keys Preview​

The Autessa CDK uses a separate deploy key, created in Settings → Deploy keys. A deploy key belongs to one company (tenant) and carries deploy scopes: DEPLOY_DIFF, DEPLOY_APPLY, DEPLOY_PULL, DEPLOY_ROLLBACK, MODEL_TURN for local agent chats, and HARNESS_CHAT for chatting with a project's agents in the tenant. Company admins create, rotate and revoke them, in the web app or with autessa deploy-keys. Store one per stage, for example AUTESSA_DEPLOY_KEY_DEV and AUTESSA_DEPLOY_KEY_PROD.

When a call is refused​

StatusUsually means
401The key is wrong or disabled, or (on table, Drive, and agent paths) the key can't reach that resourceId.
403The key is valid but lacks a permission.
400 with errorsOn a table: the key lacks READ or WRITE on it.
429Rate limit. Wait for Retry-After, then retry.

Each key has its own rate limits (60 requests per minute and 5,000 per day by default). Change them in Developer → API keys.