← Volver al listado
POST/api/v1/mail/send

Enviar 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

obligatorio

PublicApiSendMailRequestDto

grantId

string

Optional connected mailbox identifier. Prefer senderEmail so the backend resolves the active mailbox.

senderEmail

string

Email address of the connected mailbox. Must match the configured mailbox.

fromName

string

torequired

array<PublicApiMailAddressDto>

cc

array<PublicApiMailAddressDto>

bcc

array<PublicApiMailAddressDto>

replyTo

array<PublicApiMailAddressDto>

replyToMessageId

string

subjectrequired

string

html

string

HTML email body.

text

string

Plain text fallback body.

metadata

object

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

statusCoderequired

number

countrequired

number

errorrequired

string

datarequired

PublicApiSendMailResultDto

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