Skip to main content
Create API keys from your own tools, for example to give each new customer integration or each environment its own key, without going through Studio > API Keys. These endpoints are not available as MCP tools.

Authentication

Listing keys requires an API key with the api_keys:read scope; creating and revoking keys requires api_keys:write. These scopes can only be granted to API keys, not to OAuth connections. See API Key Authentication to create the first key in AGO.

What a key can create

A key never gives more access than it has:
  • Scopes: the new key can only have scopes the creating key holds. A write scope lets it give the matching read scope, and only a key with * can give *.
  • IP allowlist: when the creating key only accepts some IP addresses, the new key gets the same allowlist by default. You can give it a narrower one, such as a single address from the same range, but not a wider one.
  • Expiry: when the creating key expires, or was rotated and is in its grace period, the new key gets the same end date by default. You can choose an earlier date, but not a later one.
  • Owner: the new key has the same owner as the key that creates it. Features that act as the key’s owner, such as resolutions:write, act as that person.
A key only lists and revokes its direct managed children: those it created and those transferred to it by rotation. Unrelated keys created from Studio > API Keys are not visible to it. A delegated key is usable only while its parent and all ancestors remain usable. Keys can be created up to 10 levels below a key created in Studio > API Keys. Revoking a key, through the API or in Studio > API Keys, also revokes the keys it currently manages and their descendants. After you rotate a key, its replacement manages the keys the old one created, including those created during the grace period. Revoking the old secret does not revoke the children transferred to its replacement. Those new keys still expire no later than the end of the old key’s grace period. Once the replacement is revoked, the old key can no longer create keys. Keys with the apps:invoke scope cannot be created through the API: create them from the app’s page.

Create a key

The response has status 201 and contains the new key in key. Store it right away: it is returned only once.

Errors

List keys

Returns your key’s direct managed children, newest first, revoked ones included, as a paginated list. Secrets are never returned.

Get a key

Returns 404 for a key outside your key’s direct managed children.

Revoke a key

Revokes the key immediately, together with the keys it currently manages and their descendants, and returns it with is_active set to false. A revoked key cannot be restored. Returns 404 for a key outside your key’s direct managed children.