ApiKeyService
Get API Key
Retrieve a single API key owned by the caller account or scoped to a sub-account the caller administers.
Request
curl --request GET \ \ --url 'https://api.testnet.polyester.com/v1/auth/api-keys/ak_1a3c6de8153d5a5b04cd2a6529779542' \ --header 'Accept: */*' \ --header 'X-API-KEY-ID: YOUR_API_KEY_ID' \ --header 'X-API-TIMESTAMP: YOUR_API_TIMESTAMP' \ --header 'X-API-SIGNATURE: YOUR_API_SIGNATURE'
Responses
{
"apiKey": {
"color": "#7C3AED",
"createdAt": "2025-01-01T00:00:00Z",
"createdByActor": "dashboard",
"expiresAt": "2025-01-01T00:00:00Z",
"icon": "💰",
"ipWhitelist": [
"203.0.113.0/24"
],
"keyId": "ak_1a3c6de8153d5a5b04cd2a6529779542",
"label": "Trading Bot",
"lastUsedAt": "2025-01-01T00:00:00Z",
"policyId": "ADVPd9FYi2",
"publicKeyEd25519": "AA==",
"revision": "1",
"status": "ACTIVE",
"subaccountId": "39HwgZg2gCw",
"updatedAt": "2025-01-01T00:00:00Z"
}
}Opaque API key identifier, formatted as "ak_" followed by 32 lowercase hex characters.
Stable opaque identifier used to refer to this key, formatted as "ak_" followed by 32 lowercase hex characters.
ak_1a3c6de8153d5a5b04cd2a6529779542Human-readable label for the key. Maximum length is 64 characters.
Trading BotOptional user-chosen icon/emoji for UI display.
💰Optional user-chosen color token for UI display.
#7C3AEDOptional CIDR whitelist. Empty means no IP restriction. Maximum 32 unique entries.
["203.0.113.0/24"]Current key status.
ACTIVEOptional sub-account this key is scoped to (opaque ID; empty = root-level).
39HwgZg2gCwOptional API policy attached to this key (opaque ID). Empty means no policy is attached and the key has no permissions.
ADVPd9FYi2Time in UTC when this key was created.
2025-01-01T00:00:00ZLast time in UTC when this key authenticated a request. Omitted when the key has not been used.
2025-01-01T00:00:00ZEd25519 public key bytes associated with this API key. The private key or seed is never returned by the API.
AA==Optional expiry time in UTC. When set, the key cannot authenticate requests after this time, regardless of status.
2025-01-01T00:00:00ZRead-only actor label describing who created this key, such as a username or account label.
dashboardTime in UTC when this key's configuration was last changed. For the same key, later is fresher, equal is an idempotent replay, and earlier is stale. Equal timestamps with different configuration indicate an invariant failure. This is independent of last_used_at, which tracks authentication activity.
2025-01-01T00:00:00ZMonotonic resource revision used for conditional updates.
1| Key | Status | Error | When |
|---|---|---|---|
| unauthenticated | 401 | Unauthenticated | Authentication required. |
| permission-denied | 403 | Permission Denied | Permission denied. |
| invalid-argument | 400 | Invalid Argument | Invalid argument. |
| not-found | 404 | Not Found | Not found. |
| unavailable | 503 | Unavailable | Service unavailable. |