Ir al contenido

Enviar un correo

POST
/v1/mail/send
curl --request POST \
--url https://api.mailerdash.com/v1/mail/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "personalizations": [ { "to": [ { "email": "recipient@example.com", "name": "Recipient Name" } ] } ], "from": { "email": "no-reply@example-domain.com", "name": "Service Name" }, "subject": "Email subject", "content": [ { "type": "text/plain", "value": "Hello world" } ] }'

Envía un correo usando un payload tipo SendGrid. Requiere API key en el header Authorization.

Media type application/json
object
personalizations
required
Array<object>
>= 1 items
object
to
required
Array<object>
>= 1 items
object
email
required
string format: email
Example
recipient@example.com
name
string
Example
Recipient Name
from
required
object
email
required
string format: email
Example
no-reply@example-domain.com
name
string
Example
Service Name
subject
required
string
>= 1 characters
Example
Email subject
content
required
Array<object>
>= 1 items
object
type
required
string
Allowed values: text/plain text/html
Example
text/plain
value
required
string
Example
Hello world

Accepted – message queued for delivery

Media type application/json
object
message
string
app
string
Example
{
"message": "accepted",
"app": "example-app"
}

Invalid JSON or request body

Media type application/json
object
message
string
Example
{
"message": "Invalid JSON body"
}

Missing or invalid API key

From domain not authorized

Internal server error