Domains

List an app's domains

GET/api/v1/apps/{app}/domains

Required scope: apps:read

Parameters

NameInRequiredDescription
apppathyesThe app id.
page[size]querynoItems per page (1-100, default 30).
page[cursor]querynoOpaque cursor from a previous response.

Example request

curl https://hangar.nagara.cloud/api/v1/apps/app_123/domains?account_id=acct_123 \
  -H "Authorization: Bearer hgp_your_token"

Example response

{
  "data": [ { /* ... */ } ],
  "meta": { "per_page": 30, "next_cursor": "eyJ...", "prev_cursor": null },
  "links": { "next": "/api/v1/...?page[cursor]=eyJ...", "prev": null }
}

Attach a domain

POST/api/v1/apps/{app}/domains

Required scope: apps:write

Parameters

NameInRequiredDescription
apppathyesThe app id.

Example request

curl https://hangar.nagara.cloud/api/v1/apps/app_123/domains \
  -X POST \
  -H "Authorization: Bearer hgp_your_token" \
  -H "Content-Type: application/json" \
  -d '{"hostname": "..."}'

Example response

{ "data": {
  "app_id": "app_123",
  "created_at": "2026-01-01T00:00:00Z",
  "hostname": "...",
  "id": "id_123",
  "is_primary": false,
  "state": "...",
  "tls_enabled": false,
  "verification_host": "...",
  "verification_token": "...",
  "verified": false,
  "verified_at": "2026-01-01T00:00:00Z"
} }

Verify a domain's DNS

POST/api/v1/apps/{app}/domains/{domain}/verify

Required scope: apps:write

Parameters

NameInRequiredDescription
apppathyesThe app id.
domainpathyesThe domain id.

Example request

curl https://hangar.nagara.cloud/api/v1/apps/app_123/domains/domain_123/verify \
  -X POST \
  -H "Authorization: Bearer hgp_your_token"

Example response

{ "data": {
  "expected_record": "...",
  "found_records": [],
  "host": "...",
  "verified": false
} }

Detach a domain

DELETE/api/v1/apps/{app}/domains/{domain}

Required scope: apps:write

Parameters

NameInRequiredDescription
apppathyesThe app id.
domainpathyesThe domain id.

Example request

curl https://hangar.nagara.cloud/api/v1/apps/app_123/domains/domain_123 \
  -X DELETE \
  -H "Authorization: Bearer hgp_your_token"

Example response

HTTP/1.1 204 No Content