Skip to main content
POST
/
api-keys
Create API key
curl --request POST \
  --url https://lb.routeme.sh/api-keys \
  --header 'Content-Type: application/json' \
  --header 'X-Mgmt-Key: <api-key>' \
  --data '
{
  "allowed_domains": [
    "<string>"
  ],
  "name": "<string>"
}
'
{
  "id": 123,
  "customer_id": 123,
  "allowed_domains": [
    "<string>"
  ],
  "api_key": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "active": true,
  "bypass_credit_check": true
}

Authorizations

X-Mgmt-Key
string
header
required

Management API key from the RouteMesh dashboard. Required for customer API endpoints (/api-keys, /usage). Each request also carries the customer's RPC API key in the URL path for the RPC endpoint.

Body

application/json
allowed_domains
string[]
required

List of allowed origins/domains. Requests from other domains are rejected with 403.

Minimum array length: 1
routing_strategy
enum<string>
required

economy — most competitive prices; performance — fastest routes.

Available options:
economy,
performance
name
string | null

Friendly name for this key (e.g. "Production", "Staging").

Response

API key created (secret returned once)

id
integer
required
customer_id
integer
required
allowed_domains
string[]
required
api_key
string
required

The secret API key. Save this — it is returned only once.

created_at
string<date-time>
required
updated_at
string<date-time>
required
name
string | null
required
routing_strategy
enum<string>
required
Available options:
economy,
performance
active
boolean
required
bypass_credit_check
boolean
required