Skip to the documentation
MCP server

Domains

Adding domains, the DNS records they need, their logo, their addresses, the web app address and the workspace brand.

Domains tools

ToolWhat it does
listDomainsThe domains in this workspace, with whether each is verified, can send, has its catch-all on, and how many addresses it has. Returned a page at a time. query searches the domain name and id.
getDomainEverything about one domain, by id or name, including every DNS record to publish and whether it is found, missing or not checked yet.
listTrafficThe traffic log of the workspace or one domain, newest first: where mail that arrived went, and what the receiving server said about mail sent, with the reason, the status and the reply.
addDomainAdd a domain and get back the DNS records to publish at its DNS host.
verifyDomainCheck a domain’s DNS again now and say which records are still missing.
setDomainCatchAllTurn the catch-all on or off, so either any address on the domain or only its listed addresses take mail.
getDomainLogoThe domain’s logo, its mark certificate, what public DNS publishes for it and, for a subdomain, the DMARC of the domain it belongs to.
setDomainLogoUpload the logo inboxes show next to mail from a domain, as SVG.
removeDomainLogoRemove the logo and take its record down. A chat always asks first.
setDomainLogoCertificateUpload the VMC or CMC that Gmail and Apple Mail need before they show the logo.
removeDomainLogoCertificateRemove the mark certificate. A chat always asks first.
setDomainDmarcPolicySet the DMARC policy to none, quarantine or reject. Inboxes show a logo only at quarantine or reject. A chat always asks first.
removeDomainRemove a domain and withdraw the records written to a connected DNS host. The last domain of the workspace takes the whole mailbox with it, so it needs confirm, the domain name. A chat always asks first.
listDomainAddressesThe addresses on one domain, with their label, whether each takes mail and keeps originals, and when it last received any. Returned a page at a time.
addDomainAddressCreate an address on a domain, with an optional label, keepOriginal to keep every message it receives byte for byte, where its mail goes, when it expires and, for a group, who may post.
updateDomainAddressChange an address’s label, whether it takes mail, whether it keeps the original of every message it receives, where its mail goes (destination, webhookId, tapWebhookIds), when it expires (expiresAt, onExpiry) and its group settings.
setAddressPhotoUpload the photo shown for an address in Nextmail, in base64 or from Files, cropped as you choose.
removeAddressPhotoRemove an address’s photo. A chat always asks first.
startGravatarPublishA link that publishes an address’s photo to Gravatar once the person opens it, signed in, and allows it.
removeDomainAddressRemove an address, so it stops taking mail and any sign-in for it ends. A chat always asks first.
getAppHostThe web app address of the workspace, whether people can sign in there or it is paused, and the DNS records it needs.
getBrandedSenderThe address the emails to members come from, and whether it still waits on a logo or on the signing records of its domain.
setAppHostSet the web app address, a subdomain such as mailbox.example.com on any domain, and get the records to publish.
verifyAppHostCheck the web app address again now.
removeAppHostRemove the web app address and sign everyone out of it. A chat always asks first.
getBrandingThe brand of the workspace: its mark, its logo, its logo for dark mode, its sign-in photo, its two fonts and its sign-in background.
updateBrandingChange the primary and secondary fonts, or the sign-in background: a preset, a colour or the uploaded photo.
setBrandImageSet the mark, the logo, the logo for dark mode or the sign-in photo from an image in Files, cropped as you choose.
removeBrandImageRemove one of the brand images, so the default shows in its place.
setDomainTrackingHostSet or remove the tracking host of a domain, the subdomain its tracked links and open pixel go through, and get the record to publish.
setDomainStorageHostSet or remove the files host of a domain, the subdomain its public download links are served from, and get the record to publish.
listAddressForwardsWhere the mail of an address is forwarded, whether each destination confirmed it, and whether the address keeps a copy here.
addAddressForwardsForward the mail of an address to more places. Each one is asked by email to confirm before it receives anything.
setAddressForwardEnabledPause a forwarding destination, or switch it back on.
removeAddressForwardStop forwarding to a destination. A chat always asks first.
resendAddressForwardConsentSend a destination that has not answered the email asking it to confirm, once more.
setAddressForwardModeKeep the mail of an address here as well as forwarding it, or only forward it. A chat always asks first.
listAddressMembersWho can read an address and how: as the owner, through a role, through a grant of its domain or through a grant of the address.
getAddressLoginWhether an address has a password of its own to sign in with, and when it was set and last used.
removeAddressLoginTake the password away from an address and sign out whoever used it. A chat always asks first.
listDnsConnectionsThe DNS provider accounts connected to the workspace, with the domains each one serves and the records it keeps there.
getDnsConnectionOne DNS connection and what disconnecting it would leave behind, including the verified domains that would stop receiving mail.
disconnectDnsConnectionDisconnect a DNS provider account and take down the records written through it, or remove one that is already disconnected. A chat always asks first.
startDnsConnectionA link that connects a Cloudflare account to the workspace once the person opens it, signed in, and allows it.
getDomainDnsHow the DNS of a domain is set up, where each kind of record stands, and which connected zone answers for it.
setDomainDnsZoneChoose the zone a domain is set up through, when several connected zones could answer for it.
syncDomainDnsWrite or repair the DNS records a domain needs through its connected zone, as Sync does in the app.
getMailAppSettingsThe server settings that put an address into Apple Mail, Outlook, Thunderbird, the Gmail app or any other mail app: the IMAP, SMTP and POP3 hosts and ports, the CalDAV and CardDAV servers with their principal URLs, the username, and which of those connections the address accepts.
listAppPasswordsThe app passwords that let mail apps sign in to an address: who holds each one, when it was created and when a mail app last used it. The passwords themselves are never shown again.
revokeAppPasswordRevoke one app password, so the mail app using it is signed out within minutes. The address and its mail stay. A chat always asks first.
sendMailAppSetupEmail someone a one-time link that sets up an address in their mail app. The app password it creates acts as you, for that address alone, and the link expires after three days. A chat asks first unless you asked for it.
createAppPasswordCreate an app password that signs a mail, calendar or contacts app in to one address as you. The password comes back once, with the server settings, and appleProfile: true adds the Apple configuration profile as XML. A chat always asks first, an OAuth connection needs a verification code, and a client limited to some addresses or domains cannot use it.
createMailAppProfileLinkMake a one-time link that sets an address up on an iPhone, iPad or Mac. Opening it downloads an Apple configuration profile with a new app password that signs in as you for that address alone, and the link expires within minutes. A chat always asks first, an OAuth connection needs a verification code, and a client limited to some addresses or domains cannot use it.
renameAppPasswordRename one app password, such as when the device it is for changes. The password itself stays the same and keeps working.
listCalendarLoginsThe calendar sign-ins of a person: logins for calendar and contacts apps that belong to the person rather than to an address, with their usernames, who made each one and when an app last used it. Another member's need the workspace owner or a role that manages members.
createCalendarLoginCreate a calendar sign-in, a username starting with cal- and a password that sign calendar and contacts apps in over CalDAV and CardDAV to a person's calendars, the calendars and address books shared with them, and their contacts, even when they hold no address. Mail apps refuse it and it never sends. The password comes back once, and appleProfile: true adds the Apple configuration profile. A chat always asks first, an OAuth connection needs a verification code, and a client limited to some addresses or domains cannot use it.
revokeCalendarLoginRevoke one calendar sign-in, so the calendar and contacts apps using it are signed out within minutes. The calendars and contacts stay. A chat always asks first.
createCalendarLoginProfileLinkMake a one-time link that sets calendars and contacts up on an iPhone, iPad or Mac. Opening it downloads an Apple configuration profile with a new calendar sign-in and no mail account, and the link expires within minutes. A chat always asks first, and an OAuth connection needs a verification code.
updateMailAppSettingsTurn imap, smtp, pop3, caldav and carddav on or off for an address, passing only the ones to change. A switched-off kind refuses every sign-in, and apps connected over it are signed out within minutes. Only the workspace owner or someone who manages domains may change them. A chat asks first unless you asked for it.
setDomainSenderNameSet the name mail from a domain goes out under when the address has no name of its own, or clear it. A chat asks first unless you asked for it.
setDomainAutodiscoveryOffer or stop offering the DNS records that let mail, calendar and contacts apps set themselves up from an address on the domain. A chat asks first unless you asked for it.
getAddressLimitsThe sending and receiving limits of one address, what it has sent and received this hour, in the last 24 hours and this month, and when each count goes down.
setAddressLimitsPause, disable or cap what one address sends and receives: messages and recipients an hour, a day and a month, recipients in one message, who it may send to and whose mail it accepts. Pass only what changes, and null clears a field. A chat asks first unless you asked for it.
listDomainRoutesThe pattern routes of a domain, such as support-*, in the order they are tried, with whether each one takes mail now and why not.
getDomainRouteOne pattern route of a domain: what it catches, what it does and whether it takes mail now.
testDomainRouteTest where mail to an address would go, without sending anything: the step that decides, the route and where the mail ends up.
createDomainRouteAdd a pattern route that delivers mail to an address nobody created to another address, forwards it, posts it to a webhook or reads it on another domain. A chat always asks first, and an OAuth connection needs a verification code.
updateDomainRouteChange a pattern route, passing only what changes. A chat always asks first, and an OAuth connection needs a verification code.
deleteDomainRouteDelete a pattern route. A chat always asks first.
listGroupMembersThe group members of a group address, inside the workspace and at other providers, and whether each outside one has confirmed.
addGroupMembersAdd group members to a group address. An outside address is asked by email to confirm first. A chat always asks first, and an OAuth connection needs a verification code.
removeGroupMemberRemove one group member from a group address. A chat always asks first.
setDomainAliasMake a domain an alias of another domain of the workspace, so its mail is handled as the mail of that domain, or stop it being one. A chat asks first unless you asked for it.

