Skip to the documentation
API

Domains

Every operation in this group: what it accepts, what it returns and the errors it can answer with.

Operations

GET/domains

List domains

Scopesdomains:readReads

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

limitinteger

Rows per page, 1 to 100.

At least 1At most 100Default25
cursorstring

The 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 400 invalid_cursor.

qstring

Searches 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 q on 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

Scopesdomains:writeChanges data

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

domainstringRequired

A 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 422 invalid_parameter on domain.

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 lacks domains:write. domain_allowance_reached: the plan of the workspace includes no more domains, and the message says which plan includes more.

409

domain_already_added when you have already added this domain, domain_claimed when it is verified in another account, and operator_domain when it belongs to Nextmail. Each names domain in param.

422

invalid_parameter on domain when it is missing or not a hostname, unknown_parameter for any other field, and capability_unsupported on domainAllowlist for 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

Scopesdomains:readReads

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

idstringRequired

The domain id, from GET /domains or POST /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

Scopesdomains:writeChanges data

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

idstringRequired

Domain id from list, a UUID.

Request body

catchAllboolean

True accepts mail to any address on this domain that nobody created, false refuses it. Leaving the field out leaves the catch-all alone.

trackingHoststring

A subdomain of this domain, such as links.example.com. It is trimmed and lowercased, and an http:// or https:// 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 characters
storageHoststring

A subdomain of this domain, such as files.example.com. It is cleaned up the same way as trackingHost. 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 characters
dmarcPolicystring

The DMARC policy to publish: none, quarantine or reject. Leaving the field out leaves the policy alone.

One of"none""quarantine""reject"
autodiscoveryboolean

True 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 autodiscoveryRecords with 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.

senderNamestring

The 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 characters
aliasOfstring

The id of another domain hosted in this workspace to make this domain an alias of, or null to stop it being one. Mail to local@ this domain is then handled exactly as local@ that domain, and local@ this domain may be used as a From address wherever local@ 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 lacks domains: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_use with param: "trackingHost": another domain already uses that name, or the tracking domain on this one is managed by a different Nextmail server. storage_host_in_use with param: "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, and param is whichever field was sent. domain_not_sendable with param: "dmarcPolicy": mail from the domain is not signed yet, so a policy stricter than none would send its own mail to spam. alias_not_allowed with param: "aliasOf": aliasOf names 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_host with param: "trackingHost", or invalid_storage_host with param: "storageHost": the name is not a hostname, is not a subdomain of this domain, is the return path host bounce.<domain>, belongs to Nextmail, or is set up to receive mail. unknown_parameter for any field other than catchAll, trackingHost, storageHost, dmarcPolicy, senderName, autodiscovery and aliasOf. invalid_parameter when the body is not a JSON object, when catchAll is not a boolean, when a host field that is present is neither a string nor null, or is longer than 512 characters, when dmarcPolicy is not none, quarantine or reject, or when senderName is 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_unsupported with param: "domainAllowlist" for a narrowed key that does not hold this whole domain, which is any key narrowed to individual addresses and any key whose domainAllowlist names 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

Scopesdomains:writeDeletes
Asks for a verification code

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

Query parameters

confirmstring

The 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 lacks domains:write. insufficient_authority: an OAuth access token acts for a member whose role does not hold workspace: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 with POST /security/step-up, send it to POST /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_domain with param: "confirm": this is the last domain of the workspace and the call carries no confirm, so nothing was removed. Send the name of the domain as confirm to remove it together with the whole mailbox.

422

invalid_parameter with param: "confirm" when confirm is not the name of the domain. capability_unsupported with param: "domainAllowlist" for a narrowed key that does not hold this whole domain, and with param: "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

Scopesdomains:writeChanges data

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

idstringRequired

The domain id, from GET /domains or POST /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 lacks domains:write.

404

resource_not_found: no such domain. A domain in another workspace reads the same as one that does not exist.

422

capability_unsupported with param: "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

PUT/domains/{id}/logo/certificate

Set the mark certificate of a domain

Scopesdomains:writeChanges data

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

Request body

certificatestringRequired

The 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 lacks domains: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_parameter on certificate when 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_parameter for any other field, and capability_unsupported with param: "domainAllowlist" for a narrowed key that does not hold this whole domain.

The errors every operation can return401429500Error catalog

Also available in

TypeScript
domains.setLogoCertificate()
Python
domains.set_logo_certificate()
Ruby
domains.set_logo_certificate
PHP
domains->setLogoCertificate
Go
Domains.SetLogoCertificate
Java
domains().setLogoCertificate
C#
Domains.SetLogoCertificateAsync
CLI
nextmail domains set-logo-certificate
MCP
setDomainLogoCertificate

DELETE/domains/{id}/logo/certificate

Remove the mark certificate of a domain

Scopesdomains:writeDeletes

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

idstringRequired

The domain id, from GET /domains or POST /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 lacks domains:write.

404

resource_not_found: no such domain. A domain in another workspace reads the same as one that does not exist.

422

capability_unsupported with param: "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

Scopesdomains:readReads

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

Query parameters

limitinteger

Rows per page, 1 to 100.

At least 1At most 100Default25
cursorstring

The 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 400 invalid_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

Scopesdomains:writeChanges data
Asks for a verification code

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

Request body

localPartstringRequired

The 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 with PATCH /domains/{id} instead.

1 to 64 characters
labelstring

A 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 characters
keepOriginalboolean

True keeps every message the address receives byte for byte as it arrived, which GET /threads/{id}/messages/{messageId}/raw then answers. Leaving it out keeps it off for a new address and leaves it as it is for one that already exists.

destinationstring

mailbox, the default, keeps the mail here. webhook sends every message to the endpoint in webhookId and keeps none here, and group sends it to the group members of the address. forward needs a forwarding destination that is on, which a new address never has, so add destinations first and switch with PATCH. Choosing it asks an OAuth access token for a verification code.

One of"mailbox""forward""webhook""group"
webhookIdstring

A 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 already webhook. Needs threads:read.

Up to 128 characters
tapWebhookIdsstring[]

Up to 5 webhook endpoints of this workspace that also get every message the address receives, as email.received when it was filed here and email.routed when 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 needs threads:read, and more than 5 is refused with 422 too_many_taps.

Can be null
expiresAtstring

An 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-time
onExpirystring

stop, the default, switches the address off when it expires and keeps its mail. delete removes the address and the conversations delivered to it, which needs threads:write and asks an OAuth access token for a verification code.

One of"stop""delete"
groupPostingstring

Who may send to the address while destination is group: anyone, the default, members (its group members, passing DMARC) or workspace (an address on a domain of this workspace, passing DMARC). Anybody else is refused.

One of"anyone""members""workspace"
groupKeepCopyboolean

True 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 lacks domains:write, or threads:read for a webhook destination or tapWebhookIds, or threads:write for onExpiry: "delete". step_up_required when an OAuth access token chooses where the mail goes or that the address is deleted without a recent verification code, and insufficient_authority when 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 with POST /security/step-up, send it to POST /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_found with param on webhookId or tapWebhookIds when an endpoint named there is not in this workspace.

409

forward_required on destination for forward when the address has no forwarding destination that is on, which a new address never has.

422

invalid_parameter on localPart, label, keepOriginal, expiresAt (not 60 seconds to 10 years ahead) or webhookId (missing for a webhook destination, or sent with another one), too_many_taps on tapWebhookIds, unknown_parameter for any other field, workspace_limit_reached when the workspace already holds the most addresses it may have, and capability_unsupported with param: "domainAllowlist" for a narrowed key that does not hold this whole domain.

The errors every operation can return401429500Error catalog

Also available in

TypeScript
domains.createAddress()
Python
domains.create_address()
Ruby
domains.create_address
PHP
domains->createAddress
Go
Domains.CreateAddress
Java
domains().createAddress
C#
Domains.CreateAddressAsync
CLI
nextmail domains create-address
MCP
addDomainAddress

GET/domains/{id}/addresses/{addressId}

Retrieve an address

Scopesdomains:readReads

One address on the domain.

Requires the domains:read scope.

Path parameters

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /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

TypeScript
domains.getAddress()
Python
domains.get_address()
Ruby
domains.get_address
PHP
domains->getAddress
Go
Domains.GetAddress
Java
domains().getAddress
C#
Domains.GetAddressAsync
CLI
nextmail domains get-address

PATCH/domains/{id}/addresses/{addressId}

Update an address

Scopesdomains:writeChanges data
Asks for a verification code

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.

Request body

labelstring

A 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 characters
enabledboolean

False 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.

destinationstring

Where the mail of the address goes. mailbox keeps it here, and sends a copy to every forwarding destination that is on. forward sends it only to the destinations and keeps no copy, so it needs at least one destination that is on, or it is refused with 409 forward_required. Destinations are managed under /domains/{id}/addresses/{addressId}/forwards. webhook sends every message to the endpoint in webhookId and keeps none here, and group sends 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"
keepOriginalboolean

True keeps every message the address receives from now on byte for byte as it arrived, which GET /threads/{id}/messages/{messageId}/raw then answers. False stops keeping new ones, and the originals already kept stay with their messages until those are deleted.

