Skip to content

/mail/send

POST
/mail/send
curl --request POST \
--url https://example.com/api/v1/mail/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "to": [ "example" ], "cc": [], "bcc": [], "subject": "", "text": "", "html": "example", "inReplyTo": "example", "replyFolder": "example", "replyUid": 1, "draftUid": 1, "uploads": [], "forwardParts": [] }'

Send through Postfix submission as the mailbox, append to Sent, flag the replied message, drop the draft. rejected lists the recipients Postfix refused while accepting the rest. Refuses with 409 uploads_missing, sending nothing, when an upload id no longer resolves — uploads are held in memory, so an API restart loses them.

Media typeapplication/json
object
to
required
Array<string>
>= 1 items
cc
Array<string>
default:
bcc
Array<string>
default:
subject
string
"" <= 998 characters
text
string
""
html
string
<= 2000000 characters
inReplyTo
string
replyFolder
string
replyUid
integer
> 0 <= 9007199254740991
draftUid
integer
> 0 <= 9007199254740991
uploads
Array<string>
default:
forwardParts
Array<object>
default:
object
folder
required
string
uid
required
integer
> 0 <= 9007199254740991
part
required
string

Default Response

Media typeapplication/json
object
messageId
required
string
sentFolder
required
string
uid
required
integer
>= -9007199254740991 <= 9007199254740991
rejected
required
Array<object>
object
address
required
string
reason
required
string
Examplegenerated
{
"messageId": "example",
"sentFolder": "example",
"uid": 1,
"rejected": [
{
"address": "example",
"reason": "example"
}
]
}