API keys
List API keys
List API keys for an owner with the Go SDK.
GET
/api-keysUse client.ApiKeys.List to list API keys for an owner.
Call the method
keys, _, _ := client.ApiKeys.List(
&blnkgo.ListApiKeysOptions{
Owner: "merchant_a",
},
)
| Field | Type | Description |
|---|---|---|
options.Owner | string | Owner whose keys to return. Required when authenticating with the master key. |
Use the key list
Iterate over keys to find keys by name, scopes, or expiration. Plaintext key values are not included in list results.
Response
[
{
"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"
}
]Go response ([]blnkgo.ApiKeyResponse)
| Field | Type | Description |
|---|---|---|
| return value | []blnkgo.ApiKeyResponse | Slice of API key records without the plaintext key value. |