webhookIdstring

A 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 already webhook. Needs threads:read.

Up to 128 characters
tapWebhookIdsstring[]

Up to 5 webhook endpoints of this workspace that also get every message the address receives, as email.received when it was filed here and email.routed when 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 needs threads:read, and more than 5 is refused with 422 too_many_taps.

Can be null
expiresAtstring

An 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-time
onExpirystring

stop, the default, switches the address off when it expires and keeps its mail. delete removes the address and the conversations delivered to it, which needs threads:write and asks an OAuth access token for a verification code.

One of"stop""delete"
groupPostingstring

Who may send to the address while destination is group: anyone, the default, members (its group members, passing DMARC) or workspace (an address on a domain of this workspace, passing DMARC). Anybody else is refused.

One of"anyone""members""workspace"
groupKeepCopyboolean

True 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 lacks domains:write, or threads:read for a webhook destination or tapWebhookIds, or threads:write for deletion on expiry. step_up_required when an OAuth access token changes where the mail goes or chooses deletion without a recent verification code, and insufficient_authority when 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 with POST /security/step-up, send it to POST /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_found with param on webhookId or tapWebhookIds when an endpoint named there is not in this workspace.

409

forward_required on destination for forward when the address has no forwarding destination that is on.

422

invalid_parameter on label, enabled, keepOriginal, expiresAt (not 60 seconds to 10 years ahead) or webhookId (missing for a webhook destination, or sent with another one), too_many_taps on tapWebhookIds, unknown_parameter for any other field, and capability_unsupported with param: "domainAllowlist" for a narrowed key that does not hold this whole domain.

The errors every operation can return401429500Error catalog

Also available in

TypeScript
domains.updateAddress()
Python
domains.update_address()
Ruby
domains.update_address
PHP
domains->updateAddress
Go
Domains.UpdateAddress
Java
domains().updateAddress
C#
Domains.UpdateAddressAsync
CLI
nextmail domains update-address
MCP
setAddressForwardModeupdateDomainAddress

DELETE/domains/{id}/addresses/{addressId}

Remove an address

Scopesdomains:writeDeletes
Asks for a verification code

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.

Returns

Errors

403

insufficient_scope: the key lacks domains:write. insufficient_authority: an OAuth access token acts for a member whose role does not hold workspace: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 with POST /security/step-up, send it to POST /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_unsupported with param: "domainAllowlist" for a narrowed key that does not hold this whole domain.

The errors every operation can return400401429500Error catalog

Also available in

TypeScript
domains.deleteAddress()
Python
domains.delete_address()
Ruby
domains.delete_address
PHP
domains->deleteAddress
Go
Domains.DeleteAddress
Java
domains().deleteAddress
C#
Domains.DeleteAddressAsync
CLI
nextmail domains delete-address
MCP
removeDomainAddress

PUT/domains/{id}/addresses/{addressId}/photo

Set the photo of an address

Scopesdomains:writeChanges data

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.

Query parameters

cropstring

The 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,1 keeps 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 with invalid_parameter.

Pattern^[0-9.]+,[0-9.]+,[0-9.]+,[0-9.]+$

Request body

Content typeimage/png, image/jpeg, image/webp, image/gif

binary

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_image when the body is not an image of an accepted type, is too large or cannot be read. capability_unsupported with param: "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

TypeScript
domains.setAddressPhoto()
Python
domains.set_address_photo()
Ruby
domains.set_address_photo
PHP
domains->setAddressPhoto
Go
Domains.SetAddressPhoto
Java
domains().setAddressPhoto
C#
Domains.SetAddressPhotoAsync
CLI
nextmail domains set-address-photo
MCP
setAddressPhoto

DELETE/domains/{id}/addresses/{addressId}/photo

Remove the photo of an address

Scopesdomains:writeDeletes

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /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_unsupported with param: "domainAllowlist" for a narrowed key that does not hold this whole domain.

The errors every operation can return400401403429500Error catalog

Also available in

TypeScript
domains.removeAddressPhoto()
Python
domains.remove_address_photo()
Ruby
domains.remove_address_photo
PHP
domains->removeAddressPhoto
Go
Domains.RemoveAddressPhoto
Java
domains().removeAddressPhoto
C#
Domains.RemoveAddressPhotoAsync
CLI
nextmail domains remove-address-photo
MCP
removeAddressPhoto

GET/app-host

Retrieve the web app address

Scopesdomains:readReads

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

Scopesdomains:writeChanges data
Asks for a verification code

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

hoststringRequired

A 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 an http:// or https:// 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 lacks domains: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 with POST /security/step-up, send it to POST /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_use with param: "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_host with param: "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_parameter on host when it is missing, empty or longer than 253 characters, unknown_parameter for any other field, and capability_unsupported with param: "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

Scopesdomains:writeDeletes
Asks for a verification code

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 lacks domains: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 with POST /security/step-up, send it to POST /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_unsupported with param: "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

TypeScript
appHost.delete()
Python
app_host.delete()
Ruby
app_host.delete
PHP
appHost->delete
Go
AppHost.Delete
Java
appHost().delete
C#
AppHost.DeleteAsync
CLI
nextmail app-host delete
MCP
removeAppHostsetAppHost

POST/app-host/verify

Check the web app address now

Scopesdomains:writeChanges data

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 lacks domains:write.

The errors every operation can return400401404422429500Error catalog

Also available in

TypeScript
appHost.verify()
Python
app_host.verify()
Ruby
app_host.verify
PHP
appHost->verify
Go
AppHost.Verify
Java
appHost().verify
C#
AppHost.VerifyAsync
CLI
nextmail app-host verify
MCP
verifyAppHost

GET/domains/{id}/addresses/{addressId}/forwards

List the forwarding destinations of an address

Scopesdomains:readReads

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /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

TypeScript
domains.listAddressForwards()
Python
domains.list_address_forwards()
Ruby
domains.list_address_forwards
PHP
domains->listAddressForwards
Go
Domains.ListAddressForwards
Java
domains().listAddressForwards
C#
Domains.ListAddressForwardsAsync
CLI
nextmail domains list-address-forwards
MCP
listAddressForwards

POST/domains/{id}/addresses/{addressId}/forwards

Forward the mail of an address

Scopesdomains:writeChanges data
Asks for a verification code

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /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[]Required

The 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 with POST /security/step-up, send it to POST /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.addAddressForwards()
Python
domains.add_address_forwards()
Ruby
domains.add_address_forwards
PHP
domains->addAddressForwards
Go
Domains.AddAddressForwards
Java
domains().addAddressForwards
C#
Domains.AddAddressForwardsAsync
CLI
nextmail domains add-address-forwards
MCP
addAddressForwards

PATCH/domains/{id}/addresses/{addressId}/forwards/{forwardId}

Switch a forwarding destination on or off

Scopesdomains:writeChanges data
Asks for a verification code

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.

forwardIdstringRequired

A forwarding destination of the address, as GET /domains/{id}/addresses/{addressId}/forwards lists it.

Request body

enabledbooleanRequired

False 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 with POST /security/step-up, send it to POST /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

Scopesdomains:writeDeletes
Asks for a verification code

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.

forwardIdstringRequired

A forwarding destination of the address, as GET /domains/{id}/addresses/{addressId}/forwards lists it.

Returns

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 with POST /security/step-up, send it to POST /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

Scopesdomains:writeSends mail
Asks for a verification code

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.

forwardIdstringRequired

A forwarding destination of the address, as GET /domains/{id}/addresses/{addressId}/forwards lists 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 with POST /security/step-up, send it to POST /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

Scopesmembers:readReads

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /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

TypeScript
domains.listAddressMembers()
Python
domains.list_address_members()
Ruby
domains.list_address_members
PHP
domains->listAddressMembers
Go
Domains.ListAddressMembers
Java
domains().listAddressMembers
C#
Domains.ListAddressMembersAsync
CLI
nextmail domains list-address-members
MCP
listAddressMembers

GET/domains/{id}/addresses/{addressId}/login

Read the sign-in of an address

Scopesmembers:writeReads

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /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

TypeScript
domains.getAddressLogin()
Python
domains.get_address_login()
Ruby
domains.get_address_login
PHP
domains->getAddressLogin
Go
Domains.GetAddressLogin
Java
domains().getAddressLogin
C#
Domains.GetAddressLoginAsync
CLI
nextmail domains get-address-login
MCP
getAddressLogin

PUT/domains/{id}/addresses/{addressId}/login

Set the password of an address

Scopesmembers:writeChanges data
Asks for a verification code

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.

Request body

passwordstringRequired

At 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 with POST /security/step-up, send it to POST /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.setAddressLogin()
Python
domains.set_address_login()
Ruby
domains.set_address_login
PHP
domains->setAddressLogin
Go
Domains.SetAddressLogin
Java
domains().setAddressLogin
C#
Domains.SetAddressLoginAsync
CLI
nextmail domains set-address-login

DELETE/domains/{id}/addresses/{addressId}/login

Remove the sign-in of an address

Scopesmembers:writeDeletes

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.

