API: Email
Addresses as an inbox or a forward, receiving and sending on or off, DMARC reports, mail record fixes, the inbox, the mail log and sending mail.
/domains/{domain}/email email.read Email state
The plan, receiving with its addresses, sending with what is left for the day, DMARC reports, the mail records with the fixes that apply, and the inbox room.
curl -H "Authorization: Bearer $KEY" \
https://my.cloud9.ir/api/customer/v1/domains/example.com/email /domains/{domain}/email/addresses email.settings Set the addresses
The whole list of addresses: each one kept in the inbox here or forwarded to your mailboxes. New forwarding mailboxes get a confirmation link.
| Body field | Values | Meaning |
|---|---|---|
addressesRequired | Text | The list of addresses; the list you send replaces the old one. |
addresses[].local | Text | The part before the @, or * for every address. |
addresses[].mode | inbox | forward | inbox: kept in the portal inbox; forward: sent to the mailboxes in to. |
addresses[].to | Text | For forward: the destination mailboxes. |
curl -X PUT -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{"addresses":[{"local":"info","mode":"forward","to":["owner@example.org"]},{"local":"sales","mode":"inbox"}]}' \
https://my.cloud9.ir/api/customer/v1/domains/example.com/email/addresses /domains/{domain}/email/receiving email.settings Receiving on or off
on sets our MX and SPF; off brings back the mail servers from before.
| Body field | Values | Meaning |
|---|---|---|
actionRequired | on | off | on or off. |
curl -X POST -H "Authorization: Bearer $KEY" \
https://my.cloud9.ir/api/customer/v1/domains/example.com/email/receiving /domains/{domain}/email/confirmation email.settings Send the confirmation link again
To a forwarding mailbox that has not confirmed yet; at most once in five minutes (429 too_soon).
| Body field | Values | Meaning |
|---|---|---|
emailRequired | Text | The forwarding mailbox. |
curl -X POST -H "Authorization: Bearer $KEY" \
https://my.cloud9.ir/api/customer/v1/domains/example.com/email/confirmation /domains/{domain}/email/sending email.settings Sending on or off
The SMTP user of the domain with DKIM; 422 not_in_plan when the plan does not send.
| Body field | Values | Meaning |
|---|---|---|
actionRequired | on | off | on or off. |
curl -X POST -H "Authorization: Bearer $KEY" \
https://my.cloud9.ir/api/customer/v1/domains/example.com/email/sending /domains/{domain}/email/dmarc email.settings DMARC reports on or off
Adds or removes our report address in the DMARC record.
| Body field | Values | Meaning |
|---|---|---|
actionRequired | on | off | on or off. |
curl -X POST -H "Authorization: Bearer $KEY" \
https://my.cloud9.ir/api/customer/v1/domains/example.com/email/dmarc /domains/{domain}/email/dmarc/reports email.read DMARC reports
Aggregate reports, newest first: who sent, how many, and whether DKIM and SPF passed.
curl -H "Authorization: Bearer $KEY" \
https://my.cloud9.ir/api/customer/v1/domains/example.com/email/dmarc/reports /domains/{domain}/email/security email.settings Fix a mail record
One of the fixes the email state lists for the domain.
| Body field | Values | Meaning |
|---|---|---|
fixRequired | add_spf | add_dmarc | strict_dmarc | no_mail | Which fix to apply. |
curl -X POST -H "Authorization: Bearer $KEY" \
https://my.cloud9.ir/api/customer/v1/domains/example.com/email/security /domains/{domain}/email/log email.read Mail log
Received mail, newest first, with what became of each message: forwarded, kept, deferred, bounced or rejected, and why.
| Query field | Values | Meaning |
|---|---|---|
limit | 1-500 | Most rows to return. |
curl -H "Authorization: Bearer $KEY" \
https://my.cloud9.ir/api/customer/v1/domains/example.com/email/log /domains/{domain}/email/inbox email.read Inbox
Received or sent messages without their text, newest first.
| Query field | Values | Meaning |
|---|---|---|
box | inbox | sent | inbox for received mail, sent for sent mail. |
limit | 1-200 | Most rows to return. |
curl -H "Authorization: Bearer $KEY" \
https://my.cloud9.ir/api/customer/v1/domains/example.com/email/inbox /domains/{domain}/email/inbox/{id} email.read One message
A message with its text (and HTML for sent mail).
curl -H "Authorization: Bearer $KEY" \
https://my.cloud9.ir/api/customer/v1/domains/example.com/email/inbox/9f2c1a7b3d4e5f60 /domains/{domain}/email/messages email.send Send mail
From an address of the domain to up to 20 recipients; with reply, the answer goes from the address the message was written to.
| Body field | Values | Meaning |
|---|---|---|
fromRequired | Text | The part before the @ of the sending address. |
name | Text | The sender name shown to the recipient. |
toRequired | Text | Recipients, comma separated or a list. |
cc | Text | Copies, comma separated or a list. |
subjectRequired | Text | Subject. |
body | Text | Plain text body. |
html | Text | HTML body (instead of body). |
reply | Text | An inbox message id to answer. |
curl -X POST -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{"from":"info","to":"someone@example.org","subject":"Hello","body":"Hello from the API"}' \
https://my.cloud9.ir/api/customer/v1/domains/example.com/email/messages {"ok":true,"data":{"id":"3f1c...","message_id":"...@example.com"}} No answer here? Sign in to the portal and open a ticket. Open a ticket