API Endpoint

POST /management/api-keys

Create a generated server API key for provisioning routes.

POST /management/api-keys

Endpoint context

Use these endpoints from internal tooling or your frontend backend to manage slug policy templates, provisioning API keys, and webhook endpoint configuration. Management routes require the management bootstrap key configured via MANAGEMENT_API_KEYS or MANAGEMENT_API_KEY.

  • Requires management API key auth.
  • Returns plaintext api_key only at creation time.
  • Created keys are stored hashed at rest.
bash
curl -sS http://localhost:8080/management/api-keys \
  -H "Authorization: Bearer management_key_dev_123456" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "stripe-prod"
  }'

Request body

json
{
  "name": "stripe-prod"
}

Response body

json
{
  "api_key": "a94f2c8b5e11d67e8a03c91fd78122e3f6acbb16de2202aa0f814cc2f71d10be",
  "id": 3,
  "name": "stripe-prod",
  "created_at": "2026-04-21T10:30:00Z"
}

Response field types

api_key

string

Generated key value, shown only once.

id

number

Stable internal key id.

name

string

Operator-supplied label.

created_at

string

RFC3339 creation timestamp.

Error codes

400

Invalid JSON payload.

401

Missing or invalid management API key.

500

Unexpected server or storage error.

Back to API overview