POST /deploy/production/domains
Attach a custom domain
Scope deploy:create. Write: live key required (403 deploy_production_live_key_required with a test key). Served only when Galon Deploy is open to the account (404 otherwise). Errors {"detail": {"code"}}. The response gives the TXT proof record (_galon-challenge.<domaine>) and the routing: CNAME for a subdomain, A for the apex.
API key (Bearer), on the public API endpoint.
Request body
application/json
| Field | Type | Description |
|---|---|---|
domain | string · required |
Responses
| Status | Description | Body |
|---|---|---|
201 | Domain attached, records to publish | object |
200 | Already attached | object |
401 | Key missing or invalid | Error |
Examples
curl
curl -X POST "$GALON_API_BASE/deploy/production/domains" \
-H "Authorization: Bearer $GALON_API_KEY" \
-H "Content-Type: application/json" \
-d '{"domain": "string"}'Node.js (SDK)
import { Galon } from "galon";
const galon = new Galon(process.env.GALON_API_KEY);
const result = await galon.production.addDomain({"domain": "string"});Python (SDK)
from galon import Galon
galon = Galon() # reads GALON_API_KEY
result = galon.production.add_domain({"domain": "string"})