Returns

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
domains.deleteAddressLogin()
Python
domains.delete_address_login()
Ruby
domains.delete_address_login
PHP
domains->deleteAddressLogin
Go
Domains.DeleteAddressLogin
Java
domains().deleteAddressLogin
C#
Domains.DeleteAddressLoginAsync
CLI
nextmail domains delete-address-login
MCP
removeAddressLogin

GET/dns-connections

List DNS connections

Scopesdomains:readReads

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

TypeScript
dnsConnections.list()
Python
dns_connections.list()
Ruby
dns_connections.list
PHP
dnsConnections->list
Go
DNSConnections.List
Java
dnsConnections().list
C#
DnsConnections.ListAsync
CLI
nextmail dns-connections list
MCP
listDnsConnections

POST/dns-connections

Start connecting a DNS provider account

Scopesdomains:writeChanges data
Asks for a verification code

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 with POST /security/step-up, send it to POST /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

TypeScript
dnsConnections.start()
Python
dns_connections.start()
Ruby
dns_connections.start
PHP
dnsConnections->start
Go
DNSConnections.Start
Java
dnsConnections().start
C#
DnsConnections.StartAsync
CLI
nextmail dns-connections start
MCP
startDnsConnection

GET/dns-connections/{id}

Retrieve a DNS connection

Scopesdomains:readReads

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

idstringRequired

A DNS connection, as GET /dns-connections lists it.

Returns

The connection.

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
dnsConnections.get()
Python
dns_connections.get()
Ruby
dns_connections.get
PHP
dnsConnections->get
Go
DNSConnections.Get
Java
dnsConnections().get
C#
DnsConnections.GetAsync
CLI
nextmail dns-connections get
MCP
getDnsConnection

DELETE/dns-connections/{id}

Disconnect a DNS connection

Scopesdomains:writeDeletes
Asks for a verification code

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

idstringRequired

A DNS connection, as GET /dns-connections lists 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 with POST /security/step-up, send it to POST /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
dnsConnections.delete()
Python
dns_connections.delete()
Ruby
dns_connections.delete
PHP
dnsConnections->delete
Go
DNSConnections.Delete
Java
dnsConnections().delete
C#
DnsConnections.DeleteAsync
CLI
nextmail dns-connections delete
MCP
disconnectDnsConnection

GET/domains/{id}/dns

Read how the DNS of a domain is set up

Scopesdomains:readReads

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

Query parameters

refreshboolean

True 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

Scopesdomains:writeChanges data
Asks for a verification code

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

Request body

connectionIdstringRequired

The connection that holds the zone, from dnsConnections.list.

1 to 64 characters
zoneIdstringRequired

The zone, as zone.candidates of getDns lists 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 with POST /security/step-up, send it to POST /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.setDnsZone()
Python
domains.set_dns_zone()
Ruby
domains.set_dns_zone
PHP
domains->setDnsZone
Go
Domains.SetDNSZone
Java
domains().setDnsZone
C#
Domains.SetDnsZoneAsync
CLI
nextmail domains set-dns-zone
MCP
setDomainDnsZone

POST/domains/{id}/dns/sync

Write the DNS records of a domain

Scopesdomains:writeChanges data
Asks for a verification code

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

Request body

purposestring

Only this kind of record: dmarc, tracking, storage, bimi or app-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 with POST /security/step-up, send it to POST /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.syncDns()
Python
domains.sync_dns()
Ruby
domains.sync_dns
PHP
domains->syncDns
Go
Domains.SyncDNS
Java
domains().syncDns
C#
Domains.SyncDnsAsync
CLI
nextmail domains sync-dns
MCP
syncDomainDns

GET/domains/{id}/addresses/{addressId}/mail-apps

Read the mail app settings of an address

Scopesthreads:readReads

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /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

TypeScript
domains.getMailAppSettings()
Python
domains.get_mail_app_settings()
Ruby
domains.get_mail_app_settings
PHP
domains->getMailAppSettings
Go
Domains.GetMailAppSettings
Java
domains().getMailAppSettings
C#
Domains.GetMailAppSettingsAsync
CLI
nextmail domains get-mail-app-settings
MCP
getMailAppSettings

PATCH/domains/{id}/addresses/{addressId}/mail-apps

Turn mail app connections on or off for an address

Scopesthreads:readdomains:writeChanges data

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.

Request body

imapboolean

Accept IMAP sign-ins, which keep folders and read state in step.

smtpboolean

Accept SMTP sign-ins, for sending from a mail app.

pop3boolean

Accept POP3 sign-ins, for apps that only download the inbox.

caldavboolean

Serve the calendar of the address over CalDAV.

carddavboolean

Serve 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

Scopesthreads:readReads

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /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

TypeScript
domains.listAppPasswords()
Python
domains.list_app_passwords()
Ruby
domains.list_app_passwords
PHP
domains->listAppPasswords
Go
Domains.ListAppPasswords
Java
domains().listAppPasswords
C#
Domains.ListAppPasswordsAsync
CLI
nextmail domains list-app-passwords
MCP
listAppPasswords

POST/domains/{id}/addresses/{addressId}/app-passwords

Create an app password for an address

Scopesmembers:writeChanges data
Asks for a verification code

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.

Request body

namestringRequired

What 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 with POST /security/step-up, send it to POST /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.createAppPassword()
Python
domains.create_app_password()
Ruby
domains.create_app_password
PHP
domains->createAppPassword
Go
Domains.CreateAppPassword
Java
domains().createAppPassword
C#
Domains.CreateAppPasswordAsync
CLI
nextmail domains create-app-password
MCP
createAppPassword

DELETE/domains/{id}/addresses/{addressId}/app-passwords/{passwordId}

Revoke an app password

Scopesmembers:writeDeletes

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.

passwordIdstringRequired

An app password of the address, as GET /domains/{id}/addresses/{addressId}/app-passwords lists it.

Returns

Errors

The errors every operation can return400401403404422429500Error catalog

Also available in

TypeScript
domains.deleteAppPassword()
Python
domains.delete_app_password()
Ruby
domains.delete_app_password
PHP
domains->deleteAppPassword
Go
Domains.DeleteAppPassword
Java
domains().deleteAppPassword
C#
Domains.DeleteAppPasswordAsync
CLI
nextmail domains delete-app-password
MCP
revokeAppPassword

PATCH/domains/{id}/addresses/{addressId}/app-passwords/{passwordId}

Rename an app password

Scopesmembers:writeChanges data

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.

passwordIdstringRequired

An app password of the address, as GET /domains/{id}/addresses/{addressId}/app-passwords lists it.

Request body

namestringRequired

The 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

TypeScript
domains.updateAppPassword()
Python
domains.update_app_password()
Ruby
domains.update_app_password
PHP
domains->updateAppPassword
Go
Domains.UpdateAppPassword
Java
domains().updateAppPassword
C#
Domains.UpdateAppPasswordAsync
CLI
nextmail domains update-app-password
MCP
renameAppPassword

POST/domains/{id}/addresses/{addressId}/mail-app-setup

Email a mail app setup link for an address

Scopesmembers:writeSends mail
Asks for a verification code

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.

Request body

recipientstringRequired

The 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 with POST /security/step-up, send it to POST /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

TypeScript
domains.sendMailAppSetup()
Python
domains.send_mail_app_setup()
Ruby
domains.send_mail_app_setup
PHP
domains->sendMailAppSetup
Go
Domains.SendMailAppSetup
Java
domains().sendMailAppSetup
C#
Domains.SendMailAppSetupAsync
CLI
nextmail domains send-mail-app-setup
MCP
sendMailAppSetup

POST/domains/{id}/addresses/{addressId}/mail-app-profile-link

Make a link that sets an address up on an Apple device

Scopesmembers:writeChanges data
Asks for a verification code

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.

Request body

namestringRequired

What 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 characters
displayNamestringRequired

The name the device shows for the profile, 1 to 160 characters. It is trimmed.

1 to 160 characters
descriptionstringRequired

The 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 with POST /security/step-up, send it to POST /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_parameter or unknown_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 for Retry-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 in Retry-After. A request refused this way is not billed. Answered requests are billed at the apiRequests rate 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

Scopesdomains:readReads

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /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

TypeScript
domains.getAddressLimits()
Python
domains.get_address_limits()
Ruby
domains.get_address_limits
PHP
domains->getAddressLimits
Go
Domains.GetAddressLimits
Java
domains().getAddressLimits
C#
Domains.GetAddressLimitsAsync
CLI
nextmail domains get-address-limits
MCP
getAddressLimits

PATCH/domains/{id}/addresses/{addressId}/limits

Change the sending and receiving limits of an address

Scopesdomains:writeChanges data

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.

Request body

sendingobject

What the address may send. A field left out stays as it is, and null clears it.

holdstring

paused holds sending: a new send is a 429 address_sending_paused, and queued or scheduled mail waits and is tried again every 15 minutes. disabled stops it: a new send is a 403 address_sending_disabled, and queued or scheduled mail fails. Null sends as usual.

Can be nullOne of"paused""disabled"
perHourinteger

Messages it may send in the current clock hour, in UTC. Null removes the cap.

Can be nullAt least 1At most 10000000
perDayinteger

