POST
/api/v1/mail/sendSend mail from a connected mailbox
Sends an email using an active connected mailbox. Intended for automations such as n8n that need to send from the customer's connected mailbox.
Authentication
Send your API key in the x-api-key header.
x-api-keybearer
Request body
requiredPublicApiSendMailRequestDto
grantIdstring
Optional connected mailbox identifier. Prefer senderEmail so the backend resolves the active mailbox.
senderEmailstring
Email address of the connected mailbox. Must match the configured mailbox.
fromNamestring
torequiredarray<PublicApiMailAddressDto>
ccarray<PublicApiMailAddressDto>
bccarray<PublicApiMailAddressDto>
replyToarray<PublicApiMailAddressDto>
replyToMessageIdstring
subjectrequiredstring
htmlstring
HTML email body.
textstring
Plain text fallback body.
metadataobject
Optional metadata for tracing the n8n execution.
Example request
json
{
"grantId": "",
"senderEmail": "sender@example.com",
"fromName": "Example Sender",
"to": [
{
"email": "cliente@example.com",
"name": "Example Customer"
}
],
"cc": [
{
"email": "cliente@example.com",
"name": "Example Customer"
}
],
"bcc": [
{
"email": "cliente@example.com",
"name": "Example Customer"
}
],
"replyTo": [
{
"email": "cliente@example.com",
"name": "Example Customer"
}
],
"replyToMessageId": "",
"subject": "Information about your request",
"html": "",
"text": "",
"metadata": ""
}
Responses
200
PublicApiSendMailResponseDto
statusCoderequirednumber
countrequirednumber
errorrequiredstring
datarequiredPublicApiSendMailResultDto
Example response
json
{
"statusCode": 200,
"count": 0,
"error": null,
"data": {
"messageId": null,
"threadId": null,
"senderEmail": "",
"to": [
{
"email": "cliente@example.com",
"name": "Example Customer"
}
]
}
}
400Invalid request payload or inactive connected mailbox
401Unauthorized - missing or invalid API key or Bearer token
404No active connected mailbox found for the sender
502The connected mail service failed to send the email