Deployments.ai Docs
Apps

Attach a hostname to an app and print the DNS records to publish (needs apps:publish)

POST /v1/apps/{appId}/domains · SDK attachAppDomain · CLI deployments app-domain attach

POST
/v1/apps/{appId}/domains

Requires apps:publish; admits human and service-account callers.

Authorization

platformBearer
headerAuthorizationBearer <token>

Platform bearer credential accepted as an opaque API key or JWT.

Path Parameters

appId*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Header Parameters

x-deployments-environment*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
idempotency-key*string
Length1 <= length <= 512

Request Body

application/json
  1. body
hostname*string

Response Body

AppDomainResponse

application/json
  1. response
appId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
attachedBy*
createdAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
dnsRecords*array<>
hostname*string
id*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
state*||
updatedAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
curl -X POST "https://example.com/v1/apps/string/domains" \  -H "x-deployments-environment: string" \  -H "idempotency-key: string" \  -H "Content-Type: application/json" \  -d '{    "hostname": "string"  }'
{  "appId": "string",  "attachedBy": {    "id": "string",    "principal": "human"  },  "createdAt": "2019-08-24T14:15:22Z",  "dnsRecords": [    {      "name": "string",      "note": "string",      "type": "CNAME",      "value": "string"    }  ],  "hostname": "string",  "id": "string",  "state": {    "kind": "unverified"  },  "updatedAt": "2019-08-24T14:15:22Z"}