Messages it may send in the last 24 clock hours, the current one included. Null removes the cap.

Can be nullAt least 1At most 10000000
perMonthinteger

Messages it may send in the calendar month, in UTC. Null removes the cap.

Can be nullAt least 1At most 10000000
recipientsPerHourinteger

Recipients it may send to in the current clock hour, counting every address in to, cc and bcc. Null removes the cap.

Can be nullAt least 1At most 10000000
recipientsPerDayinteger

Recipients it may send to in the last 24 clock hours. Null removes the cap.

Can be nullAt least 1At most 10000000
recipientsPerMonthinteger

Recipients it may send to in the calendar month. Null removes the cap.

Can be nullAt least 1At most 10000000
recipientsPerMessageinteger

Recipients one message may have, counting to, cc and bcc together. More is a 403 too_many_recipients. Null removes the cap.

Can be nullAt least 1At most 10000000
allowedRecipientsstring[]

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 403 recipient_not_allowed.

Can be nullUp to 100 items
blockedRecipientsstring[]

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
receivingobject

What the address accepts. A field left out stays as it is, and null clears it.

holdstring

paused turns mail away with a temporary bounce (4.2.1), so senders can try again later, and disabled with a permanent one (5.2.1). Null receives as usual.

Can be nullOne of"paused""disabled"
perHourinteger

Messages 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 10000000
perDayinteger

Messages it accepts in the last 24 clock hours. Null removes the cap.

Can be nullAt least 1At most 10000000
perMonthinteger

Messages it accepts in the calendar month, in UTC. Null removes the cap.

Can be nullAt least 1At most 10000000
storageBytesinteger

The 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 1099511627776
allowedSendersstring[]

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

TypeScript
domains.updateAddressLimits()
Python
domains.update_address_limits()
Ruby
domains.update_address_limits
PHP
domains->updateAddressLimits
Go
Domains.UpdateAddressLimits
Java
domains().updateAddressLimits
C#
Domains.UpdateAddressLimitsAsync
CLI
nextmail domains update-address-limits
MCP
setAddressLimits

GET/domains/{id}/routes

List the pattern routes of a domain

Scopesdomains:readReads

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

Query parameters

limitinteger

Rows per page, 1 to 100.

At least 1At most 100Default25
cursorstring

The 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 400 invalid_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

Scopesdomains:writeChanges data
Asks for a verification code

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

Request body

patternstringRequired

The 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-* catches support-eu and support-billing, and * alone catches every address nobody created. Stored lowercased, and unique on the domain.

Up to 320 characters
actionstringRequired

What happens to mail the route catches: deliver files it at targetAddressId, forward sends it on to forwardTo once that address confirms, webhook posts it to webhookId as email.routed, and rewrite reads it as the same local part on rewriteDomainId.

One of"deliver""forward""webhook""rewrite"
targetAddressIdstring

For 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 characters
forwardTostring

For 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 charactersFormatemail
webhookIdstring

For webhook: the id of a webhook endpoint in this workspace.

Can be null1 to 64 characters
rewriteDomainIdstring

For rewrite: the id of another domain hosted in this workspace. Mail to local@this is read once more as local@ that domain, and a rewrite there is not followed again.

Can be null1 to 64 characters
priorityinteger

The 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 1000
enabledboolean

False keeps the route but stops it catching mail. Defaults to true.

descriptionstring

A 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 with POST /security/step-up, send it to POST /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, and param says 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, or forwardTo is hosted here, where deliver is the action to use.

The errors every operation can return400401404429500Error catalog

Also available in

TypeScript
domains.createRoute()
Python
domains.create_route()
Ruby
domains.create_route
PHP
domains->createRoute
Go
Domains.CreateRoute
Java
domains().createRoute
C#
Domains.CreateRouteAsync
CLI
nextmail domains create-route
MCP
createDomainRoute

POST/domains/{id}/routes/test

Test where mail to an address goes

Scopesdomains:readReads

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

Request body

addressstringRequired

The 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_parameter with param: "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

TypeScript
domains.testRoute()
Python
domains.test_route()
Ruby
domains.test_route
PHP
domains->testRoute
Go
Domains.TestRoute
Java
domains().testRoute
C#
Domains.TestRouteAsync
CLI
nextmail domains test-route
MCP
testDomainRoute

GET/domains/{id}/routes/{routeId}

Get a pattern route

Scopesdomains:readReads

One route of the domain, with whether it takes mail now.

Requires the domains:read scope.

Path parameters

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

routeIdstringRequired

The 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

TypeScript
domains.getRoute()
Python
domains.get_route()
Ruby
domains.get_route
PHP
domains->getRoute
Go
Domains.GetRoute
Java
domains().getRoute
C#
Domains.GetRouteAsync
CLI
nextmail domains get-route
MCP
getDomainRoute

PATCH/domains/{id}/routes/{routeId}

Update a pattern route

Scopesdomains:writeChanges data
Asks for a verification code

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

routeIdstringRequired

The route id, from GET /domains/{id}/routes. It has to be a route of the domain in the path.

Request body

patternstring

The 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-* catches support-eu and support-billing, and * alone catches every address nobody created. Stored lowercased, and unique on the domain.

Up to 320 characters
actionstring

What happens to mail the route catches: deliver files it at targetAddressId, forward sends it on to forwardTo once that address confirms, webhook posts it to webhookId as email.routed, and rewrite reads it as the same local part on rewriteDomainId.

One of"deliver""forward""webhook""rewrite"
targetAddressIdstring

For 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 characters
forwardTostring

For 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 charactersFormatemail
webhookIdstring

For webhook: the id of a webhook endpoint in this workspace.

Can be null1 to 64 characters
rewriteDomainIdstring

For rewrite: the id of another domain hosted in this workspace. Mail to local@this is read once more as local@ that domain, and a rewrite there is not followed again.

Can be null1 to 64 characters
priorityinteger

The 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 1000
enabledboolean

False keeps the route but stops it catching mail. Defaults to true.

descriptionstring

A 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 with POST /security/step-up, send it to POST /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.

The errors every operation can return400401404429500Error catalog

Also available in

TypeScript
domains.updateRoute()
Python
domains.update_route()
Ruby
domains.update_route
PHP
domains->updateRoute
Go
Domains.UpdateRoute
Java
domains().updateRoute
C#
Domains.UpdateRouteAsync
CLI
nextmail domains update-route
MCP
updateDomainRoute

DELETE/domains/{id}/routes/{routeId}

Delete a pattern route

Scopesdomains:writeDeletes

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

routeIdstringRequired

The 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

TypeScript
domains.deleteRoute()
Python
domains.delete_route()
Ruby
domains.delete_route
PHP
domains->deleteRoute
Go
Domains.DeleteRoute
Java
domains().deleteRoute
C#
Domains.DeleteRouteAsync
CLI
nextmail domains delete-route
MCP
deleteDomainRoute

GET/domains/{id}/addresses/{addressId}/group-members

List the group members of a group address

Scopesdomains:readReads

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.

Query parameters

limitinteger

Rows per page, 1 to 100.

At least 1At most 100Default25
cursorstring

The 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 400 invalid_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

Scopesdomains:writeChanges data
Asks for a verification code

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /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[]Required

The 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 items
addressIdstringRequired

The 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 with POST /security/step-up, send it to POST /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: an addressId is not an address of this workspace, or an email is hosted here in another workspace, and param points at it.

The errors every operation can return400401404429500Error catalog

Also available in

TypeScript
domains.addGroupMembers()
Python
domains.add_group_members()
Ruby
domains.add_group_members
PHP
domains->addGroupMembers
Go
Domains.AddGroupMembers
Java
domains().addGroupMembers
C#
Domains.AddGroupMembersAsync
CLI
nextmail domains add-group-members
MCP
addGroupMembers

DELETE/domains/{id}/addresses/{addressId}/group-members/{memberId}

Remove a group member

Scopesdomains:writeDeletes

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /domains/{id}/addresses. It has to be an address on the domain in the path, and a removed address is not found.

memberIdstringRequired

The 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

TypeScript
domains.removeGroupMember()
Python
domains.remove_group_member()
Ruby
domains.remove_group_member
PHP
domains->removeGroupMember
Go
Domains.RemoveGroupMember
Java
domains().removeGroupMember
C#
Domains.RemoveGroupMemberAsync
CLI
nextmail domains remove-group-member
MCP
removeGroupMember

POST/domains/{id}/addresses/{addressId}/photo/gravatar

Start publishing the photo of an address to Gravatar

Scopesdomains:writeChanges data

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

idstringRequired

The domain id, from GET /domains or POST /domains. A domain in another workspace reads the same as one that does not exist.

addressIdstringRequired

The address id, from GET /domains/{id}/addresses or POST /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_unsupported with param: "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"
idstring
addressIdstring
emailstring

Where the mail goes.

enabledboolean

False while the destination is paused.

statusstring

live once the destination confirmed it wants this mail, pending while it has not answered, refused when it said no, bounced when its server refused forwarded mail for good, and paused while 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 nullFormatdate-time
askedAtstring

When the confirmation email last went out.

