API keys
Create, inventory and revoke service credentials.
SandboxThis is the simulated Earn API. Position creation and withdrawal change sandbox records; they do not sign a wallet transaction.
Authentication · Errors · Amounts and units
Create an API key
POST /keys
Creates a key. The full secret is returned exactly once. Scopes are server-assigned; creating live keys requires the keys:live scope.
Parameters
| Name | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| Idempotency-Key | header | string | No | Client-generated key. Retries with the same key replay the original response. |
Request body
Schema: CreateKeyRequest
Response · 201
| Field | Type | Required | Description |
|---|---|---|---|
object |
string |
Yes | |
data |
ApiKey | Yes | |
meta |
object |
No |
For failed requests, inspect error.code, error.message and the request ID. Error handling.
List API keys
GET /keys
Lists keys with masked secrets.
Parameters
| Name | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| limit | query | integer | No | Page size (1-500, default 100) |
| cursor | query | string | No | Opaque cursor returned as meta.next_cursor |
Response · 200
| Field | Type | Required | Description |
|---|---|---|---|
object |
"list" |
Yes | |
data |
ApiKey[] | Yes | |
meta |
ListMeta | Yes |
For failed requests, inspect error.code, error.message and the request ID. Error handling.
Revoke an API key
DELETE /keys/{id}
Revokes a key. The shared sandbox key (key_bootstrap) cannot be revoked.
Parameters
| Name | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| id | path | string | Yes | Key id |
Response · 200
| Field | Type | Required | Description |
|---|---|---|---|
object |
string |
Yes | |
data |
RevokedKey | Yes | |
meta |
object |
No |
For failed requests, inspect error.code, error.message and the request ID. Error handling.