API keys
Create API key
Create a new scoped API key with the TypeScript SDK.
POST
Create API key
Use
blnk.ApiKeys.create to create a scoped API key.
blnk.ApiKeys.create
| Field | Description |
|---|---|
name | Descriptive name for the key or service account. |
owner | Owner identifier you assign, such as a team, service, or user ID. |
scopes | List of permissions in resource:action format (for example ledgers:read). |
expires_at | Expiration timestamp (ISO 8601, for example 2026-12-31T23:59:59Z). |
Response shape
201 Created
| Field | Description |
|---|---|
api_key_id | Unique ID for the key. Use it to revoke the key. |
key | Plaintext secret. Store it now — it is only returned at creation. |
scopes | Permissions granted to the key. |
expires_at | Date and time the key expires. |
is_revoked | Whether the key has been revoked. |
Related docs
How API keys work
Scopes, the master key, and the auth model.
Create API key
HTTP request and response schema.