Use a domain for the app, or make it the default
PATCH
/api/v1/domains/{host}
const url = 'http://localhost:3000/api/v1/domains/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"app":true,"primary":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url http://localhost:3000/api/v1/domains/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "app": true, "primary": true }'app: the whole app answers there, or stops; off when verified, any number of them, never one a portal serves. primary: of those, the one links in email point at.
Scope: admin.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”host
required
string
E.g. assets.example.com
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
app
Use it for the app, or stop: the whole app answers there. Off when verified
boolean
primary
Make it the default of those used for the app: where links in email point
boolean
Responses
Section titled “Responses”The domain
Media typeapplication/json
object
data
required
object
host
required
string
verified
required
boolean
record
required
What proves it: add this record at your DNS host
object
type
required
string
name
required
string
value
required
string
app
required
Used for the app: the whole app answers here
boolean
primary
required
The default of those used for the app: links in email point here
boolean
portal
required
The portal it serves, by slug; null for the whole app
string | null
url
required
string format: uri
Example
{ "data": { "record": { "type": "TXT" }, "cname": { "type": "CNAME" } }}default
Section titled “default”An error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
detail
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}