Domains
Every operation in this group: what it accepts, what it returns and the errors it can answer with.
Operations
/domains/domains/domains/{id}/domains/{id}/domains/{id}/domains/{id}/verify/domains/{id}/logo/domains/{id}/logo/domains/{id}/logo/domains/{id}/logo/certificate/domains/{id}/logo/certificate/domains/{id}/addresses/domains/{id}/addresses/domains/{id}/addresses/{addressId}/domains/{id}/addresses/{addressId}/domains/{id}/addresses/{addressId}/domains/{id}/addresses/{addressId}/photo/domains/{id}/addresses/{addressId}/photo/app-host/app-host/app-host/app-host/verify/domains/{id}/addresses/{addressId}/forwards/domains/{id}/addresses/{addressId}/forwards/domains/{id}/addresses/{addressId}/forwards/{forwardId}/domains/{id}/addresses/{addressId}/forwards/{forwardId}/domains/{id}/addresses/{addressId}/forwards/{forwardId}/resend/domains/{id}/addresses/{addressId}/members/domains/{id}/addresses/{addressId}/login/domains/{id}/addresses/{addressId}/login/domains/{id}/addresses/{addressId}/login/dns-connections/dns-connections/dns-connections/{id}/dns-connections/{id}/domains/{id}/dns/domains/{id}/dns/domains/{id}/dns/sync/domains/{id}/addresses/{addressId}/mail-apps/domains/{id}/addresses/{addressId}/mail-apps/domains/{id}/addresses/{addressId}/app-passwords/domains/{id}/addresses/{addressId}/app-passwords/domains/{id}/addresses/{addressId}/app-passwords/{passwordId}/domains/{id}/addresses/{addressId}/app-passwords/{passwordId}/domains/{id}/addresses/{addressId}/mail-app-setup/domains/{id}/addresses/{addressId}/mail-app-profile-link/domains/{id}/addresses/{addressId}/limits/domains/{id}/addresses/{addressId}/limits/domains/{id}/routes/domains/{id}/routes/domains/{id}/routes/test/domains/{id}/routes/{routeId}/domains/{id}/routes/{routeId}/domains/{id}/routes/{routeId}/domains/{id}/addresses/{addressId}/group-members/domains/{id}/addresses/{addressId}/group-members/domains/{id}/addresses/{addressId}/group-members/{memberId}/domains/{id}/addresses/{addressId}/photo/gravatar
GET/domains
List domains
receiving and sending are two independent facts. A verified domain can RECEIVE, and that says nothing about outbound: mail from a domain is signed once its signing record is published and confirmed, which is usually a couple of minutes after it answers in DNS. sending.status reports that state as the last check saw it (verified, pending, failed, no_identity or unknown), sending.canSend says whether a send from the domain would be accepted right now, and sending.checkedAt says how old that verdict is. A negative verdict older than a day is treated as unknown rather than as a refusal.
tracking reports the custom tracking domain, if one is set, and whether new mail uses it yet. storage reports the custom files domain the same way, which is the name the download links for files sent from this domain use.
Requires the domains:read scope.
Query parameters
limitintegerRows per page, 1 to 100.
At least 1At most 100Default25cursorstringThe previous page's
nextCursor, passed back as it came. It is opaque: it holds where the last row sat in this list's order, so a row deleted or edited between pages never breaks the walk, and the next page starts at the first row that sorts after it. A value this list did not hand out is a 400invalid_cursor.qstringSearches the domain name and the domain id. Every word has to appear in one of them, ignoring case and accents, and when nothing matches exactly, close spellings are returned instead. Leave it out for every row. Paging walks the matches in the same order, so keep the same
qon every page.Up to 200 characters
Returns
A page of domains, alphabetically, without addresses.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
- TypeScript
domains.list()domains.listAll()domains.iterate()- Python
domains.list()domains.list_all()domains.iterate()- Ruby
domains.listdomains.list_alldomains.iterate- PHP
domains->listdomains->listAlldomains->iterate- Go
Domains.ListDomains.ListAllDomains.Iterate- Java
domains().listdomains().listAlldomains().iterate- C#
Domains.ListAsyncDomains.ListAllAsyncDomains.IterateAsync- CLI
nextmail domains list- MCP
getDomainlistDomainslistRoles
POST/domains
Add a domain
Adds a domain to the workspace and returns it with every DNS record to publish, in the same shape as GET /domains/{id}. The first DNS check runs during the call, so records[].status already says what public DNS answers with. The domain receives mail once public DNS answers with its MX records and its ownership TXT record, and it can send once its signing records are in place. Publish the records exactly as records gives them, then poll GET /domains/{id} or call POST /domains/{id}/verify.
A new domain starts with its catch-all on and no addresses. Create addresses with POST /domains/{id}/addresses, or turn the catch-all off with PATCH /domains/{id}.
How many domains you can add is set by the plan of the workspace, counted within that workspace. A domain that is already added anywhere is refused, and so is a domain whose parent or subdomain belongs to somebody else, and a domain that belongs to Nextmail.
Adding a domain reaches the whole workspace, so a key or app limited to particular addresses or domains cannot add one. Use a key with no address or domain restriction.
Requires the domains:write scope.
Request body
domainstringRequiredA bare domain such as
example.com. It is trimmed, lowercased and converted to its ASCII form, so an internationalised name is stored as punycode. Anything that is not a hostname of at least two labels is a 422invalid_parameterondomain.
Returns
The new domain, its DNS records and what the first check found.
Errors
- 400
malformed_json: the body is not valid JSON.- 403
insufficient_scope: the key lacksdomains:write.domain_allowance_reached: the plan of the workspace includes no more domains, and the message says which plan includes more.- 409
domain_already_addedwhen you have already added this domain,domain_claimedwhen it is verified in another account, andoperator_domainwhen it belongs to Nextmail. Each namesdomaininparam.- 422
invalid_parameterondomainwhen it is missing or not a hostname,unknown_parameterfor any other field, andcapability_unsupportedondomainAllowlistfor a key or app limited to particular addresses or domains.
The errors every operation can return401404429500Error catalog
Also available in
- TypeScript
domains.create()- Python
domains.create()- Ruby
domains.create- PHP
domains->create- Go
Domains.Create- Java
domains().create- C#
Domains.CreateAsync- CLI
nextmail domains create- MCP
addDomain
GET/domains/{id}
Retrieve a domain
The domain with its addresses, every DNS record it uses with what the last check found, and its DMARC reading. records is what to publish at your DNS provider, and records[].status says which of them public DNS answers with yet.
Reading an unverified domain checks its DNS again when the last check is more than 20 seconds old, so polling this route is how to wait for verification: receiving.verified turns true on the read whose check finds the records. The signing records of a verified domain are checked again when their last check is more than 10 minutes old. POST /domains/{id}/verify checks straight away.
tracking reports the custom tracking domain, if one is set, and whether new mail uses it yet. storage reports the custom files domain the same way.
Requires the domains:read scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.
Returns
The domain, its addresses, its DNS records and its DMARC reading.
Errors
- 404
resource_not_found: no such domain. A domain in another workspace reads the same as one that does not exist.
The errors every operation can return400401403422429500Error catalog
Also available in
- TypeScript
domains.get()- Python
domains.get()- Ruby
domains.get- PHP
domains->get- Go
Domains.Get- Java
domains().get- C#
Domains.GetAsync- CLI
nextmail domains get- MCP
getDomainlistDomains
PATCH/domains/{id}
Update a domain
Turns the catch-all on or off, sets or removes the two custom names a domain can carry, sets its DMARC policy, sets the name its mail goes out under, offers the records that let mail apps set themselves up and makes it an alias of another domain. All seven fields are optional and independent: a field left out is left alone. A body with none of them changes nothing and answers 200 with the domain as it stands. The fields are applied in order, catchAll first, then trackingHost, then storageHost, then dmarcPolicy, then senderName, then autodiscovery, then aliasOf, and a refusal on one does not undo the ones before it: a refused storageHost leaves a catchAll or trackingHost change already made in place. Send them in separate calls when any of them has to stand on its own.
senderName is the name recipients see beside every address on this domain that has no name of its own, such as Acme Support. Mail sent without a name in from goes out under the name of the address, then this one, then the name of the workspace. It applies to the whole domain, so only a key that holds the whole domain may change it.
dmarcPolicy is what the DMARC record of the domain tells receivers to do with mail that fails its checks: none only monitors, quarantine sends it to spam and reject refuses it. Inboxes show the domain logo only at quarantine or reject. A stricter policy than none needs mail from the domain to be signed first, or it would send the domain's own mail to spam. Where Nextmail writes the DNS for the domain, the record is updated during the call, keeping every other tag it has, such as rua, and a record published by hand is replaced only if it is still the one Nextmail last read. Otherwise publish the DMARC record records lists.
catchAll true accepts mail to any address on the domain that nobody created and delivers it to the mailbox, and the address is listed from its first message on. False refuses mail to every address that was not created by hand, including the ones the catch-all picked up before. It applies to the whole domain, so only a key that holds the whole domain may change it.
trackingHost is a subdomain such as links.example.com that tracked links and the open pixel in new mail from this domain use in place of the Nextmail host. storageHost is a subdomain such as files.example.com that the download links for files sent from this domain use in place of the Nextmail host. For either, null or an empty string removes that name, and a string sets it.
Each name is set up the same way, and the rest of this describes both. trackingHost reports into the tracking object on the response and storageHost into storage, and the field names below are the ones on whichever of the two you sent.
A new name is saved and checked straight away. Setting one needs the domain to be verified or its ownership TXT record to be published, and it does not have to be receiving mail yet. Add a CNAME record named that host whose value is target, an address Nextmail prepares for that name alone, with any proxying turned off. record in the response spells it out. If the address could not be prepared during the call, record is null and error says it is being prepared, and it is finished within a few minutes without another call. Nextmail checks the name over HTTPS, and until a check passes, new mail keeps using the default Nextmail host: status stays pending and error says what the last check saw. There is no need to call this again once the record is in place. A name that has not passed yet is checked every 2 minutes in its first hour, every 10 minutes in its first day, hourly in its first week and every 6 hours after that.
Once a check passes, new mail from this domain uses the name, and it is checked every 10 minutes. A failed check is retried after 1 minute and then 2, and three failures in a row put new mail back on the default host.
Sending a name that is already set checks it again at once, unless a check ran in the last 30 seconds, in which case the stored state comes back unchanged.
null or an empty string removes that name, and new mail goes back to the default host. Links in mail already sent keep the name they were sent with, whether it is removed or replaced, so they only keep working while its CNAME record stays in place. That holds for the download link on a file as much as for a tracked link. Setting a name up again can give it a different record, so publish the one the response reports.
A tracking domain serves tracking paths only and a files domain serves download paths only, and each answers only for mail the workspace that owns it sent. Either name applies to every address on the domain, so a key narrowed to individual addresses is refused with capability_unsupported. A key whose domainAllowlist holds this whole domain may set both, because that key already covers every address the change reaches.
Requires the domains:write scope.
Path parameters
idstringRequiredDomain id from
list, a UUID.
Request body
catchAllbooleanTrue accepts mail to any address on this domain that nobody created, false refuses it. Leaving the field out leaves the catch-all alone.
trackingHoststringA subdomain of this domain, such as
links.example.com. It is trimmed and lowercased, and anhttp://orhttps://prefix, a path and a trailing dot are stripped.null, or a string that is empty once cleaned up, removes the tracking domain. Sending the name already set checks it again. Leaving the field out leaves the tracking domain alone.Can be nullUp to 512 charactersstorageHoststringA subdomain of this domain, such as
files.example.com. It is cleaned up the same way astrackingHost.null, or a string that is empty once cleaned up, removes the files domain. Sending the name already set checks it again. Leaving the field out leaves the files domain alone.Can be nullUp to 512 charactersdmarcPolicystringThe DMARC policy to publish:
none,quarantineorreject. Leaving the field out leaves the policy alone.One of"none""quarantine""reject"autodiscoverybooleanTrue when the domain offers the DNS records that let mail, calendar and contacts apps find the Nextmail servers from an address on it alone: SRV records for IMAP on 993, SMTP on 465 and 587, POP3 on 995, and CalDAV and CardDAV, with a TXT record naming the path for each of the last two. The records are listed in
autodiscoveryRecordswith what the last check found. They change nothing about how mail arrives, and they are left out of the records that verify the domain. Where Nextmail writes the DNS for the domain, turning it on writes them and turning it off takes them down. Defaults to false.senderNamestringThe name mail from this domain goes out under when the address has no name of its own, such as
Acme Support. It is trimmed.null, or a string that is empty once trimmed, removes it, so that mail goes out under the name of the workspace. Leaving the field out leaves it alone.Can be nullUp to 120 charactersaliasOfstringThe id of another domain hosted in this workspace to make this domain an alias of, or
nullto stop it being one. Mail tolocal@this domain is then handled exactly aslocal@that domain, andlocal@this domain may be used as a From address whereverlocal@that domain may. The other domain may not be an alias itself, this domain may not have aliases of its own, and it may not hold addresses created by hand or routes. Leaving the field out leaves it alone.Can be nullUp to 64 characters
Returns
The domain in the same shape as GET /domains/{id}, with receiving.catchAll, tracking and storage as they stand after this call.
Errors
- 400
malformed_json: the body is not valid JSON.- 403
insufficient_scope: the key lacksdomains:write.- 404
resource_not_found: no such domain. A domain in another workspace reads the same as one that does not exist.- 409
tracking_host_in_usewithparam: "trackingHost": another domain already uses that name, or the tracking domain on this one is managed by a different Nextmail server.storage_host_in_usewithparam: "storageHost"is the same refusal for a files domain, and a name already taken by the other feature is refused here too, since one name cannot be both.domain_not_verified: this domain is not verified and its ownership TXT record is not published yet, so it cannot take a new name, andparamis whichever field was sent.domain_not_sendablewithparam: "dmarcPolicy": mail from the domain is not signed yet, so a policy stricter thannonewould send its own mail to spam.alias_not_allowedwithparam: "aliasOf":aliasOfnames this domain or no other domain hosted in this workspace.alias_chain: the domain it names is an alias itself, or other domains are aliases of this one.alias_has_addresses: this domain holds addresses created by hand or routes.- 422
invalid_tracking_hostwithparam: "trackingHost", orinvalid_storage_hostwithparam: "storageHost": the name is not a hostname, is not a subdomain of this domain, is the return path hostbounce.<domain>, belongs to Nextmail, or is set up to receive mail.unknown_parameterfor any field other thancatchAll,trackingHost,storageHost,dmarcPolicy,senderName,autodiscoveryandaliasOf.invalid_parameterwhen the body is not a JSON object, whencatchAllis not a boolean, when a host field that is present is neither a string nor null, or is longer than 512 characters, whendmarcPolicyis notnone,quarantineorreject, or whensenderNameis neither a string nor null, or is longer than 120 characters once trimmed. A body carrying none of the fields is not an error: it changes nothing and answers 200.capability_unsupportedwithparam: "domainAllowlist"for a narrowed key that does not hold this whole domain, which is any key narrowed to individual addresses and any key whosedomainAllowlistnames only other domains.
The errors every operation can return401429500Error catalog
Also available in
- TypeScript
domains.update()- Python
domains.update()- Ruby
domains.update- PHP
domains->update- Go
Domains.Update- Java
domains().update- C#
Domains.UpdateAsync- CLI
nextmail domains update- MCP
setDomainAliassetDomainAutodiscoverysetDomainCatchAllsetDomainDmarcPolicysetDomainSenderNamesetDomainStorageHostsetDomainTrackingHost
DELETE/domains/{id}
Remove a domain
Removes the domain from the workspace. Mail to it stops being accepted, and nothing can be sent from it. Every address on it is removed with it, their password sign-ins are revoked, its signing key is released, its tracking and files domains are retired, and the domain.deleted webhook fires. Mail already received stays in the mailbox, unless this is the last domain of the workspace.
Where Nextmail wrote the DNS for this domain itself, it takes those records back. Any it could not take back are listed in leftBehind, and those have to be removed at your DNS provider. Records you published yourself are never touched, so remove them too once the domain is gone.
Removing the last domain of a workspace deletes the whole mailbox with it, every message for good, as removing it in the app does. So it needs confirm, the name of the domain, the way the app asks the person to type it, and without confirm the call is a 409 last_domain that changes nothing. mailboxPurged in the answer says whether the mailbox went with it. A key limited to particular addresses or domains, or an app that was limited to some when it was connected, cannot remove the last domain, because the mailbox holds the mail of every address.
There is no undo. Adding the domain again starts it from scratch: its records have to be checked again and its addresses created again.
A key limited to particular addresses or domains has to hold this whole domain.
Requires the domains:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.
Query parameters
confirmstringThe name of the domain, as the app asks the person to type it before removing it. It is needed only for the last domain of the workspace, because removing that one deletes the whole mailbox with it. Letter case and the spaces around it do not matter, and a name that does not match is refused whichever domain it is.
Up to 253 characters
Returns
Removed, with any DNS records that have to be removed by hand, and whether the whole mailbox went with it.
Errors
- 403
insufficient_scope: the key lacksdomains:write.insufficient_authority: an OAuth access token acts for a member whose role does not holdworkspace:manage, which removing a domain needs, as it does in the app.step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code withPOST /security/step-up, send it toPOST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.- 404
resource_not_found: no such domain. A domain in another workspace reads the same as one that does not exist.- 409
last_domainwithparam: "confirm": this is the last domain of the workspace and the call carries noconfirm, so nothing was removed. Send the name of the domain asconfirmto remove it together with the whole mailbox.- 422
invalid_parameterwithparam: "confirm"whenconfirmis not the name of the domain.capability_unsupportedwithparam: "domainAllowlist"for a narrowed key that does not hold this whole domain, and withparam: "addressAllowlist"when a key limited to particular addresses or domains, or an app that was limited to some when it was connected, would remove the last domain.
The errors every operation can return400401429500Error catalog
Also available in
- TypeScript
domains.delete()- Python
domains.delete()- Ruby
domains.delete- PHP
domains->delete- Go
Domains.Delete- Java
domains().delete- C#
Domains.DeleteAsync- CLI
nextmail domains delete- MCP
removeDomain
POST/domains/{id}/verify
Check a domain now
Checks the DNS of the domain straight away and returns it in the same shape as GET /domains/{id}. On an unverified domain that is the check for the records that verify it, and receiving.verified comes back true when they are found. On a verified domain it checks the signing and return path records again and asks whether mail from the domain can be sent, so sending is fresh.
Call it after publishing records, rather than waiting for the next read to notice. When the last check ran under 10 seconds ago, the call checks nothing new and returns the domain as it stands, so polling it faster than that gains nothing. A record published a moment ago can take a few minutes to show up in public DNS.
A key limited to particular addresses or domains has to hold this whole domain.
Requires the domains:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.
Returns
The domain as the check left it.
Errors
- 403
insufficient_scope: the key lacksdomains:write.- 404
resource_not_found: no such domain. A domain in another workspace reads the same as one that does not exist.- 422
capability_unsupportedwithparam: "domainAllowlist"for a narrowed key that does not hold this whole domain.
The errors every operation can return400401429500Error catalog
Also available in
- TypeScript
domains.verify()- Python
domains.verify()- Ruby
domains.verify- PHP
domains->verify- Go
Domains.Verify- Java
domains().verify- C#
Domains.VerifyAsync- CLI
nextmail domains verify- MCP
verifyDomain
GET/domains/{id}/logo
Retrieve the logo of a domain
The brand logo inboxes show next to mail from the domain, with what public DNS answers with right now. published.ours turns true once the BIMI record pointing at the logo is live.
For a subdomain such as mail.example.com, parentDmarc reports the DMARC record of the domain it belongs to, because inboxes check that one too: they show the logo only when its p= and sp= both quarantine or reject at 100 percent. That record lives at the parent domain, so Nextmail never changes it.
Requires the domains:read scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.
Returns
The logo and what public DNS answers with.
Errors
- 404
resource_not_found: no such domain. A domain in another workspace reads the same as one that does not exist.
The errors every operation can return400401403422429500Error catalog
Also available in
PUT/domains/{id}/logo
Set the logo of a domain
Uploads the brand logo inboxes show next to mail from the domain, replacing any there was. Send the SVG as svg. It is converted to the SVG Tiny PS format inboxes require: CSS is turned into attributes, the shape is made square and titled after the workspace, and anything inboxes do not draw is refused with the reason. A file that is SVG Tiny PS already is kept byte for byte.
Nextmail serves the logo and publishes the BIMI TXT record where it writes the DNS for the domain, and records says how that went. Otherwise publish record at your DNS provider. Inboxes show the logo once the DMARC policy of the domain quarantines or rejects, which PATCH /domains/{id} with dmarcPolicy sets. Gmail also needs a mark certificate, set with PUT /domains/{id}/logo/certificate.
The domain has to be verified. A key limited to particular addresses or domains has to hold this whole domain.
Requires the domains:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.
Request body
svgstringRequiredThe logo as SVG markup, up to 1 MB. It is converted to the SVG Tiny PS format inboxes require, made square and titled after the workspace. A file that is SVG Tiny PS already is kept byte for byte, which keeps it the same as the copy inside a mark certificate.
1 to 1048576 characters
Returns
The logo as it stands, and what happened to its record.
Errors
- 400
malformed_json: the body is not valid JSON.- 403
insufficient_scope: the key lacksdomains:write.- 404
resource_not_found: no such domain. A domain in another workspace reads the same as one that does not exist.- 409
domain_not_verified: the domain is not verified yet.- 422
invalid_parameteronsvgwhen it is missing, over 1 MB, not an SVG, or uses something inboxes do not draw, such as a bitmap image, a filter, a mask, a clipping path or a link to another file, and the message says which.unknown_parameterfor any other field, andcapability_unsupportedwithparam: "domainAllowlist"for a narrowed key that does not hold this whole domain.
The errors every operation can return401429500Error catalog
Also available in
DELETE/domains/{id}/logo
Remove the logo of a domain
Removes the logo and deletes the stored file. Where Nextmail writes the DNS for the domain, it takes its BIMI record down too. Otherwise remove the record yourself. Any mark certificate stays, ready for the next logo. Removing a logo from a domain that has none changes nothing.
A key limited to particular addresses or domains has to hold this whole domain.
Requires the domains:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.
Returns
The domain with url and record null.
Errors
- 403
insufficient_scope: the key lacksdomains:write.- 404
resource_not_found: no such domain. A domain in another workspace reads the same as one that does not exist.- 422
capability_unsupportedwithparam: "domainAllowlist"for a narrowed key that does not hold this whole domain.
The errors every operation can return400401429500Error catalog
Also available in
PUT/domains/{id}/logo/certificate
Set the mark certificate of a domain
Uploads the Verified Mark Certificate (VMC) or Common Mark Certificate (CMC) a certificate authority issued for the domain, replacing any there was. Gmail shows the logo only with one, and only a VMC earns the blue checkmark and the logo in Apple Mail.
Send the file as certificate: PEM text as it came, or a DER or PKCS #7 file encoded as base64. The chain is put in order with the mark certificate first and served as PEM, and the BIMI record points at it.
Inboxes compare the logo inside the certificate with the published one and show nothing when they differ. When they differ, the logo from the certificate becomes the published one, and logoFromCertificate says so.
The domain has to be verified. A key limited to particular addresses or domains has to hold this whole domain.
Requires the domains:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.
Request body
certificatestringRequiredThe certificate file the certificate authority sent, up to 128 KB: PEM text, which can hold the whole chain or a PKCS #7 bundle, or a DER or PKCS #7 file encoded as base64.
1 to 175020 characters
Returns
The logo with its certificate, and what happened to its record.
Errors
- 400
malformed_json: the body is not valid JSON.- 403
insufficient_scope: the key lacksdomains:write.- 404
resource_not_found: no such domain. A domain in another workspace reads the same as one that does not exist.- 409
domain_not_verified: the domain is not verified yet.- 422
invalid_parameteroncertificatewhen the file holds no certificate, cannot be read, is over 128 KB, holds no VMC or CMC, was issued for a different domain or has expired, and the message says which.unknown_parameterfor any other field, andcapability_unsupportedwithparam: "domainAllowlist"for a narrowed key that does not hold this whole domain.
The errors every operation can return401429500Error catalog
Also available in
DELETE/domains/{id}/logo/certificate
Remove the mark certificate of a domain
Removes the mark certificate and deletes the stored file. The logo stays, and the BIMI record no longer points at a certificate, so Gmail and Apple Mail stop showing the logo. Removing a certificate from a domain that has none changes nothing.
A key limited to particular addresses or domains has to hold this whole domain.
Requires the domains:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.
Returns
The logo with certificate null.
Errors
- 403
insufficient_scope: the key lacksdomains:write.- 404
resource_not_found: no such domain. A domain in another workspace reads the same as one that does not exist.- 422
capability_unsupportedwithparam: "domainAllowlist"for a narrowed key that does not hold this whole domain.
The errors every operation can return400401429500Error catalog
Also available in
- TypeScript
domains.removeLogoCertificate()- Python
domains.remove_logo_certificate()- Ruby
domains.remove_logo_certificate- PHP
domains->removeLogoCertificate- Go
Domains.RemoveLogoCertificate- Java
domains().removeLogoCertificate- C#
Domains.RemoveLogoCertificateAsync- CLI
nextmail domains remove-logo-certificate- MCP
removeDomainLogoCertificate
GET/domains/{id}/addresses
List the addresses on a domain
Every address on the domain, alphabetically, a page at a time, with its id, label, whether it is enabled and when it last received mail. That is the addresses created by hand or through this API and the ones the catch-all picked up when mail first arrived for them. Disabled addresses are listed. Removed addresses and the catch-all itself are not: the catch-all is receiving.catchAll on the domain.
Requires the domains:read scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.
Query parameters
limitintegerRows per page, 1 to 100.
At least 1At most 100Default25cursorstringThe previous page's
nextCursor, passed back as it came. It is opaque: it holds where the last row sat in this list's order, so a row deleted or edited between pages never breaks the walk, and the next page starts at the first row that sorts after it. A value this list did not hand out is a 400invalid_cursor.
Returns
A page of addresses, alphabetically.
Errors
- 404
resource_not_found: no such domain. A domain in another workspace reads the same as one that does not exist.
The errors every operation can return400401403422429500Error catalog
Also available in
- TypeScript
domains.listAddresses()domains.listAllAddresses()domains.iterateAddresses()- Python
domains.list_addresses()domains.list_all_addresses()domains.iterate_addresses()- Ruby
domains.list_addressesdomains.list_all_addressesdomains.iterate_addresses- PHP
domains->listAddressesdomains->listAllAddressesdomains->iterateAddresses- Go
Domains.ListAddressesDomains.ListAllAddressesDomains.IterateAddresses- Java
domains().listAddressesdomains().listAllAddressesdomains().iterateAddresses- C#
Domains.ListAddressesAsyncDomains.ListAllAddressesAsyncDomains.IterateAddressesAsync- CLI
nextmail domains list-addresses- MCP
getAddressScopelistDomainAddresses
POST/domains/{id}/addresses
Create an address
Creates an address on the domain, enabled, and returns it. The domain does not have to be verified yet, but the address receives nothing until it is.
When the domain has its catch-all on, the new address starts with the per-address settings of the catch-all, such as its signature and tracking, apart from the privacy settings. It does not copy them again later.
Creating an address that already exists, or one that was removed, is not an error: it comes back enabled and keeps its id, and its label changes only when you send one. Only an address that does not exist yet counts against the workspace limit. An address the catch-all picked up becomes one created by hand, so it keeps receiving when the catch-all is turned off. The workspace limit on addresses applies to new ones, and an address reserved as somebody's account address cannot be created.
The address can start with its delivery chosen (destination, webhookId, tapWebhookIds), an expiry (expiresAt, onExpiry) and group settings (groupPosting, groupKeepCopy), each as on PATCH. Choosing where the mail goes, or that the address is deleted when it expires, asks an OAuth access token for a verification code. Pointing mail at a webhook endpoint needs threads:read as well, and choosing deletion needs threads:write and, for an access token acting for a member, a role that may manage the workspace.
A key limited to particular addresses or domains has to hold this whole domain.
Requires the domains:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.
Request body
localPartstringRequiredThe part in front of the @, 1 to 64 characters once trimmed, and lowercased. Letters, digits, the backtick and ! # $ % & ' * + / = ? ^ _ { | } ~ - are allowed, and so are dots between them.
*on its own is how the catch-all is written, so it is refused: turn the catch-all on withPATCH /domains/{id}instead.1 to 64 characterslabelstringA name for the address shown in the app, trimmed, up to 120 characters. Null, an empty string or leaving it out sets none.
Can be nullUp to 120 characterskeepOriginalbooleanTrue keeps every message the address receives byte for byte as it arrived, which
GET /threads/{id}/messages/{messageId}/rawthen answers. Leaving it out keeps it off for a new address and leaves it as it is for one that already exists.destinationstringmailbox, the default, keeps the mail here.webhooksends every message to the endpoint inwebhookIdand keeps none here, andgroupsends it to the group members of the address.forwardneeds a forwarding destination that is on, which a new address never has, so add destinations first and switch withPATCH. Choosing it asks an OAuth access token for a verification code.One of"mailbox""forward""webhook""group"webhookIdstringA webhook endpoint of this workspace that mail goes to, sent with
destination: "webhook", or alone to change the endpoint of an address whose destination is alreadywebhook. Needsthreads:read.Up to 128 characterstapWebhookIdsstring[]Up to 5 webhook endpoints of this workspace that also get every message the address receives, as
email.receivedwhen it was filed here andemail.routedwhen it went to a webhook, once per message even when the endpoint subscribes to it too. It replaces the list, and an empty list or null clears it. Naming any needsthreads:read, and more than 5 is refused with 422too_many_taps.Can be nullexpiresAtstringAn RFC 3339 time, at least 60 seconds and at most 10 years ahead, when the address stops taking mail and sending. Null clears it. On an address that expired, a later time or null turns it back on.
Can be nullFormatdate-timeonExpirystringstop, the default, switches the address off when it expires and keeps its mail.deleteremoves the address and the conversations delivered to it, which needsthreads:writeand asks an OAuth access token for a verification code.One of"stop""delete"groupPostingstringWho may send to the address while
destinationisgroup:anyone, the default,members(its group members, passing DMARC) orworkspace(an address on a domain of this workspace, passing DMARC). Anybody else is refused.One of"anyone""members""workspace"groupKeepCopybooleanTrue keeps each message sent to a group in the group address's own mailbox as well. Off by default.
Returns
The address.
Errors
- 400
malformed_json: the body is not valid JSON.- 403
insufficient_scope: the key lacksdomains:write, orthreads:readfor a webhook destination ortapWebhookIds, orthreads:writeforonExpiry: "delete".step_up_requiredwhen an OAuth access token chooses where the mail goes or that the address is deleted without a recent verification code, andinsufficient_authoritywhen the member it acts for does not reach an address that already exists.step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code withPOST /security/step-up, send it toPOST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.- 404
resource_not_found: no such domain. A domain in another workspace reads the same as one that does not exist.webhook_not_foundwithparamonwebhookIdortapWebhookIdswhen an endpoint named there is not in this workspace.- 409
forward_requiredondestinationforforwardwhen the address has no forwarding destination that is on, which a new address never has.- 422
invalid_parameteronlocalPart,label,keepOriginal,expiresAt(not 60 seconds to 10 years ahead) orwebhookId(missing for a webhook destination, or sent with another one),too_many_tapsontapWebhookIds,unknown_parameterfor any other field,workspace_limit_reachedwhen the workspace already holds the most addresses it may have, andcapability_unsupportedwithparam: "domainAllowlist"for a narrowed key that does not hold this whole domain.
The errors every operation can return401429500Error catalog
Also available in
GET/domains/{id}/addresses/{addressId}
Retrieve an address
One address on the domain.
Requires the domains:read scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.
Returns
The address.
Errors
- 404
resource_not_found: no such domain, or no such address on it. A removed address is not found.
The errors every operation can return400401403422429500Error catalog
Also available in
PATCH/domains/{id}/addresses/{addressId}
Update an address
Renames an address, turns it off and on, chooses where its mail goes, sets when it expires, sets who may post to a group, or keeps its originals. Every field is optional, and a field left out is left alone.
A disabled address stops taking mail: mail to it is refused while the sending server is still connected, so the sender gets a bounce, and nothing can be sent from it. It keeps its mail, its settings and the people who can reach it, so turning it back on picks up where it left off. That is the difference from DELETE.
An address with expiresAt stops at that moment: mail to it is refused as if it did not exist, sends from it are refused with 403 address_expired, and a minute later it is switched off, or deleted with the conversations delivered to it when onExpiry is delete. A later expiresAt, or null, on an address that expired turns it back on, and so does enabled: true, which also clears an expiresAt that has passed.
Changing destination, webhookId or tapWebhookIds, or choosing that the address is deleted when it expires, asks an OAuth access token for a verification code, and an access token acting for a member needs that member to reach the address. Pointing mail at a webhook endpoint needs threads:read as well, and choosing deletion needs threads:write and a role that may manage the workspace.
A key limited to particular addresses or domains has to hold this whole domain.
Requires the domains:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.
Request body
labelstringA new name for the address, trimmed, up to 120 characters. Null or an empty string removes it. Leaving the field out leaves it alone.
Can be nullUp to 120 charactersenabledbooleanFalse stops the address taking mail: mail to it is refused while the sending server is still connected, so the sender gets a bounce. True takes mail again. Nothing already delivered is touched either way.
destinationstringWhere the mail of the address goes.
mailboxkeeps it here, and sends a copy to every forwarding destination that is on.forwardsends it only to the destinations and keeps no copy, so it needs at least one destination that is on, or it is refused with 409forward_required. Destinations are managed under/domains/{id}/addresses/{addressId}/forwards.webhooksends every message to the endpoint inwebhookIdand keeps none here, andgroupsends it to the group members of the address. Changing it asks an OAuth access token for a verification code.One of"mailbox""forward""webhook""group"keepOriginalbooleanTrue keeps every message the address receives from now on byte for byte as it arrived, which
GET /threads/{id}/messages/{messageId}/rawthen answers. False stops keeping new ones, and the originals already kept stay with their messages until those are deleted.webhookIdstringA webhook endpoint of this workspace that mail goes to, sent with
destination: "webhook", or alone to change the endpoint of an address whose destination is alreadywebhook. Needsthreads:read.Up to 128 characterstapWebhookIdsstring[]Up to 5 webhook endpoints of this workspace that also get every message the address receives, as
email.receivedwhen it was filed here andemail.routedwhen it went to a webhook, once per message even when the endpoint subscribes to it too. It replaces the list, and an empty list or null clears it. Naming any needsthreads:read, and more than 5 is refused with 422too_many_taps.Can be nullexpiresAtstringAn RFC 3339 time, at least 60 seconds and at most 10 years ahead, when the address stops taking mail and sending. Null clears it. On an address that expired, a later time or null turns it back on.
Can be nullFormatdate-timeonExpirystringstop, the default, switches the address off when it expires and keeps its mail.deleteremoves the address and the conversations delivered to it, which needsthreads:writeand asks an OAuth access token for a verification code.One of"stop""delete"groupPostingstringWho may send to the address while
destinationisgroup:anyone, the default,members(its group members, passing DMARC) orworkspace(an address on a domain of this workspace, passing DMARC). Anybody else is refused.One of"anyone""members""workspace"groupKeepCopybooleanTrue keeps each message sent to a group in the group address's own mailbox as well. Off by default.
Returns
The address as it stands after this call.
Errors
- 400
malformed_json: the body is not valid JSON.- 403
insufficient_scope: the key lacksdomains:write, orthreads:readfor a webhook destination ortapWebhookIds, orthreads:writefor deletion on expiry.step_up_requiredwhen an OAuth access token changes where the mail goes or chooses deletion without a recent verification code, andinsufficient_authoritywhen the member it acts for does not reach the address or may not manage the workspace.step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code withPOST /security/step-up, send it toPOST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.- 404
resource_not_found: no such domain, or no such address on it. A removed address is not found.webhook_not_foundwithparamonwebhookIdortapWebhookIdswhen an endpoint named there is not in this workspace.- 409
forward_requiredondestinationforforwardwhen the address has no forwarding destination that is on.- 422
invalid_parameteronlabel,enabled,keepOriginal,expiresAt(not 60 seconds to 10 years ahead) orwebhookId(missing for a webhook destination, or sent with another one),too_many_tapsontapWebhookIds,unknown_parameterfor any other field, andcapability_unsupportedwithparam: "domainAllowlist"for a narrowed key that does not hold this whole domain.
The errors every operation can return401429500Error catalog
Also available in
DELETE/domains/{id}/addresses/{addressId}
Remove an address
Removes the address. Mail to it is refused from then on, even when the catch-all on the domain is on. Its forwarding stops, its settings are deleted, the people who were given access to it lose that access, and its password sign-in is revoked. Mail it already received stays in the mailbox.
Creating the same address again with POST /domains/{id}/addresses brings it back with the same id, enabled, but without its old settings or access.
A key limited to particular addresses or domains has to hold this whole domain.
Requires the domains:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.
Returns
Removed.
Errors
- 403
insufficient_scope: the key lacksdomains:write.insufficient_authority: an OAuth access token acts for a member whose role does not holdworkspace:manage, which removing an address needs, as it does in the app.step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code withPOST /security/step-up, send it toPOST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.- 404
resource_not_found: no such domain, or no such address on it. An address already removed is not found.- 422
capability_unsupportedwithparam: "domainAllowlist"for a narrowed key that does not hold this whole domain.
The errors every operation can return400401429500Error catalog
Also available in
PUT/domains/{id}/addresses/{addressId}/photo
Set the photo of an address
Uploads the photo shown for the address in Nextmail, in place of the domain logo, replacing any there was. Send the image itself as the body, not JSON, with its type in Content-Type: image/png, image/jpeg, image/webp, image/gif. Up to 100 MB goes in. It is cropped to a 512 pixel square and stored as JPEG or PNG, the formats other services such as Gravatar take. Pass crop to choose the part of the image to keep, as the app does when you drag and zoom it.
A key limited to particular addresses or domains has to hold this whole domain.
Requires the domains:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.
Query parameters
cropstringThe part of the image to keep, as four numbers from 0 to 1 separated by commas: the left edge, the top edge, the width and the height, each a fraction of the image as it shows upright.
0.25,0,0.5,1keeps the middle half of its width. Leave it out to keep the whole image. A crop that does not fit inside the image is refused withinvalid_parameter.Pattern^[0-9.]+,[0-9.]+,[0-9.]+,[0-9.]+$
Request body
Content typeimage/png, image/jpeg, image/webp, image/gif
Returns
The address, with its new photoUrl.
Errors
- 404
resource_not_found: no such domain, or no such address on it. A removed address is not found.- 422
invalid_imagewhen the body is not an image of an accepted type, is too large or cannot be read.capability_unsupportedwithparam: "domainAllowlist"for a narrowed key that does not hold this whole domain.- 502
image_not_stored: the image was read but could not be stored. Try again.- 503
image_busy: the image service is saturated. Try again shortly.
The errors every operation can return400401403429500Error catalog
Also available in
DELETE/domains/{id}/addresses/{addressId}/photo
Remove the photo of an address
Removes the photo of the address and deletes the stored image, so the domain logo is shown for it again. Removing a photo from an address that has none changes nothing.
A key limited to particular addresses or domains has to hold this whole domain.
Requires the domains:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.
Returns
The address, with photoUrl null.
Errors
- 404
resource_not_found: no such domain, or no such address on it. A removed address is not found.- 422
capability_unsupportedwithparam: "domainAllowlist"for a narrowed key that does not hold this whole domain.
The errors every operation can return400401403429500Error catalog
Also available in
GET/app-host
Retrieve the web app address
The web app address of the workspace, with everything the Branded app tab shows: the address and the verified domain it sits under, whether people can sign in there, the DNS records to publish, and when it was last checked. With no address set, status is none, and domains and suggested list the verified domains and the address the app suggests. sender says where the emails sent to the people of the workspace come from, and what that still waits on, as the tab shows once the address is live. PUT and POST /app-host/verify return it too.
Reading it checks the address again when its last check is more than 15 seconds old, so polling this route is how to wait for it to go live: active turns true on the read whose check finds it live. POST /app-host/verify checks straight away.
Only the members of the workspace, the people who sign in with one of its addresses and anyone with a pending invitation can sign in at the address, and they see the workspace brand there. Without white label the address is kept but paused: paused is true and nobody can sign in there until the workspace has white label again.
Requires the domains:read scope.
Returns
The web app address, or status: "none" when none is set.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
- TypeScript
appHost.get()- Python
app_host.get()- Ruby
app_host.get- PHP
appHost->get- Go
AppHost.Get- Java
appHost().get- C#
AppHost.GetAsync- CLI
nextmail app-host get- MCP
getAppHostgetBrandedSender
PUT/app-host
Set the web app address
Sets the web app address of the workspace, replacing any it had, and returns it in the same shape as GET /app-host. host is a subdomain such as mailbox.example.com, on a verified domain of the workspace or on any other domain you control, and the workspace has to have white label, which comes with the Pro, Max or Enterprise plan. Setting the address it already has changes nothing and checks it again.
On a verified domain of the workspace the address is set up during the call. On any other domain it is set up once the TXT record in ownershipRecord answers, which proves the domain is yours. Either way it stays pending until its records answer and its certificate is issued, usually a few minutes after they are published. Publish record, and ownershipRecord when it is not null, at your DNS provider exactly as given, then poll GET /app-host or call POST /app-host/verify. This call writes no DNS record itself.
An address on another domain replaces the old one once it is set up. An address on the same domain replaces the old one straight away. Everyone signed in at a replaced address is signed out.
Only the members of the workspace, the people who sign in with one of its addresses and anyone with a pending invitation can sign in at the address. Anyone else gets the usual wrong email or password answer, and an invited person can create their account there.
The address applies to the whole workspace, so a key or app limited to particular addresses or domains cannot set it.
Requires the domains:write scope.
Request body
hoststringRequiredA subdomain such as
mailbox.example.com, on a verified domain of this workspace or on any other domain you control. It is trimmed and lowercased, and anhttp://orhttps://prefix, a path and a trailing dot are stripped. A bare domain cannot be used.1 to 253 characters
Returns
The web app address as this call left it.
Errors
- 400
malformed_json: the body is not valid JSON.- 403
insufficient_scope: the key lacksdomains:write.plan_required: the workspace is on the free plan, and a web app address needs a paid one.step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code withPOST /security/step-up, send it toPOST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.- 409
app_host_in_usewithparam: "host": another workspace already uses the address, or a mail domain, a tracking host or a files host has that name. When another workspace set the address but never proved it, the message gives the TXT record that frees it for you.- 422
invalid_app_hostwithparam: "host": the address is not a hostname, it is a bare domain, or it is on a domain Nextmail runs, and the message suggests one that works.invalid_parameteronhostwhen it is missing, empty or longer than 253 characters,unknown_parameterfor any other field, andcapability_unsupportedwithparam: "domainAllowlist"for a key or app limited to particular addresses or domains.- 503
app_host_unavailable: the address could not be set up just now, or web app addresses are switched off. Try again in a minute.
The errors every operation can return401404429500Error catalog
Also available in
- TypeScript
appHost.set()- Python
app_host.set()- Ruby
app_host.set- PHP
appHost->set- Go
AppHost.Set- Java
appHost().set- C#
AppHost.SetAsync- CLI
nextmail app-host set- MCP
removeAppHostsetAppHost
DELETE/app-host
Remove the web app address
Removes the web app address of the workspace. Everyone signed in there is signed out, the address stops opening the workspace, and emails link to nextmail.sh again. People keep working at nextmail.sh with the same accounts. Its DNS records are not touched, so remove them at your DNS provider when you no longer need them.
Removing it when none is set changes nothing and answers deleted: false, so a repeated call is safe. Setting the same address again later sets it up from scratch.
The address applies to the whole workspace, so a key or app limited to particular addresses or domains cannot remove it.
Requires the domains:write scope.
Returns
What was removed.
Errors
- 403
insufficient_scope: the key lacksdomains:write.step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code withPOST /security/step-up, send it toPOST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.- 422
capability_unsupportedwithparam: "domainAllowlist"for a key or app limited to particular addresses or domains.- 503
app_host_unavailable: the address could not be removed just now, so it is still set. Try again in a minute.
The errors every operation can return400401404429500Error catalog
Also available in
POST/app-host/verify
Check the web app address now
Checks the web app address straight away, whether its DNS records answer and its certificate is issued, and returns it in the same shape as GET /app-host. When the last check ran under 10 seconds ago, the call checks nothing new and returns the address as it stands. With no address set, it checks nothing and answers status: "none". No body.
Requires the domains:write scope.
Returns
The web app address as the check left it.
Errors
- 403
insufficient_scope: the key lacksdomains:write.
The errors every operation can return400401404422429500Error catalog
Also available in
GET/domains/{id}/addresses/{addressId}/forwards
List the forwarding destinations of an address
Every place the mail of the address is forwarded to, with whether each destination confirmed it wants it, and destination, which says whether the address also keeps a copy here. An address forwards to 10 places at most.
Requires the domains:read scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.
Returns
The destinations, oldest first.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
POST/domains/{id}/addresses/{addressId}/forwards
Forward the mail of an address
Adds places the mail of the address goes to. Each one is asked to confirm by email first, and receives nothing until it does. An address hosted here, one already on the list, one that would make a loop or one that refused mail from this workspace before is skipped and named in skipped with the reason, and the rest are added. An address that is switched off is refused with 409 address_disabled. A key or an app limited to some addresses needs the whole domain, and an app acting for a member can only forward an address that member reaches.
Requires the domains:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.
Request body
emailsstring[]RequiredThe addresses to forward to, 1 to 10 of them. Each is trimmed and lowercased.
1 to 10 items
Returns
What was added and what was skipped.
Errors
- 403
The key lacks the scope, or may not send as that address.
step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code withPOST /security/step-up, send it toPOST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.
The errors every operation can return400401404422429500Error catalog
Also available in
PATCH/domains/{id}/addresses/{addressId}/forwards/{forwardId}
Switch a forwarding destination on or off
Pauses a destination, or switches it back on. A paused destination keeps its confirmation, so switching it on again needs no new one. When the last destination that is on is paused, the address goes back to keeping its mail here.
Requires the domains:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.forwardIdstringRequiredA forwarding destination of the address, as
GET /domains/{id}/addresses/{addressId}/forwardslists it.
Request body
enabledbooleanRequiredFalse pauses the destination, true switches it back on.
Returns
The destination as it is now.
Errors
- 403
The key lacks the scope, or may not send as that address.
step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code withPOST /security/step-up, send it toPOST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.
The errors every operation can return400401404422429500Error catalog
Also available in
- TypeScript
domains.updateAddressForward()- Python
domains.update_address_forward()- Ruby
domains.update_address_forward- PHP
domains->updateAddressForward- Go
Domains.UpdateAddressForward- Java
domains().updateAddressForward- C#
Domains.UpdateAddressForwardAsync- CLI
nextmail domains update-address-forward- MCP
setAddressForwardEnabled
DELETE/domains/{id}/addresses/{addressId}/forwards/{forwardId}
Remove a forwarding destination
Stops forwarding to that place. When it was the last destination that was on, the address goes back to keeping its mail here.
Requires the domains:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.forwardIdstringRequiredA forwarding destination of the address, as
GET /domains/{id}/addresses/{addressId}/forwardslists it.
Returns
Removed.
Errors
- 403
The key lacks the scope, or may not send as that address.
step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code withPOST /security/step-up, send it toPOST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.
The errors every operation can return400401404422429500Error catalog
Also available in
- TypeScript
domains.deleteAddressForward()- Python
domains.delete_address_forward()- Ruby
domains.delete_address_forward- PHP
domains->deleteAddressForward- Go
Domains.DeleteAddressForward- Java
domains().deleteAddressForward- C#
Domains.DeleteAddressForwardAsync- CLI
nextmail domains delete-address-forward- MCP
removeAddressForward
POST/domains/{id}/addresses/{addressId}/forwards/{forwardId}/resend
Ask a forwarding destination to confirm again
Sends the confirmation email to the destination again. status says what happened: sent, already-confirmed when it has confirmed and needs nothing, too-soon when the last one went out moments ago, revoked when it refused mail from this workspace, and send-failed when the email could not be sent. A destination that bounced is asked again like one that never answered.
Requires the domains:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.forwardIdstringRequiredA forwarding destination of the address, as
GET /domains/{id}/addresses/{addressId}/forwardslists it.
Returns
What became of the request.
Errors
- 403
The key lacks the scope, or may not send as that address.
step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code withPOST /security/step-up, send it toPOST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.
The errors every operation can return400401404422429500Error catalog
Also available in
- TypeScript
domains.resendAddressForwardConsent()- Python
domains.resend_address_forward_consent()- Ruby
domains.resend_address_forward_consent- PHP
domains->resendAddressForwardConsent- Go
Domains.ResendAddressForwardConsent- Java
domains().resendAddressForwardConsent- C#
Domains.ResendAddressForwardConsentAsync- CLI
nextmail domains resend-address-forward-consent- MCP
resendAddressForwardConsent
GET/domains/{id}/addresses/{addressId}/members
List who reaches an address
Everybody who can read the address, and how: the owner of the workspace, a role that reaches every address, a grant of the whole domain, or a grant of the address itself. removable says whether the caller may take that grant back from the address alone: it is true only for a grant of the address itself that the caller may revoke, and never for the grant of the member who connected a mailbox while they are in the workspace. Change grants with POST /members/{userId}/addresses and DELETE /members/{userId}/addresses/{addressId}.
Requires the members:read scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.
Returns
Who reaches the address.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
GET/domains/{id}/addresses/{addressId}/login
Read the sign-in of an address
Whether the address has a password of its own, which lets somebody sign in to Nextmail as that address alone and read and send only its mail. login is null when it has none. It needs members:write, like setting one.
Requires the members:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.
Returns
The sign-in, or null.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
PUT/domains/{id}/addresses/{addressId}/login
Set the password of an address
Gives the address a password, or replaces the one it has. Whoever holds it signs in as the address and reaches only its mail. The password needs at least 8 characters with a lowercase letter, an uppercase letter, a number and a special character, or the call is a 422 invalid_parameter on password. An address that an account on Nextmail already signs in as is refused with 409 account_exists, a first password needs a plan with team access, and a key or an app has to hold everything a sign-in for one address may do.
Requires the members:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.
Request body
passwordstringRequiredAt least 8 characters, with a lowercase letter, an uppercase letter, a number and a special character.
1 to 512 characters
Returns
The sign-in as it is now.
Errors
- 403
The key lacks the scope, or may not send as that address.
step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code withPOST /security/step-up, send it toPOST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.
The errors every operation can return400401404422429500Error catalog
Also available in
DELETE/domains/{id}/addresses/{addressId}/login
Remove the sign-in of an address
Takes the password away and signs out whoever used it. The address and its mail stay. An address with no password is a 404.
Requires the members:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.
Returns
Removed.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
GET/dns-connections
List DNS connections
The DNS provider accounts connected to the workspace, through which Nextmail writes the records of a domain itself, with the domains each one serves. configured is false when this server cannot connect a provider at all. POST /dns-connections starts a connection, which the person finishes in a browser because the provider asks them to sign in.
Requires the domains:read scope.
Returns
Every connection, disconnected ones included.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
POST/dns-connections
Start connecting a DNS provider account
Starts connecting a Cloudflare account to the workspace and answers with the url to open. The person the key or app acts for, the workspace owner for an API key, opens it in a browser signed in to Nextmail with this workspace open. Cloudflare asks them to sign in and choose what Nextmail may reach, and the connection is made when Cloudflare sends them back, which takes that signed-in browser session and never this credential. The link works once, within 10 minutes. Connecting an account that is already connected refreshes it. A server that cannot connect a provider answers 503 dns_unavailable. A key or an app limited to particular addresses or domains is refused with 422 capability_unsupported, and an app acting for a member needs workspace:manage in their role.
Requires the domains:write scope.
Returns
The link to open.
Errors
- 403
The key lacks the scope, or may not send as that address.
step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code withPOST /security/step-up, send it toPOST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.- 503
dns_unavailable: connecting a DNS provider is not set up on this server.
The errors every operation can return400401404422429500Error catalog
Also available in
GET/dns-connections/{id}
Retrieve a DNS connection
One connection with what disconnecting it would leave behind: the domains it serves, the records Nextmail wrote through it, busy for the domains a sync is running on right now, and keepsMail for the verified domains whose records come down with it.
Requires the domains:read scope.
Path parameters
idstringRequiredA DNS connection, as
GET /dns-connectionslists it.
Returns
The connection.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
DELETE/dns-connections/{id}
Disconnect a DNS connection
Takes the records Nextmail wrote through the connection down, detaches every domain it serves and revokes it at the provider, so a verified domain whose records come down stops receiving mail. detached counts what came down and lists what is still published. A connection that is already disconnected is removed from the list instead, once nothing is left on it. A key or an app limited to particular addresses or domains is refused with 422 capability_unsupported, and an app acting for a member needs workspace:manage in their role.
Requires the domains:write scope.
Path parameters
idstringRequiredA DNS connection, as
GET /dns-connectionslists it.
Returns
Disconnected, or removed.
Errors
- 403
The key lacks the scope, or may not send as that address.
step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code withPOST /security/step-up, send it toPOST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.
The errors every operation can return400401404422429500Error catalog
Also available in
GET/domains/{id}/dns
Read how the DNS of a domain is set up
Whether Nextmail writes the records of the domain itself, through which connection and zone, where each kind of record stands, and the records left behind to delete by hand. zone says which connected zone answers for the domain: one is resolved, several are ambiguous and need a choice, none holds it, or the connections could not be asked (unusable).
Requires the domains:read scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.
Query parameters
refreshbooleanTrue asks the providers again which zone answers for the domain, rather than using the answer from the last minutes.
Returns
The DNS setup of the domain.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
- TypeScript
domains.getDns()- Python
domains.get_dns()- Ruby
domains.get_dns- PHP
domains->getDns- Go
Domains.GetDNS- Java
domains().getDns- C#
Domains.GetDnsAsync- CLI
nextmail domains get-dns- MCP
getDomainDns
PUT/domains/{id}/dns
Choose the zone a domain is set up through
Attaches the domain to a zone of a connection, after checking the zone covers the domain, is active and takes a test record. Nothing is written yet: sync the domain to write its records. A domain set up through another zone is refused with 409 dns_zone_conflict.
Requires the domains:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.
Request body
connectionIdstringRequiredThe connection that holds the zone, from
dnsConnections.list.1 to 64 characterszoneIdstringRequiredThe zone, as
zone.candidatesofgetDnslists it.1 to 64 characters
Returns
The DNS setup as it is now.
Errors
- 403
The key lacks the scope, or may not send as that address.
step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code withPOST /security/step-up, send it toPOST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.
The errors every operation can return400401404422429500Error catalog
Also available in
POST/domains/{id}/dns/sync
Write the DNS records of a domain
Finds the zone that answers for the domain among the connections, attaches it when it is the only one, and writes or repairs every record the domain needs there. With purpose, only that kind of record. When no single zone answers, nothing is written and outcome is refused with the reason in message. A domain that was waiting for its records is verified once they are in place.
Requires the domains:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.
Request body
purposestringOnly this kind of record:
dmarc,tracking,storage,bimiorapp-host.One of"dmarc""tracking""storage""bimi""app-host"
Returns
What was written, or why nothing was.
Errors
- 403
The key lacks the scope, or may not send as that address.
step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code withPOST /security/step-up, send it toPOST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.
The errors every operation can return400401404422429500Error catalog
Also available in
GET/domains/{id}/addresses/{addressId}/mail-apps
Read the mail app settings of an address
The IMAP, SMTP and POP3 servers that put the address into Apple Mail, Gmail, Outlook, Thunderbird or any other mail app, the CalDAV and CardDAV servers that put its calendar and contacts into calendar and contacts apps, the username to sign in with, and which of those connections the address accepts. The password is an app password of the address, or its own password sign-in when it has one and no two-factor.
It takes threads:read on the address, as the app lets whoever holds an address set up their own mail apps. An app a member connected reaches the addresses that member holds, a key or app limited to particular addresses reaches only those, and any other address is a 404.
Requires the threads:read scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.
Returns
The settings.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
PATCH/domains/{id}/addresses/{addressId}/mail-apps
Turn mail app connections on or off for an address
Switches each kind of connection on or off: IMAP, SMTP and POP3 for mail, CalDAV for the calendar and CardDAV for contacts. Send only the ones to change. A switched-off kind refuses every sign-in to it, whatever the password, and connections of that kind that are already open end within minutes. Every kind is on until it is switched off. Only the workspace owner, or someone whose role manages domains, may change them, and anyone else gets a 403 insufficient_authority.
It takes threads:read on the address, as the app lets whoever holds an address set up their own mail apps. An app a member connected reaches the addresses that member holds, a key or app limited to particular addresses reaches only those, and any other address is a 404.
Requires the threads:read and domains:write scopes.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.
Request body
imapbooleanAccept IMAP sign-ins, which keep folders and read state in step.
smtpbooleanAccept SMTP sign-ins, for sending from a mail app.
pop3booleanAccept POP3 sign-ins, for apps that only download the inbox.
caldavbooleanServe the calendar of the address over CalDAV.
carddavbooleanServe the contacts of the workspace over CardDAV.
Returns
The settings, with the switches as they now stand.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
- TypeScript
domains.updateMailAppSettings()- Python
domains.update_mail_app_settings()- Ruby
domains.update_mail_app_settings- PHP
domains->updateMailAppSettings- Go
Domains.UpdateMailAppSettings- Java
domains().updateMailAppSettings- C#
Domains.UpdateMailAppSettingsAsync- CLI
nextmail domains update-mail-app-settings- MCP
updateMailAppSettings
GET/domains/{id}/addresses/{addressId}/app-passwords
List the app passwords of an address
Every app password that lets a mail app sign in to the address, newest first. The passwords themselves are shown only when created. A key or app holding members:write, for the workspace owner or someone whose role manages members, sees the passwords of everyone who holds the address, and any other caller sees only its own.
It takes threads:read on the address, as the app lets whoever holds an address set up their own mail apps. An app a member connected reaches the addresses that member holds, a key or app limited to particular addresses reaches only those, and any other address is a 404.
Requires the threads:read scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.
Returns
The app passwords, newest first.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
POST/domains/{id}/addresses/{addressId}/app-passwords
Create an app password for an address
Makes a password a mail app signs in with, using the address as the username. password in the answer is the only time it is shown, so hand it over or store it then. It acts as the caller for this address alone. A person can hold 20 for one address. Beyond that the call is a 422 app_password_limit_reached, and an address that is switched off or forwards all its mail is a 422 address_has_no_mailbox. The caller also needs every scope the password would carry, and is a 403 insufficient_authority without one.
It takes members:write, because an app password opens the mailbox over IMAP and SMTP, so a key that may only read is never given one to hand out. A key or app limited to particular addresses, and an app a member connected, get a 422 capability_unsupported.
Requires the members:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.
Request body
namestringRequiredWhat to call the password, such as the device it is for, 1 to 64 characters. It is trimmed.
1 to 64 characters
Returns
Created, with the password shown this once.
Errors
- 403
The key lacks the scope, or may not send as that address.
step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code withPOST /security/step-up, send it toPOST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.
The errors every operation can return400401404422429500Error catalog
Also available in
DELETE/domains/{id}/addresses/{addressId}/app-passwords/{passwordId}
Revoke an app password
Revokes the password. A mail app using it is signed out within minutes. An unknown or already revoked password is a 404.
It takes members:write, because an app password opens the mailbox over IMAP and SMTP, so a key that may only read is never given one to hand out. A key or app limited to particular addresses, and an app a member connected, get a 422 capability_unsupported.
Requires the members:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.passwordIdstringRequiredAn app password of the address, as
GET /domains/{id}/addresses/{addressId}/app-passwordslists it.
Returns
Revoked.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
PATCH/domains/{id}/addresses/{addressId}/app-passwords/{passwordId}
Rename an app password
Changes the name shown for the password, such as the device it is for. The password itself stays the same and keeps working. An unknown or revoked password is a 404.
It takes members:write, because an app password opens the mailbox over IMAP and SMTP, so a key that may only read is never given one to hand out. A key or app limited to particular addresses, and an app a member connected, get a 422 capability_unsupported.
Requires the members:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.passwordIdstringRequiredAn app password of the address, as
GET /domains/{id}/addresses/{addressId}/app-passwordslists it.
Request body
namestringRequiredThe new name, 1 to 64 characters. It is trimmed.
1 to 64 characters
Returns
Renamed.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
POST/domains/{id}/addresses/{addressId}/mail-app-setup
Email a mail app setup link for an address
Emails the recipient a link that creates an app password for the address, shows it once with the server settings, and offers a profile for Apple devices. The link works once and expires in three days. The password it creates acts as the caller. When the email cannot be sent the call is a 503 setup_email_not_sent and nothing is created. A workspace can email 50 setup links a day, and past that the call is a 429 setup_email_rate_limited. The caller also needs every scope the password would carry, and is a 403 insufficient_authority without one.
It takes members:write, because an app password opens the mailbox over IMAP and SMTP, so a key that may only read is never given one to hand out. A key or app limited to particular addresses, and an app a member connected, get a 422 capability_unsupported.
Requires the members:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.
Request body
recipientstringRequiredThe email address to send the link to, such as the person who will use the mail app. It is trimmed and lowercased.
Up to 320 charactersFormatemail
Returns
Sent.
Errors
- 403
The key lacks the scope, or may not send as that address.
step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code withPOST /security/step-up, send it toPOST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.- 503
setup_email_not_sent: the email could not be sent, so no link exists and nothing was created.
The errors every operation can return400401404422429500Error catalog
Also available in
POST/domains/{id}/addresses/{addressId}/mail-app-profile-link
Make a link that sets an address up on an Apple device
Makes a one-time link that sets the address up on an iPhone, iPad or Mac. Opened there, url downloads an Apple configuration profile with a new app password inside, named name, which signs in as the caller for this address alone. displayName and description are what the device shows for the profile. The password is made when the link is opened, not before, so nothing appears in the list of app passwords until then. The link works once and stops working at expiresAt, a few minutes later, so open it on the device straight away and keep it secret until then. A person can make 10 of these links an hour, and past that the call is a 429 profile_link_rate_limited. The caller also needs every scope the password would carry, and is a 403 insufficient_authority without one.
It takes members:write, because an app password opens the mailbox over IMAP and SMTP, so a key that may only read is never given one to hand out. A key or app limited to particular addresses, and an app a member connected, get a 422 capability_unsupported.
Requires the members:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.
Request body
namestringRequiredWhat to call the app password the link makes, such as the device it is for, 1 to 64 characters. It is trimmed.
1 to 64 charactersdisplayNamestringRequiredThe name the device shows for the profile, 1 to 160 characters. It is trimmed.
1 to 160 charactersdescriptionstringRequiredThe description the device shows for the profile, 1 to 160 characters. It is trimmed.
1 to 160 characters
Returns
Made. The link works once.
Errors
- 403
The key lacks the scope, or may not send as that address.
step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code withPOST /security/step-up, send it toPOST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.- 422
address_has_no_mailbox: the address is switched off or forwards all its mail, so a mail app has nothing to open.capability_unsupported: the key or app is limited to particular addresses, or a member connected it.invalid_parameterorunknown_parameter: a field is missing, too long or not one this takes.- 429
profile_link_rate_limited: this person made 10 links in the last hour. Wait forRetry-After.rate_limited: the workspace's keys and apps together made more requests in 60 seconds than its limit, 1,000 on Starter, 5,000 on Pro and 10,000 on Max, unless the workspace has a limit of its own. Wait for the seconds inRetry-After. A request refused this way is not billed. Answered requests are billed at theapiRequestsrate of the plan while pay as you go is on. Per 1,000,000 requests that is $0.50 on Starter, $0.30 on Pro and $0.20 on Max.
The errors every operation can return400401404500Error catalog
Also available in
- TypeScript
domains.createMailAppProfileLink()- Python
domains.create_mail_app_profile_link()- Ruby
domains.create_mail_app_profile_link- PHP
domains->createMailAppProfileLink- Go
Domains.CreateMailAppProfileLink- Java
domains().createMailAppProfileLink- C#
Domains.CreateMailAppProfileLinkAsync- CLI
nextmail domains create-mail-app-profile-link- MCP
createMailAppProfileLink
GET/domains/{id}/addresses/{addressId}/limits
Read the sending and receiving limits of an address
What the address may send and receive, what it has sent and received so far, how much mail it keeps, and when each count starts over. Every field is null until somebody sets it, and null means no limit of its own: the plan of the workspace still applies. A key or app limited to some addresses reaches only those, and any other address is a 404.
Requires the domains:read scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.
Returns
The limits, the usage and when it resets.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
PATCH/domains/{id}/addresses/{addressId}/limits
Change the sending and receiving limits of an address
Sets, changes or clears the limits of the address. Send only the fields to change: one left out stays as it is, and null clears it. Caps take whole numbers from 1 to 10,000,000, and lists up to 100 entries. receiving.storageBytes is a storage quota from 1 MiB to 1 TiB: a message that would take the address past it gets a permanent bounce (5.2.2), and deleting mail for good makes room again. The limits hold on every way mail leaves the address (the API, the SMTP relay, the app, the assistant, forms, broadcasts, automations and bookings) and every way it arrives. A send over a cap is a 429 address_limit_reached that names the cap in param and says in retryAfterSeconds and Retry-After when it lifts. Messages are counted when they are accepted, so a scheduled message counts the moment it is scheduled. Lowering a cap below what was already sent stops sending until enough of the window has passed. Only the workspace owner, or someone who reaches the address, may change them, and anyone else gets a 403 insufficient_authority. See GET /domains/{id}/addresses/{addressId}/limits for the answer.
Requires the domains:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.
Request body
sendingobjectWhat the address may send. A field left out stays as it is, and null clears it.
holdstringpausedholds sending: a new send is a 429address_sending_paused, and queued or scheduled mail waits and is tried again every 15 minutes.disabledstops it: a new send is a 403address_sending_disabled, and queued or scheduled mail fails. Null sends as usual.Can be nullOne of"paused""disabled"perHourintegerMessages it may send in the current clock hour, in UTC. Null removes the cap.
Can be nullAt least 1At most 10000000perDayintegerMessages it may send in the last 24 clock hours, the current one included. Null removes the cap.
Can be nullAt least 1At most 10000000perMonthintegerMessages it may send in the calendar month, in UTC. Null removes the cap.
Can be nullAt least 1At most 10000000recipientsPerHourintegerRecipients it may send to in the current clock hour, counting every address in
to,ccandbcc. Null removes the cap.Can be nullAt least 1At most 10000000recipientsPerDayintegerRecipients it may send to in the last 24 clock hours. Null removes the cap.
Can be nullAt least 1At most 10000000recipientsPerMonthintegerRecipients it may send to in the calendar month. Null removes the cap.
Can be nullAt least 1At most 10000000recipientsPerMessageintegerRecipients one message may have, counting
to,ccandbcctogether. More is a 403too_many_recipients. Null removes the cap.Can be nullAt least 1At most 10000000allowedRecipientsstring[]The only recipients it may send to, up to 100: an exact address (
[email protected]), a domain (client.com) or every subdomain of one (*.client.com), in any case. Null lets it send to anyone, and an empty list to nobody. Anyone else is a 403recipient_not_allowed.Can be nullUp to 100 itemsblockedRecipientsstring[]Recipients it may never send to, up to 100, written the same way. A message to one of them is a 403
recipient_not_allowed. Null or an empty list blocks nobody.Can be nullUp to 100 items
receivingobjectWhat the address accepts. A field left out stays as it is, and null clears it.
holdstringpausedturns mail away with a temporary bounce (4.2.1), so senders can try again later, anddisabledwith a permanent one (5.2.1). Null receives as usual.Can be nullOne of"paused""disabled"perHourintegerMessages it accepts in the current clock hour, in UTC. Past it, mail is turned away with a temporary bounce (4.2.2). Null removes the cap.
Can be nullAt least 1At most 10000000perDayintegerMessages it accepts in the last 24 clock hours. Null removes the cap.
Can be nullAt least 1At most 10000000perMonthintegerMessages it accepts in the calendar month, in UTC. Null removes the cap.
Can be nullAt least 1At most 10000000storageBytesintegerThe most mail it may keep, in bytes, from 1 MiB (1,048,576) to 1 TiB (1,099,511,627,776). Every message filed in its mailbox counts, with its kept original when it keeps originals, and deleting mail for good frees the space again. A message that would take it past the quota gets a permanent bounce (5.2.2). Mail stored before storage counting began and mail routed to a webhook are not counted. Null removes the quota.
Can be nullAt least 1048576At most 1099511627776allowedSendersstring[]The only senders it accepts mail from, up to 100, matched against the From header and the envelope sender, written like
allowedRecipients. Anyone else gets a permanent bounce (5.7.1). Null accepts anyone, and an empty list nobody.Can be nullUp to 100 items
Returns
The limits as they now stand, with the usage.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
GET/domains/{id}/routes
List the pattern routes of a domain
Every pattern route of the domain, a page at a time, in the order they are tried: the lowest priority first, then the longest literal text (the pattern without its * wildcards), then the oldest. Mail to an address is decided in this order: an address that exists, then these routes, then the catch-all. A route catches mail for the local part with any plus tag removed, without case. Each route says whether it takes mail now in active, and why not in inactiveReason. A domain holds at most 100 routes.
Requires the domains:read scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.
Query parameters
limitintegerRows per page, 1 to 100.
At least 1At most 100Default25cursorstringThe previous page's
nextCursor, passed back as it came. It is opaque: it holds where the last row sat in this list's order, so a row deleted or edited between pages never breaks the walk, and the next page starts at the first row that sorts after it. A value this list did not hand out is a 400invalid_cursor.
Returns
A page of routes, in the order they are tried.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
- TypeScript
domains.listRoutes()domains.listAllRoutes()domains.iterateRoutes()- Python
domains.list_routes()domains.list_all_routes()domains.iterate_routes()- Ruby
domains.list_routesdomains.list_all_routesdomains.iterate_routes- PHP
domains->listRoutesdomains->listAllRoutesdomains->iterateRoutes- Go
Domains.ListRoutesDomains.ListAllRoutesDomains.IterateRoutes- Java
domains().listRoutesdomains().listAllRoutesdomains().iterateRoutes- C#
Domains.ListRoutesAsyncDomains.ListAllRoutesAsyncDomains.IterateRoutesAsync- CLI
nextmail domains list-routes- MCP
listDomainRoutes
POST/domains/{id}/routes
Create a pattern route
Adds a route that catches mail to addresses nobody created whose local part matches pattern, such as support-*, and acts on it. deliver files it at targetAddressId, any address of the workspace, whose own destination then applies. forward sends it on to forwardTo, an address at another provider, which is sent an email asking it to confirm and receives nothing until it does, so the route reads forwardStatus: "pending" until then. webhook posts it to the endpoint webhookId as the email.routed event. rewrite reads local@ this domain as local@ the domain rewriteDomainId once more, and a rewrite there is not followed again. Send the field of the action and leave the other three out.
The pattern is lowercased and unique on the domain, and a domain holds at most 100 routes. A domain that is an alias takes the routes of its primary domain, so it cannot hold routes of its own. A key limited to particular addresses or domains has to hold this whole domain, and an access token acting for a member needs a member who reaches the whole domain.
Requires the domains:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.
Request body
patternstringRequiredThe part before the @ that the route catches, matched without case against the address with any plus tag removed. 1 to 64 of the letters a to z, digits,
.,_,-,+and*, where each*stands for any run of characters, at most 3 of them.support-*catchessupport-euandsupport-billing, and*alone catches every address nobody created. Stored lowercased, and unique on the domain.Up to 320 charactersactionstringRequiredWhat happens to mail the route catches:
deliverfiles it attargetAddressId,forwardsends it on toforwardToonce that address confirms,webhookposts it towebhookIdasemail.routed, andrewritereads it as the same local part onrewriteDomainId.One of"deliver""forward""webhook""rewrite"targetAddressIdstringFor
deliver: the id of an address in this workspace, on any of its domains. Its own destination then applies, so a group or a forwarding address goes on as it would.Can be null1 to 64 charactersforwardTostringFor
forward: an address at another provider. It is sent an email asking it to confirm and receives nothing until it does. Sending it again on an update asks again when it has not confirmed.Can be nullUp to 320 charactersFormatemailwebhookIdstringFor
webhook: the id of a webhook endpoint in this workspace.Can be null1 to 64 charactersrewriteDomainIdstringFor
rewrite: the id of another domain hosted in this workspace. Mail tolocal@thisis read once more aslocal@that domain, and a rewrite there is not followed again.Can be null1 to 64 characterspriorityintegerThe order routes are tried in, from 0 to 1000, lowest first. Routes with the same priority are tried longest literal text first. Defaults to 100.
At least 0At most 1000enabledbooleanFalse keeps the route but stops it catching mail. Defaults to true.
descriptionstringA note for people, up to 200 characters.
Can be nullUp to 200 characters
Returns
The route as it was saved.
Errors
- 403
The key lacks the scope, or may not send as that address.
step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code withPOST /security/step-up, send it toPOST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.- 409
route_pattern_taken: the domain already has a route with that pattern.alias_not_allowed: the domain is an alias, so its mail follows the routes of its primary domain.- 422
invalid_route_pattern: the pattern is not 1 to 64 of the letters a to z, digits,.,_,-,+and*, with at most three wildcards.route_target_not_found: the address, webhook endpoint or domain the route names is not in this workspace, andparamsays which.route_limit_reached: the domain holds 100 routes.invalid_parameter: the field of the action is missing, a field of another action was sent, orforwardTois hosted here, wheredeliveris the action to use.
The errors every operation can return400401404429500Error catalog
Also available in
POST/domains/{id}/routes/test
Test where mail to an address goes
Answers which step decides mail to an address, without sending anything: address when an address that exists takes it, alias when the domain is an alias and its primary decides, route when a pattern route catches it, catch_all when the catch-all takes it and none when it would be turned away. route is the route that decided, and target where the mail would end up: a mailbox, a forward, a webhook or a group, with the address it is filed at. reason says why mail would be turned away. Pass a local part, which is read on this domain, or a whole address on this domain or one of its aliases.
Requires the domains:read scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.
Request body
addressstringRequiredThe address to try: a local part such as
support-eu, or a whole address on this domain or one of its aliases.1 to 320 characters
Returns
Which step decides, the route that decided and where the mail would go.
Errors
- 422
invalid_parameterwithparam: "address": the address is not a local part or an address on this domain or one of its aliases.
The errors every operation can return400401403404429500Error catalog
Also available in
GET/domains/{id}/routes/{routeId}
Get a pattern route
One route of the domain, with whether it takes mail now.
Requires the domains:read scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.routeIdstringRequiredThe route id, from
GET /domains/{id}/routes. It has to be a route of the domain in the path.
Returns
The route.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
PATCH/domains/{id}/routes/{routeId}
Update a pattern route
Changes a route. Send only the fields to change. Changing action needs the field of the new action, unless the route already holds it, and the fields of the old action are cleared. Sending forwardTo again asks that address to confirm once more when it has not, at most once every few minutes. enabled: false keeps the route but stops it catching mail.
Requires the domains:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.routeIdstringRequiredThe route id, from
GET /domains/{id}/routes. It has to be a route of the domain in the path.
Request body
patternstringThe part before the @ that the route catches, matched without case against the address with any plus tag removed. 1 to 64 of the letters a to z, digits,
.,_,-,+and*, where each*stands for any run of characters, at most 3 of them.support-*catchessupport-euandsupport-billing, and*alone catches every address nobody created. Stored lowercased, and unique on the domain.Up to 320 charactersactionstringWhat happens to mail the route catches:
deliverfiles it attargetAddressId,forwardsends it on toforwardToonce that address confirms,webhookposts it towebhookIdasemail.routed, andrewritereads it as the same local part onrewriteDomainId.One of"deliver""forward""webhook""rewrite"targetAddressIdstringFor
deliver: the id of an address in this workspace, on any of its domains. Its own destination then applies, so a group or a forwarding address goes on as it would.Can be null1 to 64 charactersforwardTostringFor
forward: an address at another provider. It is sent an email asking it to confirm and receives nothing until it does. Sending it again on an update asks again when it has not confirmed.Can be nullUp to 320 charactersFormatemailwebhookIdstringFor
webhook: the id of a webhook endpoint in this workspace.Can be null1 to 64 charactersrewriteDomainIdstringFor
rewrite: the id of another domain hosted in this workspace. Mail tolocal@thisis read once more aslocal@that domain, and a rewrite there is not followed again.Can be null1 to 64 characterspriorityintegerThe order routes are tried in, from 0 to 1000, lowest first. Routes with the same priority are tried longest literal text first. Defaults to 100.
At least 0At most 1000enabledbooleanFalse keeps the route but stops it catching mail. Defaults to true.
descriptionstringA note for people, up to 200 characters.
Can be nullUp to 200 characters
Returns
The route as it now stands.
Errors
- 403
The key lacks the scope, or may not send as that address.
step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code withPOST /security/step-up, send it toPOST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.- 409
route_pattern_taken: another route of the domain has that pattern.- 422
invalid_route_pattern,route_target_not_foundorinvalid_parameter, as on create.
The errors every operation can return400401404429500Error catalog
Also available in
DELETE/domains/{id}/routes/{routeId}
Delete a pattern route
Deletes the route. Mail it caught then goes to the next route that matches, or to the catch-all.
Requires the domains:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.routeIdstringRequiredThe route id, from
GET /domains/{id}/routes. It has to be a route of the domain in the path.
Returns
The route is deleted.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
GET/domains/{id}/addresses/{addressId}/group-members
List the group members of a group address
The group members of the address, oldest first, a page at a time: the addresses of the workspace and the addresses at other providers its mail goes to when its destination is group. These are not the people who can read the address, which GET /domains/{id}/addresses/{addressId}/members lists. An outside member reads pending until it confirms, live once it has, refused when it said no and bounced when mail forwarded to it bounced for good, which stops it until it confirms again. A member of the workspace reads live, or paused while that address is switched off.
Requires the domains:read scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.
Query parameters
limitintegerRows per page, 1 to 100.
At least 1At most 100Default25cursorstringThe previous page's
nextCursor, passed back as it came. It is opaque: it holds where the last row sat in this list's order, so a row deleted or edited between pages never breaks the walk, and the next page starts at the first row that sorts after it. A value this list did not hand out is a 400invalid_cursor.
Returns
A page of group members, oldest first.
Errors
The errors every operation can return400401403404422429500Error catalog
Also available in
- TypeScript
domains.listGroupMembers()domains.listAllGroupMembers()domains.iterateGroupMembers()- Python
domains.list_group_members()domains.list_all_group_members()domains.iterate_group_members()- Ruby
domains.list_group_membersdomains.list_all_group_membersdomains.iterate_group_members- PHP
domains->listGroupMembersdomains->listAllGroupMembersdomains->iterateGroupMembers- Go
Domains.ListGroupMembersDomains.ListAllGroupMembersDomains.IterateGroupMembers- Java
domains().listGroupMembersdomains().listAllGroupMembersdomains().iterateGroupMembers- C#
Domains.ListGroupMembersAsyncDomains.ListAllGroupMembersAsyncDomains.IterateGroupMembersAsync- CLI
nextmail domains list-group-members- MCP
listGroupMembers
POST/domains/{id}/addresses/{addressId}/group-members
Add group members to a group address
Adds up to 100 group members, each { addressId } for an address of the workspace or { email } for an address at another provider. An email hosted in this workspace is added as that address. An outside address is sent an email asking it to confirm and receives nothing until it does. Sending one that has not confirmed yet asks it again.
A group holds at most 1,000 group members, and groups nest at most 3 deep. The address has to be a group address already, so set its destination to group first. A member that is already in the group, and an outside address that refused mail from this workspace or whose email could not be sent, is named in skipped with the reason, and the rest are still added.
Requires the domains:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.
Request body
membersobject[]RequiredThe group members to add, 1 to 100 of them, each
{ addressId }for an address in this workspace or{ email }for an address at another provider.1 to 100 itemsaddressIdstringRequiredThe id of an address in this workspace, on any of its domains.
1 to 64 characters
Returns
The group members added and the ones skipped.
Errors
- 403
The key lacks the scope, or may not send as that address.
step_up_required: the call was made with an OAuth access token that has not been verified in the last 60 minutes. Ask for a code withPOST /security/step-up, send it toPOST /security/step-up/verify, then repeat the call. The person can also choose Allow changes for 60 minutes on the app in Account settings, Connected apps, on the Nextmail website. An API key is never asked for a code.- 409
not_a_group: the address is not a group address.- 422
group_member_limit: the group would hold more than 1,000 group members.group_nesting_too_deep: an address would nest groups more than 3 deep or make the group contain itself.group_member_not_found: anaddressIdis not an address of this workspace, or anemailis hosted here in another workspace, andparampoints at it.
The errors every operation can return400401404429500Error catalog
Also available in
DELETE/domains/{id}/addresses/{addressId}/group-members/{memberId}
Remove a group member
Removes one group member, so the mail of the group stops going there. An outside address keeps its confirmation, so adding it back needs no new one.
Requires the domains:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.memberIdstringRequiredThe group member id, from
GET /domains/{id}/addresses/{addressId}/group-members. It has to be a group member of the address in the path.
Returns
The group member is removed.
Errors
- 404
group_member_not_found: the group has no group member with that id.
The errors every operation can return400401403422429500Error catalog
Also available in
POST/domains/{id}/addresses/{addressId}/photo/gravatar
Start publishing the photo of an address to Gravatar
Answers with the url that publishes the photo of the address to Gravatar, so other mail apps and sites show it too. The person the key or app acts for, the workspace owner for an API key, opens it in a browser signed in to Nextmail: Gravatar asks them to sign in to the WordPress.com account that owns the address, and the photo is published when Gravatar sends them back, which takes that signed-in browser session and never this credential. The link works for 10 minutes. The address needs a photo first, from PUT /domains/{id}/addresses/{addressId}/photo.
A key limited to particular addresses or domains has to hold this whole domain.
Requires the domains:write scope.
Path parameters
idstringRequiredThe domain id, from
GET /domainsorPOST /domains. A domain in another workspace reads the same as one that does not exist.addressIdstringRequiredThe address id, from
GET /domains/{id}/addressesorPOST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.
Returns
The link to open.
Errors
- 404
resource_not_found: no such domain, or no such address on it. A removed address is not found.- 409
photo_required: the address has no photo yet, so there is nothing to publish.- 422
capability_unsupportedwithparam: "domainAllowlist"for a narrowed key that does not hold this whole domain.- 503
gravatar_not_configured: publishing to Gravatar is not set up on this server.
The errors every operation can return400401403429500Error catalog
Also available in
- TypeScript
domains.startGravatarPublish()- Python
domains.start_gravatar_publish()- Ruby
domains.start_gravatar_publish- PHP
domains->startGravatarPublish- Go
Domains.StartGravatarPublish- Java
domains().startGravatarPublish- C#
Domains.StartGravatarPublishAsync- CLI
nextmail domains start-gravatar-publish- MCP
startGravatarPublish
Objects
AddressForwardobject
objectstring- One of
"address_forward" idstringaddressIdstringemailstringWhere the mail goes.
enabledbooleanFalse while the destination is paused.
statusstringliveonce the destination confirmed it wants this mail,pendingwhile it has not answered,refusedwhen it said no,bouncedwhen its server refused forwarded mail for good, andpausedwhile it is switched off. Only a live destination receives anything. Asking a bounced destination again sends it a new confirmation, and it is live again once it confirms.One of"live""pending""refused""paused""bounced"confirmedAtstring- Can be nullFormat
date-time askedAtstringWhen the confirmation email last went out.
Can be nullFormatdate-timelastRelayAtstring- Can be nullFormat
date-time lastErrorstringWhy the last forward failed, cleared once one succeeds.
Can be nullfailuresintegerFailures in a row.
createdAtstring- Format
date-time
AddressForwardChangeobject
objectstring- One of
"address_forward" idstringaddressIdstringemailstringWhere the mail goes.
enabledbooleanFalse while the destination is paused.
statusstringliveonce the destination confirmed it wants this mail,pendingwhile it has not answered,refusedwhen it said no,bouncedwhen its server refused forwarded mail for good, andpausedwhile it is switched off. Only a live destination receives anything. Asking a bounced destination again sends it a new confirmation, and it is live again once it confirms.One of"live""pending""refused""paused""bounced"destinationstringWhere the mail of the address goes after the change.
One of"mailbox""forward""webhook""group"
AddressForwardConsentobject
objectstring- One of
"address_forward_consent" idstringaddressIdstringemailstringstatusstring- One of
"sent""already-confirmed""revoked""too-soon""send-failed"
AddressForwardListobject
objectstring- One of
"list" addressstringdestinationstring- One of
"mailbox""forward""webhook""group" maxintegerHow many destinations one address may have.
dataAddressForward[]
AddressForwardsAddedobject
objectstring- One of
"address_forwards" addedAddressForward[]skippedobject[]emailstringreasonstring
AddressLimitsobject
objectstring- One of
"address_limits" addressIdstringaddressstringsendingobjectWhat the address may send.
holdstringpausedholds sending anddisabledstops it. Null sends as usual.Can be nullOne of"paused""disabled"perHourintegerMessages it may send in the current clock hour, in UTC.
Can be nullperDayintegerMessages it may send in the last 24 clock hours.
Can be nullperMonthintegerMessages it may send in the calendar month, in UTC.
Can be nullrecipientsPerHourintegerRecipients it may send to in the current clock hour.
Can be nullrecipientsPerDayintegerRecipients it may send to in the last 24 clock hours.
Can be nullrecipientsPerMonthintegerRecipients it may send to in the calendar month.
Can be nullrecipientsPerMessageintegerRecipients one message may have.
Can be nullallowedRecipientsstring[]The only recipients it may send to. Null is anyone, and an empty list nobody.
Can be nullblockedRecipientsstring[]Recipients it may never send to.
Can be null
receivingobjectWhat the address accepts.
holdstringpausedturns mail away with a temporary bounce anddisabledwith a permanent one. Null receives as usual.Can be nullOne of"paused""disabled"perHourintegerMessages it accepts in the current clock hour, in UTC.
Can be nullperDayintegerMessages it accepts in the last 24 clock hours.
Can be nullperMonthintegerMessages it accepts in the calendar month, in UTC.
Can be nullstorageBytesintegerThe most mail it may keep, in bytes, from 1 MiB to 1 TiB. A message that would take it past the quota gets a permanent bounce (5.2.2). Null is no quota of its own.
Can be nullFormatint64allowedSendersstring[]The only senders it accepts mail from. Null is anyone, and an empty list nobody.
Can be null
usageobjectWhat the address has sent and received, across every way mail leaves and arrives. Mail to or from a plus tag counts toward the address it belongs to, and mail sent with a test key is not counted.
hourobjectIn the current clock hour, in UTC.
sentintegerRequiredMessages it sent.
recipientsintegerRequiredRecipients those messages went to.
receivedintegerRequiredMessages it received.
dayobjectIn the last 24 clock hours, the current one included.
sentintegerRequiredMessages it sent.
recipientsintegerRequiredRecipients those messages went to.
receivedintegerRequiredMessages it received.
monthobjectIn the calendar month, in UTC.
sentintegerRequiredMessages it sent.
recipientsintegerRequiredRecipients those messages went to.
receivedintegerRequiredMessages it received.
storageobjectThe mail the address keeps: every message filed in its mailbox since storage counting began, with its kept original when it keeps originals. Deleting mail for good takes it out again. Mail stored before then and mail routed to a webhook are not counted.
bytesintegerRequiredBytes the counted mail takes.
Formatint64messagesintegerRequiredMessages counted.
resetsobjectWhen each count next goes down.
hourstringThe start of the next hour.
Formatdate-timedaystringWhen the oldest hour still in the last 24 drops out of it.
Formatdate-timemonthstringThe first of next month.
Formatdate-time
updatedAtstringWhen the limits last changed. Null while the address has none.
Can be nullFormatdate-time
AddressLoginobject
objectstring- One of
"address_login" addressIdstringaddressstringcreatedbooleanOn a PUT, true when the password is new rather than a replacement.
loginobject- Can be null
userIdstringnamestringcreatedAtstring- Format
date-time createdBystring- Can be null
passwordSetAtstring- Format
date-time passwordSetBystring- Can be null
lastSignedInAtstring- Can be nullFormat
date-time
AddressMemberobject
objectstring- One of
"address_member" userIdstringemailstringnamestring- Can be null
imagestring- Can be null
accessstring- One of
"member""viewer" viastring- One of
"owner""every-address""whole-domain""direct" viaDomainstringThe domain whose grant brings them here, when
viaiswhole-domain.Can be nullremovablebooleanWhether the caller may take this grant back with
DELETEon the member address. False for the owner, a role, a whole domain and the member who connected a mailbox.
AddressMemberListobject
objectstring- One of
"list" dataAddressMember[]
AddressRouteobject
objectstringRequired- One of
"address_route" idstringRequiredThe route id.
domainIdstringRequiredThe domain the route belongs to.
domainstringRequiredThe name of that domain.
patternstringRequiredThe local part it catches, lowercased, with
*for any run of characters.actionstringRequiredWhat it does with the mail it catches.
One of"deliver""forward""webhook""rewrite"priorityintegerRequiredThe order it is tried in, lowest first.
enabledbooleanRequiredWhether it is switched on.
activebooleanRequiredWhether it takes mail now: switched on, with a target that exists and, for
forward, a confirmed destination.inactiveReasonstringWhy it takes no mail, or null when it does.
webhook_deletedis a webhook route whose endpoint was deleted, which takes no mail until it is given another, andforward_bouncedis a forward whose destination bounced mail for good, which takes no mail until the destination confirms again.Can be nullOne of"switched_off""target_removed""target_disabled""webhook_deleted""webhook_disabled""rewrite_domain_removed""forward_pending""forward_refused""forward_bounced"descriptionstringThe note on the route.
Can be nulltargetAddressIdstringFor
deliver, the address it files mail at.Can be nulltargetAddressstringThat address in full, or null when it was removed.
Can be nullforwardTostringFor
forward, where it sends mail on.Can be nullforwardStatusstringFor
forward:pendinguntil the destination confirms,liveonce it has,refusedwhen it said no,bouncedwhen mail forwarded to it bounced for good.Can be nullOne of"live""pending""refused""paused""bounced"forwardConfirmedAtstringWhen the destination confirmed.
Can be nullFormatdate-timeforwardAskedAtstringWhen it was last asked to confirm.
Can be nullFormatdate-timewebhookIdstringFor
webhook, the endpoint it posts to, or null when that endpoint was deleted.Can be nullrewriteDomainIdstringFor
rewrite, the domain it reads the local part on.Can be nullrewriteDomainstringThe name of that domain.
Can be nullcreatedBystringThe account that created it, when one did.
Can be nullcreatedAtstringWhen it was created.
Formatdate-timeupdatedAtstringWhen it last changed.
Formatdate-time
AddressRouteListobject
objectstringRequired- One of
"list" domainIdstringRequiredThe domain.
domainstringRequiredThe name of the domain.
maxintegerRequiredThe most routes the domain may hold.
dataAddressRoute[]RequiredhasMorebooleanRequiredTrue when another page follows. Pass
nextCursorback ascursorto read it.nextCursorstringRequiredAn opaque cursor for the next page, or null on the last page.
Can be null
AddressRouteTestobject
objectstringRequired- One of
"address_route_test" addressstringRequiredThe address that was tested, lowercased.
stepstringRequiredWhich step decides:
address,alias,route,catch_allornone.One of"address""alias""route""catch_all""none"routeAddressRouteRequiredtargetobjectRequiredWhere the mail would end up, or null when it would be turned away.
Can be nullkindstringRequiredA mailbox, a forward that keeps no copy, a webhook or a group.
One of"mailbox""forward""webhook""group"addressIdstringRequiredThe address it is filed at, when one exists.
Can be nulladdressstringRequiredThat address in full.
forwardTostringRequiredThe first place it is forwarded to, when it is.
Can be nullforwardsstring[]RequiredEvery place it is forwarded to.
webhookIdstringRequiredThe webhook endpoint it is posted to, when it is.
Can be null
reasonstringRequiredWhy the mail would be turned away, or null when it would be taken.
Can be null
AppHostobject
The web app address of the workspace: a subdomain such as mailbox.example.com, on one of its verified domains or on any other domain it controls, where its people open the Nextmail web app under the workspace brand. A workspace has at most one. Set it with PUT /app-host and remove it with DELETE /app-host.
objectstring- One of
"app_host" idstringThe id of the address,
ahost_and 24 hex characters. Null when none is set.Can be nullhoststringThe address, lowercased. Null when none is set.
Can be nulldomainIdstringThe id of the verified domain of the workspace the address sits under, as
GET /domainslists it. Null when none is set, or when the address is on another domain.Can be nulldomainstringThe verified domain of the workspace the address sits under. Null when none is set, or when the address is on another domain.
Can be nullstatusstringnonemeans no address is set.pendingmeans it is set and waiting for its DNS records to answer and its certificate to be issued.activemeans the address answers over HTTPS.failedmeans setting it up failed, usually because the record was missing or wrong for too long, anderrorsays why. Set the address again to start over.One of"none""pending""active""failed"activebooleanWhether people can sign in at the address right now. True exactly when
statusisactiveand the workspace has white label.pausedbooleanTrue when an address is set and the workspace has no white label. Nobody can sign in there, and emails link to nextmail.sh instead, until the workspace has white label again. The address and its record are kept.
targetstringThe host the CNAME record points at, the same for every workspace. Null only while web app addresses cannot be set up.
Can be nullrecordobjectThe CNAME record to add at your DNS provider. Null when no address is set.
Can be nulltypestringAlways
CNAME.One of"CNAME"namestringThe record name, which is
host.valuestringThe record value, which is
target.
ownershipRecordobjectThe TXT record that proves the domain of the address is yours, to add next to
record. Nothing is set up for the address until it answers. Null when no address is set, or when the address is on a verified domain of the workspace, which proves it already.Can be nulltypestringAlways
TXT.One of"TXT"namestringThe record name,
_nextmail-challenge.in front ofhost.valuestringThe record value. It stays the same for this address in this workspace.
ownershipVerifiedbooleanWhether the address is proven to be yours: true when it is on a verified domain of the workspace or
ownershipRecordanswered. False when no address is set.errorstringWhy setting the address up failed or has not finished, written to be shown to a person. Null when there is nothing to report.
Can be nullcheckedAtstringWhen the address was last checked. Null until the first check.
Can be nullFormatdate-timeverifiedAtstringWhen the address first answered over HTTPS. Null while it never has.
Can be nullFormatdate-timeavailablebooleanWhether web app addresses can be set up right now. False only while they are switched off, and then
PUT /app-hostanswers 503app_host_unavailable.paidPlanbooleanRepeats
whiteLabel, which is the field to read. It keeps working until at least 14 May 2027.whiteLabelbooleanWhether the workspace has white label, which a web app address needs. It comes with the Pro, Max or Enterprise plan, so
POST /billing/checkoutis how a workspace gets it.domainsstring[]The verified domains of the workspace, alphabetically. An address on one of them needs only
record.suggestedstringThe address the app suggests: the current one, or
mailbox.in front of the first verified domain. Null when the workspace has no verified domain.Can be nullsenderobjectWhere the emails Nextmail sends to the people of the workspace come from: invitations, password resets and alerts. With white label and a live web app address on a domain of the workspace, they come from
noreply@that domain once the workspace has a logo and the signing records of the domain verify. Null while the workspace has no white label or no live web app address on one of its domains, and then they come from Nextmail's own address.Can be nulladdressstringRequiredThe address they come from now:
noreply@anddomainonce nothing is missing, and Nextmail's own address whilewaitingOnis set.FormatemaildomainstringRequiredThe verified domain of the workspace that the live web app address sits under.
waitingOnstringRequiredWhat they wait on before they come from
domain:logountil the workspace has a logo, uploaded withPUT /branding/images/wordmark, thensigninguntil the signing records ofdomainverify. Null once they come fromdomain.Can be nullOne of"logo""signing"
AppPasswordobject
objectstring- One of
"app_password" idstringnamestringWhat the person called it, such as the device it is for.
last4stringThe last four letters of the password, to tell them apart.
originstringsettingswhen made in the app,apiwhen made here,setup-linkwhen made by opening an emailed setup link.One of"settings""setup-link""api"ownerobjectThe person the password signs in as. A mail app using it reaches this address alone, with what that person may do there.
idstringnamestringemailstring
createdAtstring- Format
date-time lastUsedAtstring- Can be nullFormat
date-time lastUsedProtocolstring- Can be nullOne of
"imap""smtp""pop3""caldav""carddav" lastUsedClientstringThe mail app, when it named itself.
Can be null
AppPasswordListobject
objectstring- One of
"list" dataAppPassword[]
CreatedAppPasswordobject
objectstring- One of
"app_password" idstringnamestringWhat the person called it, such as the device it is for.
last4stringThe last four letters of the password, to tell them apart.
originstringsettingswhen made in the app,apiwhen made here,setup-linkwhen made by opening an emailed setup link.One of"settings""setup-link""api"ownerobjectThe person the password signs in as. A mail app using it reaches this address alone, with what that person may do there.
idstringnamestringemailstring
createdAtstring- Format
date-time lastUsedAtstring- Can be nullFormat
date-time lastUsedProtocolstring- Can be nullOne of
"imap""smtp""pop3""caldav""carddav" lastUsedClientstringThe mail app, when it named itself.
Can be nullpasswordstringThe password, shown this once. Spaces and dashes are optional when typed.
serversMailAppSettingsappleProfilestringAn Apple configuration profile (
.mobileconfigXML) with the password inside. Saved to a file and opened on an iPhone, iPad or Mac, it adds the address to Mail, and the calendar and contacts to Calendar and Contacts, in one step. It covers only the connections the address accepts. It holds the password, so treat it like one.
DeletedAddressForwardobject
objectstring- One of
"address_forward" idstringaddressIdstringemailstringdeletedboolean- One of
true destinationstring- One of
"mailbox""forward""webhook""group"
DeletedAddressLoginobject
objectstring- One of
"address_login" addressIdstringaddressstringdeletedboolean- One of
true
DeletedAddressRouteobject
objectstringRequired- One of
"address_route" idstringRequiredThe route id.
domainIdstringRequiredThe domain it belonged to.
patternstringRequiredThe pattern it caught.
deletedbooleanRequired- One of
true
DeletedAppHostobject
objectstring- One of
"app_host" idstringThe id of the address that was removed. Null when none was set.
Can be nullhoststringThe address that was removed. Null when none was set.
Can be nulldeletedbooleanTrue when an address was removed, false when none was set, so a repeated call is safe.
DeletedAppPasswordobject
objectstring- One of
"app_password" idstringdeletedboolean- One of
true
DeletedDnsConnectionobject
objectstring- One of
"dns_connection" idstringproviderstring- One of
"cloudflare""operator-cloudflare" subjectstringWho the connection signed in as at the DNS provider, usually an email address.
accountsDnsAccount[]The provider accounts the connection reaches.
statusstringactivewhile Nextmail may write through it,needs-reauthwhen the provider wants the account connected again,revokedonce it was disconnected, anderrorwhen the last call failed.One of"active""needs-reauth""revoked""error"lastVerifiedAtstring- Can be nullFormat
date-time lastErrorstring- Can be null
createdAtstring- Format
date-time removedbooleanTrue when the connection was already disconnected and is now gone.
confirmedbooleanWhether the provider confirmed the revocation. Null when it was removed.
Can be nulldetachedobject- Can be null
domainsintegerdetachedintegerremovedintegerRecords deleted.
rewrittenintegerRecords shared with others, rewritten.
pendingintegerRecords still published.
leftDnsLeftRecord[]
DeletedDomainobject
objectstring- One of
"domain" idstringdomainstringdeletedboolean- One of
true mailboxPurgedbooleanTrue when this was the last domain of the workspace and its whole mailbox was deleted with it. False for any other domain, and when the mailbox could not be deleted, which leaves the mail in place.
leftBehindstring[]DNS records Nextmail wrote for this domain and could not take back, one line each naming the record and why. They are still published, so remove them at your DNS provider. Empty when nothing was left, which is always the case for a domain whose DNS Nextmail never wrote.
DeletedDomainAddressobject
objectstring- One of
"address" idstringaddressstringThe full address that was removed, lowercased.
deletedboolean- One of
true
DeletedGroupMemberobject
objectstringRequired- One of
"group_member" idstringRequiredThe group member id.
groupAddressIdstringRequiredThe group address it belonged to.
addressstringRequiredThe address that no longer gets the mail of the group.
deletedbooleanRequired- One of
true
DnsAccountobject
idstringnamestring- Can be null
DnsConnectionobject
objectstring- One of
"dns_connection" idstringproviderstring- One of
"cloudflare""operator-cloudflare" subjectstringWho the connection signed in as at the DNS provider, usually an email address.
accountsDnsAccount[]The provider accounts the connection reaches.
statusstringactivewhile Nextmail may write through it,needs-reauthwhen the provider wants the account connected again,revokedonce it was disconnected, anderrorwhen the last call failed.One of"active""needs-reauth""revoked""error"lastVerifiedAtstring- Can be nullFormat
date-time lastErrorstring- Can be null
createdAtstring- Format
date-time domainsDnsConnectionDomain[]recordsintegerHow many records Nextmail wrote through the connection and still keeps.
removablebooleanTrue for a disconnected connection with nothing left on it, which a second
DELETEremoves from the list.
DnsConnectionDetailobject
objectstring- One of
"dns_connection" idstringproviderstring- One of
"cloudflare""operator-cloudflare" subjectstringWho the connection signed in as at the DNS provider, usually an email address.
accountsDnsAccount[]The provider accounts the connection reaches.
statusstringactivewhile Nextmail may write through it,needs-reauthwhen the provider wants the account connected again,revokedonce it was disconnected, anderrorwhen the last call failed.One of"active""needs-reauth""revoked""error"lastVerifiedAtstring- Can be nullFormat
date-time lastErrorstring- Can be null
createdAtstring- Format
date-time domainsDnsConnectionDomain[]recordsintegerHow many records Nextmail wrote through the connection and still keeps.
removablebooleanTrue for a disconnected connection with nothing left on it, which a second
DELETEremoves from the list.busystring[]The domains a sync is running on, which stop a disconnect until it ends.
keepsMailstring[]The verified domains that stop receiving mail when their records come down.
DnsConnectionDomainobject
domainIdstringdomainstring- Can be null
zoneIdstring- Can be null
zoneNamestring- Can be null
statestring- Can be nullOne of
"unmanaged""ready""awaiting-sync""awaiting-signing""conflict""blocked" recordsintegerkeepsMailbooleanTrue for a verified domain, which stops receiving when its records come down.
busybooleanTrue while a sync is running on the domain.
DnsConnectionListobject
objectstring- One of
"list" configuredbooleanFalse when this server cannot connect a DNS provider.
dataDnsConnection[]
DnsConnectionStartobject
objectstringRequired- One of
"dns_connection_start" urlstringRequiredThe Cloudflare sign-in page, for the person to open in a browser signed in to Nextmail.
Formaturi
DnsLeftRecordobject
A record still published that Nextmail could not take down.
purposestring- One of
"challenge""dkim""spf""mx""mail-from""dmarc""tracking""storage""bimi""app-host""autodiscovery" namestringtypestringcontentstringstandingstring- One of
"ours""theirs""unverified" detailstring
DnsZoneobject
idstringnamestringaccountIdstring- Can be null
activebooleanstatusstringtypestringnameServersstring[]coversbooleanWhether the zone covers the domain.
DnsZoneCandidateobject
connectionIdstringsubjectstringstatusstring- One of
"active""needs-reauth""revoked""error" accountsDnsAccount[]accountDnsAccountzoneDnsZone
DnsZoneObstacleobject
connectionIdstringsubjectstringstatusstring- One of
"active""needs-reauth""revoked""error" accountsDnsAccount[]obstaclestring- One of
"needs-reauth""unreachable" detailstring
DnsZoneResolutionobject
kindstring- One of
"resolved""ambiguous""none""unusable" checkedAtstring- Format
date-time cachedbooleancandidateDnsZoneCandidatecandidatesDnsZoneCandidate[]reasonstringWhy no zone answers, when
kindisnone.Can be nullOne of"not-configured""no-links""not-held"connectedinteger- Can be null
hoststringWho serves the DNS of the domain, when
kindisnone.Can be nullOne of"cloudflare""elsewhere""unknown"blockedDnsZoneObstacle[]The connections that could not be asked.
Domainobject
objectstring- One of
"domain" idstringdomainstringreceivingobjectverifiedbooleanWhether ownership has been proven. A verified domain can receive mail.
verifiedAtstring- Can be nullFormat
date-time catchAllbooleanWhether mail to a local-part nobody created on this domain is accepted.
lastCheckedAtstring- Can be nullFormat
date-time errorstringWhy the last ownership check failed.
Can be null
sendingobjectstatusstringThe signing state as the last check saw it.
One of"unknown""no_identity""pending""verified""failed"canSendbooleanWhether a send from this domain would be accepted right now.
checkedAtstringWhen
statuswas last checked. Null until the first check.Can be nullFormatdate-timeerrorstringWhy the last signing check failed.
Can be nullnotestringWhat
statusmeans, written to be shown to a person.
trackingDomainTrackingstorageDomainStoragelogoDomainLogodmarcPolicystringThe DMARC policy set with
PATCH /domains/{id}. Null when it was never set, in which case the DMARC record of the domain is left as it is. Where Nextmail writes the DNS for the domain, it publishes this policy and keeps every other tag of the record, such asrua. Otherwise publish the DMARC record inrecords.Can be nullOne of"none""quarantine""reject"autodiscoverybooleanTrue when the domain offers the DNS records that let mail, calendar and contacts apps find the Nextmail servers from an address on it alone: SRV records for IMAP on 993, SMTP on 465 and 587, POP3 on 995, and CalDAV and CardDAV, with a TXT record naming the path for each of the last two. The records are listed in
autodiscoveryRecordswith what the last check found. They change nothing about how mail arrives, and they are left out of the records that verify the domain. Where Nextmail writes the DNS for the domain, turning it on writes them and turning it off takes them down. Defaults to false.senderNamestringThe name mail from this domain goes out under when the address has no name of its own, set with
PATCH /domains/{id}. Null when none is set, in which case that mail goes out under the name of the workspace.Can be nullaliasOfstringThe id of the primary domain this domain is an alias of, set with
PATCH /domains/{id}, or null when it is not an alias. Mail tolocal@an alias is handled exactly aslocal@its primary domain, through the addresses, routes, group addresses and catch-all of the primary, andlocal@the alias may be used as a From address whereverlocal@the primary may.Can be nullaliasesobject[]The domains that are aliases of this one. Empty when there are none, and always empty on an alias.
idstringRequiredThe id of the alias domain.
domainstringRequiredIts name.
createdAtstring- Format
date-time
DomainAddressobject
objectstring- One of
"address" idstringThe address id. Pass it as
addressId.domainIdstringThe domain the address is on.
addressstringThe full address, lowercased.
localPartstringThe part in front of the @, lowercased.
labelstringThe name mail from the address is sent under and shown in the app, such as
Support. Null when none is set, and mail then goes out under the name of the workspace or the person sending.Can be nullphotoUrlstringThe photo set for the address with
PUT /domains/{id}/addresses/{addressId}/photo, shown for it in Nextmail. Null when none is set, and the domain logo is shown instead.Can be nullenabledbooleanWhether the address takes mail. Mail to a disabled address is refused while the sending server is still connected, so the sender gets a bounce, and nothing can be sent from it.
destinationstringmailboxwhen mail to the address lands here, with a copy to each forwarding destination that is on,forwardwhen it only goes to the destinations,webhookwhen every message goes to the endpoint inwebhookIdand none is kept here, andgroupwhen it goes to the group members of the address.One of"mailbox""forward""webhook""group"webhookIdstringThe webhook endpoint mail goes to while
destinationiswebhook. Null for every other destination, and when the endpoint was deleted, in which case the mail is kept here instead.Can be nulltapWebhookIdsstring[]Up to 5 webhook endpoints that also get every message the address receives, whatever they subscribe to. An endpoint that was deleted is left out. Empty when there are none.
keepOriginalbooleanWhether every message the address receives is also kept byte for byte as it arrived. While it is on,
GET /threads/{id}/messages/{messageId}/rawanswers that original for mail received from then on, and mail received before it was on, or while it was off, comes back rebuilt from the stored message. The original is deleted with its message. Off unless somebody turns it on.expiresAtstringWhen the address stops taking mail and sending, from that very moment. Null when it never expires.
Can be nullFormatdate-timeonExpirystringWhat happens when
expiresAtpasses:stopswitches the address off and keeps its mail, anddeleteremoves it and the conversations delivered to it.One of"stop""delete"expiredAtstringWhen the address expired and was switched off. Null while it has not, and again once it is turned back on.
Can be nullFormatdate-timegroupPostingstringWho may send to the address while
destinationisgroup:anyone,members(its group members, passing DMARC) orworkspace(an address on a domain of this workspace, passing DMARC).One of"anyone""members""workspace"groupKeepCopybooleanWhether a group address also keeps each message in its own mailbox.
lastReceivedAtstringWhen mail last arrived for the address. Null when none has.
Can be nullFormatdate-timecreatedAtstring- Format
date-time updatedAtstring- Format
date-time
DomainAddressListobject
objectstring- One of
"list" dataDomainAddress[]hasMorebooleanTrue when another page follows. Pass
nextCursorback ascursorto read it.nextCursorstringAn opaque cursor for the next page, or null on the last page. Pass it back unchanged.
Can be null
DomainDetailobject
A domain as GET /domains lists it, plus its addresses, every DNS record it uses and its DMARC reading.
objectstring- One of
"domain" idstringdomainstringreceivingobjectverifiedbooleanWhether ownership has been proven. A verified domain can receive mail.
verifiedAtstring- Can be nullFormat
date-time catchAllbooleanWhether mail to a local-part nobody created on this domain is accepted.
lastCheckedAtstring- Can be nullFormat
date-time errorstringWhy the last ownership check failed.
Can be null
sendingobjectstatusstringThe signing state as the last check saw it.
One of"unknown""no_identity""pending""verified""failed"canSendbooleanWhether a send from this domain would be accepted right now.
checkedAtstringWhen
statuswas last checked. Null until the first check.Can be nullFormatdate-timeerrorstringWhy the last signing check failed.
Can be nullnotestringWhat
statusmeans, written to be shown to a person.
trackingDomainTrackingstorageDomainStoragelogoDomainLogodmarcPolicystringThe DMARC policy set with
PATCH /domains/{id}. Null when it was never set, in which case the DMARC record of the domain is left as it is. Where Nextmail writes the DNS for the domain, it publishes this policy and keeps every other tag of the record, such asrua. Otherwise publish the DMARC record inrecords.Can be nullOne of"none""quarantine""reject"autodiscoverybooleanTrue when the domain offers the DNS records that let mail, calendar and contacts apps find the Nextmail servers from an address on it alone: SRV records for IMAP on 993, SMTP on 465 and 587, POP3 on 995, and CalDAV and CardDAV, with a TXT record naming the path for each of the last two. The records are listed in
autodiscoveryRecordswith what the last check found. They change nothing about how mail arrives, and they are left out of the records that verify the domain. Where Nextmail writes the DNS for the domain, turning it on writes them and turning it off takes them down. Defaults to false.senderNamestringThe name mail from this domain goes out under when the address has no name of its own, set with
PATCH /domains/{id}. Null when none is set, in which case that mail goes out under the name of the workspace.Can be nullaliasOfstringThe id of the primary domain this domain is an alias of, set with
PATCH /domains/{id}, or null when it is not an alias. Mail tolocal@an alias is handled exactly aslocal@its primary domain, through the addresses, routes, group addresses and catch-all of the primary, andlocal@the alias may be used as a From address whereverlocal@the primary may.Can be nullaliasesobject[]The domains that are aliases of this one. Empty when there are none, and always empty on an alias.
idstringRequiredThe id of the alias domain.
domainstringRequiredIts name.
createdAtstring- Format
date-time addressesobject[]Every address on this domain. Not present on a
GET /domainsrow.addressstringThe full address, lowercased.
enabledboolean
recordsDomainRecord[]Every DNS record the domain uses, in this order: the MX records and the SPF record that bring mail in, the
_nextmail-challengeTXT record that proves you own the domain, a starter DMARC record, the signing records once they are prepared, the return path records on the bounce host (one CNAME record, or an MX and a TXT record on a domain that already publishes those), and the CNAME records for a tracking domain and a files domain when either is set. The domain is verified once public DNS answers with both the MX records and the challenge record. Publishing the signing records is what lets mail from the domain be sent.dmarcobjectWhat the domain's DMARC record says, read from public DNS, and whether a stricter policy is safe yet. Nextmail only changes this record for you to publish the starter record it offers, or the policy set as
dmarcPolicy.Can be nullstagestringmissingwhen the domain has no DMARC record,invalidwhen it has one receivers cannot use, and otherwise the policy it sets:monitorforp=none,quarantineorreject.One of"missing""invalid""monitor""quarantine""reject"recordstringThe record as published, or null when there is none. For a zone Nextmail writes to, this can show the starter record for up to an hour before public DNS answers with it.
Can be nullissuesstring[]Problems found in the record, each written to be shown to a person. Empty when there are none.
alignmentPossiblebooleanWhether this domain has a signing key set up. Without one, a policy stricter than
p=nonewould tell receivers to throw away the domain's own mail.caveatstringWhat to check before tightening the policy, written to be shown to a person beside it.
autodiscoveryRecordsDomainRecord[]The SRV and TXT records that let mail apps set themselves up, while
autodiscoveryis true, and empty while it is false. None of them is needed to verify the domain or to send from it.
DomainDnsobject
objectstring- One of
"domain_dns" domainIdstringdomainstringmanagingbooleanTrue while Nextmail writes the records of the domain itself.
connectionIdstring- Can be null
connectionobject- Can be null
idstringstatusstring- One of
"active""needs-reauth""revoked""error" subjectstringaccountsDnsAccount[]
zoneIdstring- Can be null
zoneNamestring- Can be null
zoneHolderstring- Can be null
statestring- One of
"unmanaged""ready""awaiting-sync""awaiting-signing""conflict""blocked" stepsobject[]purposestring- One of
"challenge""dkim""spf""mx""mail-from""dmarc""tracking""storage""bimi""app-host""autodiscovery" okbooleandetailstringvisibilitystring- One of
"held""missing""unchecked""public" recordsobject[]namestringtypestringvaluesstring[]requiredbooleanvisibilitystring- One of
"held""missing""unchecked""public"
leftoversDnsLeftRecord[]probeobjectA test record Nextmail wrote to check it may write in the zone and could not take down again, to delete by hand.
Can be nullnamestring- Can be null
typestringzoneIdstringzoneNamestring- Can be null
detailstringnoticedAtstring- Format
date-time
errorstring- Can be null
syncedAtstring- Can be nullFormat
date-time
DomainDnsSyncobject
objectstring- One of
"domain_dns_sync" outcomestring- One of
"synced""refused" messagestringWhy nothing was written, when
outcomeisrefused.Can be nullattachedbooleanTrue when this sync attached the domain to its zone.
provisionobject- Can be null
outcomestring- One of
"applied""unmanaged""lease-held""domain-missing""link-unusable""zone-unusable""provider-unreachable" statestring- One of
"unmanaged""ready""awaiting-sync""awaiting-signing""conflict""blocked" connectionIdstring- Can be null
zoneIdstring- Can be null
provenbooleanWhether the domain proved it belongs here.
ownershipstringwrittenobject[]purposestring- One of
"challenge""dkim""spf""mx""mail-from""dmarc""tracking""storage""bimi""app-host""autodiscovery" namestringtypestringmodestring- One of
"created""merged"
adoptedintegerRecords that were already right.
conflictsobject[]kindstring- One of
"foreign-mx""foreign-record""spf-lookup-limit""spf-redirect""spf-duplicate""email-routing-locked""cname-flattening""zone-not-active""name-taken""delegated" purposestring- Can be null
namestringexistingstring- Can be null
detailstring
failuresobject[]purposestringnamestringerrorstring
stepsobject[]purposestring- One of
"challenge""dkim""spf""mx""mail-from""dmarc""tracking""storage""bimi""app-host""autodiscovery" okbooleandetailstringvisibilitystring- One of
"held""missing""unchecked""public" recordsobject[]namestringtypestringvaluesstring[]requiredbooleanvisibilitystring- One of
"held""missing""unchecked""public"
retiredobject[]purposestringoutcomestring- One of
"deleted""rewritten""kept""pending""failed" detailstring
leftoversDnsLeftRecord[]probeobjectA test record Nextmail wrote to check it may write in the zone and could not take down again, to delete by hand.
Can be nullnamestring- Can be null
typestringzoneIdstringzoneNamestring- Can be null
detailstringnoticedAtstring- Format
date-time
errorstring- Can be null
dnsDomainDns
DomainListobject
objectstring- One of
"list" dataDomain[]hasMorebooleanTrue when another page follows. Pass
nextCursorback ascursorto read it.nextCursorstringAn opaque cursor for the next page, or null on the last page. Pass it back unchanged.
Can be null
DomainLogoobject
The brand logo inboxes show next to mail from the domain, through BIMI. Yahoo, AOL and Fastmail show it once the DMARC policy of the domain quarantines or rejects. Gmail also needs a mark certificate, and Apple Mail a VMC.
urlstringWhere the logo is served, in the SVG Tiny PS format inboxes require. Null when the domain has no logo.
Can be nullrecordobjectOne DNS record the domain uses, with what the last check found. Publish
type,nameandvalueexactly as given. The values are specific to this domain and this service, so a value copied from anywhere else does not work.Can be nulltypestringThe record type:
MX,TXTorCNAME, andSRVamongautodiscoveryRecords.namestringThe full record name, such as
example.comor_dmarc.example.com. Some DNS providers want only the part in front of your domain.valuestringThe record value, to publish exactly as given.
priorityintegerThe priority of an MX or SRV record. Null on every other type. The
valueof an SRV record holds its weight, port and target, in that order.Can be nullpurposestringWhat the record is for, written to be shown to a person. Null on the MX records and the SPF record on the domain itself, which are the records that bring mail in.
Can be nullstatusstringfoundwhen the last check saw the record in public DNS, andmissingwhen it looked and did not. Null means the record has not been checked yet. Where Nextmail writes the DNS for this domain itself, what the zone holds is reported instead.Can be nullOne of"found""missing"foundstring[]What the last check found published at
namefor this record type, as public DNS answered: the target of a CNAME, the priority and host of each MX record, the text of each TXT record (only the SPF ones at an SPF name). An empty list means nothing of this type is published there. Null when the record has not been looked up since this was added, or when it is one of several MX records and the first one carries the list.Can be nullproblemobjectWhat looks wrong with this record, read from what the last check found. Null when nothing does.
Can be nullcodestringRequirednothing-publishedwhen nothing of this type is at the name,different-valuewhen something else is,doubled-namewhen the record sits at the name with the domain added a second time,quoted-valuewhen a TXT value was saved with its quote marks,relative-targetwhen the domain was added to the end of a CNAME or MX target,proxiedwhen the name answers with an address because the record is proxied,several-spfandseveral-dmarcwhen more than one such record is published at the name, which makes receivers ignore all of them, andunreadablewhen DNS could not be read for the name.One of"nothing-published""different-value""doubled-name""quoted-value""relative-target""proxied""several-spf""several-dmarc""unreadable"messagestringRequiredThe same, written to be shown to a person.
certificateobjectThe mark certificate published with the logo. Gmail shows a logo only with one, and Apple Mail only with a VMC.
Can be nullurlstringWhere the certificate chain is served as PEM, the
a=of the BIMI record.markstringverifiedfor a Verified Mark Certificate (VMC),commonfor a Common Mark Certificate (CMC), andunknownwhen the certificate does not say.One of"verified""common""unknown"expiresAtstringWhen the certificate expires. Inboxes stop showing the logo after that.
Can be nullFormatdate-timedomainsstring[]The domains the certificate was issued for.
issuerstringThe certificate authority that issued it.
Can be null
matchesCertificatebooleanWhether the published logo is the one inside the certificate. Gmail and Apple Mail only show the logo when the two match. Null when there is no certificate, or it carries no logo.
Can be null
DomainLogoChangeobject
The brand logo inboxes show next to mail from the domain, through BIMI. Yahoo, AOL and Fastmail show it once the DMARC policy of the domain quarantines or rejects. Gmail also needs a mark certificate, and Apple Mail a VMC.
urlstringWhere the logo is served, in the SVG Tiny PS format inboxes require. Null when the domain has no logo.
Can be nullrecordobjectOne DNS record the domain uses, with what the last check found. Publish
type,nameandvalueexactly as given. The values are specific to this domain and this service, so a value copied from anywhere else does not work.Can be nulltypestringThe record type:
MX,TXTorCNAME, andSRVamongautodiscoveryRecords.namestringThe full record name, such as
example.comor_dmarc.example.com. Some DNS providers want only the part in front of your domain.valuestringThe record value, to publish exactly as given.
priorityintegerThe priority of an MX or SRV record. Null on every other type. The
valueof an SRV record holds its weight, port and target, in that order.Can be nullpurposestringWhat the record is for, written to be shown to a person. Null on the MX records and the SPF record on the domain itself, which are the records that bring mail in.
Can be nullstatusstringfoundwhen the last check saw the record in public DNS, andmissingwhen it looked and did not. Null means the record has not been checked yet. Where Nextmail writes the DNS for this domain itself, what the zone holds is reported instead.Can be nullOne of"found""missing"foundstring[]What the last check found published at
namefor this record type, as public DNS answered: the target of a CNAME, the priority and host of each MX record, the text of each TXT record (only the SPF ones at an SPF name). An empty list means nothing of this type is published there. Null when the record has not been looked up since this was added, or when it is one of several MX records and the first one carries the list.Can be nullproblemobjectWhat looks wrong with this record, read from what the last check found. Null when nothing does.
Can be nullcodestringRequirednothing-publishedwhen nothing of this type is at the name,different-valuewhen something else is,doubled-namewhen the record sits at the name with the domain added a second time,quoted-valuewhen a TXT value was saved with its quote marks,relative-targetwhen the domain was added to the end of a CNAME or MX target,proxiedwhen the name answers with an address because the record is proxied,several-spfandseveral-dmarcwhen more than one such record is published at the name, which makes receivers ignore all of them, andunreadablewhen DNS could not be read for the name.One of"nothing-published""different-value""doubled-name""quoted-value""relative-target""proxied""several-spf""several-dmarc""unreadable"messagestringRequiredThe same, written to be shown to a person.
certificateobjectThe mark certificate published with the logo. Gmail shows a logo only with one, and Apple Mail only with a VMC.
Can be nullurlstringWhere the certificate chain is served as PEM, the
a=of the BIMI record.markstringverifiedfor a Verified Mark Certificate (VMC),commonfor a Common Mark Certificate (CMC), andunknownwhen the certificate does not say.One of"verified""common""unknown"expiresAtstringWhen the certificate expires. Inboxes stop showing the logo after that.
Can be nullFormatdate-timedomainsstring[]The domains the certificate was issued for.
issuerstringThe certificate authority that issued it.
Can be null
matchesCertificatebooleanWhether the published logo is the one inside the certificate. Gmail and Apple Mail only show the logo when the two match. Null when there is no certificate, or it carries no logo.
Can be nullobjectstring- One of
"domain_logo" domainIdstringdomainstringdmarcPolicystringThe DMARC policy set with
PATCH /domains/{id}, as on the domain.Can be nullOne of"none""quarantine""reject"recordsstringWhat happened to the BIMI record.
publishedwhen Nextmail writes the DNS for the domain and the record is in place.manualwhen it does not, so publishrecordyourself.blockedwhen a record you published yourself is in the way, which Nextmail does not replace without asking: replace it yourself, or sync the domain in the app.busywhen another change to the DNS of the domain was running, andfailedwhen the DNS provider refused. Call again for either.One of"published""manual""blocked""busy""failed"logoFromCertificatebooleanTrue when the certificate carried a different logo from the one published, so its logo is now the published one. Inboxes compare the two.
DomainLogoStatusobject
The brand logo inboxes show next to mail from the domain, through BIMI. Yahoo, AOL and Fastmail show it once the DMARC policy of the domain quarantines or rejects. Gmail also needs a mark certificate, and Apple Mail a VMC.
urlstringWhere the logo is served, in the SVG Tiny PS format inboxes require. Null when the domain has no logo.
Can be nullrecordobjectOne DNS record the domain uses, with what the last check found. Publish
type,nameandvalueexactly as given. The values are specific to this domain and this service, so a value copied from anywhere else does not work.Can be nulltypestringThe record type:
MX,TXTorCNAME, andSRVamongautodiscoveryRecords.namestringThe full record name, such as
example.comor_dmarc.example.com. Some DNS providers want only the part in front of your domain.valuestringThe record value, to publish exactly as given.
priorityintegerThe priority of an MX or SRV record. Null on every other type. The
valueof an SRV record holds its weight, port and target, in that order.Can be nullpurposestringWhat the record is for, written to be shown to a person. Null on the MX records and the SPF record on the domain itself, which are the records that bring mail in.
Can be nullstatusstringfoundwhen the last check saw the record in public DNS, andmissingwhen it looked and did not. Null means the record has not been checked yet. Where Nextmail writes the DNS for this domain itself, what the zone holds is reported instead.Can be nullOne of"found""missing"foundstring[]What the last check found published at
namefor this record type, as public DNS answered: the target of a CNAME, the priority and host of each MX record, the text of each TXT record (only the SPF ones at an SPF name). An empty list means nothing of this type is published there. Null when the record has not been looked up since this was added, or when it is one of several MX records and the first one carries the list.Can be nullproblemobjectWhat looks wrong with this record, read from what the last check found. Null when nothing does.
Can be nullcodestringRequirednothing-publishedwhen nothing of this type is at the name,different-valuewhen something else is,doubled-namewhen the record sits at the name with the domain added a second time,quoted-valuewhen a TXT value was saved with its quote marks,relative-targetwhen the domain was added to the end of a CNAME or MX target,proxiedwhen the name answers with an address because the record is proxied,several-spfandseveral-dmarcwhen more than one such record is published at the name, which makes receivers ignore all of them, andunreadablewhen DNS could not be read for the name.One of"nothing-published""different-value""doubled-name""quoted-value""relative-target""proxied""several-spf""several-dmarc""unreadable"messagestringRequiredThe same, written to be shown to a person.
certificateobjectThe mark certificate published with the logo. Gmail shows a logo only with one, and Apple Mail only with a VMC.
Can be nullurlstringWhere the certificate chain is served as PEM, the
a=of the BIMI record.markstringverifiedfor a Verified Mark Certificate (VMC),commonfor a Common Mark Certificate (CMC), andunknownwhen the certificate does not say.One of"verified""common""unknown"expiresAtstringWhen the certificate expires. Inboxes stop showing the logo after that.
Can be nullFormatdate-timedomainsstring[]The domains the certificate was issued for.
issuerstringThe certificate authority that issued it.
Can be null
matchesCertificatebooleanWhether the published logo is the one inside the certificate. Gmail and Apple Mail only show the logo when the two match. Null when there is no certificate, or it carries no logo.
Can be nullobjectstring- One of
"domain_logo" domainIdstringdomainstringdmarcPolicystringThe DMARC policy set with
PATCH /domains/{id}, as on the domain.Can be nullOne of"none""quarantine""reject"publishedobjectWhat public DNS answers with at
default._bimi.<domain>right now.foundbooleanWhether a BIMI record is published.
oursbooleanWhether the published record points at the logo Nextmail serves.
valuestringThe published record, or null when there is none.
Can be null
parentDmarcobjectFor a subdomain such as
mail.example.com, inboxes also check the DMARC record of the domain it belongs to before they show a logo. Null on a domain that is not a subdomain.Can be nulldomainstringThe parent domain, such as
example.com.recordstringIts DMARC record, or null when it has none.
Can be nullpolicystringIts
p=.Can be nullsubdomainPolicystringIts
sp=, which falls back top=when the record has none.Can be nullpercentintegerIts
pct=, 100 when the record has none.readablebooleanFalse when public DNS could not be asked. The other fields are then empty.
enforcedbooleanWhether both
p=andsp=quarantine or reject at 100 percent, which inboxes need before they show a logo for the subdomain.
DomainRecordobject
One DNS record the domain uses, with what the last check found. Publish type, name and value exactly as given. The values are specific to this domain and this service, so a value copied from anywhere else does not work.
typestringThe record type:
MX,TXTorCNAME, andSRVamongautodiscoveryRecords.namestringThe full record name, such as
example.comor_dmarc.example.com. Some DNS providers want only the part in front of your domain.valuestringThe record value, to publish exactly as given.
priorityintegerThe priority of an MX or SRV record. Null on every other type. The
valueof an SRV record holds its weight, port and target, in that order.Can be nullpurposestringWhat the record is for, written to be shown to a person. Null on the MX records and the SPF record on the domain itself, which are the records that bring mail in.
Can be nullstatusstringfoundwhen the last check saw the record in public DNS, andmissingwhen it looked and did not. Null means the record has not been checked yet. Where Nextmail writes the DNS for this domain itself, what the zone holds is reported instead.Can be nullOne of"found""missing"foundstring[]What the last check found published at
namefor this record type, as public DNS answered: the target of a CNAME, the priority and host of each MX record, the text of each TXT record (only the SPF ones at an SPF name). An empty list means nothing of this type is published there. Null when the record has not been looked up since this was added, or when it is one of several MX records and the first one carries the list.Can be nullproblemobjectWhat looks wrong with this record, read from what the last check found. Null when nothing does.
Can be nullcodestringRequirednothing-publishedwhen nothing of this type is at the name,different-valuewhen something else is,doubled-namewhen the record sits at the name with the domain added a second time,quoted-valuewhen a TXT value was saved with its quote marks,relative-targetwhen the domain was added to the end of a CNAME or MX target,proxiedwhen the name answers with an address because the record is proxied,several-spfandseveral-dmarcwhen more than one such record is published at the name, which makes receivers ignore all of them, andunreadablewhen DNS could not be read for the name.One of"nothing-published""different-value""doubled-name""quoted-value""relative-target""proxied""several-spf""several-dmarc""unreadable"messagestringRequiredThe same, written to be shown to a person.
DomainStorageobject
The custom files domain on a domain: a subdomain such as files.example.com that the download links for files sent from that domain use in place of the Nextmail host, once a check has passed. A domain has at most one. Set or remove it with PATCH /domains/{id}.
hoststringThe files domain, lowercased. Null when none is set.
Can be nullstatusstringnonemeans no files domain is set.pendingmeans one is set and has never passed a check, so download links still use the default Nextmail host.activemeans new mail from this domain uses it.failedmeans it passed a check before and is not in use now, so new links are back on the default host until a check passes again.One of"none""pending""active""failed"activebooleanWhether the download links in new mail from this domain use the files domain right now. True exactly when
statusisactive. Links fall back to the default host after three failed checks in a row, or once the last successful check is more than 2 hours old, so a name that has failed once or twice is still active and carries the reason inerror.targetstringThe address the CNAME record must point at, prepared by Nextmail for this files domain alone. An empty string when no files domain is set, and while the address for a new one is still being prepared.
recordobjectThe DNS record to add at your DNS provider, as a plain CNAME with any proxying turned off. Null when no files domain is set, and while its address is still being prepared.
Can be nulltypestringAlways
CNAME.One of"CNAME"namestringThe record name, which is
host.valuestringThe record value, which is
target.
checkedAtstringWhen the last check ran, whether it passed or not. Null until the first one.
Can be nullFormatdate-timeverifiedAtstringWhen a check last passed. Null while the name has never passed one.
Can be nullFormatdate-timeerrorstringWhy the last check failed, written to be shown to a person. Null when the last check passed or none has run yet. A name managed by a different Nextmail server always carries a message saying so.
Can be null
DomainTrackingobject
The custom tracking domain on a domain: a subdomain such as links.example.com that tracked links and the open pixel in new mail from that domain use in place of the Nextmail host, once a check has passed. A domain has at most one. Set or remove it with PATCH /domains/{id}.
hoststringThe tracking domain, lowercased. Null when none is set.
Can be nullstatusstringnonemeans no tracking domain is set.pendingmeans one is set and has never passed a check, so mail still uses the default Nextmail host.activemeans new mail from this domain uses it.failedmeans it passed a check before and is not in use now, so new mail is back on the default host until a check passes again.One of"none""pending""active""failed"activebooleanWhether new mail from this domain uses the tracking domain right now. True exactly when
statusisactive. Mail falls back to the default host after three failed checks in a row, or once the last successful check is more than 2 hours old, so a name that has failed once or twice is still active and carries the reason inerror.targetstringThe address the CNAME record must point at, prepared by Nextmail for this tracking domain alone. An empty string when no tracking domain is set, and while the address for a new one is still being prepared.
recordobjectThe DNS record to add at your DNS provider, as a plain CNAME with any proxying turned off. Null when no tracking domain is set, and while its address is still being prepared.
Can be nulltypestringAlways
CNAME.One of"CNAME"namestringThe record name, which is
host.valuestringThe record value, which is
target.
checkedAtstringWhen the last check ran, whether it passed or not. Null until the first one.
Can be nullFormatdate-timeverifiedAtstringWhen a check last passed. Null while the name has never passed one.
Can be nullFormatdate-timeerrorstringWhy the last check failed, written to be shown to a person. Null when the last check passed or none has run yet. A name managed by a different Nextmail server always carries a message saying so.
Can be null
GravatarPublishStartobject
objectstringRequired- One of
"gravatar_publish" addressIdstringRequiredurlstringRequiredThe Gravatar sign-in page, for the person to open in a browser signed in to Nextmail.
Formaturi
GroupMemberobject
objectstringRequired- One of
"group_member" idstringRequiredThe group member id.
groupAddressIdstringRequiredThe group address it belongs to.
kindstringRequiredaddressfor an address of the workspace,emailfor one at another provider.One of"address""email"addressIdstringFor
address, the address id.Can be nulladdressstringRequiredThe address the mail goes to.
emailstringFor
email, the outside address.Can be nullgroupbooleanRequiredTrue when the member is a group address itself, whose own members get the mail too.
statusstringRequiredFor an outside address,
pending,live,refused, orbouncedwhen mail forwarded to it bounced for good. For an address of the workspace,live, orpausedwhile it is switched off.One of"live""pending""refused""paused""bounced"confirmedAtstringWhen an outside address confirmed.
Can be nullFormatdate-timeaskedAtstringWhen an outside address was last asked to confirm.
Can be nullFormatdate-timeaddedBystringThe account that added it, when one did.
Can be nullcreatedAtstringRequiredWhen it was added.
Formatdate-time
GroupMemberListobject
objectstringRequired- One of
"list" groupAddressIdstringRequiredThe group address.
addressstringRequiredThat address in full.
destinationstringRequiredWhere its mail goes. The group members get it only while this is
group.One of"mailbox""forward""webhook""group"maxintegerRequiredThe most group members one group may hold.
dataGroupMember[]RequiredhasMorebooleanRequiredTrue when another page follows. Pass
nextCursorback ascursorto read it.nextCursorstringRequiredAn opaque cursor for the next page, or null on the last page.
Can be null
GroupMembersAddedobject
objectstringRequired- One of
"group_members" groupAddressIdstringRequiredThe group address.
addedGroupMember[]RequiredThe group members added, and outside addresses asked to confirm once more.
skippedobject[]RequiredThe entries that were not added, with the reason.
addressIdstringThe address id that was sent.
Can be nullemailstringThe outside address that was sent.
Can be nullreasonstringRequiredWhy it was not added.
MailAppCalDavServerobject
A CalDAV or CardDAV server, for Apple Calendar and Contacts, Thunderbird, DAVx5 on Android and other calendar and contacts apps. They sign in with the same username and an app password. CardDAV is left out of the servers that come with a password made by a setup link, because such a password cannot reach contacts.
urlstringThe server address to enter in the app.
principalUrlstringThe account address on the server, for apps that ask for a principal URL instead of finding it.
hoststringportintegersecuritystringAlways
ssl-tls: the server answers only over HTTPS.One of"ssl-tls"
MailAppProfileLinkobject
objectstring- One of
"mail_app_profile_link" addressstringurlstringThe link to open on the device. It works once, and holds what makes the password, so treat it as a secret until it is used.
expiresAtstringWhen the link stops working.
Formatdate-time
MailAppProtocolSwitchesobject
Which kinds of connection the address accepts. A switched-off kind refuses every sign-in to it. Every kind is on until the workspace owner, or someone who manages domains, switches it off.
imapbooleanRequiredsmtpbooleanRequiredpop3booleanRequiredcaldavbooleanRequiredcarddavbooleanRequired
MailAppSettingsobject
objectstring- One of
"mail_app_settings" addressstringusernamestringWhat to sign in with: the address itself.
imapobjectIncoming mail over IMAP, the protocol that keeps folders and read state in step.
hoststringportintegersecuritystringAlways
ssl-tls: the connection is encrypted from the first byte (implicit TLS).One of"ssl-tls"
smtpobjectOutgoing mail over SMTP, for sending from the mail app.
hoststringportintegersecuritystringAlways
ssl-tls: the connection is encrypted from the first byte (implicit TLS).One of"ssl-tls"
smtpSubmissionobjectOutgoing mail over SMTP on port 587, for apps, devices and libraries that only offer STARTTLS. It takes the same username and app password as
smtp, and the address has to accept SMTP for either to work.hoststringportintegersecuritystringAlways
starttls: the connection opens unencrypted and the app has to upgrade it with STARTTLS before it signs in. The server refuses a sign-in or a message until it has.One of"starttls"
pop3objectIncoming mail over POP3, for apps that only download the inbox.
hoststringportintegersecuritystringAlways
ssl-tls: the connection is encrypted from the first byte (implicit TLS).One of"ssl-tls"
caldavMailAppCalDavServercarddavMailAppCalDavServerprotocolsMailAppProtocolSwitches
MailAppSetupobject
objectstring- One of
"mail_app_setup" addressstringrecipientstringexpiresAtstring- Format
date-time