API keys
Create Autonnel API keys for the REST API and MCP server: Bearer auth, read-only by default with a per-key Write switch, hashed storage, instant revocation.
API keys authenticate requests to the external API at /api/v1.1/* and to the MCP server at /api/mcp. Each user can hold multiple keys, and each key independently controls whether write operations are permitted.
Creating a key
- Go to Settings → API Keys.
- Click + New key.
- Enter a name to identify the key (e.g., “Zapier integration” or “Claude Desktop”).
- Click Create.
- Click Copy in the confirmation banner.
- If the key will create or change data, turn on the Write switch for it in the key list. See Write access below.
The key value is shown exactly once in the confirmation banner. Copy it before dismissing. Autonnel stores only a SHA-256 hash of the key; there is no way to retrieve the original value later.
Using a key
Pass the key in the Authorization header on every request:
GET /api/v1.1/orders HTTP/1.1
Authorization: Bearer <your-key-value>
All external API endpoints require this header. Requests without a valid key return 401 Unauthorized.
Handing a key to an AI agent
Below the key list, Use with an AI agent holds a ready-to-paste message for any agent that can make HTTP requests. It contains the key and the link to the skill this deployment serves at /SKILL.md, and it tells the agent to call this deployment’s API with that key. Right after you create a key it contains that key; otherwise it shows YOUR_API_KEY for you to replace. Click Copy, paste it into the agent and add your task. Turn on Write for the key if the agent should build or change pages. See Edit a page with an AI agent.
Write access
Each key has a writeAccess boolean flag, shown as the Write switch in the key list. New keys start read-only.
writeAccess | Allowed methods |
|---|---|
false (default) | GET only |
true | GET, POST, PUT, DELETE |
Read-only keys are suitable for reporting integrations and monitoring. Write keys are needed for endpoints that create or mutate data, such as marking an order as delivered.
Toggle the Write switch to change it at any time. The change applies to the next request made with that key.
Revoking a key
Click Delete next to any key in Settings → API Keys. Revocation takes effect immediately — no cache delay. Any in-flight request that reached the server before revocation will still complete.
Key scope
A key’s effective permissions are the union of the creating user’s role features. If the user is later assigned a more restrictive role, keys created before that change retain the previous effective access until revoked and recreated.
Usage tracking
Every request authenticated with an API key is logged with:
- Key ID (not the raw key value)
- HTTP status code returned
- Latency in milliseconds
Logs are visible in the API key detail view and are useful for debugging integration failures.
Key storage details
The full key value is never stored. Only a display prefix (first 8 characters) and a SHA-256 hash are retained. The display prefix lets you identify which key is which in the list without exposing the secret.
Caveats
- Lost keys cannot be recovered. If you lose the key value, delete it and create a new one.
- Keys are user-scoped. The effective permissions come from the creating user’s roles. Deleting a user also deletes all their keys.
- Do not commit keys to source code or version control. A key is equivalent to a username and password for the external API. Store it in a secrets manager or environment variable.
- Use one key per integration or agent. Deleting a key then cuts off exactly one client.
Related
- External API overview — list of all
/api/v1.1/*endpoints. - MCP server — use the same API key to authenticate AI agents.
- Tutorial: edit a page with an AI agent — from new key to a published edit.
- Permissions — how user roles govern API key scope.