# Email API

Manage support email addresses, verified sending domains, DKIM key rotations, email signatures, and bounce suppressions via the dimmi REST API.

## Email addresses

- `GET /email-addresses` - List email addresses: Lists the public addresses customers write to, such as support@company.com, the default first, each with the forwarding address it must forward to, the inbox it feeds and what it sends as now. Returns every address of the workspace with its forwarding address, sending state and setup guides.
- `GET /email-addresses/{address}/inbound-emails` - List emails received at an address: Lists what arrived at an address, newest first, with sender, subject, how each was handled and the conversation it joined. Use it to find out why an email did not show up in the inbox. Returns a page of received emails with status, sender, subject and any error, with next_cursor for more.
- `POST /email-addresses` - Connect an email address: Connects a public address the team receives mail at and gives it a forwarding address. Mail only arrives once the person sets their mail provider to forward to that address. The workspace's first address becomes its default. Returns the new address with the forwarding address to set up and the setup guide that fits its domain.
- `POST /email-addresses/{address}/tests` - Send a forwarding test: Sends a test email to the address's own public address and waits for it to come back through forwarding, proving the setup works. One test per address every thirty seconds, twenty a day. Returns the test, waiting for its mail, with the address it was sent to.
- `GET /email-addresses/{address}` - Get an email address: Reads one connected address: its forwarding address, reply settings, the inbox it feeds, whether forwarding was confirmed and what it sends as (its own verified domain or the default sender). Returns the address with its settings, sending state and setup guides.
- `GET /email-addresses/{address}/tests/{test}` - Get a forwarding test: Reads a forwarding test: still waiting, received, or failed, with findings that explain what went wrong and how long the mail took. Returns the test with its status, findings and latency.
- `PATCH /email-addresses/{address}` - Update an email address: Changes how an address signs and styles replies customers receive, what happens to bulk mail, which inbox it feeds, or makes it the default. Moving it to another inbox leaves earlier conversations where they are. Only the fields sent change. Returns the address as it now is.
- `DELETE /email-addresses/{address}` - Disconnect an email address: Disconnects an address: mail sent to its forwarding address no longer becomes conversations. Returns nothing once it is disconnected.

## Email domains

- `GET /email-domains` - List sending domains: Lists the domains the workspace sends email from, with whether each is verified. Returns every sending domain with its status, DNS records and when it was last checked.
- `POST /email-domains` - Add a sending domain: Adds a domain such as company.com so replies are sent from it rather than the default sender. It starts pending: the person publishes the DNS records it returns, then it is checked. Returns the pending domain with the DNS records to publish.
- `POST /email-domains/{domain}/checks` - Check a sending domain's DNS: Queues a check of the domain's DNS records now instead of waiting for the next scheduled one. A pending or failed domain starts a fresh three day verification window. Once every ten seconds. Returns the domain, with the check queued.
- `POST /email-domains/{domain}/dns-setups` - Start automatic DNS setup: Gets a link the person opens to approve adding every record at their DNS host in one step, where the host supports it. Nothing changes until they approve there; copying records by hand always works. Returns the DNS host's name and the apply_url to give the person.
- `POST /email-domains/{domain}/dkim-rotations` - Rotate a domain's signing key: Starts a new DKIM signing key for a domain dimmi signs for. The current key signs until the new record is published and seen. Domains sent through SES rotate their own keys. Returns the domain with the new record to publish.
- `GET /email-domains/{domain}` - Get a sending domain: Reads one sending domain: the DNS records to publish and the state of each, the DNS host found and its guide, and why verification failed if it did. Returns the domain with its records, warnings and host guide, or a zone file with format=bind.
- `PATCH /email-domains/{domain}` - Update a sending domain: Changes the return path label or the DNS host the person says they use. A new return path's records are checked again; the other records keep their state. Returns the domain as it now is.
- `DELETE /email-domains/{domain}` - Remove a sending domain: Removes a sending domain. A verified domain addresses still send from is refused unless force is true; those addresses then send from the default sender. Returns nothing once it is removed.

## Email signatures

- `GET /email-signatures` - List email signatures: Lists the signatures that close email replies: personal ones per teammate and address ones per address. Without manage_any you see only your own and the team's. Returns the signatures with their kind, teammate, address, Markdown body and whether each is used.
- `POST /email-signatures` - Create an email signature: Adds a signature put under replies customers receive. A personal one is yours unless member_id names another teammate, and covers every address unless email_address_id names one. One per teammate and address. Returns the signature as saved.
- `PATCH /email-signatures/{signature}` - Update an email signature: Changes a signature's text or turns it on or off. The next replies customers receive use it. Returns the signature as it now is.
- `DELETE /email-signatures/{signature}` - Delete an email signature: Removes a signature. Replies sent from then on go out without it. Returns nothing once it is removed.

## Email suppressions

- `GET /email-suppressions` - List what stops email to a customer: Lists the bounces, complaints and blocks that stop mail to a contact's address. Returns each suppression with its reason, the kind of mail it stops and when it lapses.
- `DELETE /email-suppressions/{email_suppression}` - Lift an email suppression: Lets mail reach a suppressed address again. Lifting a complaint takes an owner. Returns nothing.

---

Index of all dimmi docs: https://trydimmi.com/llms.txt (full text: https://trydimmi.com/llms-full.txt)
