Write an app's DNS records: every custom domain the organization verified points at the Gateway (or `domains.cname_target`).
POST
/api/v1/projects/{project}/environments/{environment}/apps/{app}/dns
const url = 'https://example.com/api/v1/projects/example/environments/example/apps/example/dns';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"provider":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/projects/example/environments/example/apps/example/dns \ --header 'Content-Type: application/json' \ --data '{ "provider": "example" }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”project
required
string
Project name
environment
required
string
Environment short name
app
required
string
App name
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
provider
required
The DNS provider account to write through.
string
Examplegenerated
{ "provider": "example"}Responses
Section titled “Responses”Media typeapplication/json
Array<object>
object
host
required
string
recordType
string | null
content
string | null
action
required
created, updated, unchanged, deleted, conflict, skipped or
failed.
string
detail
string | null
Examplegenerated
[ { "host": "example", "recordType": "example", "content": "example", "action": "example", "detail": "example" }]Media typeapplication/json
Problem Details body.
object
code
required
Stable machine-readable code, e.g. forbidden.
string
title
required
Short human readable title.
string
status
required
HTTP status.
integer format: int32
detail
Details, if safe to expose.
string | null
Example
{ "code": "forbidden"}