Skip to main content
POST
/
api
/
api-keys
curl --request POST \
  --url https://mcp.echozero.app/api/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "CI / automation key"
}
'
{
  "success": true,
  "data": {
    "rawKey": "<string>",
    "rawSecretKey": "<string>",
    "apiKey": {
      "id": "<string>",
      "name": "<string>",
      "keyPrefix": "<string>",
      "scopes": [],
      "createdAt": "2023-11-07T05:31:56Z",
      "lastUsedAt": "2023-11-07T05:31:56Z",
      "expiresAt": "2023-11-07T05:31:56Z"
    }
  }
}

Authorizations

Authorization
string
header
required

User JWT access token issued by POST /api/auth/verify or POST /api/auth/social/verify. Routes that accept both auth modes declare api-key and bearer-jwt security schemes.

Headers

x-signature
string

HMAC-SHA256 signature: HMAC-SHA256(secretKey, timestamp + METHOD + path + body). Optional -- when omitted, HMAC verification is skipped.

x-timestamp
string

Request timestamp in epoch milliseconds. Required when x-signature is provided. Rejected if drift exceeds 5 minutes.

Body

application/json

OpenAPI schema CreateApiKeyDto.

name
string
required

Human-readable name for the API key

type
enum<string>
default:platform

Key type: platform (standard), developer (external agent developers), internal (admin only)

Available options:
platform,
developer,
internal
scopes
enum<string>[]

Permission scopes. Defaults to all public, non-admin scopes if omitted. admin:* cannot be created through this API.

Available options:
agents:read,
agents:write,
trades:read,
trades:execute,
bots:read,
bots:write,
marketplace:read,
ai:chat,
read:tokens,
read:trades,
read:strategies,
write:strategies,
read:wallet,
write:wallet,
read:agents,
write:agents,
read:ai,
write:ai,
read:earn,
read:notifications,
write:notifications,
read:analytics,
admin:*
expiresAt
string<date-time>

Expiration date for the key

Response

API key created successfully. Raw key and secret returned.

success
boolean
required
Example:

true

data
object
required

Endpoint-specific payload