← API reference

API Keys API

Manage the organization's API keys. Available on plans with API access, currently Business and Enterprise; other plans get 403.

GET /api-keys

List API keys

Auth: API key (Authorization: Bearer). Scopes: api-keys:read, api-keys:manage.

Requires one of the following scopes: api-keys:read, api-keys:manage. Requires a plan with API access, currently Business and Enterprise (403 otherwise).

Parameters

NameInTypeDescription
limitqueryinteger

Max items to return (1-100).

Default 25 · min 1 · max 100

offsetqueryinteger

Number of items to skip.

Default 0 · min 0

include_inactivequerystring

Always 1

Responses

200 Success

Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days

Response fields
FieldTypeDescription
successboolean required

Always true

dataarray of object required
data[].idinteger
data[].key_idstring
data[].key_prefixstring
data[].namestring
data[].descriptionstring | null
data[].scopesarray of string
data[].rate_limitsobject
data[].rate_limits.per_minuteinteger
data[].rate_limits.per_hourinteger
data[].rate_limits.per_dayinteger
data[].is_activeboolean
data[].usage_countinteger
data[].last_used_atstring | null
data[].expires_atstring | null
data[].created_atstring (date-time)
data[].updated_atstring (date-time) | null
metaobject

Offset pagination metadata (in the top-level meta object).

meta.totalinteger
meta.limitinteger
meta.offsetinteger
meta.has_moreboolean

401 Missing or invalid API key.

Headers: X-Request-ID

Response fields

Shape 1 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.codestring required

e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED.

error.messagestring required
error.retry_afterinteger

Seconds; present on 429 only.

Shape 2 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.messagestring required
error.codestring required

Machine-readable error code, e.g. bad_request, not_found.

error.detailsobject | null

Optional; validation failures put field errors under details.validation_errors.

Accepts any keys

403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).

Headers: X-Request-ID

Response fields

Shape 1 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.codestring required

e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED.

error.messagestring required
error.retry_afterinteger

Seconds; present on 429 only.

Shape 2 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.messagestring required
error.codestring required

Machine-readable error code, e.g. bad_request, not_found.

error.detailsobject | null

Optional; validation failures put field errors under details.validation_errors.

Accepts any keys

429 Rate limit exceeded.

Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID

POST /api-keys

Create an API key

Auth: API key (Authorization: Bearer). Scopes: api-keys:write, api-keys:manage.

Creates a key. The full secret is returned once, only on creation. The new key's scopes, whether requested or the defaults used when scopes is omitted, must be a subset of the caller key's scopes (403 otherwise). A key created without expires_at expires after 90 days.

Requires one of the following scopes: api-keys:write, api-keys:manage. Requires a plan with API access, currently Business and Enterprise (403 otherwise). The calling key must have been created by an organization owner or admin (403 otherwise).

Request body application/json required

FieldTypeDescription
namestring required

max length 100

descriptionstring

max length 500

scopesarray of string

Scopes for the new key. When sent it must be a non-empty array of valid scopes (400 otherwise). When omitted the key gets calls:schedule, calls:read and calls:cancel. Either way the calling key must itself hold every scope the new key gets, or the request is refused with 403.

rate_limit_per_minuteinteger

Default 60 · min 1 · max 1000

rate_limit_per_hourinteger

Default 1000 · min 1 · max 50000

rate_limit_per_dayinteger

Default 10000 · min 1 · max 500000

expires_atstring | null

When the key expires. Omitted: the key expires 90 days after creation. null: the key never expires. Otherwise a date string in the future (400 expires_at must be a valid future date).

Responses

201 Key created (secret shown once)

Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days

Response fields
FieldTypeDescription
successboolean required

Always true

dataobject required
data.idinteger
data.key_idstring
data.keystring
data.key_prefixstring
data.namestring
data.messagestring

400 Invalid request (validation errors under error.details.validation_errors).

401 Missing or invalid API key.

Headers: X-Request-ID

Response fields

Shape 1 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.codestring required

e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED.

error.messagestring required
error.retry_afterinteger