Can be nullFormatdate-time
lastRelayAtstring
Can be nullFormatdate-time
lastErrorstring

Why the last forward failed, cleared once one succeeds.

Can be null
failuresinteger

Failures in a row.

createdAtstring
Formatdate-time

AddressForwardChangeobject

objectstring
One of"address_forward"
idstring
addressIdstring
emailstring

Where the mail goes.

enabledboolean

False while the destination is paused.

statusstring

live once the destination confirmed it wants this mail, pending while it has not answered, refused when it said no, bounced when its server refused forwarded mail for good, and paused while 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"
destinationstring

Where the mail of the address goes after the change.

One of"mailbox""forward""webhook""group"

AddressForwardConsentobject

objectstring
One of"address_forward_consent"
idstring
addressIdstring
emailstring
statusstring
One of"sent""already-confirmed""revoked""too-soon""send-failed"

AddressForwardListobject

objectstring
One of"list"
addressstring
destinationstring
One of"mailbox""forward""webhook""group"
maxinteger

How many destinations one address may have.

AddressForwardsAddedobject

objectstring
One of"address_forwards"
skippedobject[]
emailstring
reasonstring

AddressLimitsobject

objectstring
One of"address_limits"
addressIdstring
addressstring
sendingobject

What the address may send.

holdstring

paused holds sending and disabled stops it. Null sends as usual.

Can be nullOne of"paused""disabled"
perHourinteger

Messages it may send in the current clock hour, in UTC.

Can be null
perDayinteger

Messages it may send in the last 24 clock hours.

Can be null
perMonthinteger

Messages it may send in the calendar month, in UTC.

Can be null
recipientsPerHourinteger

Recipients it may send to in the current clock hour.

Can be null
recipientsPerDayinteger

Recipients it may send to in the last 24 clock hours.

Can be null
recipientsPerMonthinteger

Recipients it may send to in the calendar month.

Can be null
recipientsPerMessageinteger

Recipients one message may have.

Can be null
allowedRecipientsstring[]

The only recipients it may send to. Null is anyone, and an empty list nobody.

Can be null
blockedRecipientsstring[]

Recipients it may never send to.

Can be null
receivingobject

What the address accepts.

holdstring

paused turns mail away with a temporary bounce and disabled with a permanent one. Null receives as usual.

Can be nullOne of"paused""disabled"
perHourinteger

Messages it accepts in the current clock hour, in UTC.

Can be null
perDayinteger

Messages it accepts in the last 24 clock hours.

Can be null
perMonthinteger

Messages it accepts in the calendar month, in UTC.

Can be null
storageBytesinteger

The 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 nullFormatint64
allowedSendersstring[]

The only senders it accepts mail from. Null is anyone, and an empty list nobody.

Can be null
usageobject

What 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.

hourobject

In the current clock hour, in UTC.

sentintegerRequired

Messages it sent.

recipientsintegerRequired

Recipients those messages went to.

receivedintegerRequired

Messages it received.

dayobject

In the last 24 clock hours, the current one included.

sentintegerRequired

Messages it sent.

recipientsintegerRequired

Recipients those messages went to.

receivedintegerRequired

Messages it received.

monthobject

In the calendar month, in UTC.

sentintegerRequired

Messages it sent.

recipientsintegerRequired

Recipients those messages went to.

receivedintegerRequired

Messages it received.

storageobject

The 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.

bytesintegerRequired

Bytes the counted mail takes.

Formatint64
messagesintegerRequired

Messages counted.

resetsobject

When each count next goes down.

hourstring

The start of the next hour.

Formatdate-time
daystring

When the oldest hour still in the last 24 drops out of it.

Formatdate-time
monthstring

The first of next month.

Formatdate-time
updatedAtstring

When the limits last changed. Null while the address has none.

Can be nullFormatdate-time

AddressLoginobject

objectstring
One of"address_login"
addressIdstring
addressstring
createdboolean

On a PUT, true when the password is new rather than a replacement.

loginobject
Can be null
userIdstring
namestring
createdAtstring
Formatdate-time
createdBystring
Can be null
passwordSetAtstring
Formatdate-time
passwordSetBystring
Can be null
lastSignedInAtstring
Can be nullFormatdate-time

AddressMemberobject

objectstring
One of"address_member"
userIdstring
emailstring
namestring
Can be null
imagestring
Can be null
accessstring
One of"member""viewer"
viastring
One of"owner""every-address""whole-domain""direct"
viaDomainstring

The domain whose grant brings them here, when via is whole-domain.

Can be null
removableboolean

Whether the caller may take this grant back with DELETE on the member address. False for the owner, a role, a whole domain and the member who connected a mailbox.

AddressRouteobject

objectstringRequired
One of"address_route"
idstringRequired

The route id.

domainIdstringRequired

The domain the route belongs to.

domainstringRequired

The name of that domain.

patternstringRequired

The local part it catches, lowercased, with * for any run of characters.

actionstringRequired

What it does with the mail it catches.

One of"deliver""forward""webhook""rewrite"
priorityintegerRequired

The order it is tried in, lowest first.

enabledbooleanRequired

Whether it is switched on.

activebooleanRequired

Whether it takes mail now: switched on, with a target that exists and, for forward, a confirmed destination.

inactiveReasonstring

Why it takes no mail, or null when it does. webhook_deleted is a webhook route whose endpoint was deleted, which takes no mail until it is given another, and forward_bounced is 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"
descriptionstring

The note on the route.

Can be null
targetAddressIdstring

For deliver, the address it files mail at.

Can be null
targetAddressstring

That address in full, or null when it was removed.

Can be null
forwardTostring

For forward, where it sends mail on.

Can be null
forwardStatusstring

For forward: pending until the destination confirms, live once it has, refused when it said no, bounced when mail forwarded to it bounced for good.

Can be nullOne of"live""pending""refused""paused""bounced"
forwardConfirmedAtstring

When the destination confirmed.

Can be nullFormatdate-time
forwardAskedAtstring

When it was last asked to confirm.

Can be nullFormatdate-time
webhookIdstring

For webhook, the endpoint it posts to, or null when that endpoint was deleted.

Can be null
rewriteDomainIdstring

For rewrite, the domain it reads the local part on.

Can be null
rewriteDomainstring

The name of that domain.

Can be null
createdBystring

The account that created it, when one did.

Can be null
createdAtstring

When it was created.

Formatdate-time
updatedAtstring

When it last changed.

Formatdate-time

AddressRouteListobject

objectstringRequired
One of"list"
domainIdstringRequired

The domain.

domainstringRequired

The name of the domain.

maxintegerRequired

The most routes the domain may hold.

dataAddressRoute[]Required
hasMorebooleanRequired

True when another page follows. Pass nextCursor back as cursor to read it.

nextCursorstringRequired

An opaque cursor for the next page, or null on the last page.

Can be null

AddressRouteTestobject

objectstringRequired
One of"address_route_test"
addressstringRequired

The address that was tested, lowercased.

stepstringRequired

Which step decides: address, alias, route, catch_all or none.

One of"address""alias""route""catch_all""none"
routeAddressRouteRequired
targetobjectRequired

Where the mail would end up, or null when it would be turned away.

Can be null
kindstringRequired

A mailbox, a forward that keeps no copy, a webhook or a group.

One of"mailbox""forward""webhook""group"
addressIdstringRequired

The address it is filed at, when one exists.

Can be null
addressstringRequired

That address in full.

forwardTostringRequired

The first place it is forwarded to, when it is.

Can be null
forwardsstring[]Required

Every place it is forwarded to.

webhookIdstringRequired

The webhook endpoint it is posted to, when it is.

Can be null
reasonstringRequired

Why 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"
idstring

The id of the address, ahost_ and 24 hex characters. Null when none is set.

Can be null
hoststring

The address, lowercased. Null when none is set.

Can be null
domainIdstring

The id of the verified domain of the workspace the address sits under, as GET /domains lists it. Null when none is set, or when the address is on another domain.

Can be null
domainstring

The verified domain of the workspace the address sits under. Null when none is set, or when the address is on another domain.

Can be null
statusstring

none means no address is set. pending means it is set and waiting for its DNS records to answer and its certificate to be issued. active means the address answers over HTTPS. failed means setting it up failed, usually because the record was missing or wrong for too long, and error says why. Set the address again to start over.

One of"none""pending""active""failed"
activeboolean

Whether people can sign in at the address right now. True exactly when status is active and the workspace has white label.

pausedboolean

True 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.

targetstring

The host the CNAME record points at, the same for every workspace. Null only while web app addresses cannot be set up.

Can be null
recordobject

The CNAME record to add at your DNS provider. Null when no address is set.

Can be null
typestring

Always CNAME.

One of"CNAME"
namestring

The record name, which is host.

valuestring

The record value, which is target.

ownershipRecordobject

The 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 null
typestring

Always TXT.

One of"TXT"
namestring

The record name, _nextmail-challenge. in front of host.

valuestring

The record value. It stays the same for this address in this workspace.

ownershipVerifiedboolean

Whether the address is proven to be yours: true when it is on a verified domain of the workspace or ownershipRecord answered. False when no address is set.

