Skip to Content
Xeonr Developer Docs
API Specification

API keys

A team's API keys. Requires a signed-in user; API keys are refused here.

postCreate a team API key

Creates a team-owned API key in Xeonr Auth for CI and returns it with its `secret` (`xk_…`). The secret appears only in this response, because Xeonr Auth stores it hashed. `role` must be `API_KEY_ROLE_EDITOR` (scopes `functions:functions:read` and `functions:functions:edit`) or `API_KEY_ROLE_VIEWER` (`functions:functions:read`). `name` is required (at most 64 characters), `description` is at most 512 characters, and `expiresAt` must be in the future, or unset for a key that never expires. Xeonr Auth may refuse an expiry beyond the application's maximum lifetime. Needs the admin role in the team, held by a signed-in member of it: the key is created on their behalf. Needs a signed-in user: team API keys are refused on every method of this service (`PERMISSION_DENIED`). A `token.create` event is recorded in the activity feed. **Required scopes:** `functions:functions:edit`

postList a team's API keys

Lists the team's API keys as Xeonr Auth reports them, including `fnt_…` tokens imported from before keys moved to Xeonr Auth. Each key comes with its role, scopes, creator, expiry and when it was last used, never its secret. Revoked keys are left out unless `includeRevoked` is set. Pages default to 50 keys and are capped at 500 (`limit`); pass `nextCursor` back as `cursor` until it comes back empty. Needs the admin role in the team. Needs a signed-in user: team API keys are refused on every method of this service (`PERMISSION_DENIED`). **Required scopes:** `functions:functions:edit`

postRevoke a team API key

Revokes one of the team's API keys in Xeonr Auth, by the URN `ListApiKeys` returns. A key that does not exist or belongs to another team is `NOT_FOUND`. Verifiers cache a key's answer for up to 30 seconds, so a revoked key stops working within that time. Needs the admin role in the team. Needs a signed-in user: team API keys are refused on every method of this service (`PERMISSION_DENIED`). A `token.delete` event is recorded in the activity feed. **Required scopes:** `functions:functions:edit`