- Create Message Request Payload
You can create a message
You can create a message
The kind of message being created. Values: in_app, email or whatsapp. inapp is also accepted for in-app messages, and responses always show in-app messages as inapp.
For email messages, the style of the outgoing message. Possible values plain or personal. For whatsapp messages, the name of the WhatsApp message template to send. A template that doesn't exist returns a 400 error.
A recipient of a message
The time the message was created. If not provided, the current time will be used.
Whether a conversation should be opened in the inbox for the message without the contact replying. Defaults to false if not provided. For whatsapp messages, a conversation is always opened and this field is ignored.
The components of the WhatsApp template, with the values for its variables. Required for whatsapp messages.
[ { "type": "BODY", "parameters": [ … ] } ]
The locale of the WhatsApp template to send, such as en. If you leave it out, the contact's messenger locale is used, then the workspace locale. A template that isn't available in the locale returns a 400 error.
- message_type: `email`.
- message_type: `inapp`.
- message_type: `whatsapp`.
{ "message_type": "in_app", "subject": "Thanks for everything", "body": "Hello there", "template": "plain", "from": { "type": "admin", "id": 394051, "whatsapp_number": "+14155550123" }, "to": { "type": "user", "id": "536e564f316c83104c000020" }, "cc": { "type": "user", "id": "536e564f316c83104c000020" }, "bcc": { "type": "user", "id": "536e564f316c83104c000020" }, "created_at": 1590000000, "create_conversation_without_contact_reply": true, "components": [ { … } ], "locale": "en", "brand_id": "1234" }