v1

latestOpenAPI 3.0.02026-07-26868170.3 KB
messages

Send emails to recipients

post/messages

Request body

channel'email' required

Today, only the email channel is upported.

idempotency_keystring

This key must be used if you want to avoid duplicates. When receiving 2 calls with the same idempotency key, we refuse the second call. Can also be used by the sender to identify a specific message.

transactionalboolean

When 'true', the message will be considered as transactional. It means that it will bypass some optins and blacklists. Warning: in the case of a marketing message, you cannot communicate with a contact which is not optin, and so not use this option.

variablesobject

Those variables will be applied to all the messages in this sending. They are used to personalize the messages but won't modify the contacts in database.

Example request

{
  "channel": "email",
  "idempotency_key": "09ebe6d6-1733-451a-a165-7d43ac584895",
  "properties": {
    "content_id": "123a123a-123a-123a-123a-123a123a123a",
    "html_content": "<html><p>My template</p></html>",
    "options": {
      "expiration_date": "2024-07-26",
      "expiration_delay": 30
    },
    "sender_email": "splio@sender.com",
    "sender_name": "Splio",
    "reply_to": "reply-to@sender.com",
    "subject": "My email subject",
    "text_content": "My template"
  },
  "recipients": [
    {
      "contact_id": "MyContactCustomIdentifier",
      "email": "john.doe@example.com",
      "name": "John Doe",
      "resources": {
        "order_id": "1928412"
      }
    }
  ]
}

Response

MessageEvent sending request approved

message_idstring
statusstring

Example response

{
  "message_id": "52e96f8d-0c9f-479c-865c-964e633f5e76",
  "status": "received"
}