Seconds; present on 429 only.

Shape 2 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.messagestring required
error.codestring required

Machine-readable error code, e.g. bad_request, not_found.

error.detailsobject | null

Optional; validation failures put field errors under details.validation_errors.

Accepts any keys

403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).

Headers: X-Request-ID

Response fields

Shape 1 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.codestring required

e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED.

error.messagestring required
error.retry_afterinteger

Seconds; present on 429 only.

Shape 2 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.messagestring required
error.codestring required

Machine-readable error code, e.g. bad_request, not_found.

error.detailsobject | null

Optional; validation failures put field errors under details.validation_errors.

Accepts any keys

429 Rate limit exceeded.

Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID

GET /api-keys/scopes

List available scopes and presets

Auth: API key (Authorization: Bearer). Scopes: api-keys:read, api-keys:manage.

Requires one of the following scopes: api-keys:read, api-keys:manage. Requires a plan with API access, currently Business and Enterprise (403 otherwise).

Responses

200 Success

Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days

Response fields
FieldTypeDescription
successboolean required

Always true

dataobject required
data.scopesarray of object
data.scopes[].scopestring
data.scopes[].descriptionstring
data.presetsarray of object

401 Missing or invalid API key.

Headers: X-Request-ID

Response fields

Shape 1 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.codestring required

e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED.

error.messagestring required
error.retry_afterinteger

Seconds; present on 429 only.

Shape 2 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.messagestring required
error.codestring required

Machine-readable error code, e.g. bad_request, not_found.

error.detailsobject | null

Optional; validation failures put field errors under details.validation_errors.

Accepts any keys

403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).

Headers: X-Request-ID

Response fields

Shape 1 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.codestring required

e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED.

error.messagestring required
error.retry_afterinteger

Seconds; present on 429 only.

Shape 2 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.messagestring required
error.codestring required

Machine-readable error code, e.g. bad_request, not_found.

error.detailsobject | null

Optional; validation failures put field errors under details.validation_errors.

Accepts any keys

429 Rate limit exceeded.

Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID

GET /api-keys/{id}

Get an API key

Auth: API key (Authorization: Bearer). Scopes: api-keys:read, api-keys:manage.

Requires one of the following scopes: api-keys:read, api-keys:manage. Requires a plan with API access, currently Business and Enterprise (403 otherwise).

Parameters

NameInTypeDescription
idpathinteger required

API key id

Responses

200 Success

Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days

Response fields
FieldTypeDescription
successboolean required

Always true

dataobject required
data.idinteger
data.key_idstring
data.key_prefixstring
data.namestring
data.descriptionstring | null
data.scopesarray of string
data.rate_limitsobject
data.rate_limits.per_minuteinteger
data.rate_limits.per_hourinteger
data.rate_limits.per_dayinteger
data.is_activeboolean
data.usage_countinteger
data.last_used_atstring | null
data.expires_atstring | null
data.created_atstring (date-time)
data.updated_atstring (date-time) | null

401 Missing or invalid API key.

Headers: X-Request-ID

Response fields

Shape 1 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.codestring required

e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED.

error.messagestring required
error.retry_afterinteger

Seconds; present on 429 only.

Shape 2 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.messagestring required
error.codestring required

Machine-readable error code, e.g. bad_request, not_found.

error.detailsobject | null

Optional; validation failures put field errors under details.validation_errors.

Accepts any keys

403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).

Headers: X-Request-ID

Response fields

Shape 1 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.codestring required

e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED.

error.messagestring required
error.retry_afterinteger

Seconds; present on 429 only.

Shape 2 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.messagestring required
error.codestring required

Machine-readable error code, e.g. bad_request, not_found.

error.detailsobject | null

Optional; validation failures put field errors under details.validation_errors.

Accepts any keys

404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).

429 Rate limit exceeded.

Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID

PATCH /api-keys/{id}

Update key metadata

Auth: API key (Authorization: Bearer). Scopes: api-keys:write, api-keys:manage.

