Skip to navigation

Create an API key

Creates an API key with a context of its own; the secret is shown only in this answer.

Authentication

AuthorizationBearer

An API key: Authorization: Bearer bl_live_….

OR
AuthorizationBearer

Blende’s apps: a sign-in JWT, sent with Blende-Context-Key.

Headers

Idempotency-KeystringOptional<=255 characters

A unique key per call; a retry with it answers the first result.

Request

This endpoint expects an object.
namestringRequired
Its label.
scopeslist of enumsRequired
Its scopes.
Allowed values:
expires_atdatetimeOptional

RFC 3339: when it expires; never if absent.

Response headers

Cache-ControlenumOptional

Always no-store.

Allowed values:
Request-IdstringOptional
The request's id.
RateLimitstringOptional
The quota left in the current window.
RateLimit-PolicystringOptional

The rate-limit policy in force.

Response

The new key with its secret.
idstring

The key’s id, e.g. bl_live_3fQ….

namestring
Its label.
scopeslist of enums
Its scopes.
Allowed values:
created_atdatetime

RFC 3339: when it was created.

last_used_atdatetime or null

RFC 3339: when it was last used; null if never.

secretstring
The full key, shown once.
expires_atdatetimeOptional

RFC 3339: when it expires; never if absent.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
415
Unsupported Media Type Error
429
Too Many Requests Error
500
Internal Server Error