errorstring

Why 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 null
checkedAtstring

When the address was last checked. Null until the first check.

Can be nullFormatdate-time
verifiedAtstring

When the address first answered over HTTPS. Null while it never has.

Can be nullFormatdate-time
availableboolean

Whether web app addresses can be set up right now. False only while they are switched off, and then PUT /app-host answers 503 app_host_unavailable.

paidPlanboolean

Repeats whiteLabel, which is the field to read. It keeps working until at least 14 May 2027.

whiteLabelboolean

Whether the workspace has white label, which a web app address needs. It comes with the Pro, Max or Enterprise plan, so POST /billing/checkout is how a workspace gets it.

domainsstring[]

The verified domains of the workspace, alphabetically. An address on one of them needs only record.

suggestedstring

The 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 null
senderobject

Where 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 null
addressstringRequired

The address they come from now: noreply@ and domain once nothing is missing, and Nextmail's own address while waitingOn is set.

Formatemail
domainstringRequired

The verified domain of the workspace that the live web app address sits under.

waitingOnstringRequired

What they wait on before they come from domain: logo until the workspace has a logo, uploaded with PUT /branding/images/wordmark, then signing until the signing records of domain verify. Null once they come from domain.

Can be nullOne of"logo""signing"

AppPasswordobject

objectstring
One of"app_password"
idstring
namestring

What the person called it, such as the device it is for.

last4string

The last four letters of the password, to tell them apart.

originstring

settings when made in the app, api when made here, setup-link when made by opening an emailed setup link.

One of"settings""setup-link""api"
ownerobject

The person the password signs in as. A mail app using it reaches this address alone, with what that person may do there.

idstring
namestring
emailstring
createdAtstring
Formatdate-time
lastUsedAtstring
Can be nullFormatdate-time
lastUsedProtocolstring
Can be nullOne of"imap""smtp""pop3""caldav""carddav"
lastUsedClientstring

The mail app, when it named itself.

Can be null

CreatedAppPasswordobject

objectstring
One of"app_password"
idstring
namestring

What the person called it, such as the device it is for.

last4string

The last four letters of the password, to tell them apart.

originstring

settings when made in the app, api when made here, setup-link when made by opening an emailed setup link.

One of"settings""setup-link""api"
ownerobject

The person the password signs in as. A mail app using it reaches this address alone, with what that person may do there.

idstring
namestring
emailstring
createdAtstring
Formatdate-time
lastUsedAtstring
Can be nullFormatdate-time
lastUsedProtocolstring
Can be nullOne of"imap""smtp""pop3""caldav""carddav"
lastUsedClientstring

The mail app, when it named itself.

Can be null
passwordstring

The password, shown this once. Spaces and dashes are optional when typed.

appleProfilestring

An Apple configuration profile (.mobileconfig XML) 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"
idstring
addressIdstring
emailstring
deletedboolean
One oftrue
destinationstring
One of"mailbox""forward""webhook""group"

DeletedAddressLoginobject

objectstring
One of"address_login"
addressIdstring
addressstring
deletedboolean
One oftrue

DeletedAddressRouteobject

objectstringRequired
One of"address_route"
idstringRequired

The route id.

domainIdstringRequired

The domain it belonged to.

patternstringRequired

The pattern it caught.

deletedbooleanRequired
One oftrue

DeletedAppHostobject

objectstring
One of"app_host"
idstring

The id of the address that was removed. Null when none was set.

Can be null
hoststring

The address that was removed. Null when none was set.

Can be null
deletedboolean

True when an address was removed, false when none was set, so a repeated call is safe.

DeletedAppPasswordobject

objectstring
One of"app_password"
idstring
deletedboolean
One oftrue

DeletedDnsConnectionobject

objectstring
One of"dns_connection"
idstring
providerstring
One of"cloudflare""operator-cloudflare"
subjectstring

Who the connection signed in as at the DNS provider, usually an email address.

accountsDnsAccount[]

The provider accounts the connection reaches.

statusstring

active while Nextmail may write through it, needs-reauth when the provider wants the account connected again, revoked once it was disconnected, and error when the last call failed.

One of"active""needs-reauth""revoked""error"
lastVerifiedAtstring
Can be nullFormatdate-time
lastErrorstring
Can be null
createdAtstring
Formatdate-time
removedboolean

True when the connection was already disconnected and is now gone.

confirmedboolean

Whether the provider confirmed the revocation. Null when it was removed.

Can be null
detachedobject
Can be null
domainsinteger
detachedinteger
removedinteger

Records deleted.

rewritteninteger

Records shared with others, rewritten.

pendinginteger

Records still published.

DeletedDomainobject

objectstring
One of"domain"
idstring
domainstring
deletedboolean
One oftrue
mailboxPurgedboolean

True 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"
idstring
addressstring

The full address that was removed, lowercased.

deletedboolean
One oftrue

DeletedGroupMemberobject

objectstringRequired
One of"group_member"
idstringRequired

The group member id.

groupAddressIdstringRequired

The group address it belonged to.

addressstringRequired

The address that no longer gets the mail of the group.

deletedbooleanRequired
One oftrue

DnsAccountobject

idstring
namestring
Can be null

DnsConnectionobject

objectstring
One of"dns_connection"
idstring
providerstring
One of"cloudflare""operator-cloudflare"
subjectstring

Who the connection signed in as at the DNS provider, usually an email address.

accountsDnsAccount[]

The provider accounts the connection reaches.

statusstring

active while Nextmail may write through it, needs-reauth when the provider wants the account connected again, revoked once it was disconnected, and error when the last call failed.

One of"active""needs-reauth""revoked""error"
lastVerifiedAtstring
Can be nullFormatdate-time
lastErrorstring
Can be null
createdAtstring
Formatdate-time
recordsinteger

How many records Nextmail wrote through the connection and still keeps.

removableboolean

True for a disconnected connection with nothing left on it, which a second DELETE removes from the list.

DnsConnectionDetailobject

objectstring
One of"dns_connection"
idstring
providerstring
One of"cloudflare""operator-cloudflare"
subjectstring

Who the connection signed in as at the DNS provider, usually an email address.

accountsDnsAccount[]

The provider accounts the connection reaches.

statusstring

active while Nextmail may write through it, needs-reauth when the provider wants the account connected again, revoked once it was disconnected, and error when the last call failed.

One of"active""needs-reauth""revoked""error"
lastVerifiedAtstring
Can be nullFormatdate-time
lastErrorstring
Can be null
createdAtstring
Formatdate-time
recordsinteger

How many records Nextmail wrote through the connection and still keeps.

removableboolean

True for a disconnected connection with nothing left on it, which a second DELETE removes 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

domainIdstring
domainstring
Can be null
zoneIdstring
Can be null
zoneNamestring
Can be null
statestring
Can be nullOne of"unmanaged""ready""awaiting-sync""awaiting-signing""conflict""blocked"
recordsinteger
keepsMailboolean

True for a verified domain, which stops receiving when its records come down.

busyboolean

True while a sync is running on the domain.

DnsConnectionListobject

objectstring
One of"list"
configuredboolean

False when this server cannot connect a DNS provider.

DnsConnectionStartobject

objectstringRequired
One of"dns_connection_start"
urlstringRequired

The 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"
namestring
typestring
contentstring
standingstring
One of"ours""theirs""unverified"
detailstring

DnsZoneobject

idstring
namestring
accountIdstring
Can be null
activeboolean
statusstring
typestring
nameServersstring[]
coversboolean

Whether the zone covers the domain.

DnsZoneCandidateobject

connectionIdstring
subjectstring
statusstring
One of"active""needs-reauth""revoked""error"
accountsDnsAccount[]
accountDnsAccount

DnsZoneObstacleobject

connectionIdstring
subjectstring
statusstring
One of"active""needs-reauth""revoked""error"
accountsDnsAccount[]
obstaclestring
One of"needs-reauth""unreachable"
detailstring

DnsZoneResolutionobject

kindstring
One of"resolved""ambiguous""none""unusable"
checkedAtstring
Formatdate-time
cachedboolean
reasonstring

Why no zone answers, when kind is none.

Can be nullOne of"not-configured""no-links""not-held"
connectedinteger
Can be null
hoststring

Who serves the DNS of the domain, when kind is none.

Can be nullOne of"cloudflare""elsewhere""unknown"
blockedDnsZoneObstacle[]

The connections that could not be asked.

Domainobject

objectstring
One of"domain"
idstring
domainstring
receivingobject
verifiedboolean

Whether ownership has been proven. A verified domain can receive mail.

verifiedAtstring
Can be nullFormatdate-time
catchAllboolean

Whether mail to a local-part nobody created on this domain is accepted.

lastCheckedAtstring
Can be nullFormatdate-time
errorstring

Why the last ownership check failed.

Can be null
sendingobject
statusstring

The signing state as the last check saw it.

One of"unknown""no_identity""pending""verified""failed"
canSendboolean

Whether a send from this domain would be accepted right now.

checkedAtstring

When status was last checked. Null until the first check.

Can be nullFormatdate-time
errorstring

Why the last signing check failed.

Can be null
notestring

