Endpoint
Authentication
Requires a developer API key in theAuthorization header.
Request Headers
| Header | Value |
|---|---|
Authorization | Bearer <api_key> |
Content-Type | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
domain | string | Yes | The custom domain to register (e.g. auth.example.com) |
Example Request
Response — 201 Created
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique domain ID |
domain | string | The registered domain |
verified | boolean | Whether the domain has been verified (always false on creation) |
verificationToken | string | Token to add as a DNS TXT record for verification |
instructions | string | Human-readable DNS configuration instructions |
Error Responses
| Status | Code | Description |
|---|---|---|
| 400 | BAD_REQUEST | Missing domain field |
| 401 | UNAUTHORIZED | Invalid or missing API key |
| 402 | PLAN_LIMIT_EXCEEDED | Custom domains require Enterprise plan |
| 409 | CONFLICT | Domain already registered |