Create Tenant
POST {base_url}/tenantsRequest headers
| Key | Value | Description |
|---|---|---|
X-API-Key | {{ADMIN_API_KEY}} | Administrator key required. |
Content-Type | application/json | Request body is JSON. |
Request body
| Key | Value | Description |
|---|---|---|
label | "production" | Required and unique. 1–255 characters; letters, numbers, spaces, hyphens, underscores, and periods. |
Response headers
| Key | Value | Description |
|---|---|---|
Content-Type | application/json | JSON response body. |
Sample request
curl --silent --show-error --request POST "$BASE_URL/tenants" --header "X-API-Key: $ADMIN_API_KEY" --header "Content-Type: application/json" --data-raw '{"label":"production"}'
Sample response
{
"tenant_id": "01912345-6789-7000-8000-000000000001",
"label": "production",
"created_at": "2026-09-25T08:00:00Z",
"updated_at": "2026-09-25T08:00:00Z"
}
Creates a new tenant with a unique label. Tenants act as isolated workspaces that contain counters.
Authentication: Requires API key via X-Api-Key header
Rate Limit: 10 requests per minute (configurable via RATE_LIMIT_REQUESTS)
Errors
- 400 INVALID_JSON - Invalid JSON in request body
- 400 INVALID_PARAMETER - Label validation failed
- 409 TENANT_LABEL_EXISTS - Label already in use
- 401 UNAUTHORIZED - Missing or invalid API key
- 429 RATE_LIMIT_EXCEEDED - Too many requests