Reading needs domains:read and changing needs domains:write. A domain reaches every address on it, so a client limited to some addresses or domains cannot add one, and changes a domain or its addresses only when it holds that whole domain.

Removing the workspace’s last domain deletes the whole mailbox with it, so removeDomain asks for confirm, the name of the domain, the way the app asks the person to type it. A client limited to some addresses or domains when it was connected cannot remove the last domain.

The tools act exactly as the REST API does, and the /domains pages of the API reference describe every field and refusal.

Removing a domain or an address also needs workspace:manage in your role unless you own the workspace, the same permission the app asks for. It is console-only, so no approval can give it to a client.

Some tools on this server make a change the REST API guards with a verification code, and ask for the same code. Until the client has verified a code in the last 60 minutes, or the person has chosen Allow changes for 60 minutes on it in Account → Connected apps, such a tool answers with a result that starts Refused (step_up_required): and changes nothing. beginStepUp asks for a code, verifyStepUp checks the one the person gives, and getStepUpStatus says whether the client is verified. emptyAudience never asks for a code. The API Authentication page lists every tool that asks.

Changing a logo, its certificate or the DMARC policy also publishes the DNS record where Nextmail writes the domain’s DNS, and the result says how that went or which record to publish yourself.

The web app address belongs to the whole workspace, so any client with domains:read can read it, and only the workspace owner’s client, connected with every address, sets or removes it. Setting one needs white label, which comes with the Pro, Max or Enterprise plan, and the /app-host pages of the API reference describe every field and refusal.

The brand belongs to the whole workspace too. Reading it needs settings:read and changing it settings:write, and a client limited to some addresses or domains can read it but not change it. The /branding pages of the API reference describe every field and refusal.

Forwarding needs domains:write and reaches only an address you reach yourself. Seeing who reaches an address needs members:read, and its sign-in needs members:write. Setting the password of an address is not a tool: it is done in the app or with PUT /domains/{id}/addresses/{addressId}/login.

A DNS provider account is connected in a browser, because the provider asks the person to sign in there: startDnsConnection only gives the link, which the person opens signed in to the app. Once one is connected, these tools read it and write records through it. Starting or disconnecting one needs the whole workspace, and workspace:manage in your role unless you own it.

Reading the mail app settings needs threads:read, and turning their connections on or off needs threads:read and domains:write. Listing app passwords needs threads:read on the address. Creating, renaming and revoking app passwords, emailing a setup link and making a link for an Apple device need members:write, which a client limited to some addresses or domains never holds. createAppPassword shows the password once, in its result, and createMailAppProfileLink shows a link that works once, so anyone who can read the chat can use either. createAppPassword, sendMailAppSetup and createMailAppProfileLink hand the address to a mail app, so the client must itself hold every one of these permissions that your role holds: threads:read, threads:write, emails:send, drafts:write, labels:write, calendar:read, calendar:write, contacts:read and contacts:write. Without one of them the tool is refused.

Reference

listDomains

Scopesdomains:readThe app's assistant runs it without askingToolkitworkspace

The domains in this workspace, by name: whether each is verified, whether it can send, whether its catch-all is on, and how many addresses it has. getDomain gives the DNS records of one. query searches the domain name and id. One page at a time: when more follow, the last line gives a cursor to pass back for the next page.

Inputs

limitinteger
At least 1At most 100
cursorstring
querystring

Words to search for. Every word has to appear somewhere on the row, ignoring case and accents, and close spellings count when nothing matches exactly. Pass the same query with the cursor for the next page.

Up to 200 characters

Also available in

API
GET /domainsGET /domains/{id}GET /rolesGET /roles/permissions
TypeScript
domains.list()domains.listAll()domains.iterate()domains.get()roles.list()roles.listAll()roles.iterate()roles.listPermissions()
Python
domains.list()domains.list_all()domains.iterate()domains.get()roles.list()roles.list_all()roles.iterate()roles.list_permissions()
Ruby
domains.listdomains.list_alldomains.iteratedomains.getroles.listroles.list_allroles.iterateroles.list_permissions
PHP
domains->listdomains->listAlldomains->iteratedomains->getroles->listroles->listAllroles->iterateroles->listPermissions
Go
Domains.ListDomains.ListAllDomains.IterateDomains.GetRoles.ListRoles.ListAllRoles.IterateRoles.ListPermissions
Java
domains().listdomains().listAlldomains().iteratedomains().getroles().listroles().listAllroles().iterateroles().listPermissions
C#
Domains.ListAsyncDomains.ListAllAsyncDomains.IterateAsyncDomains.GetAsyncRoles.ListAsyncRoles.ListAllAsyncRoles.IterateAsyncRoles.ListPermissionsAsync

getDomain

Scopesdomains:readThe app's assistant runs it without askingToolkitworkspace

Everything about one domain: whether it is verified and why not, whether it can send and what stops it, the catch-all, DMARC, the tracking and files hosts, and every DNS record to publish with its status (found, missing, or not checked yet).

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters

Also available in

API
GET /domainsGET /domains/{id}
TypeScript
domains.list()domains.listAll()domains.iterate()domains.get()
Python
domains.list()domains.list_all()domains.iterate()domains.get()
Ruby
domains.listdomains.list_alldomains.iteratedomains.get
PHP
domains->listdomains->listAlldomains->iteratedomains->get
Go
Domains.ListDomains.ListAllDomains.IterateDomains.Get
Java
domains().listdomains().listAlldomains().iteratedomains().get
C#
Domains.ListAsyncDomains.ListAllAsyncDomains.IterateAsyncDomains.GetAsync

listTraffic

No scopeThe app's assistant runs it without askingToolkitworkspace

