CustomDomain Docs
Applications

Create an application (client_secret returned once)

Create an application (client_secret returned once): CustomDomain™ API reference in the applications group. Covers parameters, request body and responses.

POST
/applications

Accepts the management key (the body tenant_id selects the tenant) or a tenant-scoped API key (the app is always created in the key's own tenant; any body tenant_id is ignored).

Send "sandbox": true to make a test mode application: a place to run the widget, the API and webhooks end to end before you have a real customer domain. It connects only reserved .test names (the first label picks the outcome: conflict.acme.test stays pending with domain_already_connected, timeout.acme.test fails after about a minute with propagation_timeout, any other name goes live after about 15 seconds), uses the manual rail only, and counts for nothing: no free domain, no quota, no billing, no metering and no reporting. Webhook events from it carry "sandbox": true. A workspace can hold up to 3 test mode applications, each up to 100 connections (sandbox_limit). A test mode application is always a development application, so leave environment out. A live application never connects a .test name (sandbox_domain_reserved), and a test mode one never connects a real name (sandbox_domain_required).

Authorization

AuthorizationBearer <token>

Operator management key. Gates provisioning + reads across tenants.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/applications" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "id": "string",  "tenant_id": "string",  "name": "string",  "environment": "production",  "default_origin": "string",  "connect_target": {    "cname_target": "string",    "apex_ipv4": [      "string"    ]  },  "sandbox": true,  "nameserver_migration": {    "mode": "off",    "target": {      "kind": "managed",      "provider": "string",      "account_id": "string",      "nameservers": [        "string",        "string"      ]    }  },  "end_user_saved_access": true,  "secure_sign_in": {    "available": true,    "reason": "switched_off"  },  "created_at": "2019-08-24T14:15:22Z",  "client_secret": "string"}
{  "code": "string",  "title": "string",  "details": "string"}
{  "code": "string",  "title": "string",  "details": "string"}
{  "code": "billing_required",  "title": "An active subscription is needed to connect new domains.",  "details": "This workspace has not started its subscription yet. Domains that are already connected keep working. An owner or admin can set up billing at https://app.customdomain.ai/app/billing."}