API keys
List API keys
List API keys for an owner with the Java SDK.
GET
/api-keysUse blnk.apiKeys().list for this operation.
Call the method
ApiResponse<JsonNode> response = blnk.apiKeys().list(
ListApiKeysOptions.create().owner("merchant_a")
);
| Field | Type | Description |
|---|---|---|
owner | String | Owner whose keys to return. Required when authenticating with the master key. |
Use the key list
When response.data().isArray(), iterate by index and read fields with get:
JsonNode keys = response.data();
for (int i = 0; i < keys.size(); i++) {
String keyId = keys.get(i).get("api_key_id").asText();
}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"
}
]
| Field | Type | Description |
|---|---|---|
response.data() | JsonNode | JSON array of API key records without the plaintext key value. |
response.data().get(i).get("api_key_id") | String | Unique API key ID. |