API Keys
These endpoints let a poweruser credential create and manage client API keys: the scoped keys that call the client-side execution API (/clients/…). They mirror the Builder's API Management page one-for-one. Every key belongs to the person who created it, is private to them unless shared, and can never reach more than they can.
Only client keys are managed here. Poweruser keys (pwrusr:…), CLI keys, and the keys behind webhook handlers are created, rotated and revoked from the Builder only. Every request follows the same rules as the Builder: the caller becomes the owner of any key it creates, nothing a key is given may exceed the caller's own access, and a key's identity is always set by Autessa, never by the request.
Base URL
https://api.autessa.com/autessa_poweruser/keys
All endpoints are POST with a JSON body. Authenticate with a poweruser key or temporary credential in the Authorization header (no Bearer prefix):
Authorization: pwrusr:{id}:{secret}
Key management isn't available to hosted apps: the key endpoints can't be added to an app's allowedPoweruserEndpoints (see poweruser endpoint options). Call them with your own poweruser key.
Who can do what
Every key in a response carries an access object describing what you may do with it, so a client can turn actions on or off without guessing.
| Action | Who |
|---|---|
See the key (/get, /all, usage) | Its owner, anyone it is shared with, and company Admins |
| Narrow it (lower limits, remove resources or operations, disable) | Its owner, and people it is shared with at WRITE or ADMIN |
| Widen it, rotate it, share it | Its owner, or someone it is shared with at ADMIN who can reach everything the key can |
| Disable or delete it | Its owner, people it is shared with at ADMIN, and company Admins |
| Claim a legacy key | Company Admins who can reach everything the key can |
Keys are shared through the standard sharing endpoints with resource type API_KEY at READ, WRITE, or ADMIN. Sharing a key never reveals its secret.
The API key object
- Name
id- Type
- string
- Description
Opaque id of the key — the prefix before the
:in the secret value.
- Name
keyName- Type
- string
- Description
Display name shown in the key list.
- Name
keyDescription- Type
- string
- Description
What the key is used for.
- Name
allResources- Type
- boolean
- Description
When
truethe key may access every resource in the company andpermissionsis ignored.
- Name
permissions- Type
- array<object>
- Description
Per-resource-type grants:
{ resourceType: "TOOL" | "AGENT" | "MANAGER" | "AUTESSADB" | "CUSTOM_WEBHOOK" | "ESIGNATURE_ENVELOPE", resourceIds: string[] }. An emptyresourceIdsacts as a wildcard for that type.
- Name
isEnabled- Type
- boolean
- Description
A disabled key authenticates to nothing.
- Name
rateLimitPerMinute- Type
- integer
- Description
Per-minute cap (default 60).
- Name
rateLimitPerDay- Type
- integer
- Description
Per-day cap (default 5000; must be ≥
rateLimitPerMinute).
- Name
allowedOrigins- Type
- array<string>
- Description
Optional CORS allowlist; empty means unrestricted.
- Name
metadata.autessaDbMetadata- Type
- object
- Description
{ globalAllowedOperations: ["READ","WRITE","DELETE"], tablePermissions: { "<tableId>": ["READ","WRITE"] } }— per-table operation overrides win over the global set. An absent/empty list means all operations are allowed.
- Name
identityMode- Type
- string
- Description
How the key acts:
ACT_AS_OWNER(default) runs requests as the owner, narrowed to the key's scope;SERVICE_ROLEruns them as the key itself, limited to the AutessaDB roles inserviceRoleIdsand never more than the owner can see. Keys withallowedOriginsmust beSERVICE_ROLE.
- Name
serviceRoleIds- Type
- array<string>
- Description
For
SERVICE_ROLEkeys, the AutessaDB roles assigned to the key. On a table where none of these roles applies, the key sees no rows. You can assign only roles on tables you administer.
- Name
ownerUserId- Type
- string
- Description
Read-only. The user who owns the key — whoever created it. Absent on legacy keys.
- Name
ownerName- Type
- string
- Description
Read-only. The owner's display name.
- Name
legacy- Type
- boolean
- Description
Read-only.
truefor a key created before keys had owners. Legacy keys keep working, are listed only for company Admins, and can be claimed with/claim(below).
- Name
access- Type
- object
- Description
Read-only. What the caller may do with this key:
canView,canEdit(narrow),canWiden,canRotate,canShare,canDisable,canDelete(booleans), androtateBlockedReason(string, present whencanRotateisfalse).
{
"keyName": "support-internal-scripts",
"keyDescription": "Used by the support desk's trigger and scheduled scripts.",
"allResources": false,
"isEnabled": true,
"rateLimitPerMinute": 600,
"rateLimitPerDay": 200000,
"permissions": [
{ "resourceType": "AUTESSADB", "resourceIds": ["fQMiNu10sCdT", "6m3BMDOhub7D"] },
{ "resourceType": "TOOL", "resourceIds": ["DVb0iQNqSxOE"] }
],
"metadata": {
"autessaDbMetadata": {
"globalAllowedOperations": ["READ"],
"tablePermissions": { "fQMiNu10sCdT": ["READ", "WRITE"], "6m3BMDOhub7D": ["READ", "WRITE"] }
}
}
}
Create Key POST/create
Mints a new client key and returns its secret exactly once. Every table, operation, tool, agent, and role you give the key is checked against your own access; a request that asks for more is refused with a message naming the resource.
Request Body
- Name
apiKey- Type
- object
- Description
The desired configuration — see The API key object. The caller becomes the owner.
isSystemKeyand any identity settings inmetadata(linked user, CLI, or app scoping) are ignored.
Response
- Name
keyValue- Type
- string
- Description
The full secret, formatted
{keyId}:{secret}. Store it now; it is never returned again.
- Name
apiKey- Type
- object
- Description
The stored configuration (without the secret).
- Name
errors- Type
- array<string>
- Description
Array of error messages. Absent on success.
curl https://api.autessa.com/autessa_poweruser/keys/create \
-H "Authorization: $POWERUSER_KEY" \
-H "Content-Type: application/json" \
-d '{"apiKey": {"keyName": "support-internal-scripts", "allResources": false, "isEnabled": true}}'
{
"keyValue": "c1f2a3b4-5d6e-4789-9abc-0def12345678:Xk9…",
"apiKey": { "id": "c1f2a3b4-5d6e-4789-9abc-0def12345678", "keyName": "support-internal-scripts", "isEnabled": true }
}
Get Key POST/get
Fetches one key's configuration (never the secret). Keys outside your company, and keys you can't see, report as not found.
Request Body
- Name
apiKeyId- Type
- string
- Description
Id of the key.
Response
- Name
apiKey- Type
- object
- Description
See The API key object.
curl https://api.autessa.com/autessa_poweruser/keys/get \
-H "Authorization: $POWERUSER_KEY" \
-H "Content-Type: application/json" \
-d '{"apiKeyId": "c1f2a3b4-5d6e-4789-9abc-0def12345678"}'
List Keys POST/all
Lists client keys (secrets never included). Not paginated.
Request Body
- Name
view- Type
- string
- Description
MINE(default): keys you own and keys shared with you.ALL: every key in the company, including legacy keys — company Admins only.
Response
- Name
apiKeys- Type
- array<object>
- Description
The keys.
curl https://api.autessa.com/autessa_poweruser/keys/all \
-H "Authorization: $POWERUSER_KEY" \
-H "Content-Type: application/json" \
-d '{}'
Update Key POST/update
Replaces the stored configuration wholesale — start from the entity returned by /get. Does not rotate the secret and does not itself grant per-resource permissions. The owner and the identity settings in metadata can't be changed here and are ignored. Someone the key is shared with at WRITE may only narrow it; widening it (more resources, operations, or roles, or higher limits) requires access.canWiden. Every grant is re-checked against both the owner's access and yours.
Request Body
- Name
apiKeyId- Type
- string
- Description
Id of the key.
- Name
updatedApiKey- Type
- object
- Description
The complete desired configuration.
curl https://api.autessa.com/autessa_poweruser/keys/update \
-H "Authorization: $POWERUSER_KEY" \
-H "Content-Type: application/json" \
-d '{"apiKeyId": "c1f2…", "updatedApiKey": {"id": "c1f2…", "keyName": "support-internal-scripts", "rateLimitPerMinute": 120, "isEnabled": true}}'
Refresh Key POST/refresh
Rotates the secret. The previous secret stops working the moment this succeeds; the new value is returned once.
Only the owner, or someone the key is shared with at ADMIN who can reach everything the key can, may rotate it. Poweruser, CLI, webhook-handler, and system keys can't be rotated here. Otherwise the call returns 403 with "You can't rotate this key because it can reach data you can't."
Request Body
- Name
apiKeyId- Type
- string
- Description
Id of the key.
Response
- Name
keyValue- Type
- string
- Description
The new secret,
{keyId}:{secret}.
curl https://api.autessa.com/autessa_poweruser/keys/refresh \
-H "Authorization: $POWERUSER_KEY" \
-H "Content-Type: application/json" \
-d '{"apiKeyId": "c1f2a3b4-5d6e-4789-9abc-0def12345678"}'
Enable / Disable Key POST/enable · /disable
/disable makes the key authenticate to nothing immediately (it is not deleted). /enable re-activates it with its existing secret.
Request Body
- Name
apiKeyId- Type
- string
- Description
Id of the key.
curl https://api.autessa.com/autessa_poweruser/keys/disable \
-H "Authorization: $POWERUSER_KEY" \
-H "Content-Type: application/json" \
-d '{"apiKeyId": "c1f2a3b4-5d6e-4789-9abc-0def12345678"}'
Delete Key POST/delete
Permanently deletes a key. The key must already be disabled.
Request Body
- Name
apiKeyId- Type
- string
- Description
Id of the key.
Response
- Name
deleted- Type
- boolean
- Description
Whether the key was deleted.
curl https://api.autessa.com/autessa_poweruser/keys/delete \
-H "Authorization: $POWERUSER_KEY" \
-H "Content-Type: application/json" \
-d '{"apiKeyId": "c1f2a3b4-5d6e-4789-9abc-0def12345678"}'
Claim Legacy Key POST/claim
Makes the caller the owner of a legacy key (one with legacy: true) and turns it into an ACT_AS_OWNER key that follows every rule on this page. The secret doesn't change. Company Admins only, and only when the caller can reach everything the key can.
Request Body
- Name
apiKeyId- Type
- string
- Description
Id of the legacy key.
Response
- Name
apiKey- Type
- object
- Description
The claimed key, now with
ownerUserIdset andlegacy: false.
curl https://api.autessa.com/autessa_poweruser/keys/claim \
-H "Authorization: $POWERUSER_KEY" \
-H "Content-Type: application/json" \
-d '{"apiKeyId": "c1f2a3b4-5d6e-4789-9abc-0def12345678"}'
Permissions POST/permissions/…
Adjust a key's scoped grants. All are no-ops on a key with allResources = true. Adding a grant requires access.canWiden and is checked against your access and the owner's; removing one requires access.canEdit.
| Path | Body | Effect |
|---|---|---|
/permissions/add-resource | { apiKeyId, resourceType, resourceId } | Grant one resource. |
/permissions/add-group | { apiKeyId, permissions: { resourceType, resourceIds } } | Grant a set of resources of one type. |
/permissions/delete-specific | { apiKeyId, resourceType, resourceId } | Revoke one resource grant. |
/permissions/set-all-for-type | { apiKeyId, resourceType } | Replace per-id grants with a wildcard for the type. |
/permissions/remove-all-for-type | { apiKeyId, resourceType } | Revoke every grant of the type. |
resourceType is one of TOOL, AGENT, MANAGER, AUTESSADB, CUSTOM_WEBHOOK, ESIGNATURE_ENVELOPE.
curl https://api.autessa.com/autessa_poweruser/keys/permissions/add-resource \
-H "Authorization: $POWERUSER_KEY" \
-H "Content-Type: application/json" \
-d '{"apiKeyId": "c1f2…", "resourceType": "AUTESSADB", "resourceId": "fQMiNu10sCdT"}'
Monthly Usage POST/transactions/monthly-stats
Aggregated request counts for a key in a given month, broken down by endpoint, agent, and tool.
Request Body
- Name
apiKeyId- Type
- string
- Description
Id of the key.
- Name
year- Type
- integer
- Description
Four-digit year.
- Name
month- Type
- integer
- Description
Month (1–12).
curl https://api.autessa.com/autessa_poweruser/keys/transactions/monthly-stats \
-H "Authorization: $POWERUSER_KEY" \
-H "Content-Type: application/json" \
-d '{"apiKeyId": "c1f2…", "year": 2026, "month": 8}'
Errors
Refusals come back with HTTP 400 or 403 and a plain-language message:
| Message | Why |
|---|---|
| You can't give this key access to table “Orders” because you don't have WRITE access to it. | A grant asked for more than you or the key's owner hold. The same wording names tools, agents, and roles. |
| You can't rotate this key because it can reach data you can't. | You aren't the owner, and the key reaches tables, rows, tools, or agents you can't. |
| Keys used on websites (allowed origins) must use their own role, not act as you. | A key with allowedOrigins was saved as ACT_AS_OWNER. |