The traffic log, newest first: one entry for each message and recipient at each step it took in or out of the workspace, kept for 30 days. Inbound, where mail that arrived went: filed, spam, routed to a webhook, forwarded, refused with a bounce or dropped, with the reason. Outbound, what the receiving server said about mail sent or forwarded: delivered, deferred, bounced, complained, suppressed, rejected or failed, with its reply. Use it to answer why a message never arrived or never reached someone. Outbound entries need emails:read and inbound ones threads:read; with one of them only that direction is listed. One page at a time: when more follow, the last line gives a cursor to pass back for the next page.

Inputs

domainstring

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
directionstring
One of"inbound""outbound"
outcomesstring[]
Up to 14 itemsOne of"delivered""deferred""bounced""suppressed""complained""rejected""failed""forwarded""filed""spam""routed""refused""dropped""report"
addressstring

One of your addresses: the one mail arrived for or was sent from.

Up to 320 characters
recipientstring

One recipient: the person written to, or the address mail arrived for.

Up to 320 characters
sincestring
Formatdate-time
untilstring
Formatdate-time
limitinteger
At least 1At most 100
cursorstring

Also available in

API
GET /traffic
TypeScript
traffic.list()traffic.listAll()traffic.iterate()
Python
traffic.list()traffic.list_all()traffic.iterate()
Ruby
traffic.listtraffic.list_alltraffic.iterate
PHP
traffic->listtraffic->listAlltraffic->iterate
Go
Traffic.ListTraffic.ListAllTraffic.Iterate
Java
traffic().listtraffic().listAlltraffic().iterate
C#
Traffic.ListAsyncTraffic.ListAllAsyncTraffic.IterateAsync

addDomain

Scopesdomains:writeThe app's assistant asks first unless you asked for itToolkitworkspace

Add a domain you own to this workspace. It starts unverified with its catch-all on, and the answer lists the DNS records to publish at its DNS host. Once they answer, verifyDomain confirms it. Refused when the domain is already claimed, when a parent or child domain belongs to someone else, or when the plan allows no more domains.

Inputs

domainstringRequired

The bare domain, e.g. example.com

Also available in

API
POST /domains
TypeScript
domains.create()
Python
domains.create()
Ruby
domains.create
PHP
domains->create
Go
Domains.Create
Java
domains().create
C#
Domains.CreateAsync

verifyDomain

Scopesdomains:writeThe app's assistant asks first unless you asked for itToolkitworkspace

Check the DNS of one domain again now, instead of waiting for the next scheduled check, and say which records are still missing. A check made in the last few seconds is reused rather than repeated.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters

Also available in

API
POST /domains/{id}/verify
TypeScript
domains.verify()
Python
domains.verify()
Ruby
domains.verify
PHP
domains->verify
Go
Domains.Verify
Java
domains().verify
C#
Domains.VerifyAsync

setDomainCatchAll

Scopesdomains:writeThe app's assistant asks first unless you asked for itToolkitworkspace

Turn the catch-all of a domain on or off. On, mail to any address at the domain arrives here, listed or not. Off, only the addresses listed on it take mail and the rest is refused.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
catchAllbooleanRequired

Also available in

API
PATCH /domains/{id}
TypeScript
domains.update()
Python
domains.update()
Ruby
domains.update
PHP
domains->update
Go
Domains.Update
Java
domains().update
C#
Domains.UpdateAsync

setDomainLogoCertificate

Scopesdomains:writeThe app's assistant asks first unless you asked for itToolkitworkspace

Set the mark certificate of a domain logo, replacing any there was: the Verified Mark Certificate (VMC) or Common Mark Certificate (CMC) a certificate authority issued for the domain. Gmail shows the logo only with one, and only a VMC earns the blue checkmark and the logo in Apple Mail. The chain is put in order and served, and the logo record points at it. Inboxes show nothing when the logo inside the certificate differs from the published one, so the logo from the certificate then becomes the published one. The domain has to be verified.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
certificatestringRequired

The certificate file: PEM text as it came, or a DER or PKCS #7 file in base64.

1 to 175020 characters

Also available in

API
PUT /domains/{id}/logo/certificate
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

removeDomainLogoCertificate

Scopesdomains:writeThe app's assistant always asks firstToolkitworkspace

Remove the mark certificate of a domain logo and delete the stored file. The logo stays, but its record no longer points at a certificate, so Gmail and Apple Mail stop showing it. Removing a certificate from a domain that has none changes nothing.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters

Also available in

API
DELETE /domains/{id}/logo/certificate
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

setDomainDmarcPolicy

Scopesdomains:writeThe app's assistant always asks firstToolkitworkspace

Set the DMARC policy of a domain: what its DMARC record tells receivers to do with mail that fails its checks. none only monitors, quarantine sends that mail to spam and reject refuses it. Inboxes show the domain logo only at quarantine or reject. A policy stricter than none needs mail from the domain to be signed first, and anything else that sends as the domain, such as a newsletter tool or a help desk, has to sign as it too, or its mail lands in spam or is refused. Where Nextmail writes the DNS of the domain the record is updated straight away, keeping its other tags such as rua, and otherwise the answer gives the record to publish.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
dmarcPolicystringRequired

none to only monitor, quarantine to send failing mail to spam, reject to refuse it.

One of"none""quarantine""reject"

Also available in

API
PATCH /domains/{id}
TypeScript
domains.update()
Python
domains.update()
Ruby
domains.update
PHP
domains->update
Go
Domains.Update
Java
domains().update
C#
Domains.UpdateAsync

removeDomain

Scopesdomains:writeThe app's assistant always asks firstToolkitworkspace

Remove a domain from this workspace. Its addresses stop taking mail, its tracking and files hosts retire, and records written to a connected DNS host are withdrawn. Removing the last domain of a workspace deletes the whole mailbox with it, every message, so it needs confirm, the domain name typed out, as the app asks for it. This cannot be undone. Anybody but the workspace owner also needs a role that may remove domains (workspace:manage).

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
confirmstring

The name of the domain, typed out, as the app asks for it. Needed only to remove the last domain of the workspace, which deletes the whole mailbox with it.

1 to 253 characters

Also available in

API
DELETE /domains/{id}
TypeScript
domains.delete()
Python
domains.delete()
Ruby
domains.delete
PHP
domains->delete
Go
Domains.Delete
Java
domains().delete
C#
Domains.DeleteAsync

listDomainAddresses

Scopesdomains:readThe app's assistant runs it without askingToolkitworkspace

addDomainAddress

Scopesdomains:writeThe app's assistant asks first unless you asked for itToolkitworkspace

Add an address to a domain, such as sales on example.com, with an optional label, where its mail goes (destination, webhookId, tapWebhookIds), when it expires (expiresAt, onExpiry) and, for a group, who may post (groupPosting, groupKeepCopy). Adding one that was removed brings it back. Refused for an address reserved for an account, or when the workspace holds as many addresses as it may.

  • Asks for a verification code
    Only when it changes where the mail of the address goes, or sets it to be deleted when it expiresPOST /domains/{id}/addresses

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
localPartstringRequired

The part before the @, e.g. sales

1 to 64 charactersPattern^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*$
labelstring
Up to 120 characters
keepOriginalboolean

True keeps every message the address receives from now on byte for byte as it arrived, so getRawMessage returns that original instead of a source rebuilt from the stored message. False stops keeping new ones. Originals already kept stay with their messages.

destinationstring

Where mail to the address goes. mailbox keeps it here, forward only forwards it and needs a forwarding destination that is on, webhook sends every message to the endpoint in webhookId and keeps none here, and group sends it to the group members of the address.

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

The webhook endpoint mail goes to while destination is webhook, an id that listWebhooks gives. Pass it with destination webhook.

