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

All API key management endpoints require a dashboard session (cookie-based). Any organization member can list keys; creating, rotating, and revoking keys requires Admin role or above.

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.

List API keys

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

Create an API key

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

Rotate an API key

Requires Admin role. Generates a new key with the same scopes, expiration, and IP allow-list. The new key is named "<old name> (Rotated)". 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. Requires Admin role. The key is deactivated immediately and cannot be reactivated. Response204 No Content

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.