Requires one of the following scopes: api-keys:write, api-keys:manage. Requires a plan with API access, currently Business and Enterprise (403 otherwise). The calling key must have been created by an organization owner or admin (403 otherwise). Revoked keys cannot be modified (403). An empty body is a 400.

Parameters

NameInTypeDescription
idpathinteger required

API key id

Request body application/json required

FieldTypeDescription
namestring

max length 100

descriptionstring

max length 500

scopesarray of string

Replaces the key's scopes. Must be a non-empty array (400 otherwise). A retired scope the key already holds is dropped without error; any other invalid scope is a 400, and so is a list with no current scope left. The calling key must itself hold every scope in the list (403 otherwise).

rate_limit_per_minuteinteger

min 1 · max 1000

rate_limit_per_hourinteger

min 1 · max 50000

rate_limit_per_dayinteger

min 1 · max 500000

expires_atstring | null

New expiry. Must be a date string in the future (400 otherwise). null is ignored and leaves the stored expiry unchanged, so an expiry cannot be removed here.

Responses

200 Success

Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days

Response fields
FieldTypeDescription
successboolean required

Always true

dataobject required
data.idinteger
data.key_idstring
data.key_prefixstring
data.namestring
data.descriptionstring | null
data.scopesarray of string
data.rate_limitsobject
data.rate_limits.per_minuteinteger
data.rate_limits.per_hourinteger
data.rate_limits.per_dayinteger
data.is_activeboolean
data.usage_countinteger
data.last_used_atstring | null
data.expires_atstring | null
data.created_atstring (date-time)
data.updated_atstring (date-time) | null

400 Invalid request (validation errors under error.details.validation_errors).

401 Missing or invalid API key.

Headers: X-Request-ID

Response fields

Shape 1 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.codestring required

e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED.

error.messagestring required
error.retry_afterinteger

Seconds; present on 429 only.

Shape 2 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.messagestring required
error.codestring required

Machine-readable error code, e.g. bad_request, not_found.

error.detailsobject | null

Optional; validation failures put field errors under details.validation_errors.

Accepts any keys

403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).

Headers: X-Request-ID

Response fields

Shape 1 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.codestring required

e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED.

error.messagestring required
error.retry_afterinteger

Seconds; present on 429 only.

Shape 2 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.messagestring required
error.codestring required

Machine-readable error code, e.g. bad_request, not_found.

error.detailsobject | null

Optional; validation failures put field errors under details.validation_errors.

Accepts any keys

404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).

429 Rate limit exceeded.

Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID

DELETE /api-keys/{id}

Permanently delete a key

Auth: API key (Authorization: Bearer). Scopes: api-keys:delete, api-keys:manage.

Requires one of the following scopes: api-keys:delete, api-keys:manage. Requires a plan with API access, currently Business and Enterprise (403 otherwise). The calling key must have been created by an organization owner or admin (403 otherwise).

Parameters

NameInTypeDescription
idpathinteger required

API key id

Responses

204 Deleted

400 Invalid request (validation errors under error.details.validation_errors).

401 Missing or invalid API key.

Headers: X-Request-ID

Response fields

Shape 1 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.codestring required

e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED.

error.messagestring required
error.retry_afterinteger

Seconds; present on 429 only.

Shape 2 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.messagestring required
error.codestring required

Machine-readable error code, e.g. bad_request, not_found.

error.detailsobject | null

Optional; validation failures put field errors under details.validation_errors.

Accepts any keys

403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).

Headers: X-Request-ID

Response fields

Shape 1 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.codestring required

e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED.

error.messagestring required
error.retry_afterinteger

Seconds; present on 429 only.

Shape 2 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.messagestring required
error.codestring required

Machine-readable error code, e.g. bad_request, not_found.

error.detailsobject | null

Optional; validation failures put field errors under details.validation_errors.

Accepts any keys

404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).

429 Rate limit exceeded.

Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID

POST /api-keys/{id}/revoke

Revoke (deactivate) a key

Auth: API key (Authorization: Bearer). Scopes: api-keys:write, api-keys:manage.