1 to 128 characters
tapWebhookIdsstring[]

Up to 5 webhook endpoints that also get every message the address receives, as ids that listWebhooks gives. An empty list or null stops them.

Can be nullUp to 100 items
expiresAtstring

When the address expires, an RFC 3339 time from 60 seconds to 10 years ahead. Null keeps it for good. Setting it on an address that expired turns the address back on.

Can be nullFormatdate-time
onExpirystring

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

One of"stop""delete"
groupPostingstring

Who may send to a group address: anyone, members (its group members), or workspace (any address on a domain of this workspace).

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

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

Also available in

API
POST /domains/{id}/addresses
TypeScript
domains.createAddress()
Python
domains.create_address()
Ruby
domains.create_address
PHP
domains->createAddress
Go
Domains.CreateAddress
Java
domains().createAddress
C#
Domains.CreateAddressAsync

updateDomainAddress

Scopesdomains:writeThe app's assistant asks first unless you asked for itToolkitworkspace

Change an address on a domain: its label, whether it takes mail, whether it keeps the original of every message it receives, where its mail goes (destination, webhookId, tapWebhookIds), when it expires (expiresAt, onExpiry) and, for a group, who may post (groupPosting, groupKeepCopy). A disabled address keeps its settings, and enabling it again restores it. An empty label clears it.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters
labelstring
Can be nullUp to 120 characters
enabledboolean
keepOriginalboolean

True keeps every message the address receives from now on byte for byte as it arrived, so getRawMessage returns that original instead of a source rebuilt from the stored message. False stops keeping new ones. Originals already kept stay with their messages.

destinationstring

Where mail to the address goes. mailbox keeps it here, forward only forwards it and needs a forwarding destination that is on, webhook sends every message to the endpoint in webhookId and keeps none here, and group sends it to the group members of the address.

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

The webhook endpoint mail goes to while destination is webhook, an id that listWebhooks gives. Pass it with destination webhook.

1 to 128 characters
tapWebhookIdsstring[]

Up to 5 webhook endpoints that also get every message the address receives, as ids that listWebhooks gives. An empty list or null stops them.

Can be nullUp to 100 items
expiresAtstring

When the address expires, an RFC 3339 time from 60 seconds to 10 years ahead. Null keeps it for good. Setting it on an address that expired turns the address back on.

Can be nullFormatdate-time
onExpirystring

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

One of"stop""delete"
groupPostingstring

Who may send to a group address: anyone, members (its group members), or workspace (any address on a domain of this workspace).

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

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

Also available in

API
PATCH /domains/{id}/addresses/{addressId}
TypeScript
domains.updateAddress()
Python
domains.update_address()
Ruby
domains.update_address
PHP
domains->updateAddress
Go
Domains.UpdateAddress
Java
domains().updateAddress
C#
Domains.UpdateAddressAsync

setAddressPhoto

Scopesdomains:writeThe app's assistant asks first unless you asked for itToolkitworkspace

Set the photo of an address on a domain, replacing any there was. Mail from the address shows it in Nextmail, in place of the domain logo. Pass the image in base64 as image with its type (image/png, image/jpeg, image/webp, image/gif), or an image in Files as fileId, up to 100MB, and crop to choose the part to show. It is cropped to a square and stored as JPEG or PNG.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters
imagestring

The image in base64, or as a data: URL. Leave it out when you pass fileId instead.

1 to 16000000 characters
fileIdstring

An image in Files to use instead of image: one the user attached in this chat, or one listFiles found. It can be up to 100MB.

1 to 128 characters
cropobject

The part of the image to keep, each value a fraction of the whole from 0 to 1: x and y are its left and top edges, width and height its size. Leave it out to keep the whole image.

xnumberRequired
At least 0At most 1
ynumberRequired
At least 0At most 1
widthnumberRequired
At least 0At most 1
heightnumberRequired
At least 0At most 1
contentTypestring

The type of the image, such as image/png. It is needed with image and taken from the file with fileId.

1 to 100 characters

Also available in

API
PUT /domains/{id}/addresses/{addressId}/photo
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

removeAddressPhoto

Scopesdomains:writeThe app's assistant always asks firstToolkitworkspace

Remove the photo of an address on a domain and delete the stored image, so mail from it shows the domain logo again. Removing a photo from an address that has none changes nothing.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters

Also available in

API
DELETE /domains/{id}/addresses/{addressId}/photo
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

startGravatarPublish

Scopesdomains:writeThe app's assistant asks first unless you asked for itToolkitworkspace

Start publishing the photo of an address to Gravatar, so other mail apps and sites show it too. It answers with a link for the person this connection acts for to open 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 they come back. The address needs a photo first, from setAddressPhoto.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters

Also available in

API
POST /domains/{id}/addresses/{addressId}/photo/gravatar
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

removeDomainAddress

Scopesdomains:writeThe app's assistant always asks firstToolkitworkspace

Remove an address from a domain. It stops taking mail as a listed address, the people it was shared with lose it, and any sign-in for it ends. Adding it again later starts it fresh. Anybody but the workspace owner also needs a role that may remove domains (workspace:manage).

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters

Also available in

API
DELETE /domains/{id}/addresses/{addressId}
TypeScript
domains.deleteAddress()
Python
domains.delete_address()
Ruby
domains.delete_address
PHP
domains->deleteAddress
Go
Domains.DeleteAddress
Java
domains().deleteAddress
C#
Domains.DeleteAddressAsync

getAppHost

Scopesdomains:readThe app's assistant runs it without askingToolkitworkspace

The web app address of this workspace: a subdomain on any domain, such as mailbox.example.com, where its people open Nextmail with the workspace brand. Says whether it is live, waiting for its DNS records, or paused because the workspace is on the free plan, and gives the records to publish. With none set, it names the verified domains of the workspace and the suggested address.

Inputs

Takes no input.

Also available in

API
GET /app-host
TypeScript
appHost.get()
Python
app_host.get()
Ruby
app_host.get
PHP
appHost->get
Go
AppHost.Get
Java
appHost().get
C#
AppHost.GetAsync

getBrandedSender

Scopesdomains:readThe app's assistant runs it without askingToolkitworkspace

The address the emails sent to members of this 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 at that domain, once the workspace has a logo and the signing records of the domain verify. Says which of those it still waits on.

Inputs

Takes no input.

Also available in

API
GET /app-host
TypeScript
appHost.get()
Python
app_host.get()
Ruby
app_host.get
PHP
appHost->get
Go
AppHost.Get
Java
appHost().get
C#
AppHost.GetAsync

setAppHost

Scopesdomains:writeThe app's assistant asks first unless you asked for itToolkitworkspace

Set the web app address of this workspace, replacing any it had: a subdomain on any domain, such as mailbox.example.com, where only its members, the people who sign in with one of its addresses and its invitees can sign in, under the workspace brand. Under a verified domain of the workspace it takes one CNAME record. Under any other domain it also takes a TXT record that proves the domain is yours. The answer gives the records to publish. Needs white label, which comes with the Pro, Max or Enterprise plan. Setting the address it already has checks it again.

  • Asks for a verification code
    Only when it replaces the web app addressPUT /app-host

Inputs

hoststringRequired

The subdomain, e.g. mailbox.example.com, on any domain.

1 to 253 characters

Also available in

API
DELETE /app-hostPUT /app-host
TypeScript
appHost.delete()appHost.set()
Python
app_host.delete()app_host.set()
Ruby
app_host.deleteapp_host.set
PHP
appHost->deleteappHost->set
Go
AppHost.DeleteAppHost.Set
Java
appHost().deleteappHost().set
C#
AppHost.DeleteAsyncAppHost.SetAsync

removeAppHost

Scopesdomains:writeThe app's assistant always asks firstToolkitworkspace

