---
title: "Domains"
description: "Adding domains, the DNS records they need, their logo, their addresses, the web app address and the workspace brand."
url: "https://nextmail.sh/docs/mcp/tools/domains"
area: "MCP server"
category: "Tools"
---

# Domains

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

## Domains tools

| Tool | What it does |
| --- | --- |
| listDomains | The 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. |
| getDomain | Everything about one domain, by id or name, including every DNS record to publish and whether it is found, missing or not checked yet. |
| addDomain | Add a domain and get back the DNS records to publish at its DNS host. |
| verifyDomain | Check a domain’s DNS again now and say which records are still missing. |
| setDomainCatchAll | Turn the catch-all on or off, so either any address on the domain or only its listed addresses take mail. |
| getDomainLogo | The domain’s logo, its mark certificate, what public DNS publishes for it and, for a subdomain, the DMARC of the domain it belongs to. |
| setDomainLogo | Upload the logo inboxes show next to mail from a domain, as SVG. |
| removeDomainLogo | Remove the logo and take its record down. A chat always asks first. |
| setDomainLogoCertificate | Upload the VMC or CMC that Gmail and Apple Mail need before they show the logo. |
| removeDomainLogoCertificate | Remove the mark certificate. A chat always asks first. |
| setDomainDmarcPolicy | Set the DMARC policy to `none`, `quarantine` or `reject`. Inboxes show a logo only at `quarantine` or `reject`. A chat always asks first. |
| removeDomain | Remove a domain and withdraw the records written to a connected DNS host. A chat always asks first. |
| listDomainAddresses | The addresses on one domain, with their label, whether each takes mail, and when it last received any. Returned a page at a time. |
| addDomainAddress | Create an address on a domain, with an optional label. |
| updateDomainAddress | Change an address’s label, whether it takes mail, or both. |
| setAddressPhoto | Upload the photo shown for an address in Nextmail, as base64 with its type. |
| removeAddressPhoto | Remove an address’s photo. A chat always asks first. |
| removeDomainAddress | Remove an address, so it stops taking mail and any sign-in for it ends. A chat always asks first. |
| getAppHost | The web app address of the workspace, whether people can sign in there or it is paused, and the DNS records it needs. |
| setAppHost | Set the web app address, a subdomain such as `mailbox.example.com` on any domain, and get the records to publish. |
| verifyAppHost | Check the web app address again now. |
| removeAppHost | Remove the web app address and sign everyone out of it. A chat always asks first. |
| getBranding | The 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. |
| updateBranding | Change the primary and secondary fonts, or the sign-in background: a preset, a colour or the uploaded photo. |
| setBrandImage | Set the mark, the logo, the logo for dark mode or the sign-in photo from an image in Files. |
| removeBrandImage | Remove one of the brand images, so the default shows in its place. |
| setDomainTrackingHost | Set or remove the tracking host of a domain, the subdomain its tracked links and open pixel go through, and get the record to publish. |
| setDomainStorageHost | Set or remove the files host of a domain, the subdomain its public download links are served from, and get the record to publish. |
| listAddressForwards | Where the mail of an address is forwarded, whether each destination confirmed it, and whether the address keeps a copy here. |
| addAddressForwards | Forward the mail of an address to more places. Each one is asked by email to confirm before it receives anything. |
| setAddressForwardEnabled | Pause a forwarding destination, or switch it back on. |
| removeAddressForward | Stop forwarding to a destination. A chat always asks first. |
| resendAddressForwardConsent | Send a destination that has not answered the email asking it to confirm, once more. |
| setAddressForwardMode | Keep the mail of an address here as well as forwarding it, or only forward it. A chat always asks first. |
| listAddressMembers | Who 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. |
| getAddressLogin | Whether an address has a password of its own to sign in with, and when it was set and last used. |
| removeAddressLogin | Take the password away from an address and sign out whoever used it. A chat always asks first. |
| listDnsConnections | The DNS provider accounts connected to the workspace, with the domains each one serves and the records it keeps there. |
| getDnsConnection | One DNS connection and what disconnecting it would leave behind, including the verified domains that would stop receiving mail. |
| disconnectDnsConnection | Disconnect a DNS provider account and take down the records written through it, or remove one that is already disconnected. A chat always asks first. |
| getDomainDns | How the DNS of a domain is set up, where each kind of record stands, and which connected zone answers for it. |
| setDomainDnsZone | Choose the zone a domain is set up through, when several connected zones could answer for it. |
| syncDomainDns | Write or repair the DNS records a domain needs through its connected zone, as Sync does in the app. |
| getMailAppSettings | The 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. |
| listAppPasswords | The 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. |
| revokeAppPassword | Revoke 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. |
| sendMailAppSetup | Email 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. |
| createAppPassword | Create 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. |
| renameAppPassword | Rename one app password, such as when the device it is for changes. The password itself stays the same and keeps working. |
| updateMailAppSettings | Turn `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. |
| setDomainSenderName | Set 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. |

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

> The workspace’s last domain cannot be removed from here, because removing it deletes the whole mailbox with it. That is done in the app, where it is confirmed first.

> 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. `emptyAudience` never asks for a code. The API Authentication page lists every tool that asks, and shows how to ask for a code and verify it.

> 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 a paid 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. A personal space carries no brand, and 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 the app, because the provider asks the person to sign in. Once one is, these tools read it and write records through it. Disconnecting one needs the whole workspace, and `workspace:manage` in your role unless you own it.

> Reading the mail app settings needs `domains:read`, and turning their connections on or off needs `domains:write`. Listing, creating, renaming and revoking app passwords and emailing a setup link need `members:write`, which a client limited to some addresses or domains never holds. `createAppPassword` shows the password once, in its result, so anyone who can read the chat can read the password. `createAppPassword` and `sendMailAppSetup` 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`

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. One page at a time: when more follow, the last line gives a cursor to pass back for the next page.

- Scopes: `domains:read`.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `limit` (`integer`, at least 1, at most 100)
- `cursor` (`string`)

