Retrieve a domain
/api/v1/domains/{domain}Parameters
| Name | In | Type | Description |
|---|---|---|---|
domainrequired | path | string | The domain id, or the domain name itself. |
Request
/api/v1/domains/{domain}curl -X GET 'https://app.mailyte.com/api/v1/domains/yourdomain.com' \
-H 'Authorization: Bearer mk_live_YOUR_API_KEY'const response = await fetch('https://app.mailyte.com/api/v1/domains/yourdomain.com', {
method: 'GET',
headers: {
Authorization: 'Bearer mk_live_YOUR_API_KEY',
},
});
const { data } = await response.json();import requests
response = requests.get(
"https://app.mailyte.com/api/v1/domains/yourdomain.com",
headers={"Authorization": "Bearer mk_live_YOUR_API_KEY"},
)
data = response.json()["data"]<?php
$response = Http::withToken('mk_live_YOUR_API_KEY')
->get('https://app.mailyte.com/api/v1/domains/yourdomain.com');
$data = $response->json('data');require "net/http"
require "json"
uri = URI("https://app.mailyte.com/api/v1/domains/yourdomain.com")
request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer mk_live_YOUR_API_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }Response
Success.
dataobjectobjectstringdomainidstringUnique identifier for the domain.
namestringThe domain itself, e.g.
example.com.descriptionstringYour own note on the domain. Null when none was set.
statestringactive | provisioning | failed | disabledThe one lifecycle answer.
disabledwins over everything: a disabled domain does nothing whatever its provisioning says.provisioningobjectHow far this domain has got on the mail server. This is the detail behind
state, not a second answer to it: readstateto decide what a domain can do, and this to explain why.statestringpending | provisioning | active | failed | suspended | deleting | deletedWhere the domain is in setup on the mail server:
pending,provisioning,active,failed,suspended,deletingordeleted. For what the domain can do, readstate.errorstringThe last setup or DNS error recorded. Null when there is none. It can be set even on an active domain, so check
stateorGET /domains/{domain}/verification-statusbefore showing it.retryablebooleanWhether
POST /domains/{domain}/retry-provisioningwould do anything. True exactly whenstateisfailed.
sendingobjectSending needs SPF and DKIM. Separate from receiving, because a customer who only relays through us must not publish an MX record.
enabledbooleanrequiresarray<string>
receivingobjectReceiving needs MX.
enabledbooleanrequiresarray<string>
limitsobjectWhat this domain is allowed. Every field is always a number. For what the mail server is enforcing right now, use
GET /domains/{domain}/limits.storage_bytesintegerHow many bytes of mail this domain may store in total. The default is 10 GB.
max_mailboxesintegerHow many mailboxes this domain may have. The default is 50.
mailboxes_usedintegerHow many mailboxes the domain has now.
defaultsobjectWhat a NEW mailbox on this domain inherits. Nothing here describes an existing mailbox.
mailbox_storage_bytesintegerHow many bytes of storage each new mailbox gets. The default is 3 GB.
created_atstringupdated_atstring
Returned inside the standard envelope.
Errors
| Status | When |
|---|---|
401 | The API key is missing, unknown, revoked or expired. All four answer identically, on purpose: distinguishing them would confirm which keys exist. |
403 | The key is valid but may not do this: it lacks the required scope, its IP allowlist does not include you, or this endpoint does not accept API keys. |
404 | No such resource in this organization. |
422 | The request was understood but the values were not acceptable. |
429 | Too many requests, or the organization has spent its sending allowance. `Retry-After` says how long to wait. |
Every status, with what causes it and what to do, is on the error reference.