Remove the web app address of this workspace. Everyone signed in there is signed out and the address stops opening the workspace, while nextmail.sh keeps working for the same people. The CNAME record stays at the DNS host until someone removes it.

Inputs

Takes no input.

Also available in

API
DELETE /app-hostPUT /app-host
TypeScript
appHost.delete()appHost.set()
Python
app_host.delete()app_host.set()
Ruby
app_host.deleteapp_host.set
PHP
appHost->deleteappHost->set
Go
AppHost.DeleteAppHost.Set
Java
appHost().deleteappHost().set
C#
AppHost.DeleteAsyncAppHost.SetAsync

getBranding

Scopessettings:readThe app's assistant runs it without askingToolkitworkspace

The brand of this workspace: the links to its mark, its logo, its logo for dark mode and the image behind its sign-in page, its primary and secondary fonts, and the background of its sign-in page (a preset, a colour or the uploaded image).

Inputs

Takes no input.

Also available in

API
GET /branding
TypeScript
branding.get()
Python
branding.get()
Ruby
branding.get
PHP
branding->get
Go
Branding.Get
Java
branding().get
C#
Branding.GetAsync

updateBranding

Scopessettings:writeThe app's assistant asks first unless you asked for itToolkitworkspace

Change the fonts or the sign-in page background of this workspace brand. Give fonts with primary, secondary or both, each a font id or null for the default; a font left out keeps its value. Give loginBackground as { kind: "preset", preset }, { kind: "color", color: "#rrggbb" } or { kind: "image" } for the uploaded image, or null for the default. Add logo: "dark" or "light" to choose the sign-in logo, or leave it null to match the background. Upload the image itself with setBrandImage first: { kind: "image" } is refused while no sign-in photo is uploaded. The fonts apply in the web app for everyone in the workspace, the primary to its text and the secondary to page headings, and the sign-in background shows on its web app address.

Inputs

fontsobject

The fonts to change. Font ids: system, arial, helvetica, verdana, tahoma, trebuchet-ms, georgia, times-new-roman, courier-new, dm-sans, inter, roboto, open-sans, lato, montserrat, poppins, nunito, work-sans, source-sans-3, ibm-plex-sans, merriweather, playfair-display, instrument-serif, jetbrains-mono, dm-mono, geist-mono.

primarystring
Can be nullOne of"system""arial""helvetica""verdana""tahoma""trebuchet-ms""georgia""times-new-roman""courier-new""dm-sans""inter""roboto""open-sans""lato""montserrat""poppins""nunito""work-sans""source-sans-3""ibm-plex-sans""merriweather""playfair-display""instrument-serif""jetbrains-mono""dm-mono""geist-mono"
secondarystring
Can be nullOne of"system""arial""helvetica""verdana""tahoma""trebuchet-ms""georgia""times-new-roman""courier-new""dm-sans""inter""roboto""open-sans""lato""montserrat""poppins""nunito""work-sans""source-sans-3""ibm-plex-sans""merriweather""playfair-display""instrument-serif""jetbrains-mono""dm-mono""geist-mono"
loginBackgroundobject

The sign-in page background, or null for the default. Presets: dusk, mist, sand, night, meadow, dots, brush, trail, ember, canvas, bloom, field, wanderer, gold. Logo: dark, light.

Can be null
kindstringRequired
One of"preset""color""image"
presetstring
Can be nullOne of"dusk""mist""sand""night""meadow""dots""brush""trail""ember""canvas""bloom""field""wanderer""gold"
colorstring
Can be nullPattern^#[0-9a-f]{6}$
logostring
Can be nullOne of"dark""light"

Also available in

API
PATCH /branding
TypeScript
branding.update()
Python
branding.update()
Ruby
branding.update
PHP
branding->update
Go
Branding.Update
Java
branding().update
C#
Branding.UpdateAsync

setBrandImage

Scopessettings:writeThe app's assistant asks first unless you asked for itToolkitworkspace

Set one of the brand images of this workspace from an image in Files, replacing the one there was: the mark (a square icon), the logo, the logo for dark mode, or the photo behind the sign-in page of its web app address. Setting the sign-in photo also switches the sign-in page to it. The image is fitted and stored as WebP; it can start from up to 100MB. Pass crop to keep only part of it.

Inputs

variantstringRequired

Which image: mark, wordmark, wordmark-dark, login-background. mark is the square icon, wordmark the logo, wordmark-dark the logo for dark mode, and login-background the photo behind the sign-in page of the web app address.

One of"mark""wordmark""wordmark-dark""login-background"
fileIdstringRequired

The fileId of an image in Files: one the user attached in this chat, or one listFiles found.

1 to 128 characters
cropobject

The part of the image to keep, each value a fraction of the whole from 0 to 1: x and y are its left and top edges, width and height its size. Leave it out to keep the whole image.

xnumberRequired
At least 0At most 1
ynumberRequired
At least 0At most 1
widthnumberRequired
At least 0At most 1
heightnumberRequired
At least 0At most 1

Also available in

API
PUT /branding/images/{variant}
TypeScript
branding.uploadImage()
Python
branding.upload_image()
Ruby
branding.upload_image
PHP
branding->uploadImage
Go
Branding.UploadImage
Java
branding().uploadImage
C#
Branding.UploadImageAsync

removeBrandImage

Scopessettings:writeThe app's assistant asks first unless you asked for itToolkitworkspace

Remove one of the brand images of this workspace and delete the stored image, so the default shows in its place. Removing the sign-in photo while the sign-in page shows it switches the page back to the preset or colour chosen before, or to the default. Removing an image that is not set changes nothing.

Inputs

variantstringRequired

Which image: mark, wordmark, wordmark-dark, login-background. mark is the square icon, wordmark the logo, wordmark-dark the logo for dark mode, and login-background the photo behind the sign-in page of the web app address.

One of"mark""wordmark""wordmark-dark""login-background"

Also available in

API
DELETE /branding/images/{variant}
TypeScript
branding.removeImage()
Python
branding.remove_image()
Ruby
branding.remove_image
PHP
branding->removeImage
Go
Branding.RemoveImage
Java
branding().removeImage
C#
Branding.RemoveImageAsync

setDomainTrackingHost

Scopesdomains:writeThe app's assistant asks first unless you asked for itToolkitworkspace

Set the tracking host of a domain, the subdomain the links and the open pixel of its mail go through, or remove it with null. The domain has to be verified, and the answer gives the CNAME record to publish for the host.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
hoststringRequired

A subdomain of the domain, such as track.example.com, or null to remove it.

Can be nullUp to 253 characters

Also available in

API
PATCH /domains/{id}
TypeScript
domains.update()
Python
domains.update()
Ruby
domains.update
PHP
domains->update
Go
Domains.Update
Java
domains().update
C#
Domains.UpdateAsync

setDomainStorageHost

Scopesdomains:writeThe app's assistant asks first unless you asked for itToolkitworkspace

Set the files host of a domain, the subdomain its public download links are served from, or remove it with null. The domain has to be verified, and the answer gives the record to publish for the host.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
hoststringRequired

A subdomain of the domain, such as track.example.com, or null to remove it.

Can be nullUp to 253 characters

Also available in

API
PATCH /domains/{id}
TypeScript
domains.update()
Python
domains.update()
Ruby
domains.update
PHP
domains->update
Go
Domains.Update
Java
domains().update
C#
Domains.UpdateAsync

listAddressForwards

Scopesdomains:readThe app's assistant runs it without askingToolkitworkspace

Where the mail of one address is forwarded: every destination, whether it confirmed it wants the mail, and whether the address also keeps a copy here.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters

Also available in

API
GET /domains/{id}/addresses/{addressId}/forwards
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

addAddressForwards

Scopesdomains:writeThe app's assistant always asks firstToolkitworkspace