Requires one of the following scopes: api-keys:write, api-keys:manage. Requires a plan with API access, currently Business and Enterprise (403 otherwise). The calling key must have been created by an organization owner or admin (403 otherwise).

Parameters

NameInTypeDescription
idpathinteger required

API key id

Responses

200 Success

Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days

Response fields
FieldTypeDescription
successboolean required

Always true

dataobject required
data.messagestring

400 Invalid request (validation errors under error.details.validation_errors).

401 Missing or invalid API key.

Headers: X-Request-ID

Response fields

Shape 1 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.codestring required

e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED.

error.messagestring required
error.retry_afterinteger

Seconds; present on 429 only.

Shape 2 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.messagestring required
error.codestring required

Machine-readable error code, e.g. bad_request, not_found.

error.detailsobject | null

Optional; validation failures put field errors under details.validation_errors.

Accepts any keys

403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).

Headers: X-Request-ID

Response fields

Shape 1 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.codestring required

e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED.

error.messagestring required
error.retry_afterinteger

Seconds; present on 429 only.

Shape 2 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.messagestring required
error.codestring required

Machine-readable error code, e.g. bad_request, not_found.

error.detailsobject | null

Optional; validation failures put field errors under details.validation_errors.

Accepts any keys

404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).

429 Rate limit exceeded.

Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID

POST /api-keys/{id}/rotate

Rotate a key with grace period

Auth: API key (Authorization: Bearer). Scopes: api-keys:write, api-keys:manage.

Issues a replacement key with the same scopes, rate limits and expiry as the old one. The old key keeps working until old_key_expires_at, and its name gains a " (rotating - expires ...)" suffix.

Requires one of the following scopes: api-keys:write, api-keys:manage. Requires a plan with API access, currently Business and Enterprise (403 otherwise). The calling key must have been created by an organization owner or admin (403 otherwise). The calling key must hold every scope of the key being rotated (403), and both keys must have been issued by the same user (403). An inactive key, or one whose stored scopes cannot be read, cannot be rotated (400). grace_period_hours outside 1 to 168 is a 400.

Parameters

NameInTypeDescription
idpathinteger required

API key id

Request body application/json

FieldTypeDescription
grace_period_hoursinteger

Default 24 · min 1 · max 168

Responses

201 Key rotated

Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days

Response fields
FieldTypeDescription
successboolean required

Always true

dataobject required
data.new_keyobject

The replacement key, in the same shape as the create response. key is the full secret and is shown only here.

data.new_key.idinteger
data.new_key.key_idstring
data.new_key.keystring
data.new_key.key_prefixstring
data.new_key.namestring
data.new_key.messagestring
data.old_key_idinteger
data.grace_period_hoursinteger
data.old_key_expires_atstring

When the old key stops working, as YYYY-MM-DD HH:MM:SS in server time.

data.messagestring

400 Invalid request (validation errors under error.details.validation_errors).

401 Missing or invalid API key.

Headers: X-Request-ID

Response fields

Shape 1 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.codestring required

e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED.

error.messagestring required
error.retry_afterinteger

Seconds; present on 429 only.

Shape 2 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.messagestring required
error.codestring required

Machine-readable error code, e.g. bad_request, not_found.

error.detailsobject | null

Optional; validation failures put field errors under details.validation_errors.

Accepts any keys

403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).

Headers: X-Request-ID

Response fields

Shape 1 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.codestring required

e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED.

error.messagestring required
error.retry_afterinteger

Seconds; present on 429 only.

Shape 2 of 2

FieldTypeDescription
successboolean required

Always false

errorobject required
error.messagestring required
error.codestring required

Machine-readable error code, e.g. bad_request, not_found.

error.detailsobject | null

Optional; validation failures put field errors under details.validation_errors.

Accepts any keys

404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).

429 Rate limit exceeded.

Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID

Ready to build on Vosy?

API access is included with the Business and Enterprise plans. Sign up, choose a plan with API access, and create your own keys from the Vosy API page in your account. Compare plans

Get Started