What status means, written to be shown to a person.

dmarcPolicystring

The 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 as rua. Otherwise publish the DMARC record in records.

Can be nullOne of"none""quarantine""reject"
autodiscoveryboolean

True 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 autodiscoveryRecords with 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.

senderNamestring

The 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 null
aliasOfstring

The 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 to local@ an alias is handled exactly as local@ its primary domain, through the addresses, routes, group addresses and catch-all of the primary, and local@ the alias may be used as a From address wherever local@ the primary may.

Can be null
aliasesobject[]

The domains that are aliases of this one. Empty when there are none, and always empty on an alias.

idstringRequired

The id of the alias domain.

domainstringRequired

Its name.

createdAtstring
Formatdate-time

DomainAddressobject

objectstring
One of"address"
idstring

The address id. Pass it as addressId.

domainIdstring

The domain the address is on.

addressstring

The full address, lowercased.

localPartstring

The part in front of the @, lowercased.

labelstring

The 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 null
photoUrlstring

The 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 null
enabledboolean

Whether 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.

destinationstring

mailbox when mail to the address lands here, with a copy to each forwarding destination that is on, forward when it only goes to the destinations, webhook when every message goes to the endpoint in webhookId and none is kept here, and group when it goes to the group members of the address.

One of"mailbox""forward""webhook""group"
webhookIdstring

The webhook endpoint mail goes to while destination is webhook. Null for every other destination, and when the endpoint was deleted, in which case the mail is kept here instead.

Can be null
tapWebhookIdsstring[]

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.

keepOriginalboolean

Whether every message the address receives is also kept byte for byte as it arrived. While it is on, GET /threads/{id}/messages/{messageId}/raw answers 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.

expiresAtstring

When the address stops taking mail and sending, from that very moment. Null when it never expires.

Can be nullFormatdate-time
onExpirystring

What happens when expiresAt passes: stop switches the address off and keeps its mail, and delete removes it and the conversations delivered to it.

One of"stop""delete"
expiredAtstring

When the address expired and was switched off. Null while it has not, and again once it is turned back on.

Can be nullFormatdate-time
groupPostingstring

Who may send to the address while destination is group: anyone, members (its group members, passing DMARC) or workspace (an address on a domain of this workspace, passing DMARC).

One of"anyone""members""workspace"
groupKeepCopyboolean

Whether a group address also keeps each message in its own mailbox.

lastReceivedAtstring

When mail last arrived for the address. Null when none has.

Can be nullFormatdate-time
createdAtstring
Formatdate-time
updatedAtstring
Formatdate-time

DomainAddressListobject

objectstring
One of"list"
hasMoreboolean

True when another page follows. Pass nextCursor back as cursor to read it.

nextCursorstring

An 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"
idstring
domainstring
receivingobject
verifiedboolean

Whether ownership has been proven. A verified domain can receive mail.

verifiedAtstring
Can be nullFormatdate-time
catchAllboolean

Whether mail to a local-part nobody created on this domain is accepted.

lastCheckedAtstring
Can be nullFormatdate-time
errorstring

Why the last ownership check failed.

Can be null
sendingobject
statusstring

The signing state as the last check saw it.

One of"unknown""no_identity""pending""verified""failed"
canSendboolean

Whether a send from this domain would be accepted right now.

checkedAtstring

When status was last checked. Null until the first check.

Can be nullFormatdate-time
errorstring

Why the last signing check failed.

Can be null
notestring

What status means, written to be shown to a person.

dmarcPolicystring

The 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 as rua. Otherwise publish the DMARC record in records.

Can be nullOne of"none""quarantine""reject"
autodiscoveryboolean

True 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 autodiscoveryRecords with 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.

senderNamestring

The 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 null
aliasOfstring

The 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 to local@ an alias is handled exactly as local@ its primary domain, through the addresses, routes, group addresses and catch-all of the primary, and local@ the alias may be used as a From address wherever local@ the primary may.

Can be null
aliasesobject[]

The domains that are aliases of this one. Empty when there are none, and always empty on an alias.

idstringRequired

The id of the alias domain.

domainstringRequired

Its name.

createdAtstring
Formatdate-time
addressesobject[]

Every address on this domain. Not present on a GET /domains row.

addressstring

The 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-challenge TXT 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.

dmarcobject

What 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 null
stagestring

missing when the domain has no DMARC record, invalid when it has one receivers cannot use, and otherwise the policy it sets: monitor for p=none, quarantine or reject.

One of"missing""invalid""monitor""quarantine""reject"
recordstring

The 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 null
issuesstring[]

Problems found in the record, each written to be shown to a person. Empty when there are none.

alignmentPossibleboolean

Whether this domain has a signing key set up. Without one, a policy stricter than p=none would tell receivers to throw away the domain's own mail.

caveatstring

What 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 autodiscovery is 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"
domainIdstring
domainstring
managingboolean

True while Nextmail writes the records of the domain itself.

connectionIdstring
Can be null
connectionobject
Can be null
idstring
statusstring
One of"active""needs-reauth""revoked""error"
subjectstring
accountsDnsAccount[]
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"
okboolean
detailstring
visibilitystring
One of"held""missing""unchecked""public"
recordsobject[]
namestring
typestring
valuesstring[]
requiredboolean
visibilitystring
One of"held""missing""unchecked""public"
probeobject

A test record Nextmail wrote to check it may write in the zone and could not take down again, to delete by hand.

Can be null
namestring
Can be null
typestring
zoneIdstring
zoneNamestring
Can be null
detailstring
noticedAtstring
Formatdate-time
errorstring
Can be null
syncedAtstring
Can be nullFormatdate-time

DomainDnsSyncobject

objectstring
One of"domain_dns_sync"
outcomestring
One of"synced""refused"
messagestring

Why nothing was written, when outcome is refused.

Can be null
attachedboolean

True 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
provenboolean

Whether the domain proved it belongs here.

ownershipstring
writtenobject[]
purposestring
One of"challenge""dkim""spf""mx""mail-from""dmarc""tracking""storage""bimi""app-host""autodiscovery"
namestring
typestring
modestring
One of"created""merged"
adoptedinteger

Records 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
namestring
existingstring
Can be null
detailstring
failuresobject[]
purposestring
namestring
errorstring
stepsobject[]
purposestring
One of"challenge""dkim""spf""mx""mail-from""dmarc""tracking""storage""bimi""app-host""autodiscovery"
okboolean
detailstring
visibilitystring
One of"held""missing""unchecked""public"
recordsobject[]
namestring
typestring
valuesstring[]
requiredboolean
visibilitystring
One of"held""missing""unchecked""public"
retiredobject[]
purposestring
outcomestring
One of"deleted""rewritten""kept""pending""failed"
detailstring
probeobject

A test record Nextmail wrote to check it may write in the zone and could not take down again, to delete by hand.

Can be null
namestring
Can be null
typestring
zoneIdstring
zoneNamestring
Can be null
detailstring
noticedAtstring
Formatdate-time
errorstring
Can be null

DomainListobject

objectstring
One of"list"
hasMoreboolean

True when another page follows. Pass nextCursor back as cursor to read it.

nextCursorstring

An opaque cursor for the next page, or null on the last page. Pass it back unchanged.

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.

urlstring

Where the logo is served, in the SVG Tiny PS format inboxes require. Null when the domain has no logo.

Can be null
recordobject

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.

Can be null
typestring

The record type: MX, TXT or CNAME, and SRV among autodiscoveryRecords.

namestring

The full record name, such as example.com or _dmarc.example.com. Some DNS providers want only the part in front of your domain.

valuestring

The record value, to publish exactly as given.

priorityinteger

The priority of an MX or SRV record. Null on every other type. The value of an SRV record holds its weight, port and target, in that order.

Can be null
purposestring

What 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 null
statusstring

found when the last check saw the record in public DNS, and missing when 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 name for 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 null
problemobject

What looks wrong with this record, read from what the last check found. Null when nothing does.

Can be null
codestringRequired

nothing-published when nothing of this type is at the name, different-value when something else is, doubled-name when the record sits at the name with the domain added a second time, quoted-value when a TXT value was saved with its quote marks, relative-target when the domain was added to the end of a CNAME or MX target, proxied when the name answers with an address because the record is proxied, several-spf and several-dmarc when more than one such record is published at the name, which makes receivers ignore all of them, and unreadable when 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"
messagestringRequired

The same, written to be shown to a person.

certificateobject

The mark certificate published with the logo. Gmail shows a logo only with one, and Apple Mail only with a VMC.

Can be null
urlstring

Where the certificate chain is served as PEM, the a= of the BIMI record.

markstring

verified for a Verified Mark Certificate (VMC), common for a Common Mark Certificate (CMC), and unknown when the certificate does not say.

One of"verified""common""unknown"
expiresAtstring

When the certificate expires. Inboxes stop showing the logo after that.

Can be nullFormatdate-time
domainsstring[]

The domains the certificate was issued for.

issuerstring

The certificate authority that issued it.

Can be null
matchesCertificateboolean

Whether 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
objectstring
One of"domain_logo"
domainIdstring
domainstring
dmarcPolicystring