Forward the mail of an address to other places. Each destination gets an email asking it to confirm and receives nothing until it does. Addresses hosted here, ones already on the list and ones that would loop are skipped with the reason. 10 destinations per address at most.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters
emailsstring[]Required
1 to 10 items

Also available in

API
POST /domains/{id}/addresses/{addressId}/forwards
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

setAddressForwardEnabled

Scopesdomains:writeThe app's assistant always asks firstToolkitworkspace

Pause a forwarding destination, or switch it back on. A paused destination keeps its confirmation. When the last one that is on is paused, the address keeps its mail here again.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters
forwardstringRequired

The forwarding destination, by its id or by the address it forwards to. listAddressForwards names every one.

1 to 320 characters
enabledbooleanRequired

Also available in

API
PATCH /domains/{id}/addresses/{addressId}/forwards/{forwardId}
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

removeAddressForward

Scopesdomains:writeThe app's assistant always asks firstToolkitworkspace

Stop forwarding the mail of an address to one destination. When it was the last one that was on, the address keeps its mail here again.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters
forwardstringRequired

The forwarding destination, by its id or by the address it forwards to. listAddressForwards names every one.

1 to 320 characters

Also available in

API
DELETE /domains/{id}/addresses/{addressId}/forwards/{forwardId}
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

resendAddressForwardConsent

Scopesdomains:writeThe app's assistant asks first unless you asked for itToolkitworkspace

Send the confirmation email to a forwarding destination again, for one that has not answered. It reaches a real inbox.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters
forwardstringRequired

The forwarding destination, by its id or by the address it forwards to. listAddressForwards names every one.

1 to 320 characters

Also available in

API
POST /domains/{id}/addresses/{addressId}/forwards/{forwardId}/resend
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

setAddressForwardMode

Scopesdomains:writeThe app's assistant always asks firstToolkitworkspace

Choose where the mail of an address goes. mailbox keeps it here, with a copy to every forwarding destination that is on. forward only sends it to the destinations and keeps no copy, so it needs one that is on first.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters
modestringRequired
One of"mailbox""forward"

Also available in

API
PATCH /domains/{id}/addresses/{addressId}
TypeScript
domains.updateAddress()
Python
domains.update_address()
Ruby
domains.update_address
PHP
domains->updateAddress
Go
Domains.UpdateAddress
Java
domains().updateAddress
C#
Domains.UpdateAddressAsync

listAddressMembers

Scopesmembers:readThe app's assistant runs it without askingToolkitworkspace

Who can read one 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.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters

Also available in

API
GET /domains/{id}/addresses/{addressId}/members
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

getAddressLogin

Scopesmembers:writeThe app's assistant runs it without askingToolkitworkspace

Whether an address has a password of its own, which lets somebody sign in as that address alone, and when it was set and last used. Setting a password is not done from here.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters

Also available in

API
GET /domains/{id}/addresses/{addressId}/login
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

removeAddressLogin

Scopesmembers:writeThe app's assistant always asks firstToolkitworkspace

Take the password away from an address and sign out whoever used it. The address and its mail stay.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters

Also available in

API
DELETE /domains/{id}/addresses/{addressId}/login
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

listDnsConnections

Scopesdomains:readThe app's assistant runs it without askingToolkitworkspace

The DNS provider accounts connected to this workspace, through which Nextmail writes the records of a domain itself, with the domains each one serves and how many records it keeps there.

Inputs

Takes no input.

Also available in

API
GET /dns-connections
TypeScript
dnsConnections.list()
Python
dns_connections.list()
Ruby
dns_connections.list
PHP
dnsConnections->list
Go
DNSConnections.List
Java
dnsConnections().list
C#
DnsConnections.ListAsync

getDnsConnection

Scopesdomains:readThe app's assistant runs it without askingToolkitworkspace

One DNS connection and what disconnecting it would leave behind: the domains it serves, the records Nextmail wrote through it, and the verified domains that would stop receiving mail.

Inputs

connectionstringRequired

The id of a DNS connection, as listDnsConnections names it.

1 to 64 characters

Also available in

API
GET /dns-connections/{id}
TypeScript
dnsConnections.get()
Python
dns_connections.get()
Ruby
dns_connections.get
PHP
dnsConnections->get
Go
DNSConnections.Get
Java
dnsConnections().get
C#
DnsConnections.GetAsync

disconnectDnsConnection

Scopesdomains:writeThe app's assistant always asks firstToolkitworkspace

Disconnect a DNS provider account: the records Nextmail wrote through it come down, every domain it serves is detached and the connection is revoked, so a verified domain whose records come down stops receiving mail. A connection that is already disconnected is removed from the list instead. Check getDnsConnection first. Anybody but the workspace owner also needs a role that may manage the workspace (workspace:manage).

Inputs

connectionstringRequired

The id of a DNS connection, as listDnsConnections names it.

1 to 64 characters

Also available in

API
DELETE /dns-connections/{id}
TypeScript
dnsConnections.delete()
Python
dns_connections.delete()
Ruby
dns_connections.delete
PHP
dnsConnections->delete
Go
DNSConnections.Delete
Java
dnsConnections().delete
C#
DnsConnections.DeleteAsync

startDnsConnection

Scopesdomains:writeThe app's assistant asks first unless you asked for itToolkitworkspace

Start connecting a Cloudflare account to the workspace, so Nextmail can write the DNS records of its domains there itself. It answers with a link for the person this connection acts for to open in a browser signed in to the app, because Cloudflare asks them to sign in and choose what to share. Connecting an account that is already connected refreshes it. Anybody but the workspace owner also needs a role that may manage the workspace (workspace:manage).

Inputs

Takes no input.

Also available in

API
POST /dns-connections
TypeScript
dnsConnections.start()
Python
dns_connections.start()
Ruby
dns_connections.start
PHP
dnsConnections->start
Go
DNSConnections.Start
Java
dnsConnections().start
C#
DnsConnections.StartAsync

getDomainDns

Scopesdomains:readThe app's assistant runs it without askingToolkitworkspace

How the DNS of one domain is set up: whether Nextmail writes its records itself and through which connection and zone, where each kind of record stands, the records left to delete by hand, and which connected zone answers for the domain.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
refreshboolean

True asks the providers again which zone answers for the domain, rather than using the answer from the last minutes.

Also available in

API
GET /domains/{id}/dns
TypeScript
domains.getDns()
Python
domains.get_dns()
Ruby
domains.get_dns
PHP
domains->getDns
Go
Domains.GetDNS
Java
domains().getDns
C#
Domains.GetDnsAsync

setDomainDnsZone

Scopesdomains:writeThe app's assistant asks first unless you asked for itToolkitworkspace

Choose the zone of a connected DNS account that a domain is set up through, when several could answer for it. The zone has to cover the domain, be active and take a test record. Nothing is written yet: syncDomainDns writes the records.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
connectionstringRequired

The id of a DNS connection, as listDnsConnections names it.

1 to 64 characters
zonestringRequired

The id of the zone, as getDomainDns lists the zones that could answer for the domain.

1 to 64 characters

Also available in

API
PUT /domains/{id}/dns
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

syncDomainDns

Scopesdomains:writeThe app's assistant asks first unless you asked for itToolkitworkspace

Write or repair the DNS records a domain needs, through the connected zone that answers for it, the way Sync does in the app. When only one zone answers it is attached first. With purpose, only that kind of record. A domain waiting for its records is verified once they are in place.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
purposestring

Write only this kind of record. Left out, every record the domain needs.

One of"dmarc""tracking""storage""bimi""app-host"

Also available in

API
POST /domains/{id}/dns/sync
TypeScript
domains.syncDns()
Python
domains.sync_dns()
Ruby
domains.sync_dns
PHP
domains->syncDns
Go
Domains.SyncDNS
Java
domains().syncDns
C#
Domains.SyncDnsAsync

