/messagesCreate a message
Creates a message initiated by an admin as an in-app message, email, or WhatsApp message. Choose a message_type and provide the fields required for that type, including a sender and recipient. Set from.type to admin; using a user or lead as the sender instead creates a contact-initiated conversation and causes to, cc, and bcc to be ignored.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Message details. Required fields depend on message_type: email requires subject, body, template, from, and to; in-app requires body, from, and to; WhatsApp requires template, components, from, and to.
One documented failure
parameter_invalidBody is required
One documented failure
unauthorizedAccess Token Invalid
One documented failure
api_plan_restrictedActive subscription needed.
One documented failure
parameter_not_foundNo subject supplied for email message
A 400 is returned when an email message has no body. A 401 is returned when the request is unauthorized. A 403 is returned when the API plan restricts this operation. A 422 is returned when an email message has no subject. Set message_type to in_app, email, or whatsapp and supply the fields required for that type; from.type must be admin to create an admin-initiated message.