Email API

The endpoint allows you to start sending emails through Mailazy Email API.


Send Email

Sends email via the REST API interface. Pass the components of the messages such as To, From, Subject as JSON payload.

Endpoint:

https://api.mailazy.com/v1/mail/send

JSON Payload:

FieldDescriptionTypeSample Value
toEmail address of the recipient(s)Array<String>["john@example.com"]
fromEmail address of the senderString"Sender <sender@domain.com>"
reply_toReply to addressString"Sender <sender@domain.com>"
subjectEmail subjectString"Hello, World!"
contentEmail contentArray<Object>[{"type": "text/plain", "value": "<Content>"},{"type": "text/html", "value": "<Content>"}]

Example:

curl --location --request POST 'https://api.mailazy.com/v1/mail/send' \
    --header 'X-Api-Key: <API KEY>' \
    --header 'X-Api-Secret: <API SECRET>' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "to" : ["john@example.com"],
        "from": "Sender <sender@example.com>",
        "subject": "Hello, World!",
        "content": [{
            "type": "text/plain",
            "value": "Hey! ....."
        },{
            "type": "text/html",
            "value": "Hey! ....."
        }]
    }'