getMailAppSettings

Scopesdomains:readThe app's assistant runs it without askingToolkitworkspace

The server settings that put an address into Apple Mail, Gmail, Outlook, Thunderbird or any other mail app: the IMAP, SMTP and POP3 hosts and ports, the CalDAV and CardDAV addresses that put its calendar and contacts into calendar and contacts apps, the username, and which of those connections the address accepts. The password is an app password, which createAppPassword makes.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters

Also available in

API
GET /domains/{id}/addresses/{addressId}/mail-apps
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

listAppPasswords

Scopesthreads:readThe app's assistant runs it without askingToolkitworkspace

The app passwords that let mail apps sign in to an address: who holds each, when it was made and when a mail app last used it. The passwords themselves are never shown again. With members:write, the workspace owner and anyone whose role manages members see the passwords of everyone who holds the address. Anyone else sees only their own.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters

Also available in

API
GET /domains/{id}/addresses/{addressId}/app-passwords
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

revokeAppPassword

Scopesmembers:writeThe app's assistant always asks firstToolkitworkspace

Revoke one app password so the mail app using it is signed out within minutes. The address and its mail stay.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters
passwordstringRequired
1 to 128 characters

Also available in

API
DELETE /domains/{id}/addresses/{addressId}/app-passwords/{passwordId}
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

sendMailAppSetup

Scopesthreads:readmembers:writeThe app's assistant always asks firstToolkitworkspace

Email someone a one-time link to set up an address in their mail app. The link creates an app password that acts as you for that address alone, shows it once and expires in three days. It reaches a real inbox.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters
recipientstringRequired
Up to 320 charactersFormatemail

Also available in

API
POST /domains/{id}/addresses/{addressId}/mail-app-setup
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

createAppPassword

Scopesthreads:readmembers:writeThe app's assistant always asks firstToolkitworkspace

Create an app password that signs a mail, calendar or contacts app in to an address as you. The password is shown this once, with the server settings, so hand it to the person straight away. Pass appleProfile to also get an Apple configuration profile that sets up an iPhone, iPad or Mac in one step. Both are secrets.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters
namestringRequired

What to call it, such as the device it is for.

1 to 64 characters
appleProfileboolean

Also return the Apple configuration profile, the XML of a .mobileconfig file.

Also available in

API
POST /domains/{id}/addresses/{addressId}/app-passwords
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

renameAppPassword

Scopesmembers:writeThe app's assistant asks first unless you asked for itToolkitworkspace

Rename an app password, such as when the device it is for changes. The password itself stays the same and keeps working.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters
passwordstringRequired

The ID listAppPasswords shows.

1 to 128 characters
namestringRequired
1 to 64 characters

Also available in

API
PATCH /domains/{id}/addresses/{addressId}/app-passwords/{passwordId}
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

listCalendarLogins

Scopesaccount:readThe app's assistant runs it without askingToolkitworkspace

The calendar sign-ins of a person: the logins calendar and contacts apps use over CalDAV and CardDAV, which belong to the person rather than to an address and never open mail. Each has a name, a username starting with cal-, the last four letters of its password, who made it and when an app last used it. The passwords are never shown again.

Inputs

memberstring

The member id of the person it is for, as listWorkspaceMembers gives it. Leave it out for your own. Another member needs the workspace owner or a role that manages members.

1 to 128 characters

Also available in

API
GET /calendar/logins
TypeScript
calendar.listCalendarLogins()
Python
calendar.list_calendar_logins()
Ruby
calendar.list_calendar_logins
PHP
calendar->listCalendarLogins
Go
Calendar.ListCalendarLogins
Java
calendar().listCalendarLogins
C#
Calendar.ListCalendarLoginsAsync

createCalendarLogin

Scopesaccount:writeThe app's assistant always asks firstToolkitworkspace

Create a calendar sign-in, a username and password that sign calendar and contacts apps (Apple Calendar and Contacts, Thunderbird, DAVx5) in to a person's calendars, the calendars and address books shared with them, and their contacts, for someone with or without an email address. It never opens mail and never sends: mail apps refuse it. The password is shown this once, so hand it to the person straight away. Pass appleProfile to also get an Apple configuration profile that sets up an iPhone, iPad or Mac in one step. Both are secrets.

Inputs

namestringRequired

What to call it, such as the device it is for.

1 to 64 characters
memberstring

The member id of the person it is for, as listWorkspaceMembers gives it. Leave it out for your own. Another member needs the workspace owner or a role that manages members.

1 to 128 characters
appleProfileboolean

Also return the Apple configuration profile, the XML of a .mobileconfig file.

Also available in

API
POST /calendar/logins
TypeScript
calendar.createCalendarLogin()
Python
calendar.create_calendar_login()
Ruby
calendar.create_calendar_login
PHP
calendar->createCalendarLogin
Go
Calendar.CreateCalendarLogin
Java
calendar().createCalendarLogin
C#
Calendar.CreateCalendarLoginAsync

revokeCalendarLogin

Scopesaccount:writeThe app's assistant always asks firstToolkitworkspace

Revoke one calendar sign-in so the calendar and contacts apps using it are signed out within minutes. The calendars and contacts stay. Another member's needs the workspace owner or a role that manages members.

Inputs

loginstringRequired

The ID listCalendarLogins shows.

1 to 128 characters

Also available in

API
DELETE /calendar/logins/{id}
TypeScript
calendar.revokeCalendarLogin()
Python
calendar.revoke_calendar_login()
Ruby
calendar.revoke_calendar_login
PHP
calendar->revokeCalendarLogin
Go
Calendar.RevokeCalendarLogin
Java
calendar().revokeCalendarLogin
C#
Calendar.RevokeCalendarLoginAsync

updateMailAppSettings

Scopesdomains:writeThe app's assistant always asks firstToolkitworkspace

Turn each kind of mail app connection on or off for an address: imap, smtp and pop3 for mail, caldav for its calendar and carddav for contacts. Pass only the ones to change. A switched-off kind refuses every sign-in to it, and connections of that kind that are already open end within minutes. Only the workspace owner or someone who manages domains may change them.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters
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.

Also available in

API
PATCH /domains/{id}/addresses/{addressId}/mail-apps
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

setDomainSenderName

Scopesdomains:writeThe app's assistant asks first unless you asked for itToolkitworkspace

Set the name mail from a domain goes out under when the address has no name of its own, such as "Acme Support", or clear it with null so that mail goes out under the name of the workspace. An address with a name of its own keeps it: change that with updateDomainAddress.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
senderNamestringRequired

The name, at most 120 characters, or null to clear it.

Can be nullUp to 120 characters

Also available in

API
PATCH /domains/{id}
TypeScript
domains.update()
Python
domains.update()
Ruby
domains.update
PHP
domains->update
Go
Domains.Update
Java
domains().update
C#
Domains.UpdateAsync

setDomainAutodiscovery

Scopesdomains:writeThe app's assistant asks first unless you asked for itToolkitworkspace

Offer or stop offering the DNS records that let mail, calendar and contacts apps find the servers for a domain from an address alone (SRV records for IMAP, SMTP, POP3, CalDAV and CardDAV). They change nothing about how mail arrives. Where the DNS of the domain is written for it, the records are written or taken down at once; otherwise the answer lists them to publish.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
enabledbooleanRequired

Also available in

API
PATCH /domains/{id}
TypeScript
domains.update()
Python
domains.update()
Ruby
domains.update
PHP
domains->update
Go
Domains.Update
Java
domains().update
C#
Domains.UpdateAsync

getAddressLimits

Scopesdomains:readThe app's assistant runs it without askingToolkitworkspace

