Domains

List domains

GET /domains · response 200

Create a domain

POST /domains · scope domains:write · idempotent · response 201

Field Type Required Description
hostname hostname yes Exact or apex customer domain
destination_id ULID no Destination override; the default is used when omitted
BASH
curl -X POST https://api.subdomain.to/v1/domains \
  -H "Authorization: Bearer $SUBDOMAIN_TO_API_KEY" \
  -H "Idempotency-Key: customer-42-domain" \
  -H "Content-Type: application/json" \
  -d '{"hostname":"portal.customer.com"}'

Creation returns dns_records. Poll GET /domains/{id} until the domain is active.

Delete a domain

DELETE /domains/{id} · scope domains:write · response 202