VocalDocscontracts 1.65.0

Read an API key

GET /v1/api-keys/{key_id}

PropertyValue
Operationget_api_key
GroupAPI keys
Scopeapi_keys:read
Route classread
IdempotencyNo Idempotency-Key
AuditNot audited: A configuration read: a key is answered by its prefix, never its secret, and no read of it is Call content.
Released in1.51.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Answers one key of the Organization by its prefix, never the secret (1.51.0). A developer manages test keys only (access-control-and-isolation.md section 4.2), so its reads answer test keys only and a live key of the Organization is not_found to it. Session only (api.md section 2): the api refuses the route to every API key with forbidden, whatever its scopes; Phase 0 accepts a Member ID token.

Request

Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the api_keys:read scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.

curl "$VOCAL_API/v1/api-keys/key_..." \
  -H "Authorization: Bearer $VOCAL_API_KEY"

Parameters

NameInTypeRequiredDescription
key_idpathApiKeyIdyesThe id of an API key: key_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.

Responses

StatusContent typeShapeError codes
200application/jsonApiKey
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden
404application/jsonErrorEnvelopenot_found
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is ApiKey.

FieldTypeRequiredDescription
created_atTimestampyes
created_byActorRef or nullnoWho made the key (1.52.0): {type: member, id} for a key created through POST /v1/api-keys, {type: operator, id} for one the seed or an operator command made when the api records it, and null when it does not. Absent from an api before 1.52.0. A removed Member keeps its id here; the keys it made stay.
environmentEnvironmentyes
expires_atTimestamp or nullyes
idApiKeyIdyes
last_used_atTimestamp or nullyes
namestringyes
object"api_key"yes
prefixstringyesThe non-secret start of the key, vk_<env>_<lookup>; the full key is vk_<env>_<lookup>_<secret>.
revoked_atTimestamp or nullyes
scopesarray of ApiKeyScopeyes
statusApiKeyStatusyes