The DMARC policy set with PATCH /domains/{id}, as on the domain.

Can be nullOne of"none""quarantine""reject"
recordsstring

What happened to the BIMI record. published when Nextmail writes the DNS for the domain and the record is in place. manual when it does not, so publish record yourself. blocked when 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. busy when another change to the DNS of the domain was running, and failed when the DNS provider refused. Call again for either.

One of"published""manual""blocked""busy""failed"
logoFromCertificateboolean

True 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.

urlstring

Where the logo is served, in the SVG Tiny PS format inboxes require. Null when the domain has no logo.

Can be null
recordobject

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.

Can be null
typestring

The record type: MX, TXT or CNAME, and SRV among autodiscoveryRecords.

namestring

The full record name, such as example.com or _dmarc.example.com. Some DNS providers want only the part in front of your domain.

valuestring

The record value, to publish exactly as given.

priorityinteger

The priority of an MX or SRV record. Null on every other type. The value of an SRV record holds its weight, port and target, in that order.

Can be null
purposestring

What 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 null
statusstring

found when the last check saw the record in public DNS, and missing when 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 name for 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 null
problemobject

What looks wrong with this record, read from what the last check found. Null when nothing does.

Can be null
codestringRequired

nothing-published when nothing of this type is at the name, different-value when something else is, doubled-name when the record sits at the name with the domain added a second time, quoted-value when a TXT value was saved with its quote marks, relative-target when the domain was added to the end of a CNAME or MX target, proxied when the name answers with an address because the record is proxied, several-spf and several-dmarc when more than one such record is published at the name, which makes receivers ignore all of them, and unreadable when 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"
messagestringRequired

The same, written to be shown to a person.

certificateobject

The mark certificate published with the logo. Gmail shows a logo only with one, and Apple Mail only with a VMC.

Can be null
urlstring

Where the certificate chain is served as PEM, the a= of the BIMI record.

markstring

verified for a Verified Mark Certificate (VMC), common for a Common Mark Certificate (CMC), and unknown when the certificate does not say.

One of"verified""common""unknown"
expiresAtstring

When the certificate expires. Inboxes stop showing the logo after that.

Can be nullFormatdate-time
domainsstring[]

The domains the certificate was issued for.

issuerstring

The certificate authority that issued it.

Can be null
matchesCertificateboolean

Whether 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
objectstring
One of"domain_logo"
domainIdstring
domainstring
dmarcPolicystring

The DMARC policy set with PATCH /domains/{id}, as on the domain.

Can be nullOne of"none""quarantine""reject"
publishedobject

What public DNS answers with at default._bimi.<domain> right now.

foundboolean

Whether a BIMI record is published.

oursboolean

Whether the published record points at the logo Nextmail serves.

valuestring

The published record, or null when there is none.

Can be null
parentDmarcobject

For 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 null
domainstring

The parent domain, such as example.com.

recordstring

Its DMARC record, or null when it has none.

Can be null
policystring

Its p=.

Can be null
subdomainPolicystring

Its sp=, which falls back to p= when the record has none.

Can be null
percentinteger

Its pct=, 100 when the record has none.

readableboolean

False when public DNS could not be asked. The other fields are then empty.

enforcedboolean

Whether both p= and sp= 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.

typestring

The record type: MX, TXT or CNAME, and SRV among autodiscoveryRecords.

namestring

The full record name, such as example.com or _dmarc.example.com. Some DNS providers want only the part in front of your domain.

valuestring

The record value, to publish exactly as given.

priorityinteger

The priority of an MX or SRV record. Null on every other type. The value of an SRV record holds its weight, port and target, in that order.

Can be null
purposestring

What 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 null
statusstring

found when the last check saw the record in public DNS, and missing when 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 name for 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 null
problemobject

What looks wrong with this record, read from what the last check found. Null when nothing does.

Can be null
codestringRequired

nothing-published when nothing of this type is at the name, different-value when something else is, doubled-name when the record sits at the name with the domain added a second time, quoted-value when a TXT value was saved with its quote marks, relative-target when the domain was added to the end of a CNAME or MX target, proxied when the name answers with an address because the record is proxied, several-spf and several-dmarc when more than one such record is published at the name, which makes receivers ignore all of them, and unreadable when 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"
messagestringRequired

The 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}.

hoststring

The files domain, lowercased. Null when none is set.

Can be null
statusstring

none means no files domain is set. pending means one is set and has never passed a check, so download links still use the default Nextmail host. active means new mail from this domain uses it. failed means 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"
activeboolean

Whether the download links in new mail from this domain use the files domain right now. True exactly when status is active. 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 in error.

targetstring

The 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.

recordobject

The 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 null
typestring

Always CNAME.

One of"CNAME"
namestring

The record name, which is host.

valuestring

The record value, which is target.

checkedAtstring

When the last check ran, whether it passed or not. Null until the first one.

Can be nullFormatdate-time
verifiedAtstring

When a check last passed. Null while the name has never passed one.

Can be nullFormatdate-time
errorstring

Why 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}.

hoststring

The tracking domain, lowercased. Null when none is set.

Can be null
statusstring

none means no tracking domain is set. pending means one is set and has never passed a check, so mail still uses the default Nextmail host. active means new mail from this domain uses it. failed means 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"
activeboolean

Whether new mail from this domain uses the tracking domain right now. True exactly when status is active. 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 in error.

targetstring

The 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.

recordobject

The 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 null
typestring

Always CNAME.

One of"CNAME"
namestring

The record name, which is host.

valuestring

The record value, which is target.

checkedAtstring

When the last check ran, whether it passed or not. Null until the first one.

Can be nullFormatdate-time
verifiedAtstring

When a check last passed. Null while the name has never passed one.

Can be nullFormatdate-time
errorstring

Why 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"
addressIdstringRequired
urlstringRequired

The Gravatar sign-in page, for the person to open in a browser signed in to Nextmail.

Formaturi

GroupMemberobject

objectstringRequired
One of"group_member"
idstringRequired

The group member id.

groupAddressIdstringRequired

The group address it belongs to.

kindstringRequired

address for an address of the workspace, email for one at another provider.

One of"address""email"
addressIdstring

For address, the address id.

Can be null
addressstringRequired

The address the mail goes to.

emailstring

For email, the outside address.

Can be null
groupbooleanRequired

True when the member is a group address itself, whose own members get the mail too.

statusstringRequired

For an outside address, pending, live, refused, or bounced when mail forwarded to it bounced for good. For an address of the workspace, live, or paused while it is switched off.

One of"live""pending""refused""paused""bounced"
confirmedAtstring

When an outside address confirmed.

Can be nullFormatdate-time
askedAtstring

When an outside address was last asked to confirm.

Can be nullFormatdate-time
addedBystring

The account that added it, when one did.

Can be null
createdAtstringRequired

When it was added.

Formatdate-time

GroupMemberListobject

objectstringRequired
One of"list"
groupAddressIdstringRequired

The group address.

addressstringRequired

That address in full.

destinationstringRequired

Where its mail goes. The group members get it only while this is group.

One of"mailbox""forward""webhook""group"
maxintegerRequired

The most group members one group may hold.

dataGroupMember[]Required
hasMorebooleanRequired

True when another page follows. Pass nextCursor back as cursor to read it.

nextCursorstringRequired

An opaque cursor for the next page, or null on the last page.

Can be null

GroupMembersAddedobject

objectstringRequired
One of"group_members"
groupAddressIdstringRequired

The group address.

addedGroupMember[]Required

The group members added, and outside addresses asked to confirm once more.

skippedobject[]Required

The entries that were not added, with the reason.

addressIdstring

The address id that was sent.

Can be null
emailstring

The outside address that was sent.

Can be null
reasonstringRequired

Why 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.

urlstring

The server address to enter in the app.

principalUrlstring

The account address on the server, for apps that ask for a principal URL instead of finding it.

hoststring
portinteger
securitystring

Always ssl-tls: the server answers only over HTTPS.

One of"ssl-tls"

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.

imapbooleanRequired
smtpbooleanRequired
pop3booleanRequired
caldavbooleanRequired
carddavbooleanRequired

MailAppSettingsobject

objectstring
One of"mail_app_settings"
addressstring
usernamestring

What to sign in with: the address itself.

imapobject

Incoming mail over IMAP, the protocol that keeps folders and read state in step.

hoststring
portinteger
securitystring

Always ssl-tls: the connection is encrypted from the first byte (implicit TLS).

One of"ssl-tls"
smtpobject

Outgoing mail over SMTP, for sending from the mail app.

hoststring
portinteger
securitystring

Always ssl-tls: the connection is encrypted from the first byte (implicit TLS).

One of"ssl-tls"
smtpSubmissionobject

Outgoing 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.

hoststring
portinteger
securitystring

Always 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"
pop3object

Incoming mail over POP3, for apps that only download the inbox.

hoststring
portinteger
securitystring

Always ssl-tls: the connection is encrypted from the first byte (implicit TLS).

One of"ssl-tls"

MailAppSetupobject

objectstring
One of"mail_app_setup"
addressstring
recipientstring
expiresAtstring
Formatdate-time