Set a custom collection hostname for this domain (org admin)
PUT
/v1/domains/{id}/collect
const url = 'https://api.monita.ai/v1/domains/example/collect';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"hostname":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.monita.ai/v1/domains/example/collect \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "hostname": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Request Body
Section titled “Request Body”Media typeapplication/json
object
hostname
required
string
Examplegenerated
{ "hostname": "example"}Responses
Section titled “Responses”OK
Media typeapplication/json
object
hostname
required
string
status
required
string
dns
Array<object>
object
type
required
string
name
required
string
value
required
string
purpose
required
string
Examplegenerated
{ "hostname": "example", "status": "example", "dns": [ { "type": "example", "name": "example", "value": "example", "purpose": "example" } ]}Bad hostname
Media typeapplication/json
object
error
required
string
Examplegenerated
{ "error": "example"}Forbidden
Media typeapplication/json
object
error
required
string
Examplegenerated
{ "error": "example"}Not found
Media typeapplication/json
object
error
required
string
Examplegenerated
{ "error": "example"}Provisioning unavailable
Media typeapplication/json
object
error
required
string
Examplegenerated
{ "error": "example"}