Delete a domain
DELETE
/domains/{id}
const url = 'https://api.vaartix.com/domains/dom_5bvatg1v837anztd';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.vaartix.com/domains/dom_5bvatg1v837anztd \ --header 'Authorization: Bearer <token>'Removes the domain. Emails can no longer be sent from it.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Example
dom_5bvatg1v837anztdResponses
Section titled “Responses”Deleted.
unauthorized: the API key is missing, invalid or revoked.
Media typeapplication/json
object
error
required
object
type
required
Stable, machine-readable error type.
string
message
required
Human-readable explanation, safe to show to developers.
string
Example
{ "error": { "type": "validation_error" }}forbidden: the key cannot do this, for example a send-only key on a management endpoint.
Media typeapplication/json
object
error
required
object
type
required
Stable, machine-readable error type.
string
message
required
Human-readable explanation, safe to show to developers.
string
Example
{ "error": { "type": "validation_error" }}not_found: no such resource in your team.
Media typeapplication/json
object
error
required
object
type
required
Stable, machine-readable error type.
string
message
required
Human-readable explanation, safe to show to developers.
string
Example
{ "error": { "type": "validation_error" }}