GoDaddy

Attach a domain

View as Markdown

Attaches a custom domain to the application and initiates DNS verification.

Full description

Attaches a custom domain to the application and initiates DNS verification. Returns 202 Accepted. Poll GET /apps/{appId}/domains/{domainId} until verificationStatus is ACTIVE or FAILED. A Node.js application built in Airo has to be published before a domain can be attached. Otherwise the call returns 422 with details[].issue APP_NOT_PUBLISHED. Other 422 responses use different issue codes, so branch on details[].issue.

POST
/apps/{appId}/domains

Authorization

bearerAuth
AuthorizationBearer <token>

Personal Access Token (PAT). Generate one from the developer dashboard. Pass as: Authorization: Bearer <token>.

In: header

Path Parameters

appId*string

Application identifier in {PRODUCT}-{id} form. The prefix is the application type in upper case — an upper-case letter followed by any number of upper-case letters, digits, or underscores — then a hyphen, then the identifier. For NODEJS, the suffix is a 10-character nanoid. Example: NODEJS-aBcDeFgHiJ. For MHWP, the suffix is a 10-character nanoid of lower-case letters and digits only. Example: MHWP-a1b2c3d4e5.

Match^[A-Z][A-Z0-9_]*-[A-Za-z0-9_-]+$

Header Parameters

Idempotency-Key?string

Client-generated UUID that makes a request safe to retry. Supplying the same key on a retry with an identical request body returns the original response without triggering a second operation. Retrying with the same key while the first request is still in flight returns 409 Conflict with details[].issue IDEMPOTENCY_IN_PROGRESS. Reusing a key with a different request body returns 422 Unprocessable Entity with details[].issue IDEMPOTENCY_KEY_MISMATCH. Keys are retained for 24 hours after the operation completes, after which the key may be reused.

Formatuuid
traceparent?string

W3C Trace Context identifier for this request. Clients should send a traceparent on every request so the trace can be correlated across services. See https://www.w3.org/TR/trace-context/ for the format.

Match^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$

Request Body

application/json

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/apps/string/domains" \  -H "Content-Type: application/json" \  -d '{    "hostname": "www.example.com"  }'
{  "domainId": "string",  "hostname": "www.example.com",  "role": "PRIMARY",  "verificationStatus": "PENDING",  "certificateValidationCname": "_acme-challenge.example.com.validation.example.net",  "anycastIp": "192.0.2.10",  "cdnStatus": "INIT",  "domainType": "PREFIX",  "links": [    {      "href": "http://example.com",      "rel": "string",      "title": "string",      "targetMediaType": "string",      "targetSchema": null,      "method": "string",      "submissionMediaType": "application/json",      "submissionSchema": null    }  ]}

Last updated on

How is this guide?