Get API key
GET /v1/api-key
Describes the calling API key.
Answers with the key's id, scopes and expiry, and the service identity and organisation it acts for. Needs no scope, so an integration can check its key before it starts.
Authentication
Send an API key, or an access token from your organisation’s identity provider, in the Authorization header. How API keys work
Any API key can call this operation; it needs no scope.
Security schemes in the OpenAPI document: session_cookie (cookie __Host-ivy_session)bearer (bearer)api_key (bearer)
Responses
-
The calling key: its id, scopes and expiry, and the service identity and organisation it acts for
-
unauthenticated: the key is malformed, unknown, revoked or expired, or its service identity is disabled -
api_key_required: the caller is signed in as a person, not with an API key -
rate_limited: the key's requests per minute are used up (Retry-After) -
internal -
unavailable: the database is briefly unavailable; retry afterRetry-Afterseconds
Error codes
Errors come back as an ErrorBody whose code is one of these.
- 401
unauthenticated - 403
api_key_required - 429
rate_limited - 500
internal - 503
unavailable
Examples
curl "$IVY_API_URL/v1/api-key" \
-H "Authorization: Bearer $IVY_API_KEY" import { client, getApiKey } from "@spacivapp/ivy-sdk";
client.setConfig({
baseUrl: process.env.IVY_API_URL,
headers: { Authorization: `Bearer ${process.env.IVY_API_KEY}` },
});
const { data, error, response } = await getApiKey(); {
"expires_at": "2026-01-15T09:30:00Z",
"key_id": "key_123",
"name": "Ada Lovelace",
"organisation_id": "organisation_123",
"scopes": [
"workspaces:read"
],
"service_identity_id": "service_identity_123",
"service_identity_name": "Ada Lovelace"
}