Domains
List an app's domains
GET
/api/v1/apps/{app}/domainsRequired scope: apps:read
Parameters
| Name | In | Required | Description |
|---|---|---|---|
app | path | yes | The app id. |
page[size] | query | no | Items per page (1-100, default 30). |
page[cursor] | query | no | Opaque 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}/domainsRequired scope: apps:write
Parameters
| Name | In | Required | Description |
|---|---|---|---|
app | path | yes | The 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}/verifyRequired scope: apps:write
Parameters
| Name | In | Required | Description |
|---|---|---|---|
app | path | yes | The app id. |
domain | path | yes | The 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
| Name | In | Required | Description |
|---|---|---|---|
app | path | yes | The app id. |
domain | path | yes | The 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