Add a domain
POST
/api/v1/domains
const url = 'http://localhost:3000/api/v1/domains';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"host":"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 http://localhost:3000/api/v1/domains \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "host": "example" }'An address of the organization’s own: the app’s, or a portal’s once the portal picks it. Add the TXT record in record, point it at the server (cname), then POST /api/v1/domains/{host}/verify. The first verified one becomes the default, where links in email point. Counts against the domains limit.
Scope: admin.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
host
required
A host name of the organization’s, e.g. assets.example.com
string
Examplegenerated
{ "host": "example"}Responses
Section titled “Responses”The domain, not verified yet
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" }}