Also available in: API [`GET /domains`](https://nextmail.sh/docs/api/reference/domains#get-domains), [`GET /domains/{id}`](https://nextmail.sh/docs/api/reference/domains#get-domains-id), [`GET /roles`](https://nextmail.sh/docs/api/reference/roles#get-roles), [`GET /roles/permissions`](https://nextmail.sh/docs/api/reference/roles#get-roles-permissions); TypeScript [`nextmail.domains.list()`](https://nextmail.sh/docs/sdk/reference/domains#list), [`nextmail.domains.listAll()`](https://nextmail.sh/docs/sdk/reference/domains#listAll), [`nextmail.domains.iterate()`](https://nextmail.sh/docs/sdk/reference/domains#iterate), [`nextmail.domains.get()`](https://nextmail.sh/docs/sdk/reference/domains#get), [`nextmail.roles.list()`](https://nextmail.sh/docs/sdk/reference/roles#list), [`nextmail.roles.listAll()`](https://nextmail.sh/docs/sdk/reference/roles#listAll), [`nextmail.roles.iterate()`](https://nextmail.sh/docs/sdk/reference/roles#iterate), [`nextmail.roles.listPermissions()`](https://nextmail.sh/docs/sdk/reference/roles#listPermissions); Python [`domains.list()`](https://nextmail.sh/docs/python/reference/domains#list), [`domains.list_all()`](https://nextmail.sh/docs/python/reference/domains#listAll), [`domains.iterate()`](https://nextmail.sh/docs/python/reference/domains#iterate), [`domains.get()`](https://nextmail.sh/docs/python/reference/domains#get), [`roles.list()`](https://nextmail.sh/docs/python/reference/roles#list), [`roles.list_all()`](https://nextmail.sh/docs/python/reference/roles#listAll), [`roles.iterate()`](https://nextmail.sh/docs/python/reference/roles#iterate), [`roles.list_permissions()`](https://nextmail.sh/docs/python/reference/roles#listPermissions); Ruby [`domains.list`](https://nextmail.sh/docs/ruby/reference/domains#list), [`domains.list_all`](https://nextmail.sh/docs/ruby/reference/domains#listAll), [`domains.iterate`](https://nextmail.sh/docs/ruby/reference/domains#iterate), [`domains.get`](https://nextmail.sh/docs/ruby/reference/domains#get), [`roles.list`](https://nextmail.sh/docs/ruby/reference/roles#list), [`roles.list_all`](https://nextmail.sh/docs/ruby/reference/roles#listAll), [`roles.iterate`](https://nextmail.sh/docs/ruby/reference/roles#iterate), [`roles.list_permissions`](https://nextmail.sh/docs/ruby/reference/roles#listPermissions); PHP [`domains->list`](https://nextmail.sh/docs/php/reference/domains#list), [`domains->listAll`](https://nextmail.sh/docs/php/reference/domains#listAll), [`domains->iterate`](https://nextmail.sh/docs/php/reference/domains#iterate), [`domains->get`](https://nextmail.sh/docs/php/reference/domains#get), [`roles->list`](https://nextmail.sh/docs/php/reference/roles#list), [`roles->listAll`](https://nextmail.sh/docs/php/reference/roles#listAll), [`roles->iterate`](https://nextmail.sh/docs/php/reference/roles#iterate), [`roles->listPermissions`](https://nextmail.sh/docs/php/reference/roles#listPermissions); Go [`Domains.List`](https://nextmail.sh/docs/go/reference/domains#list), [`Domains.ListAll`](https://nextmail.sh/docs/go/reference/domains#listAll), [`Domains.Iterate`](https://nextmail.sh/docs/go/reference/domains#iterate), [`Domains.Get`](https://nextmail.sh/docs/go/reference/domains#get), [`Roles.List`](https://nextmail.sh/docs/go/reference/roles#list), [`Roles.ListAll`](https://nextmail.sh/docs/go/reference/roles#listAll), [`Roles.Iterate`](https://nextmail.sh/docs/go/reference/roles#iterate), [`Roles.ListPermissions`](https://nextmail.sh/docs/go/reference/roles#listPermissions); Java [`domains().list`](https://nextmail.sh/docs/java/reference/domains#list), [`domains().listAll`](https://nextmail.sh/docs/java/reference/domains#listAll), [`domains().iterate`](https://nextmail.sh/docs/java/reference/domains#iterate), [`domains().get`](https://nextmail.sh/docs/java/reference/domains#get), [`roles().list`](https://nextmail.sh/docs/java/reference/roles#list), [`roles().listAll`](https://nextmail.sh/docs/java/reference/roles#listAll), [`roles().iterate`](https://nextmail.sh/docs/java/reference/roles#iterate), [`roles().listPermissions`](https://nextmail.sh/docs/java/reference/roles#listPermissions); C# [`Domains.ListAsync`](https://nextmail.sh/docs/csharp/reference/domains#list), [`Domains.ListAllAsync`](https://nextmail.sh/docs/csharp/reference/domains#listAll), [`Domains.IterateAsync`](https://nextmail.sh/docs/csharp/reference/domains#iterate), [`Domains.GetAsync`](https://nextmail.sh/docs/csharp/reference/domains#get), [`Roles.ListAsync`](https://nextmail.sh/docs/csharp/reference/roles#list), [`Roles.ListAllAsync`](https://nextmail.sh/docs/csharp/reference/roles#listAll), [`Roles.IterateAsync`](https://nextmail.sh/docs/csharp/reference/roles#iterate), [`Roles.ListPermissionsAsync`](https://nextmail.sh/docs/csharp/reference/roles#listPermissions).

### `getDomain`

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

- Scopes: `domains:read`.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.

Also available in: API [`GET /domains`](https://nextmail.sh/docs/api/reference/domains#get-domains), [`GET /domains/{id}`](https://nextmail.sh/docs/api/reference/domains#get-domains-id); TypeScript [`nextmail.domains.list()`](https://nextmail.sh/docs/sdk/reference/domains#list), [`nextmail.domains.listAll()`](https://nextmail.sh/docs/sdk/reference/domains#listAll), [`nextmail.domains.iterate()`](https://nextmail.sh/docs/sdk/reference/domains#iterate), [`nextmail.domains.get()`](https://nextmail.sh/docs/sdk/reference/domains#get); Python [`domains.list()`](https://nextmail.sh/docs/python/reference/domains#list), [`domains.list_all()`](https://nextmail.sh/docs/python/reference/domains#listAll), [`domains.iterate()`](https://nextmail.sh/docs/python/reference/domains#iterate), [`domains.get()`](https://nextmail.sh/docs/python/reference/domains#get); Ruby [`domains.list`](https://nextmail.sh/docs/ruby/reference/domains#list), [`domains.list_all`](https://nextmail.sh/docs/ruby/reference/domains#listAll), [`domains.iterate`](https://nextmail.sh/docs/ruby/reference/domains#iterate), [`domains.get`](https://nextmail.sh/docs/ruby/reference/domains#get); PHP [`domains->list`](https://nextmail.sh/docs/php/reference/domains#list), [`domains->listAll`](https://nextmail.sh/docs/php/reference/domains#listAll), [`domains->iterate`](https://nextmail.sh/docs/php/reference/domains#iterate), [`domains->get`](https://nextmail.sh/docs/php/reference/domains#get); Go [`Domains.List`](https://nextmail.sh/docs/go/reference/domains#list), [`Domains.ListAll`](https://nextmail.sh/docs/go/reference/domains#listAll), [`Domains.Iterate`](https://nextmail.sh/docs/go/reference/domains#iterate), [`Domains.Get`](https://nextmail.sh/docs/go/reference/domains#get); Java [`domains().list`](https://nextmail.sh/docs/java/reference/domains#list), [`domains().listAll`](https://nextmail.sh/docs/java/reference/domains#listAll), [`domains().iterate`](https://nextmail.sh/docs/java/reference/domains#iterate), [`domains().get`](https://nextmail.sh/docs/java/reference/domains#get); C# [`Domains.ListAsync`](https://nextmail.sh/docs/csharp/reference/domains#list), [`Domains.ListAllAsync`](https://nextmail.sh/docs/csharp/reference/domains#listAll), [`Domains.IterateAsync`](https://nextmail.sh/docs/csharp/reference/domains#iterate), [`Domains.GetAsync`](https://nextmail.sh/docs/csharp/reference/domains#get).

### `addDomain`

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.

- Scopes: `domains:write`.
- The app's assistant asks first unless you asked for it.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required): The bare domain, e.g. example.com

Also available in: API [`POST /domains`](https://nextmail.sh/docs/api/reference/domains#post-domains); TypeScript [`nextmail.domains.create()`](https://nextmail.sh/docs/sdk/reference/domains#create); Python [`domains.create()`](https://nextmail.sh/docs/python/reference/domains#create); Ruby [`domains.create`](https://nextmail.sh/docs/ruby/reference/domains#create); PHP [`domains->create`](https://nextmail.sh/docs/php/reference/domains#create); Go [`Domains.Create`](https://nextmail.sh/docs/go/reference/domains#create); Java [`domains().create`](https://nextmail.sh/docs/java/reference/domains#create); C# [`Domains.CreateAsync`](https://nextmail.sh/docs/csharp/reference/domains#create).

### `verifyDomain`

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.

- Scopes: `domains:write`.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.

Also available in: API [`POST /domains/{id}/verify`](https://nextmail.sh/docs/api/reference/domains#post-domains-id-verify); TypeScript [`nextmail.domains.verify()`](https://nextmail.sh/docs/sdk/reference/domains#verify); Python [`domains.verify()`](https://nextmail.sh/docs/python/reference/domains#verify); Ruby [`domains.verify`](https://nextmail.sh/docs/ruby/reference/domains#verify); PHP [`domains->verify`](https://nextmail.sh/docs/php/reference/domains#verify); Go [`Domains.Verify`](https://nextmail.sh/docs/go/reference/domains#verify); Java [`domains().verify`](https://nextmail.sh/docs/java/reference/domains#verify); C# [`Domains.VerifyAsync`](https://nextmail.sh/docs/csharp/reference/domains#verify).

### `setDomainCatchAll`

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.

- Scopes: `domains:write`.
- The app's assistant asks first unless you asked for it.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `catchAll` (`boolean`, required)

Also available in: API [`PATCH /domains/{id}`](https://nextmail.sh/docs/api/reference/domains#patch-domains-id); TypeScript [`nextmail.domains.update()`](https://nextmail.sh/docs/sdk/reference/domains#update); Python [`domains.update()`](https://nextmail.sh/docs/python/reference/domains#update); Ruby [`domains.update`](https://nextmail.sh/docs/ruby/reference/domains#update); PHP [`domains->update`](https://nextmail.sh/docs/php/reference/domains#update); Go [`Domains.Update`](https://nextmail.sh/docs/go/reference/domains#update); Java [`domains().update`](https://nextmail.sh/docs/java/reference/domains#update); C# [`Domains.UpdateAsync`](https://nextmail.sh/docs/csharp/reference/domains#update).

### `getDomainLogo`

The brand logo inboxes show next to mail from one domain (BIMI): the logo, its record and whether public DNS answers with it right now, the mark certificate, and the DMARC policy. For a subdomain it also reads the DMARC record of its parent domain, which Nextmail never changes. Inboxes show the logo only once the DMARC policy of the domain quarantines or rejects (setDomainDmarcPolicy), and for a subdomain only once the DMARC record of its parent domain does too. Gmail also needs a Verified or Common Mark Certificate (setDomainLogoCertificate), and Apple Mail a Verified one.

- Scopes: `domains:read`.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.

Also available in: API [`GET /domains/{id}/logo`](https://nextmail.sh/docs/api/reference/domains#get-domains-id-logo); TypeScript [`nextmail.domains.getLogo()`](https://nextmail.sh/docs/sdk/reference/domains#getLogo); Python [`domains.get_logo()`](https://nextmail.sh/docs/python/reference/domains#getLogo); Ruby [`domains.get_logo`](https://nextmail.sh/docs/ruby/reference/domains#getLogo); PHP [`domains->getLogo`](https://nextmail.sh/docs/php/reference/domains#getLogo); Go [`Domains.GetLogo`](https://nextmail.sh/docs/go/reference/domains#getLogo); Java [`domains().getLogo`](https://nextmail.sh/docs/java/reference/domains#getLogo); C# [`Domains.GetLogoAsync`](https://nextmail.sh/docs/csharp/reference/domains#getLogo).

### `setDomainLogo`

Set the brand logo inboxes show next to mail from a domain (BIMI), replacing any there was. Pass the whole SVG file as svg. It is converted to the SVG Tiny PS format inboxes require: CSS becomes attributes, the shape is made square and titled after the workspace, and anything inboxes do not draw is refused with the reason. Where Nextmail writes the DNS of the domain it publishes the logo record too, and otherwise the answer gives the record to publish. The domain has to be verified. Inboxes show the logo only once the DMARC policy of the domain quarantines or rejects (setDomainDmarcPolicy), and for a subdomain only once the DMARC record of its parent domain does too. Gmail also needs a Verified or Common Mark Certificate (setDomainLogoCertificate), and Apple Mail a Verified one.

- Scopes: `domains:write`.
- The app's assistant asks first unless you asked for it.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `svg` (`string`, required, 1 to 1048576 characters): The logo, the whole SVG file as text.

Also available in: API [`PUT /domains/{id}/logo`](https://nextmail.sh/docs/api/reference/domains#put-domains-id-logo); TypeScript [`nextmail.domains.setLogo()`](https://nextmail.sh/docs/sdk/reference/domains#setLogo); Python [`domains.set_logo()`](https://nextmail.sh/docs/python/reference/domains#setLogo); Ruby [`domains.set_logo`](https://nextmail.sh/docs/ruby/reference/domains#setLogo); PHP [`domains->setLogo`](https://nextmail.sh/docs/php/reference/domains#setLogo); Go [`Domains.SetLogo`](https://nextmail.sh/docs/go/reference/domains#setLogo); Java [`domains().setLogo`](https://nextmail.sh/docs/java/reference/domains#setLogo); C# [`Domains.SetLogoAsync`](https://nextmail.sh/docs/csharp/reference/domains#setLogo).

### `removeDomainLogo`

Remove the brand logo of a domain and delete the stored file. Where Nextmail writes the DNS of the domain it takes the logo record down too, and otherwise the answer names the record to remove. Any mark certificate stays, ready for the next logo. Removing a logo from a domain that has none changes nothing.

- Scopes: `domains:write`.
- The app's assistant always asks first.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.

Also available in: API [`DELETE /domains/{id}/logo`](https://nextmail.sh/docs/api/reference/domains#delete-domains-id-logo); TypeScript [`nextmail.domains.removeLogo()`](https://nextmail.sh/docs/sdk/reference/domains#removeLogo); Python [`domains.remove_logo()`](https://nextmail.sh/docs/python/reference/domains#removeLogo); Ruby [`domains.remove_logo`](https://nextmail.sh/docs/ruby/reference/domains#removeLogo); PHP [`domains->removeLogo`](https://nextmail.sh/docs/php/reference/domains#removeLogo); Go [`Domains.RemoveLogo`](https://nextmail.sh/docs/go/reference/domains#removeLogo); Java [`domains().removeLogo`](https://nextmail.sh/docs/java/reference/domains#removeLogo); C# [`Domains.RemoveLogoAsync`](https://nextmail.sh/docs/csharp/reference/domains#removeLogo).

### `setDomainLogoCertificate`

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.

- Scopes: `domains:write`.
- The app's assistant asks first unless you asked for it.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `certificate` (`string`, required, 1 to 175020 characters): The certificate file: PEM text as it came, or a DER or PKCS #7 file in base64.

Also available in: API [`PUT /domains/{id}/logo/certificate`](https://nextmail.sh/docs/api/reference/domains#put-domains-id-logo-certificate); TypeScript [`nextmail.domains.setLogoCertificate()`](https://nextmail.sh/docs/sdk/reference/domains#setLogoCertificate); Python [`domains.set_logo_certificate()`](https://nextmail.sh/docs/python/reference/domains#setLogoCertificate); Ruby [`domains.set_logo_certificate`](https://nextmail.sh/docs/ruby/reference/domains#setLogoCertificate); PHP [`domains->setLogoCertificate`](https://nextmail.sh/docs/php/reference/domains#setLogoCertificate); Go [`Domains.SetLogoCertificate`](https://nextmail.sh/docs/go/reference/domains#setLogoCertificate); Java [`domains().setLogoCertificate`](https://nextmail.sh/docs/java/reference/domains#setLogoCertificate); C# [`Domains.SetLogoCertificateAsync`](https://nextmail.sh/docs/csharp/reference/domains#setLogoCertificate).

### `removeDomainLogoCertificate`

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.

- Scopes: `domains:write`.
- The app's assistant always asks first.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.

Also available in: API [`DELETE /domains/{id}/logo/certificate`](https://nextmail.sh/docs/api/reference/domains#delete-domains-id-logo-certificate); TypeScript [`nextmail.domains.removeLogoCertificate()`](https://nextmail.sh/docs/sdk/reference/domains#removeLogoCertificate); Python [`domains.remove_logo_certificate()`](https://nextmail.sh/docs/python/reference/domains#removeLogoCertificate); Ruby [`domains.remove_logo_certificate`](https://nextmail.sh/docs/ruby/reference/domains#removeLogoCertificate); PHP [`domains->removeLogoCertificate`](https://nextmail.sh/docs/php/reference/domains#removeLogoCertificate); Go [`Domains.RemoveLogoCertificate`](https://nextmail.sh/docs/go/reference/domains#removeLogoCertificate); Java [`domains().removeLogoCertificate`](https://nextmail.sh/docs/java/reference/domains#removeLogoCertificate); C# [`Domains.RemoveLogoCertificateAsync`](https://nextmail.sh/docs/csharp/reference/domains#removeLogoCertificate).

### `setDomainDmarcPolicy`

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.

- Scopes: `domains:write`.
- The app's assistant always asks first.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `dmarcPolicy` (`string`, required, one of `"none"`, `"quarantine"`, `"reject"`): none to only monitor, quarantine to send failing mail to spam, reject to refuse it.

Also available in: API [`PATCH /domains/{id}`](https://nextmail.sh/docs/api/reference/domains#patch-domains-id); TypeScript [`nextmail.domains.update()`](https://nextmail.sh/docs/sdk/reference/domains#update); Python [`domains.update()`](https://nextmail.sh/docs/python/reference/domains#update); Ruby [`domains.update`](https://nextmail.sh/docs/ruby/reference/domains#update); PHP [`domains->update`](https://nextmail.sh/docs/php/reference/domains#update); Go [`Domains.Update`](https://nextmail.sh/docs/go/reference/domains#update); Java [`domains().update`](https://nextmail.sh/docs/java/reference/domains#update); C# [`Domains.UpdateAsync`](https://nextmail.sh/docs/csharp/reference/domains#update).

### `removeDomain`

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. The last domain of a workspace cannot be removed here, because that deletes the whole mailbox; that is done in the app. This cannot be undone. Anybody but the workspace owner also needs a role that may remove domains (workspace:manage).

- Scopes: `domains:write`.
- The app's assistant always asks first.
- Asks for a verification code, the same as [`DELETE /domains/{id}`](https://nextmail.sh/docs/api/reference/domains#delete-domains-id).
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.

Also available in: API [`DELETE /domains/{id}`](https://nextmail.sh/docs/api/reference/domains#delete-domains-id); TypeScript [`nextmail.domains.delete()`](https://nextmail.sh/docs/sdk/reference/domains#delete); Python [`domains.delete()`](https://nextmail.sh/docs/python/reference/domains#delete); Ruby [`domains.delete`](https://nextmail.sh/docs/ruby/reference/domains#delete); PHP [`domains->delete`](https://nextmail.sh/docs/php/reference/domains#delete); Go [`Domains.Delete`](https://nextmail.sh/docs/go/reference/domains#delete); Java [`domains().delete`](https://nextmail.sh/docs/java/reference/domains#delete); C# [`Domains.DeleteAsync`](https://nextmail.sh/docs/csharp/reference/domains#delete).

### `listDomainAddresses`

The addresses listed on one domain, by address: the label, whether each takes mail, and when it last received any. With the catch-all on, unlisted addresses take mail too. One page at a time: when more follow, the last line gives a cursor to pass back for the next page.

- Scopes: `domains:read`.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `limit` (`integer`, at least 1, at most 100)
- `cursor` (`string`)

Also available in: API [`GET /domains/{id}/addresses`](https://nextmail.sh/docs/api/reference/domains#get-domains-id-addresses); TypeScript [`nextmail.domains.listAddresses()`](https://nextmail.sh/docs/sdk/reference/domains#listAddresses), [`nextmail.domains.listAllAddresses()`](https://nextmail.sh/docs/sdk/reference/domains#listAllAddresses), [`nextmail.domains.iterateAddresses()`](https://nextmail.sh/docs/sdk/reference/domains#iterateAddresses); Python [`domains.list_addresses()`](https://nextmail.sh/docs/python/reference/domains#listAddresses), [`domains.list_all_addresses()`](https://nextmail.sh/docs/python/reference/domains#listAllAddresses), [`domains.iterate_addresses()`](https://nextmail.sh/docs/python/reference/domains#iterateAddresses); Ruby [`domains.list_addresses`](https://nextmail.sh/docs/ruby/reference/domains#listAddresses), [`domains.list_all_addresses`](https://nextmail.sh/docs/ruby/reference/domains#listAllAddresses), [`domains.iterate_addresses`](https://nextmail.sh/docs/ruby/reference/domains#iterateAddresses); PHP [`domains->listAddresses`](https://nextmail.sh/docs/php/reference/domains#listAddresses), [`domains->listAllAddresses`](https://nextmail.sh/docs/php/reference/domains#listAllAddresses), [`domains->iterateAddresses`](https://nextmail.sh/docs/php/reference/domains#iterateAddresses); Go [`Domains.ListAddresses`](https://nextmail.sh/docs/go/reference/domains#listAddresses), [`Domains.ListAllAddresses`](https://nextmail.sh/docs/go/reference/domains#listAllAddresses), [`Domains.IterateAddresses`](https://nextmail.sh/docs/go/reference/domains#iterateAddresses); Java [`domains().listAddresses`](https://nextmail.sh/docs/java/reference/domains#listAddresses), [`domains().listAllAddresses`](https://nextmail.sh/docs/java/reference/domains#listAllAddresses), [`domains().iterateAddresses`](https://nextmail.sh/docs/java/reference/domains#iterateAddresses); C# [`Domains.ListAddressesAsync`](https://nextmail.sh/docs/csharp/reference/domains#listAddresses), [`Domains.ListAllAddressesAsync`](https://nextmail.sh/docs/csharp/reference/domains#listAllAddresses), [`Domains.IterateAddressesAsync`](https://nextmail.sh/docs/csharp/reference/domains#iterateAddresses).

### `addDomainAddress`

Add an address to a domain, such as sales on example.com, with an optional label. 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.

- Scopes: `domains:write`.
- The app's assistant asks first unless you asked for it.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `localPart` (`string`, required, 1 to 64 characters, pattern `^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*$`): The part before the @, e.g. sales
- `label` (`string`, up to 120 characters)

Also available in: API [`POST /domains/{id}/addresses`](https://nextmail.sh/docs/api/reference/domains#post-domains-id-addresses); TypeScript [`nextmail.domains.createAddress()`](https://nextmail.sh/docs/sdk/reference/domains#createAddress); Python [`domains.create_address()`](https://nextmail.sh/docs/python/reference/domains#createAddress); Ruby [`domains.create_address`](https://nextmail.sh/docs/ruby/reference/domains#createAddress); PHP [`domains->createAddress`](https://nextmail.sh/docs/php/reference/domains#createAddress); Go [`Domains.CreateAddress`](https://nextmail.sh/docs/go/reference/domains#createAddress); Java [`domains().createAddress`](https://nextmail.sh/docs/java/reference/domains#createAddress); C# [`Domains.CreateAddressAsync`](https://nextmail.sh/docs/csharp/reference/domains#createAddress).

### `updateDomainAddress`

Change an address on a domain: its label, whether it takes mail, or both. A disabled address keeps its settings, and enabling it again restores it. An empty label clears it.

- Scopes: `domains:write`.
- The app's assistant asks first unless you asked for it.
- Asks for a verification code only when it sets a forwarding mode, the same as [`PATCH /domains/{id}/addresses/{addressId}`](https://nextmail.sh/docs/api/reference/domains#patch-domains-id-addresses-addressid).
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `address` (`string`, required, 1 to 320 characters): The address, by its id, by the whole address (sales@example.com) or by the part before the @. listDomainAddresses names every one.
- `label` (`string`, nullable, up to 120 characters)
- `enabled` (`boolean`)

Also available in: API [`PATCH /domains/{id}/addresses/{addressId}`](https://nextmail.sh/docs/api/reference/domains#patch-domains-id-addresses-addressid); TypeScript [`nextmail.domains.updateAddress()`](https://nextmail.sh/docs/sdk/reference/domains#updateAddress); Python [`domains.update_address()`](https://nextmail.sh/docs/python/reference/domains#updateAddress); Ruby [`domains.update_address`](https://nextmail.sh/docs/ruby/reference/domains#updateAddress); PHP [`domains->updateAddress`](https://nextmail.sh/docs/php/reference/domains#updateAddress); Go [`Domains.UpdateAddress`](https://nextmail.sh/docs/go/reference/domains#updateAddress); Java [`domains().updateAddress`](https://nextmail.sh/docs/java/reference/domains#updateAddress); C# [`Domains.UpdateAddressAsync`](https://nextmail.sh/docs/csharp/reference/domains#updateAddress).

### `setAddressPhoto`

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, up to 5MB. It is cropped to a square and stored as JPEG or PNG.

- Scopes: `domains:write`.
- The app's assistant asks first unless you asked for it.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `address` (`string`, required, 1 to 320 characters): The address, by its id, by the whole address (sales@example.com) or by the part before the @. listDomainAddresses names every one.
- `image` (`string`, required, 1 to 7340032 characters): The image in base64, or as a data: URL.
- `contentType` (`string`, required, 1 to 100 characters): The type of the image: image/png, image/jpeg, image/webp, image/gif.

Also available in: API [`PUT /domains/{id}/addresses/{addressId}/photo`](https://nextmail.sh/docs/api/reference/domains#put-domains-id-addresses-addressid-photo); TypeScript [`nextmail.domains.setAddressPhoto()`](https://nextmail.sh/docs/sdk/reference/domains#setAddressPhoto); Python [`domains.set_address_photo()`](https://nextmail.sh/docs/python/reference/domains#setAddressPhoto); Ruby [`domains.set_address_photo`](https://nextmail.sh/docs/ruby/reference/domains#setAddressPhoto); PHP [`domains->setAddressPhoto`](https://nextmail.sh/docs/php/reference/domains#setAddressPhoto); Go [`Domains.SetAddressPhoto`](https://nextmail.sh/docs/go/reference/domains#setAddressPhoto); Java [`domains().setAddressPhoto`](https://nextmail.sh/docs/java/reference/domains#setAddressPhoto); C# [`Domains.SetAddressPhotoAsync`](https://nextmail.sh/docs/csharp/reference/domains#setAddressPhoto).

### `removeAddressPhoto`

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.

- Scopes: `domains:write`.
- The app's assistant always asks first.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `address` (`string`, required, 1 to 320 characters): The address, by its id, by the whole address (sales@example.com) or by the part before the @. listDomainAddresses names every one.

Also available in: API [`DELETE /domains/{id}/addresses/{addressId}/photo`](https://nextmail.sh/docs/api/reference/domains#delete-domains-id-addresses-addressid-photo); TypeScript [`nextmail.domains.removeAddressPhoto()`](https://nextmail.sh/docs/sdk/reference/domains#removeAddressPhoto); Python [`domains.remove_address_photo()`](https://nextmail.sh/docs/python/reference/domains#removeAddressPhoto); Ruby [`domains.remove_address_photo`](https://nextmail.sh/docs/ruby/reference/domains#removeAddressPhoto); PHP [`domains->removeAddressPhoto`](https://nextmail.sh/docs/php/reference/domains#removeAddressPhoto); Go [`Domains.RemoveAddressPhoto`](https://nextmail.sh/docs/go/reference/domains#removeAddressPhoto); Java [`domains().removeAddressPhoto`](https://nextmail.sh/docs/java/reference/domains#removeAddressPhoto); C# [`Domains.RemoveAddressPhotoAsync`](https://nextmail.sh/docs/csharp/reference/domains#removeAddressPhoto).

### `removeDomainAddress`

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

- Scopes: `domains:write`.
- The app's assistant always asks first.
- Asks for a verification code, the same as [`DELETE /domains/{id}/addresses/{addressId}`](https://nextmail.sh/docs/api/reference/domains#delete-domains-id-addresses-addressid).
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `address` (`string`, required, 1 to 320 characters): The address, by its id, by the whole address (sales@example.com) or by the part before the @. listDomainAddresses names every one.

Also available in: API [`DELETE /domains/{id}/addresses/{addressId}`](https://nextmail.sh/docs/api/reference/domains#delete-domains-id-addresses-addressid); TypeScript [`nextmail.domains.deleteAddress()`](https://nextmail.sh/docs/sdk/reference/domains#deleteAddress); Python [`domains.delete_address()`](https://nextmail.sh/docs/python/reference/domains#deleteAddress); Ruby [`domains.delete_address`](https://nextmail.sh/docs/ruby/reference/domains#deleteAddress); PHP [`domains->deleteAddress`](https://nextmail.sh/docs/php/reference/domains#deleteAddress); Go [`Domains.DeleteAddress`](https://nextmail.sh/docs/go/reference/domains#deleteAddress); Java [`domains().deleteAddress`](https://nextmail.sh/docs/java/reference/domains#deleteAddress); C# [`Domains.DeleteAddressAsync`](https://nextmail.sh/docs/csharp/reference/domains#deleteAddress).

### `getAppHost`

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.

- Scopes: `domains:read`.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

Takes no input.

Also available in: API [`GET /app-host`](https://nextmail.sh/docs/api/reference/domains#get-app-host); TypeScript [`nextmail.appHost.get()`](https://nextmail.sh/docs/sdk/reference/app-host#get); Python [`app_host.get()`](https://nextmail.sh/docs/python/reference/app-host#get); Ruby [`app_host.get`](https://nextmail.sh/docs/ruby/reference/app-host#get); PHP [`appHost->get`](https://nextmail.sh/docs/php/reference/app-host#get); Go [`AppHost.Get`](https://nextmail.sh/docs/go/reference/app-host#get); Java [`appHost().get`](https://nextmail.sh/docs/java/reference/app-host#get); C# [`AppHost.GetAsync`](https://nextmail.sh/docs/csharp/reference/app-host#get).

### `setAppHost`

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 a paid plan. Setting the address it already has checks it again.

- Scopes: `domains:write`.
- The app's assistant asks first unless you asked for it.
- Asks for a verification code only when it replaces the web app address, the same as [`PUT /app-host`](https://nextmail.sh/docs/api/reference/domains#put-app-host).
- Toolkit: `workspace`.

**Inputs**

- `host` (`string`, required, 1 to 253 characters): The subdomain, e.g. mailbox.example.com, on any domain.

Also available in: API [`DELETE /app-host`](https://nextmail.sh/docs/api/reference/domains#delete-app-host), [`PUT /app-host`](https://nextmail.sh/docs/api/reference/domains#put-app-host); TypeScript [`nextmail.appHost.delete()`](https://nextmail.sh/docs/sdk/reference/app-host#delete), [`nextmail.appHost.set()`](https://nextmail.sh/docs/sdk/reference/app-host#set); Python [`app_host.delete()`](https://nextmail.sh/docs/python/reference/app-host#delete), [`app_host.set()`](https://nextmail.sh/docs/python/reference/app-host#set); Ruby [`app_host.delete`](https://nextmail.sh/docs/ruby/reference/app-host#delete), [`app_host.set`](https://nextmail.sh/docs/ruby/reference/app-host#set); PHP [`appHost->delete`](https://nextmail.sh/docs/php/reference/app-host#delete), [`appHost->set`](https://nextmail.sh/docs/php/reference/app-host#set); Go [`AppHost.Delete`](https://nextmail.sh/docs/go/reference/app-host#delete), [`AppHost.Set`](https://nextmail.sh/docs/go/reference/app-host#set); Java [`appHost().delete`](https://nextmail.sh/docs/java/reference/app-host#delete), [`appHost().set`](https://nextmail.sh/docs/java/reference/app-host#set); C# [`AppHost.DeleteAsync`](https://nextmail.sh/docs/csharp/reference/app-host#delete), [`AppHost.SetAsync`](https://nextmail.sh/docs/csharp/reference/app-host#set).

### `verifyAppHost`

Check the web app address of this workspace again now: whether its DNS records answer and its certificate is issued. A check made in the last few seconds is reused rather than repeated.

- Scopes: `domains:write`.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

Takes no input.

Also available in: API [`POST /app-host/verify`](https://nextmail.sh/docs/api/reference/domains#post-app-host-verify); TypeScript [`nextmail.appHost.verify()`](https://nextmail.sh/docs/sdk/reference/app-host#verify); Python [`app_host.verify()`](https://nextmail.sh/docs/python/reference/app-host#verify); Ruby [`app_host.verify`](https://nextmail.sh/docs/ruby/reference/app-host#verify); PHP [`appHost->verify`](https://nextmail.sh/docs/php/reference/app-host#verify); Go [`AppHost.Verify`](https://nextmail.sh/docs/go/reference/app-host#verify); Java [`appHost().verify`](https://nextmail.sh/docs/java/reference/app-host#verify); C# [`AppHost.VerifyAsync`](https://nextmail.sh/docs/csharp/reference/app-host#verify).

### `removeAppHost`

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.

- Scopes: `domains:write`.
- The app's assistant always asks first.
- Asks for a verification code, the same as [`DELETE /app-host`](https://nextmail.sh/docs/api/reference/domains#delete-app-host).
- Toolkit: `workspace`.

**Inputs**

Takes no input.

Also available in: API [`DELETE /app-host`](https://nextmail.sh/docs/api/reference/domains#delete-app-host), [`PUT /app-host`](https://nextmail.sh/docs/api/reference/domains#put-app-host); TypeScript [`nextmail.appHost.delete()`](https://nextmail.sh/docs/sdk/reference/app-host#delete), [`nextmail.appHost.set()`](https://nextmail.sh/docs/sdk/reference/app-host#set); Python [`app_host.delete()`](https://nextmail.sh/docs/python/reference/app-host#delete), [`app_host.set()`](https://nextmail.sh/docs/python/reference/app-host#set); Ruby [`app_host.delete`](https://nextmail.sh/docs/ruby/reference/app-host#delete), [`app_host.set`](https://nextmail.sh/docs/ruby/reference/app-host#set); PHP [`appHost->delete`](https://nextmail.sh/docs/php/reference/app-host#delete), [`appHost->set`](https://nextmail.sh/docs/php/reference/app-host#set); Go [`AppHost.Delete`](https://nextmail.sh/docs/go/reference/app-host#delete), [`AppHost.Set`](https://nextmail.sh/docs/go/reference/app-host#set); Java [`appHost().delete`](https://nextmail.sh/docs/java/reference/app-host#delete), [`appHost().set`](https://nextmail.sh/docs/java/reference/app-host#set); C# [`AppHost.DeleteAsync`](https://nextmail.sh/docs/csharp/reference/app-host#delete), [`AppHost.SetAsync`](https://nextmail.sh/docs/csharp/reference/app-host#set).

### `getBranding`

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). A personal space carries no brand.

- Scopes: `settings:read`.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

Takes no input.

Also available in: API [`GET /branding`](https://nextmail.sh/docs/api/reference/settings#get-branding); TypeScript [`nextmail.branding.get()`](https://nextmail.sh/docs/sdk/reference/branding#get); Python [`branding.get()`](https://nextmail.sh/docs/python/reference/branding#get); Ruby [`branding.get`](https://nextmail.sh/docs/ruby/reference/branding#get); PHP [`branding->get`](https://nextmail.sh/docs/php/reference/branding#get); Go [`Branding.Get`](https://nextmail.sh/docs/go/reference/branding#get); Java [`branding().get`](https://nextmail.sh/docs/java/reference/branding#get); C# [`Branding.GetAsync`](https://nextmail.sh/docs/csharp/reference/branding#get).

### `updateBranding`

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.

- Scopes: `settings:write`.
- The app's assistant asks first unless you asked for it.
- Toolkit: `workspace`.

**Inputs**

- `fonts` (`object`): 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.
  - `primary` (`string`, nullable, one 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"`)
  - `secondary` (`string`, nullable, one 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"`)
- `loginBackground` (`object`, nullable): 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.
  - `kind` (`string`, required, one of `"preset"`, `"color"`, `"image"`)
  - `preset` (`string`, nullable, one of `"dusk"`, `"mist"`, `"sand"`, `"night"`, `"meadow"`, `"dots"`, `"brush"`, `"trail"`, `"ember"`, `"canvas"`, `"bloom"`, `"field"`, `"wanderer"`, `"gold"`)
  - `color` (`string`, nullable, pattern `^#[0-9a-f]{6}$`)
  - `logo` (`string`, nullable, one of `"dark"`, `"light"`)

Also available in: API [`PATCH /branding`](https://nextmail.sh/docs/api/reference/settings#patch-branding); TypeScript [`nextmail.branding.update()`](https://nextmail.sh/docs/sdk/reference/branding#update); Python [`branding.update()`](https://nextmail.sh/docs/python/reference/branding#update); Ruby [`branding.update`](https://nextmail.sh/docs/ruby/reference/branding#update); PHP [`branding->update`](https://nextmail.sh/docs/php/reference/branding#update); Go [`Branding.Update`](https://nextmail.sh/docs/go/reference/branding#update); Java [`branding().update`](https://nextmail.sh/docs/java/reference/branding#update); C# [`Branding.UpdateAsync`](https://nextmail.sh/docs/csharp/reference/branding#update).

### `setBrandImage`

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 5MB.

- Scopes: `settings:write`.
- The app's assistant asks first unless you asked for it.
- Toolkit: `workspace`.

**Inputs**

- `variant` (`string`, required, one of `"mark"`, `"wordmark"`, `"wordmark-dark"`, `"login-background"`): 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.
- `fileId` (`string`, required, 1 to 128 characters): The fileId of an image in Files: one the user attached in this chat, or one listFiles found.

Also available in: API [`PUT /branding/images/{variant}`](https://nextmail.sh/docs/api/reference/settings#put-branding-images-variant); TypeScript [`nextmail.branding.uploadImage()`](https://nextmail.sh/docs/sdk/reference/branding#uploadImage); Python [`branding.upload_image()`](https://nextmail.sh/docs/python/reference/branding#uploadImage); Ruby [`branding.upload_image`](https://nextmail.sh/docs/ruby/reference/branding#uploadImage); PHP [`branding->uploadImage`](https://nextmail.sh/docs/php/reference/branding#uploadImage); Go [`Branding.UploadImage`](https://nextmail.sh/docs/go/reference/branding#uploadImage); Java [`branding().uploadImage`](https://nextmail.sh/docs/java/reference/branding#uploadImage); C# [`Branding.UploadImageAsync`](https://nextmail.sh/docs/csharp/reference/branding#uploadImage).

### `removeBrandImage`

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.

- Scopes: `settings:write`.
- The app's assistant asks first unless you asked for it.
- Toolkit: `workspace`.

**Inputs**

- `variant` (`string`, required, one of `"mark"`, `"wordmark"`, `"wordmark-dark"`, `"login-background"`): 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.

Also available in: API [`DELETE /branding/images/{variant}`](https://nextmail.sh/docs/api/reference/settings#delete-branding-images-variant); TypeScript [`nextmail.branding.removeImage()`](https://nextmail.sh/docs/sdk/reference/branding#removeImage); Python [`branding.remove_image()`](https://nextmail.sh/docs/python/reference/branding#removeImage); Ruby [`branding.remove_image`](https://nextmail.sh/docs/ruby/reference/branding#removeImage); PHP [`branding->removeImage`](https://nextmail.sh/docs/php/reference/branding#removeImage); Go [`Branding.RemoveImage`](https://nextmail.sh/docs/go/reference/branding#removeImage); Java [`branding().removeImage`](https://nextmail.sh/docs/java/reference/branding#removeImage); C# [`Branding.RemoveImageAsync`](https://nextmail.sh/docs/csharp/reference/branding#removeImage).

### `setDomainTrackingHost`

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.

- Scopes: `domains:write`.
- The app's assistant asks first unless you asked for it.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `host` (`string`, required, nullable, up to 253 characters): A subdomain of the domain, such as track.example.com, or null to remove it.

Also available in: API [`PATCH /domains/{id}`](https://nextmail.sh/docs/api/reference/domains#patch-domains-id); TypeScript [`nextmail.domains.update()`](https://nextmail.sh/docs/sdk/reference/domains#update); Python [`domains.update()`](https://nextmail.sh/docs/python/reference/domains#update); Ruby [`domains.update`](https://nextmail.sh/docs/ruby/reference/domains#update); PHP [`domains->update`](https://nextmail.sh/docs/php/reference/domains#update); Go [`Domains.Update`](https://nextmail.sh/docs/go/reference/domains#update); Java [`domains().update`](https://nextmail.sh/docs/java/reference/domains#update); C# [`Domains.UpdateAsync`](https://nextmail.sh/docs/csharp/reference/domains#update).

### `setDomainStorageHost`

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.

- Scopes: `domains:write`.
- The app's assistant asks first unless you asked for it.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `host` (`string`, required, nullable, up to 253 characters): A subdomain of the domain, such as track.example.com, or null to remove it.

Also available in: API [`PATCH /domains/{id}`](https://nextmail.sh/docs/api/reference/domains#patch-domains-id); TypeScript [`nextmail.domains.update()`](https://nextmail.sh/docs/sdk/reference/domains#update); Python [`domains.update()`](https://nextmail.sh/docs/python/reference/domains#update); Ruby [`domains.update`](https://nextmail.sh/docs/ruby/reference/domains#update); PHP [`domains->update`](https://nextmail.sh/docs/php/reference/domains#update); Go [`Domains.Update`](https://nextmail.sh/docs/go/reference/domains#update); Java [`domains().update`](https://nextmail.sh/docs/java/reference/domains#update); C# [`Domains.UpdateAsync`](https://nextmail.sh/docs/csharp/reference/domains#update).

### `listAddressForwards`

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.

- Scopes: `domains:read`.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `address` (`string`, required, 1 to 320 characters): The address, by its id, by the whole address (sales@example.com) or by the part before the @. listDomainAddresses names every one.

Also available in: API [`GET /domains/{id}/addresses/{addressId}/forwards`](https://nextmail.sh/docs/api/reference/domains#get-domains-id-addresses-addressid-forwards); TypeScript [`nextmail.domains.listAddressForwards()`](https://nextmail.sh/docs/sdk/reference/domains#listAddressForwards); Python [`domains.list_address_forwards()`](https://nextmail.sh/docs/python/reference/domains#listAddressForwards); Ruby [`domains.list_address_forwards`](https://nextmail.sh/docs/ruby/reference/domains#listAddressForwards); PHP [`domains->listAddressForwards`](https://nextmail.sh/docs/php/reference/domains#listAddressForwards); Go [`Domains.ListAddressForwards`](https://nextmail.sh/docs/go/reference/domains#listAddressForwards); Java [`domains().listAddressForwards`](https://nextmail.sh/docs/java/reference/domains#listAddressForwards); C# [`Domains.ListAddressForwardsAsync`](https://nextmail.sh/docs/csharp/reference/domains#listAddressForwards).

### `addAddressForwards`

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.

- Scopes: `domains:write`.
- The app's assistant always asks first.
- Asks for a verification code, the same as [`POST /domains/{id}/addresses/{addressId}/forwards`](https://nextmail.sh/docs/api/reference/domains#post-domains-id-addresses-addressid-forwards).
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `address` (`string`, required, 1 to 320 characters): The address, by its id, by the whole address (sales@example.com) or by the part before the @. listDomainAddresses names every one.
- `emails` (`string[]`, required, 1 to 10 items)

Also available in: API [`POST /domains/{id}/addresses/{addressId}/forwards`](https://nextmail.sh/docs/api/reference/domains#post-domains-id-addresses-addressid-forwards); TypeScript [`nextmail.domains.addAddressForwards()`](https://nextmail.sh/docs/sdk/reference/domains#addAddressForwards); Python [`domains.add_address_forwards()`](https://nextmail.sh/docs/python/reference/domains#addAddressForwards); Ruby [`domains.add_address_forwards`](https://nextmail.sh/docs/ruby/reference/domains#addAddressForwards); PHP [`domains->addAddressForwards`](https://nextmail.sh/docs/php/reference/domains#addAddressForwards); Go [`Domains.AddAddressForwards`](https://nextmail.sh/docs/go/reference/domains#addAddressForwards); Java [`domains().addAddressForwards`](https://nextmail.sh/docs/java/reference/domains#addAddressForwards); C# [`Domains.AddAddressForwardsAsync`](https://nextmail.sh/docs/csharp/reference/domains#addAddressForwards).

### `setAddressForwardEnabled`

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.

- Scopes: `domains:write`.
- The app's assistant always asks first.
- Asks for a verification code, the same as [`PATCH /domains/{id}/addresses/{addressId}/forwards/{forwardId}`](https://nextmail.sh/docs/api/reference/domains#patch-domains-id-addresses-addressid-forwards-forwardid).
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `address` (`string`, required, 1 to 320 characters): The address, by its id, by the whole address (sales@example.com) or by the part before the @. listDomainAddresses names every one.
- `forward` (`string`, required, 1 to 320 characters): The forwarding destination, by its id or by the address it forwards to. listAddressForwards names every one.
- `enabled` (`boolean`, required)

Also available in: API [`PATCH /domains/{id}/addresses/{addressId}/forwards/{forwardId}`](https://nextmail.sh/docs/api/reference/domains#patch-domains-id-addresses-addressid-forwards-forwardid); TypeScript [`nextmail.domains.updateAddressForward()`](https://nextmail.sh/docs/sdk/reference/domains#updateAddressForward); Python [`domains.update_address_forward()`](https://nextmail.sh/docs/python/reference/domains#updateAddressForward); Ruby [`domains.update_address_forward`](https://nextmail.sh/docs/ruby/reference/domains#updateAddressForward); PHP [`domains->updateAddressForward`](https://nextmail.sh/docs/php/reference/domains#updateAddressForward); Go [`Domains.UpdateAddressForward`](https://nextmail.sh/docs/go/reference/domains#updateAddressForward); Java [`domains().updateAddressForward`](https://nextmail.sh/docs/java/reference/domains#updateAddressForward); C# [`Domains.UpdateAddressForwardAsync`](https://nextmail.sh/docs/csharp/reference/domains#updateAddressForward).

### `removeAddressForward`

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.

- Scopes: `domains:write`.
- The app's assistant always asks first.
- Asks for a verification code, the same as [`DELETE /domains/{id}/addresses/{addressId}/forwards/{forwardId}`](https://nextmail.sh/docs/api/reference/domains#delete-domains-id-addresses-addressid-forwards-forwardid).
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `address` (`string`, required, 1 to 320 characters): The address, by its id, by the whole address (sales@example.com) or by the part before the @. listDomainAddresses names every one.
- `forward` (`string`, required, 1 to 320 characters): The forwarding destination, by its id or by the address it forwards to. listAddressForwards names every one.

Also available in: API [`DELETE /domains/{id}/addresses/{addressId}/forwards/{forwardId}`](https://nextmail.sh/docs/api/reference/domains#delete-domains-id-addresses-addressid-forwards-forwardid); TypeScript [`nextmail.domains.deleteAddressForward()`](https://nextmail.sh/docs/sdk/reference/domains#deleteAddressForward); Python [`domains.delete_address_forward()`](https://nextmail.sh/docs/python/reference/domains#deleteAddressForward); Ruby [`domains.delete_address_forward`](https://nextmail.sh/docs/ruby/reference/domains#deleteAddressForward); PHP [`domains->deleteAddressForward`](https://nextmail.sh/docs/php/reference/domains#deleteAddressForward); Go [`Domains.DeleteAddressForward`](https://nextmail.sh/docs/go/reference/domains#deleteAddressForward); Java [`domains().deleteAddressForward`](https://nextmail.sh/docs/java/reference/domains#deleteAddressForward); C# [`Domains.DeleteAddressForwardAsync`](https://nextmail.sh/docs/csharp/reference/domains#deleteAddressForward).

### `resendAddressForwardConsent`

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

- Scopes: `domains:write`.
- The app's assistant asks first unless you asked for it.
- Asks for a verification code, the same as [`POST /domains/{id}/addresses/{addressId}/forwards/{forwardId}/resend`](https://nextmail.sh/docs/api/reference/domains#post-domains-id-addresses-addressid-forwards-forwardid-resend).
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `address` (`string`, required, 1 to 320 characters): The address, by its id, by the whole address (sales@example.com) or by the part before the @. listDomainAddresses names every one.
- `forward` (`string`, required, 1 to 320 characters): The forwarding destination, by its id or by the address it forwards to. listAddressForwards names every one.

Also available in: API [`POST /domains/{id}/addresses/{addressId}/forwards/{forwardId}/resend`](https://nextmail.sh/docs/api/reference/domains#post-domains-id-addresses-addressid-forwards-forwardid-resend); TypeScript [`nextmail.domains.resendAddressForwardConsent()`](https://nextmail.sh/docs/sdk/reference/domains#resendAddressForwardConsent); Python [`domains.resend_address_forward_consent()`](https://nextmail.sh/docs/python/reference/domains#resendAddressForwardConsent); Ruby [`domains.resend_address_forward_consent`](https://nextmail.sh/docs/ruby/reference/domains#resendAddressForwardConsent); PHP [`domains->resendAddressForwardConsent`](https://nextmail.sh/docs/php/reference/domains#resendAddressForwardConsent); Go [`Domains.ResendAddressForwardConsent`](https://nextmail.sh/docs/go/reference/domains#resendAddressForwardConsent); Java [`domains().resendAddressForwardConsent`](https://nextmail.sh/docs/java/reference/domains#resendAddressForwardConsent); C# [`Domains.ResendAddressForwardConsentAsync`](https://nextmail.sh/docs/csharp/reference/domains#resendAddressForwardConsent).

### `setAddressForwardMode`

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.

- Scopes: `domains:write`.
- The app's assistant always asks first.
- Asks for a verification code only when it sets a forwarding mode, the same as [`PATCH /domains/{id}/addresses/{addressId}`](https://nextmail.sh/docs/api/reference/domains#patch-domains-id-addresses-addressid).
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `address` (`string`, required, 1 to 320 characters): The address, by its id, by the whole address (sales@example.com) or by the part before the @. listDomainAddresses names every one.
- `mode` (`string`, required, one of `"mailbox"`, `"forward"`)

Also available in: API [`PATCH /domains/{id}/addresses/{addressId}`](https://nextmail.sh/docs/api/reference/domains#patch-domains-id-addresses-addressid); TypeScript [`nextmail.domains.updateAddress()`](https://nextmail.sh/docs/sdk/reference/domains#updateAddress); Python [`domains.update_address()`](https://nextmail.sh/docs/python/reference/domains#updateAddress); Ruby [`domains.update_address`](https://nextmail.sh/docs/ruby/reference/domains#updateAddress); PHP [`domains->updateAddress`](https://nextmail.sh/docs/php/reference/domains#updateAddress); Go [`Domains.UpdateAddress`](https://nextmail.sh/docs/go/reference/domains#updateAddress); Java [`domains().updateAddress`](https://nextmail.sh/docs/java/reference/domains#updateAddress); C# [`Domains.UpdateAddressAsync`](https://nextmail.sh/docs/csharp/reference/domains#updateAddress).

### `listAddressMembers`

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.

- Scopes: `members:read`.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `address` (`string`, required, 1 to 320 characters): The address, by its id, by the whole address (sales@example.com) or by the part before the @. listDomainAddresses names every one.

Also available in: API [`GET /domains/{id}/addresses/{addressId}/members`](https://nextmail.sh/docs/api/reference/domains#get-domains-id-addresses-addressid-members); TypeScript [`nextmail.domains.listAddressMembers()`](https://nextmail.sh/docs/sdk/reference/domains#listAddressMembers); Python [`domains.list_address_members()`](https://nextmail.sh/docs/python/reference/domains#listAddressMembers); Ruby [`domains.list_address_members`](https://nextmail.sh/docs/ruby/reference/domains#listAddressMembers); PHP [`domains->listAddressMembers`](https://nextmail.sh/docs/php/reference/domains#listAddressMembers); Go [`Domains.ListAddressMembers`](https://nextmail.sh/docs/go/reference/domains#listAddressMembers); Java [`domains().listAddressMembers`](https://nextmail.sh/docs/java/reference/domains#listAddressMembers); C# [`Domains.ListAddressMembersAsync`](https://nextmail.sh/docs/csharp/reference/domains#listAddressMembers).

### `getAddressLogin`

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.

- Scopes: `members:write`.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `address` (`string`, required, 1 to 320 characters): The address, by its id, by the whole address (sales@example.com) or by the part before the @. listDomainAddresses names every one.

Also available in: API [`GET /domains/{id}/addresses/{addressId}/login`](https://nextmail.sh/docs/api/reference/domains#get-domains-id-addresses-addressid-login); TypeScript [`nextmail.domains.getAddressLogin()`](https://nextmail.sh/docs/sdk/reference/domains#getAddressLogin); Python [`domains.get_address_login()`](https://nextmail.sh/docs/python/reference/domains#getAddressLogin); Ruby [`domains.get_address_login`](https://nextmail.sh/docs/ruby/reference/domains#getAddressLogin); PHP [`domains->getAddressLogin`](https://nextmail.sh/docs/php/reference/domains#getAddressLogin); Go [`Domains.GetAddressLogin`](https://nextmail.sh/docs/go/reference/domains#getAddressLogin); Java [`domains().getAddressLogin`](https://nextmail.sh/docs/java/reference/domains#getAddressLogin); C# [`Domains.GetAddressLoginAsync`](https://nextmail.sh/docs/csharp/reference/domains#getAddressLogin).

### `removeAddressLogin`

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

- Scopes: `members:write`.
- The app's assistant always asks first.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `address` (`string`, required, 1 to 320 characters): The address, by its id, by the whole address (sales@example.com) or by the part before the @. listDomainAddresses names every one.

Also available in: API [`DELETE /domains/{id}/addresses/{addressId}/login`](https://nextmail.sh/docs/api/reference/domains#delete-domains-id-addresses-addressid-login); TypeScript [`nextmail.domains.deleteAddressLogin()`](https://nextmail.sh/docs/sdk/reference/domains#deleteAddressLogin); Python [`domains.delete_address_login()`](https://nextmail.sh/docs/python/reference/domains#deleteAddressLogin); Ruby [`domains.delete_address_login`](https://nextmail.sh/docs/ruby/reference/domains#deleteAddressLogin); PHP [`domains->deleteAddressLogin`](https://nextmail.sh/docs/php/reference/domains#deleteAddressLogin); Go [`Domains.DeleteAddressLogin`](https://nextmail.sh/docs/go/reference/domains#deleteAddressLogin); Java [`domains().deleteAddressLogin`](https://nextmail.sh/docs/java/reference/domains#deleteAddressLogin); C# [`Domains.DeleteAddressLoginAsync`](https://nextmail.sh/docs/csharp/reference/domains#deleteAddressLogin).

### `listDnsConnections`

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.

- Scopes: `domains:read`.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

Takes no input.

Also available in: API [`GET /dns-connections`](https://nextmail.sh/docs/api/reference/domains#get-dns-connections); TypeScript [`nextmail.dnsConnections.list()`](https://nextmail.sh/docs/sdk/reference/dns-connections#list); Python [`dns_connections.list()`](https://nextmail.sh/docs/python/reference/dns-connections#list); Ruby [`dns_connections.list`](https://nextmail.sh/docs/ruby/reference/dns-connections#list); PHP [`dnsConnections->list`](https://nextmail.sh/docs/php/reference/dns-connections#list); Go [`DNSConnections.List`](https://nextmail.sh/docs/go/reference/dns-connections#list); Java [`dnsConnections().list`](https://nextmail.sh/docs/java/reference/dns-connections#list); C# [`DnsConnections.ListAsync`](https://nextmail.sh/docs/csharp/reference/dns-connections#list).

### `getDnsConnection`

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.

- Scopes: `domains:read`.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `connection` (`string`, required, 1 to 64 characters): The id of a DNS connection, as listDnsConnections names it.

Also available in: API [`GET /dns-connections/{id}`](https://nextmail.sh/docs/api/reference/domains#get-dns-connections-id); TypeScript [`nextmail.dnsConnections.get()`](https://nextmail.sh/docs/sdk/reference/dns-connections#get); Python [`dns_connections.get()`](https://nextmail.sh/docs/python/reference/dns-connections#get); Ruby [`dns_connections.get`](https://nextmail.sh/docs/ruby/reference/dns-connections#get); PHP [`dnsConnections->get`](https://nextmail.sh/docs/php/reference/dns-connections#get); Go [`DNSConnections.Get`](https://nextmail.sh/docs/go/reference/dns-connections#get); Java [`dnsConnections().get`](https://nextmail.sh/docs/java/reference/dns-connections#get); C# [`DnsConnections.GetAsync`](https://nextmail.sh/docs/csharp/reference/dns-connections#get).

### `disconnectDnsConnection`

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

- Scopes: `domains:write`.
- The app's assistant always asks first.
- Asks for a verification code, the same as [`DELETE /dns-connections/{id}`](https://nextmail.sh/docs/api/reference/domains#delete-dns-connections-id).
- Toolkit: `workspace`.

**Inputs**

- `connection` (`string`, required, 1 to 64 characters): The id of a DNS connection, as listDnsConnections names it.

Also available in: API [`DELETE /dns-connections/{id}`](https://nextmail.sh/docs/api/reference/domains#delete-dns-connections-id); TypeScript [`nextmail.dnsConnections.delete()`](https://nextmail.sh/docs/sdk/reference/dns-connections#delete); Python [`dns_connections.delete()`](https://nextmail.sh/docs/python/reference/dns-connections#delete); Ruby [`dns_connections.delete`](https://nextmail.sh/docs/ruby/reference/dns-connections#delete); PHP [`dnsConnections->delete`](https://nextmail.sh/docs/php/reference/dns-connections#delete); Go [`DNSConnections.Delete`](https://nextmail.sh/docs/go/reference/dns-connections#delete); Java [`dnsConnections().delete`](https://nextmail.sh/docs/java/reference/dns-connections#delete); C# [`DnsConnections.DeleteAsync`](https://nextmail.sh/docs/csharp/reference/dns-connections#delete).

### `getDomainDns`

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.

- Scopes: `domains:read`.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `refresh` (`boolean`): 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`](https://nextmail.sh/docs/api/reference/domains#get-domains-id-dns); TypeScript [`nextmail.domains.getDns()`](https://nextmail.sh/docs/sdk/reference/domains#getDns); Python [`domains.get_dns()`](https://nextmail.sh/docs/python/reference/domains#getDns); Ruby [`domains.get_dns`](https://nextmail.sh/docs/ruby/reference/domains#getDns); PHP [`domains->getDns`](https://nextmail.sh/docs/php/reference/domains#getDns); Go [`Domains.GetDNS`](https://nextmail.sh/docs/go/reference/domains#getDns); Java [`domains().getDns`](https://nextmail.sh/docs/java/reference/domains#getDns); C# [`Domains.GetDnsAsync`](https://nextmail.sh/docs/csharp/reference/domains#getDns).

### `setDomainDnsZone`

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.

- Scopes: `domains:write`.
- The app's assistant asks first unless you asked for it.
- Asks for a verification code, the same as [`PUT /domains/{id}/dns`](https://nextmail.sh/docs/api/reference/domains#put-domains-id-dns).
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `connection` (`string`, required, 1 to 64 characters): The id of a DNS connection, as listDnsConnections names it.
- `zone` (`string`, required, 1 to 64 characters): The id of the zone, as getDomainDns lists the zones that could answer for the domain.

Also available in: API [`PUT /domains/{id}/dns`](https://nextmail.sh/docs/api/reference/domains#put-domains-id-dns); TypeScript [`nextmail.domains.setDnsZone()`](https://nextmail.sh/docs/sdk/reference/domains#setDnsZone); Python [`domains.set_dns_zone()`](https://nextmail.sh/docs/python/reference/domains#setDnsZone); Ruby [`domains.set_dns_zone`](https://nextmail.sh/docs/ruby/reference/domains#setDnsZone); PHP [`domains->setDnsZone`](https://nextmail.sh/docs/php/reference/domains#setDnsZone); Go [`Domains.SetDNSZone`](https://nextmail.sh/docs/go/reference/domains#setDnsZone); Java [`domains().setDnsZone`](https://nextmail.sh/docs/java/reference/domains#setDnsZone); C# [`Domains.SetDnsZoneAsync`](https://nextmail.sh/docs/csharp/reference/domains#setDnsZone).

### `syncDomainDns`

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.

- Scopes: `domains:write`.
- The app's assistant asks first unless you asked for it.
- Asks for a verification code, the same as [`POST /domains/{id}/dns/sync`](https://nextmail.sh/docs/api/reference/domains#post-domains-id-dns-sync).
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `purpose` (`string`, one of `"dmarc"`, `"tracking"`, `"storage"`, `"bimi"`, `"app-host"`): Write only this kind of record. Left out, every record the domain needs.

Also available in: API [`POST /domains/{id}/dns/sync`](https://nextmail.sh/docs/api/reference/domains#post-domains-id-dns-sync); TypeScript [`nextmail.domains.syncDns()`](https://nextmail.sh/docs/sdk/reference/domains#syncDns); Python [`domains.sync_dns()`](https://nextmail.sh/docs/python/reference/domains#syncDns); Ruby [`domains.sync_dns`](https://nextmail.sh/docs/ruby/reference/domains#syncDns); PHP [`domains->syncDns`](https://nextmail.sh/docs/php/reference/domains#syncDns); Go [`Domains.SyncDNS`](https://nextmail.sh/docs/go/reference/domains#syncDns); Java [`domains().syncDns`](https://nextmail.sh/docs/java/reference/domains#syncDns); C# [`Domains.SyncDnsAsync`](https://nextmail.sh/docs/csharp/reference/domains#syncDns).

### `getMailAppSettings`

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.

- Scopes: `domains:read`.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `address` (`string`, required, 1 to 320 characters): The address, by its id, by the whole address (sales@example.com) or by the part before the @. listDomainAddresses names every one.

Also available in: API [`GET /domains/{id}/addresses/{addressId}/mail-apps`](https://nextmail.sh/docs/api/reference/domains#get-domains-id-addresses-addressid-mail-apps); TypeScript [`nextmail.domains.getMailAppSettings()`](https://nextmail.sh/docs/sdk/reference/domains#getMailAppSettings); Python [`domains.get_mail_app_settings()`](https://nextmail.sh/docs/python/reference/domains#getMailAppSettings); Ruby [`domains.get_mail_app_settings`](https://nextmail.sh/docs/ruby/reference/domains#getMailAppSettings); PHP [`domains->getMailAppSettings`](https://nextmail.sh/docs/php/reference/domains#getMailAppSettings); Go [`Domains.GetMailAppSettings`](https://nextmail.sh/docs/go/reference/domains#getMailAppSettings); Java [`domains().getMailAppSettings`](https://nextmail.sh/docs/java/reference/domains#getMailAppSettings); C# [`Domains.GetMailAppSettingsAsync`](https://nextmail.sh/docs/csharp/reference/domains#getMailAppSettings).

### `listAppPasswords`

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.

- Scopes: `members:write`.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `address` (`string`, required, 1 to 320 characters): The address, by its id, by the whole address (sales@example.com) or by the part before the @. listDomainAddresses names every one.

Also available in: API [`GET /domains/{id}/addresses/{addressId}/app-passwords`](https://nextmail.sh/docs/api/reference/domains#get-domains-id-addresses-addressid-app-passwords); TypeScript [`nextmail.domains.listAppPasswords()`](https://nextmail.sh/docs/sdk/reference/domains#listAppPasswords); Python [`domains.list_app_passwords()`](https://nextmail.sh/docs/python/reference/domains#listAppPasswords); Ruby [`domains.list_app_passwords`](https://nextmail.sh/docs/ruby/reference/domains#listAppPasswords); PHP [`domains->listAppPasswords`](https://nextmail.sh/docs/php/reference/domains#listAppPasswords); Go [`Domains.ListAppPasswords`](https://nextmail.sh/docs/go/reference/domains#listAppPasswords); Java [`domains().listAppPasswords`](https://nextmail.sh/docs/java/reference/domains#listAppPasswords); C# [`Domains.ListAppPasswordsAsync`](https://nextmail.sh/docs/csharp/reference/domains#listAppPasswords).

### `revokeAppPassword`

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

- Scopes: `members:write`.
- The app's assistant always asks first.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `address` (`string`, required, 1 to 320 characters): The address, by its id, by the whole address (sales@example.com) or by the part before the @. listDomainAddresses names every one.
- `password` (`string`, required, 1 to 128 characters)

Also available in: API [`DELETE /domains/{id}/addresses/{addressId}/app-passwords/{passwordId}`](https://nextmail.sh/docs/api/reference/domains#delete-domains-id-addresses-addressid-app-passwords-passwordid); TypeScript [`nextmail.domains.deleteAppPassword()`](https://nextmail.sh/docs/sdk/reference/domains#deleteAppPassword); Python [`domains.delete_app_password()`](https://nextmail.sh/docs/python/reference/domains#deleteAppPassword); Ruby [`domains.delete_app_password`](https://nextmail.sh/docs/ruby/reference/domains#deleteAppPassword); PHP [`domains->deleteAppPassword`](https://nextmail.sh/docs/php/reference/domains#deleteAppPassword); Go [`Domains.DeleteAppPassword`](https://nextmail.sh/docs/go/reference/domains#deleteAppPassword); Java [`domains().deleteAppPassword`](https://nextmail.sh/docs/java/reference/domains#deleteAppPassword); C# [`Domains.DeleteAppPasswordAsync`](https://nextmail.sh/docs/csharp/reference/domains#deleteAppPassword).

### `sendMailAppSetup`

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.

- Scopes: `members:write`.
- The app's assistant always asks first.
- Asks for a verification code, the same as [`POST /domains/{id}/addresses/{addressId}/mail-app-setup`](https://nextmail.sh/docs/api/reference/domains#post-domains-id-addresses-addressid-mail-app-setup).
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `address` (`string`, required, 1 to 320 characters): The address, by its id, by the whole address (sales@example.com) or by the part before the @. listDomainAddresses names every one.
- `recipient` (`string`, required, up to 320 characters, format `email`)

Also available in: API [`POST /domains/{id}/addresses/{addressId}/mail-app-setup`](https://nextmail.sh/docs/api/reference/domains#post-domains-id-addresses-addressid-mail-app-setup); TypeScript [`nextmail.domains.sendMailAppSetup()`](https://nextmail.sh/docs/sdk/reference/domains#sendMailAppSetup); Python [`domains.send_mail_app_setup()`](https://nextmail.sh/docs/python/reference/domains#sendMailAppSetup); Ruby [`domains.send_mail_app_setup`](https://nextmail.sh/docs/ruby/reference/domains#sendMailAppSetup); PHP [`domains->sendMailAppSetup`](https://nextmail.sh/docs/php/reference/domains#sendMailAppSetup); Go [`Domains.SendMailAppSetup`](https://nextmail.sh/docs/go/reference/domains#sendMailAppSetup); Java [`domains().sendMailAppSetup`](https://nextmail.sh/docs/java/reference/domains#sendMailAppSetup); C# [`Domains.SendMailAppSetupAsync`](https://nextmail.sh/docs/csharp/reference/domains#sendMailAppSetup).

### `createAppPassword`

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.

- Scopes: `members:write`.
- The app's assistant always asks first.
- Asks for a verification code, the same as [`POST /domains/{id}/addresses/{addressId}/app-passwords`](https://nextmail.sh/docs/api/reference/domains#post-domains-id-addresses-addressid-app-passwords).
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `address` (`string`, required, 1 to 320 characters): The address, by its id, by the whole address (sales@example.com) or by the part before the @. listDomainAddresses names every one.
- `name` (`string`, required, 1 to 64 characters): What to call it, such as the device it is for.
- `appleProfile` (`boolean`): Also return the Apple configuration profile, the XML of a .mobileconfig file.

Also available in: API [`POST /domains/{id}/addresses/{addressId}/app-passwords`](https://nextmail.sh/docs/api/reference/domains#post-domains-id-addresses-addressid-app-passwords); TypeScript [`nextmail.domains.createAppPassword()`](https://nextmail.sh/docs/sdk/reference/domains#createAppPassword); Python [`domains.create_app_password()`](https://nextmail.sh/docs/python/reference/domains#createAppPassword); Ruby [`domains.create_app_password`](https://nextmail.sh/docs/ruby/reference/domains#createAppPassword); PHP [`domains->createAppPassword`](https://nextmail.sh/docs/php/reference/domains#createAppPassword); Go [`Domains.CreateAppPassword`](https://nextmail.sh/docs/go/reference/domains#createAppPassword); Java [`domains().createAppPassword`](https://nextmail.sh/docs/java/reference/domains#createAppPassword); C# [`Domains.CreateAppPasswordAsync`](https://nextmail.sh/docs/csharp/reference/domains#createAppPassword).

### `renameAppPassword`

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

- Scopes: `members:write`.
- The app's assistant runs it without asking.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `address` (`string`, required, 1 to 320 characters): The address, by its id, by the whole address (sales@example.com) or by the part before the @. listDomainAddresses names every one.
- `password` (`string`, required, 1 to 128 characters): The ID listAppPasswords shows.
- `name` (`string`, required, 1 to 64 characters)

Also available in: API [`PATCH /domains/{id}/addresses/{addressId}/app-passwords/{passwordId}`](https://nextmail.sh/docs/api/reference/domains#patch-domains-id-addresses-addressid-app-passwords-passwordid); TypeScript [`nextmail.domains.updateAppPassword()`](https://nextmail.sh/docs/sdk/reference/domains#updateAppPassword); Python [`domains.update_app_password()`](https://nextmail.sh/docs/python/reference/domains#updateAppPassword); Ruby [`domains.update_app_password`](https://nextmail.sh/docs/ruby/reference/domains#updateAppPassword); PHP [`domains->updateAppPassword`](https://nextmail.sh/docs/php/reference/domains#updateAppPassword); Go [`Domains.UpdateAppPassword`](https://nextmail.sh/docs/go/reference/domains#updateAppPassword); Java [`domains().updateAppPassword`](https://nextmail.sh/docs/java/reference/domains#updateAppPassword); C# [`Domains.UpdateAppPasswordAsync`](https://nextmail.sh/docs/csharp/reference/domains#updateAppPassword).

### `updateMailAppSettings`

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.

- Scopes: `domains:write`.
- The app's assistant always asks first.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `address` (`string`, required, 1 to 320 characters): The address, by its id, by the whole address (sales@example.com) or by the part before the @. listDomainAddresses names every one.
- `imap` (`boolean`): Accept IMAP sign-ins, which keep folders and read state in step.
- `smtp` (`boolean`): Accept SMTP sign-ins, for sending from a mail app.
- `pop3` (`boolean`): Accept POP3 sign-ins, for apps that only download the inbox.
- `caldav` (`boolean`): Serve the calendar of the address over CalDAV.
- `carddav` (`boolean`): Serve the contacts of the workspace over CardDAV.

Also available in: API [`PATCH /domains/{id}/addresses/{addressId}/mail-apps`](https://nextmail.sh/docs/api/reference/domains#patch-domains-id-addresses-addressid-mail-apps); TypeScript [`nextmail.domains.updateMailAppSettings()`](https://nextmail.sh/docs/sdk/reference/domains#updateMailAppSettings); Python [`domains.update_mail_app_settings()`](https://nextmail.sh/docs/python/reference/domains#updateMailAppSettings); Ruby [`domains.update_mail_app_settings`](https://nextmail.sh/docs/ruby/reference/domains#updateMailAppSettings); PHP [`domains->updateMailAppSettings`](https://nextmail.sh/docs/php/reference/domains#updateMailAppSettings); Go [`Domains.UpdateMailAppSettings`](https://nextmail.sh/docs/go/reference/domains#updateMailAppSettings); Java [`domains().updateMailAppSettings`](https://nextmail.sh/docs/java/reference/domains#updateMailAppSettings); C# [`Domains.UpdateMailAppSettingsAsync`](https://nextmail.sh/docs/csharp/reference/domains#updateMailAppSettings).

### `setDomainSenderName`

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.

- Scopes: `domains:write`.
- The app's assistant asks first unless you asked for it.
- Toolkit: `workspace`.

**Inputs**

- `domain` (`string`, required, 1 to 253 characters): The domain, by its id or by its name (example.com). listDomains names every one.
- `senderName` (`string`, required, nullable, up to 120 characters): The name, at most 120 characters, or null to clear it.

Also available in: API [`PATCH /domains/{id}`](https://nextmail.sh/docs/api/reference/domains#patch-domains-id); TypeScript [`nextmail.domains.update()`](https://nextmail.sh/docs/sdk/reference/domains#update); Python [`domains.update()`](https://nextmail.sh/docs/python/reference/domains#update); Ruby [`domains.update`](https://nextmail.sh/docs/ruby/reference/domains#update); PHP [`domains->update`](https://nextmail.sh/docs/php/reference/domains#update); Go [`Domains.Update`](https://nextmail.sh/docs/go/reference/domains#update); Java [`domains().update`](https://nextmail.sh/docs/java/reference/domains#update); C# [`Domains.UpdateAsync`](https://nextmail.sh/docs/csharp/reference/domains#update).
