API keys
Create keys with full, agent, read-only or custom access, the permissions table and limiting a key to some tools.
An API key lets your backend call the API, the SDK and MCP servers in API key mode. Each key belongs to one project. By default a new key gets only what an agent needs; you can give it full access, read-only access, a permission list of your own, and limit which tools it can run.
Create a key
Owners and admins open API keys in a project and choose Create API key.
- Name: what the key is for, for example
support-agent-prod. - Expiration: never, 30 days, 90 days or 1 year.
- Access: one of four choices (below). Agent is preselected.
- Limit which tools it can run (optional): toolkits and single tool slugs.
The secret (sk_...) is shown once. Store it in your server's secret manager; the dashboard only
keeps its prefix. A project can have 50 active keys.
A key's access can't be changed after it is created. To change it, create a new key with the
access you want, switch your app over, then revoke the old key. This keeps every request's check
simple and the audit log clear: api_key.created records the permissions and
the allowed toolkits and tools of the key.
Access
| Access | Permissions | Use it for |
|---|---|---|
| Full access | every permission below, now and in the future | admin scripts that manage auth configs, triggers and more |
| Agent | tool:execute, auth_config:read, connected_account:read, connected_account:write | an agent that connects its users and runs tools |
| Read only | auth_config:read, connected_account:read, trigger:read, webhook_endpoint:read, mcp_server:read, logs:read, usage:read, audit:read, automation:read | dashboards, monitoring and exports |
| Custom | the permissions you tick | anything else |
Keys created before restricted keys existed have full access, and keep it.
Permissions
| Permission | Lets the key |
|---|---|
auth_config:read | list and read auth configs |
auth_config:write | create, change and delete auth configs |
connected_account:read | list and read connected accounts, read a remote MCP app's tool manifest |
connected_account:write | start a connection, reconnect, refresh and delete connected accounts |
connected_account:token | read a connected account's live credentials for a client server (POST /api/v1/connected_accounts/{id}/credentials); never part of full access, grant it explicitly |
tool:execute | run tools (POST /tools/{slug}/execute), use MCP servers in API key mode, refresh a remote MCP app's tools |
trigger:read | list and read triggers |
trigger:write | create, change, enable, disable and delete triggers, rotate their secrets, send test events, redeliver events |
webhook_endpoint:read | read the project webhook endpoint |
webhook_endpoint:write | set, rotate and remove the project webhook endpoint |
mcp_server:read | list and read MCP servers and their per-user URLs |
mcp_server:write | create, change and delete MCP servers, create and revoke per-user URLs (needs tool:execute) |
logs:read | read tool execution logs and trigger deliveries |
usage:read | read usage |
audit:read | read the audit log |
automation:read | list and read automations, their versions, runs and templates, and preview them |
automation:write | create, edit, publish, pause, enable and delete automations, start test runs, re-run and cancel runs (needs tool:execute; not allowed on a key limited to some toolkits or tools) |
Every key, whatever its access, can read the catalog (/toolkits, /toolkit_categories,
/tools, /trigger_types) and call GET /whoami. Keys never manage keys, members, billing,
organizations or projects: those stay in the dashboard.
A key without the permission a route needs gets 403 insufficient_scope. details.required
names the permission. The check runs before the body is read, so a missing permission is never
reported as a validation error:
{
"error": {
"code": "insufficient_scope",
"message": "This API key lacks the trigger:write permission",
"details": { "required": "trigger:write" }
}
}Limit the tools
Limit which tools it can run narrows the tools the key may see and run:
- Toolkits: up to 50. Every tool of a listed toolkit is allowed, including tools added later.
- Tool slugs: up to 200 single tools, for example
SLACK_SEND_MESSAGE, from any toolkit.
A tool is allowed when its toolkit or its slug is listed. Both lists are checked against the
project's tools when you create the key, including its remote MCP apps; an unknown slug fails with
400 validation_error.
With a tool restriction:
GET /toolsreturns only the allowed tools, and its counts and cursor cover only those.GET /toolkitsis the public catalog and is not filtered.GET /tools/{slug}andPOST /tools/{slug}/executefor any other tool answer403 tool_not_allowedwithdetails.tool. Nothing runs, nothing is logged and nothing counts toward usage.- In MCP API key mode,
tools/listshows only the server's tools that the key may use. - Connected accounts and triggers are not filtered. The restriction is about running tools.
{
"error": {
"code": "tool_not_allowed",
"message": "This API key may not use GITHUB_DELETE_REPOSITORY",
"details": { "tool": "GITHUB_DELETE_REPOSITORY" }
}
}A tool restriction needs Agent, Read only or Custom access, and the key can't have
mcp_server:write or automation:write. A key that could create MCP servers and per-user URLs,
or build automations, could run any tool through them and escape its own
restriction, so the API refuses that combination with 400 validation_error.
A permission list with mcp_server:write or automation:write must also include
tool:execute. A per-user MCP URL and an automation both run tools, so the key could otherwise
run tools without being allowed to. The API refuses either permission without tool:execute
with 400 validation_error on permissions. Full access keys are not affected.
Check a key
GET /api/v1/whoami needs no permission. It returns the key's project and organization and its
access: api_key.permissions (null means full access), api_key.allowed_toolkits and
api_key.allowed_tools (both null means no tool restriction).
{
"kind": "api_key",
"api_key": {
"id": "key_01jd8z4k7q3m2x9v5n6b0c1t2r",
"name": "support-agent-prod",
"prefix": "sk_9fQ2xLm8",
"permissions": ["tool:execute", "connected_account:read", "connected_account:write"],
"allowed_toolkits": ["github"],
"allowed_tools": ["SLACK_SEND_MESSAGE"]
},
"project": { "id": "proj_01jd8...", "name": "Support", "slug": "support" },
"organization": { "id": "org_01jd8...", "name": "Acme", "slug": "acme" }
}In the SDK the two errors are ToolwireInsufficientScopeError (with required) and
ToolwireToolNotAllowedError (with tool). The providers hand tool_not_allowed back to the
model as a tool error, so the model can tell the user; see TypeScript SDK.
Revoke a key
Revoke on the key's row ends it on the next request (401 invalid_api_key). Keys belong to
the project, not to the person who created them: removing a member or deleting their account keeps
their keys working until you revoke them.
Next steps
- Who may create keys: Members and roles.
- Use a key from code: TypeScript SDK.
- Use a key with an MCP server: MCP.

