Email domains
List the sender domains
Lists the sender domains of the organization with their verification status and DNS records. Read only. It is safe to repeat.
Required scope: email:read.
query Parameters
limitcursorThe nextCursor of the previous page, with the same filters.
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
List the sender domains › Responses
objecthasMorenextCursorAdd a sender domain
Returns the DNS records to add at your DNS host. Until the domain is verified nothing can be sent from it.
Required scope: email:write.
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Add a sender domain › Request Body
nameThe domain emails go out from.
defaultFromLocalThe part before the @ of the default sender address.
inboundAgentIdThe agent that opens a case when a stranger writes to an address of this domain. Without it, mail from people with no thread is ignored.
Add a sender domain › Responses
objectidnamestatusOnly a verified domain can send. Add the records; verification completes on its own once DNS answers, and POST /v2/email/domains/{id}/verify checks it right away.
defaultFrominboundAgentIdverifiedAtcreatedAtupdatedAtGet a sender domain with its status and DNS records
While the domain is pending, the status is refreshed from the email provider.
Required scope: email:read.
path Parameters
id^dom_[0-9A-Za-z]{22}… · requiredThe id of the email domain (dom_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Get a sender domain with its status and DNS records › Responses
objectidnamestatusOnly a verified domain can send. Add the records; verification completes on its own once DNS answers, and POST /v2/email/domains/{id}/verify checks it right away.
defaultFrominboundAgentIdverifiedAtcreatedAtupdatedAtRemove a sender domain
Removes a sender domain from the organization and, when possible, from the email provider. Mail stops going out from that domain. Add it again to start over. The effect is permanent through the API. Repeating the call returns 404 not_found, because the domain no longer exists, so do not retry a 404 as a failure.
Required scope: email:write.
path Parameters
id^dom_[0-9A-Za-z]{22}… · requiredThe id of the email domain (dom_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Remove a sender domain › Responses
Change the default sender or the inbound agent of a domain
Changes the default sender address or the agent that answers inbound mail on a domain. Send only the fields you want to change. Applying the same body twice leaves the same result.
Required scope: email:write.
path Parameters
id^dom_[0-9A-Za-z]{22}… · requiredThe id of the email domain (dom_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Change the default sender or the inbound agent of a domain › Request Body optional
defaultFromLocalinboundAgentIdChange the default sender or the inbound agent of a domain › Responses
objectidnamestatusOnly a verified domain can send. Add the records; verification completes on its own once DNS answers, and POST /v2/email/domains/{id}/verify checks it right away.
defaultFrominboundAgentIdverifiedAtcreatedAtupdatedAtCheck the DNS records now
Asks the email provider to check the DNS records now, instead of waiting for the next automatic check. Returns the domain with its updated status. Safe to repeat while you fix the records; it sends no mail.
Required scope: email:write.
path Parameters
id^dom_[0-9A-Za-z]{22}… · requiredThe id of the email domain (dom_…).
Headers
Lelemon-Subaccount^sub_[0-9A-Za-z]{22}…The subaccount (sub_…) this request acts on. Only for the keys of a platform account; without it the request acts on the account itself.
Idempotency-KeyMakes the request safe to retry. Once it starts running, its final response (2xx, 4xx or 5xx) is kept for 24 hours and the same key gets it back, without repeating the effect. A request rejected before it runs leaves the key free. A replayed create omits the secret. The same key with a different request is rejected with 409 idempotency_key_reused.
Check the DNS records now › Responses
objectidnamestatusOnly a verified domain can send. Add the records; verification completes on its own once DNS answers, and POST /v2/email/domains/{id}/verify checks it right away.
defaultFrominboundAgentIdverifiedAtcreatedAtupdatedAt