Skip to main content
GET
/
api-keys
curl --request GET \
  --url 'http://localhost:5001/api-keys?owner=owner_id' \
  --header 'X-blnk-key: <api-key>'
[
  {
    "api_key_id": "key_abc123def456",
    "name": "Service Account",
    "owner_id": "owner_id",
    "scopes": ["ledgers:read", "balances:write"],
    "expires_at": "2026-03-11T00:00:00Z",
    "created_at": "2024-01-15T10:30:00Z",
    "last_used_at": "2024-01-20T14:30:00Z"
  },
  {
    "api_key_id": "key_xyz789uvw012",
    "name": "Production API",
    "owner_id": "owner_id",
    "scopes": ["*:*"],
    "expires_at": "0001-01-01T00:00:00Z",
    "created_at": "2024-01-10T08:20:00Z",
    "last_used_at": "2024-01-19T10:15:00Z"
  }
]

Documentation Index

Fetch the complete documentation index at: https://docs.blnkfinance.com/llms.txt

Use this file to discover all available pages before exploring further.

List all API keys for a specific owner. Use this endpoint to audit and manage your API keys. Note that the actual API key value is not returned for security reasons.
Available on version 0.10.1 or later. Requires the master key or an API key with api-keys:read scope.

Authorization

If set, the API uses an API key for authentication. Include the following header in your requests: X-blnk-key: <api-key>. Replace <api-key> with your secret API key. Ensure the key is kept secure and not exposed in public repositories or client-side code. See also: Secure your Blnk server

Query Parameters

owner
string
Unique identifier of the owner whose keys you want to list.

Response

Returns an array of API key objects. Note that the actual key value is not returned for security reasons.
api_key_id
string
Unique identifier for the API key.
name
string
The name of the API key.
owner_id
string
The owner identifier associated with the API key.
scopes
array
List of permissions granted to the API key.
expires_at
string
The expiration date and time for the API key in ISO 8601 format.
created_at
string
ISO 8601 formatted timestamp of when the API key was created.
last_used_at
string
ISO 8601 formatted timestamp of when the API key was last used for authentication.
curl --request GET \
  --url 'http://localhost:5001/api-keys?owner=owner_id' \
  --header 'X-blnk-key: <api-key>'
[
  {
    "api_key_id": "key_abc123def456",
    "name": "Service Account",
    "owner_id": "owner_id",
    "scopes": ["ledgers:read", "balances:write"],
    "expires_at": "2026-03-11T00:00:00Z",
    "created_at": "2024-01-15T10:30:00Z",
    "last_used_at": "2024-01-20T14:30:00Z"
  },
  {
    "api_key_id": "key_xyz789uvw012",
    "name": "Production API",
    "owner_id": "owner_id",
    "scopes": ["*:*"],
    "expires_at": "0001-01-01T00:00:00Z",
    "created_at": "2024-01-10T08:20:00Z",
    "last_used_at": "2024-01-19T10:15:00Z"
  }
]
The actual api_key value is not returned for security reasons. If you need to view or regenerate the key value, you’ll need to create a new API key.

Need help?

We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool. To ask questions or discuss issues, please contact us or join our Discord community.