curl -X POST https://xquik.com/api/v1/api-keys \
-H "Cookie: session=YOUR_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Production"}' | jq
Session cookie from the dashboard. Format: session=YOUR_SESSION_TOKEN.
Must be application/json.
Body
Display name for the key. Defaults to "Default" if omitted.
Response
201 Created
401 Unauthenticated
Unique identifier for the API key.
The complete API key including the xq_ prefix.
First 8 characters of the key including the xq_ prefix (e.g. "xq_a1b2").
ISO 8601 creation timestamp.
{
"id": "42",
"fullKey": "xq_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2",
"prefix": "xq_a1b2",
"name": "Production",
"createdAt": "2026-02-24T10:30:00.000Z"
}
The fullKey is returned only once. Store it securely — it cannot be retrieved again.
{ "error": "unauthenticated" }
Missing or invalid session cookie. Sign in to the dashboard first.
This endpoint requires session cookie authentication (dashboard sign-in). API keys cannot create other API keys.Related: List API Keys · Revoke API Key