The sending and receiving limits of one address, what it has sent and received in the current hour, the last 24 hours and the calendar month, how much mail it keeps against its storage quota, and when each count goes down. An address has no limits of its own until somebody sets them, and then only the plan of the workspace applies. Hours and months are in UTC.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters

Also available in

API
GET /domains/{id}/addresses/{addressId}/limits
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

setAddressLimits

Scopesdomains:writeThe app's assistant asks first unless you asked for itToolkitworkspace

Set, change or clear the sending and receiving limits of one address. Pass only the fields to change, inside sending and receiving: a field left out stays as it is, and null clears it. Caps are whole numbers from 1 to 10,000,000 a clock hour, the last 24 hours or the calendar month, in UTC. hold pauses or disables sending or receiving outright. Recipient and sender lists take up to 100 exact addresses, domains or *.domain patterns, where null means anyone and an empty list nobody. receiving.storageBytes is a storage quota in bytes, from 1 MiB (1048576) to 1 TiB (1099511627776): mail that would take the address past it gets a permanent bounce. The limits hold on every way mail leaves or arrives, and the answer shows them with the usage so far.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters
sendingobject
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
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

Also available in

API
PATCH /domains/{id}/addresses/{addressId}/limits
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

listDomainRoutes

Scopesdomains:readThe app's assistant runs it without askingToolkitworkspace

The pattern routes of a domain, in the order they are tried: lowest priority first, then the longest literal text. A route catches mail to addresses nobody created that match its pattern, such as support-*, and delivers it to an address, forwards it, posts it to a webhook or reads it on another domain. Each line says whether the route takes mail now and, when it does not, why.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters

Also available in

API
GET /domains/{id}/routes
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

getDomainRoute

Scopesdomains:readThe app's assistant runs it without askingToolkitworkspace

One pattern route of a domain: what it catches, what it does and whether it takes mail now.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
routeIdstringRequired

The route id, as listDomainRoutes shows it (rte_...).

1 to 64 characters

Also available in

API
GET /domains/{id}/routes/{routeId}
TypeScript
domains.getRoute()
Python
domains.get_route()
Ruby
domains.get_route
PHP
domains->getRoute
Go
Domains.GetRoute
Java
domains().getRoute
C#
Domains.GetRouteAsync

testDomainRoute

Scopesdomains:readThe app's assistant runs it without askingToolkitworkspace

Test where mail to an address would go, without sending anything: which step decides (an address that exists, an alias, a pattern route, the catch-all, or none, so it would be turned away), the route that decided and where the mail would end up. Pass a local part or a whole address on the domain or one of its aliases.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters

Also available in

API
POST /domains/{id}/routes/test
TypeScript
domains.testRoute()
Python
domains.test_route()
Ruby
domains.test_route
PHP
domains->testRoute
Go
Domains.TestRoute
Java
domains().testRoute
C#
Domains.TestRouteAsync

createDomainRoute

Scopesdomains:writeThe app's assistant always asks firstToolkitworkspace

Add a pattern route to a domain. The pattern is the part before the @ with up to three * wildcards, such as support-* or *-invoices. Pass the field of the action you choose: targetAddress for deliver, forwardTo for forward (the address is asked by email to confirm first), webhookId for webhook, rewriteDomain for rewrite. A domain holds at most 100 routes, and an OAuth connection needs a verification code.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
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"
targetAddressstring

For deliver: the address to file the mail at, as its id or the whole address. Any address of the workspace, on any of its domains.

Can be null1 to 320 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 webhook endpoint id, as listWebhooks shows it.

Can be null1 to 64 characters
rewriteDomainstring

For rewrite: the other domain of the workspace to read the local part on, as its id or its name.

Can be null1 to 253 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

Also available in

API
POST /domains/{id}/routes
TypeScript
domains.createRoute()
Python
domains.create_route()
Ruby
domains.create_route
PHP
domains->createRoute
Go
Domains.CreateRoute
Java
domains().createRoute
C#
Domains.CreateRouteAsync

updateDomainRoute

Scopesdomains:writeThe app's assistant always asks firstToolkitworkspace

Change a pattern route. Pass only what changes. Changing the action needs the field of the new action, and sending forwardTo again asks that address to confirm once more when it has not. An OAuth connection needs a verification code.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
routeIdstringRequired

The route id, as listDomainRoutes shows it (rte_...).

1 to 64 characters
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"
targetAddressstring

For deliver: the address to file the mail at, as its id or the whole address. Any address of the workspace, on any of its domains.

Can be null1 to 320 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 webhook endpoint id, as listWebhooks shows it.

Can be null1 to 64 characters
rewriteDomainstring

For rewrite: the other domain of the workspace to read the local part on, as its id or its name.

Can be null1 to 253 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

Also available in

API
PATCH /domains/{id}/routes/{routeId}
TypeScript
domains.updateRoute()
Python
domains.update_route()
Ruby
domains.update_route
PHP
domains->updateRoute
Go
Domains.UpdateRoute
Java
domains().updateRoute
C#
Domains.UpdateRouteAsync

deleteDomainRoute

Scopesdomains:writeThe app's assistant always asks firstToolkitworkspace

Delete a pattern route. Mail it caught then goes to the next route that matches, or to the catch-all.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
routeIdstringRequired

The route id, as listDomainRoutes shows it (rte_...).

1 to 64 characters

Also available in

API
DELETE /domains/{id}/routes/{routeId}
TypeScript
domains.deleteRoute()
Python
domains.delete_route()
Ruby
domains.delete_route
PHP
domains->deleteRoute
Go
Domains.DeleteRoute
Java
domains().deleteRoute
C#
Domains.DeleteRouteAsync

listGroupMembers

Scopesdomains:readThe app's assistant runs it without askingToolkitworkspace

The group members of a group address: the addresses of the workspace and the outside addresses its mail goes to, and whether each outside one has confirmed. These are not the people who can read the address, which listAddressMembers shows.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters

Also available in

API
GET /domains/{id}/addresses/{addressId}/group-members
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

addGroupMembers

Scopesdomains:writeThe app's assistant always asks firstToolkitworkspace

Add group members to a group address, up to 100 at a time and 1,000 in all. Each entry is an address of the workspace or an address at another provider, which is asked by email to confirm and receives nothing until it does. Groups nest at most three deep. An OAuth connection needs a verification code.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters
membersstring[]Required
1 to 100 items

Also available in

API
POST /domains/{id}/addresses/{addressId}/group-members
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

removeGroupMember

Scopesdomains:writeThe app's assistant always asks firstToolkitworkspace

Remove one group member from a group address, so its mail stops going there.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
addressstringRequired

The address, by its id, by the whole address ([email protected]) or by the part before the @. listDomainAddresses names every one.

1 to 320 characters
memberIdstringRequired

The group member id, as listGroupMembers shows it (grm_...).

1 to 64 characters

Also available in

API
DELETE /domains/{id}/addresses/{addressId}/group-members/{memberId}
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

setDomainAlias

Scopesdomains:writeThe app's assistant asks first unless you asked for itToolkitworkspace

Make a domain an alias of another domain of the workspace, or stop it being one. Mail to local@alias is then handled exactly as local@primary, and local@alias may be used as a From address wherever local@primary may. An alias holds no addresses or routes of its own and has no aliases.

Inputs

domainstringRequired

The domain, by its id or by its name (example.com). listDomains names every one.

1 to 253 characters
aliasOfstringRequired

The primary domain, as its id or its name, or null to stop the domain being an alias.

Can be null1 to 253 characters

Also available in

API
PATCH /domains/{id}
TypeScript
domains.update()
Python
domains.update()
Ruby
domains.update
PHP
domains->update
Go
Domains.Update
Java
domains().update
C#
Domains.UpdateAsync