Create API Key
Generate a new API key with a custom name and granular permissions. The secret key is included in the response and will not be shown again.
POST
/api/v1/keysRequires authenticationStore the key immediately
The key field in the response is displayed exactly once. It cannot be retrieved after this response. If you lose it, revoke the key and create a new one.
Request body
namestringREQUIREDHuman-readable label for this key
permissionsstring[]REQUIREDArray of permission scopes to grantOne of:
create_ordersview_ordersview_balancebroadcastRequest examples
curl -X POST https://merx.exchange/api/v1/keys \
-H "X-API-Key: sk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Production Bot",
"permissions": ["create_orders", "view_orders", "view_balance"]
}'Response
Returns the newly created key object including the secret key value. The key field begins with sk_live_ for production keys.
200Key created
{
"id": "key_m1n2o3p4",
"name": "Production Bot",
"key": "sk_live_a1b2c3d4e5f6g7h8i9j0",
"permissions": ["create_orders", "view_orders", "view_balance"],
"created_at": "2026-03-29T10:00:00.000Z"
}Response fields
idstringUnique key identifiernamestringLabel assigned to this keykeystringSecret API key - shown only oncepermissionsstring[]Granted permission scopescreated_atstringISO 8601 creation timestamp