POST
/api/v1/mail/sendEnviar correo desde un buzón conectado
Envía un correo electrónico utilizando un buzón conectado activo. Destinado a automatizaciones como n8n que necesitan enviar desde el buzón conectado del cliente.
Autenticación
Envía tu API key en el header x-api-key header.
x-api-keybearer
Cuerpo de la petición
obligatorioPublicApiSendMailRequestDto
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.
Ejemplo de petición
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": ""
}
Respuestas
200
PublicApiSendMailResponseDto
statusCoderequirednumber
countrequirednumber
errorrequiredstring
datarequiredPublicApiSendMailResultDto
Ejemplo de respuesta
json
{
"statusCode": 200,
"count": 0,
"error": null,
"data": {
"messageId": null,
"threadId": null,
"senderEmail": "",
"to": [
{
"email": "cliente@example.com",
"name": "Example Customer"
}
]
}
}
400Carga útil de solicitud no válida o buzón conectado inactivo
401No autorizado - clave API o token Bearer faltante o inválido
404No se encontró ningún buzón conectado activo para el remitente
502El servicio de correo conectado no pudo enviar el correo electrónico