Skip to main content
Server API keys are available on Pro and above. The number of active keys is limited by tier: Pro allows 1, Business allows 5, Enterprise allows 20. The Free tier cannot create API keys.

Authentication

These endpoints accept either a dashboard session cookie or a server API key sent as Authorization: Bearer <key>. Key-authenticated requests are authorized by scope, not by org role. A key may only mint keys with scopes it holds itself — requesting more returns 403.
Org endpoints read the key from Authorization: Bearer only. The X-API-Key header works on the SDK and VRT surfaces, not here.

Key prefixes

Grantiva issues three kinds of keys, distinguishable by prefix: Use keys in server-to-server requests via the Authorization header:
The raw key is returned only once, at creation or rotation time. Only a SHA-256 hash is stored — a lost key cannot be recovered, only rotated.
Key-authenticated requests are rate limited in the apikey bucket — see API Conventions.

List API keys

Returns all API keys for the organization (including revoked ones), sorted by creation date, newest first. Response

Create an API key

Request body
Response200 OK
rawKey is shown only in this response. Store it securely. Errors

Rotate an API key

Generates a new key with the same scopes, expiration, and IP allow-list. The new key is named "<old name> (Rotated)". Rotation does not re-check tier scope availability — an existing key keeps exactly the access it had. Request body (optional)
Response200 OK Same shape as the create response, including the new rawKey (shown once). Errors

Revoke an API key

Both routes are equivalent. The key is deactivated immediately and cannot be reactivated. Response204 No Content Errors

Scopes

Scopes follow a resource:action format. A key with api:all passes every scope check. Scope availability by tier Requesting a scope outside your tier returns 400 with the invalid scopes listed.

See also