Messages
Send WhatsApp message
Send an outbound WhatsApp message using a business number configured in Notifyy.
Overview
Use this API to send WhatsApp template, text, media, contact, location, and interactive messages through Notifyy. The tenant is resolved from the Public API access token. For template messages, send template_name and language_code; Notifyy resolves the matching approved template. Non-template messages use a Meta-compatible WhatsApp payload in the message object and follow WhatsApp session rules. It requires public api oauth access token authentication and the messages:send scope.
/messagescURL
POSTcurl --request POST \ --url 'https://api.atlascrm.dev/v1/messages' \ --header 'Authorization: Bearer nfy_public_api_access_token' \ --header 'Content-Type: application/json' \ --data '{ "channel": "WHATSAPP", "from": "+15557654321", "to": "+15551234567", "message_type": "TEMPLATE", "template_name": "order_update", "language_code": "en"}'Sample Request Body
{ "channel": "WHATSAPP", "from": "+15557654321", "to": "+15551234567", "message_type": "TEMPLATE", "template_name": "order_update", "language_code": "en"}Additional Examples
Text message
{ "channel": "WHATSAPP", "from": "+15557654321", "to": "+15551234567", "message_type": "TEXT", "message": { "type": "text", "text": { "body": "Hello, your booking is confirmed." } }}Image message
{ "channel": "WHATSAPP", "from": "+15557654321", "to": "+15551234567", "message_type": "IMAGE", "message": { "type": "image", "image": { "link": "https://example.com/image.jpg", "caption": "Your receipt" } }}Video message
{ "channel": "WHATSAPP", "from": "+15557654321", "to": "+15551234567", "message_type": "VIDEO", "message": { "type": "video", "video": { "link": "https://example.com/demo.mp4", "caption": "Product demo" } }}Audio message
{ "channel": "WHATSAPP", "from": "+15557654321", "to": "+15551234567", "message_type": "AUDIO", "message": { "type": "audio", "audio": { "link": "https://example.com/voice-note.mp3" } }}Document message
{ "channel": "WHATSAPP", "from": "+15557654321", "to": "+15551234567", "message_type": "DOCUMENT", "message": { "type": "document", "document": { "link": "https://example.com/invoice.pdf", "filename": "invoice.pdf", "caption": "Invoice" } }}Sticker message
{ "channel": "WHATSAPP", "from": "+15557654321", "to": "+15551234567", "message_type": "STICKER", "message": { "type": "sticker", "sticker": { "link": "https://example.com/sticker.webp" } }}Location message
{ "channel": "WHATSAPP", "from": "+15557654321", "to": "+15551234567", "message_type": "LOCATION", "message": { "type": "location", "location": { "latitude": "37.483307", "longitude": "122.148981", "name": "Notifyy Store", "address": "1 Hacker Way, Menlo Park, CA" } }}Contact message
{ "channel": "WHATSAPP", "from": "+15557654321", "to": "+15551234567", "message_type": "CONTACTS", "message": { "type": "contacts", "contacts": [ { "name": { "formatted_name": "Jessica James", "first_name": "Jessica", "last_name": "James" }, "phones": [ { "phone": "+15551234567", "type": "WORK", "wa_id": "15551234567" } ] } ] }}Reply buttons message
{ "channel": "WHATSAPP", "from": "+15557654321", "to": "+15551234567", "message_type": "INTERACTIVE", "message": { "type": "interactive", "interactive": { "type": "button", "body": { "text": "Do you want to confirm this appointment?" }, "action": { "buttons": [ { "type": "reply", "reply": { "id": "confirm_appointment", "title": "Confirm" } }, { "type": "reply", "reply": { "id": "reschedule_appointment", "title": "Reschedule" } } ] } } }}List message
{ "channel": "WHATSAPP", "from": "+15557654321", "to": "+15551234567", "message_type": "INTERACTIVE", "message": { "type": "interactive", "interactive": { "type": "list", "body": { "text": "Choose an order action." }, "action": { "button": "View options", "sections": [ { "title": "Orders", "rows": [ { "id": "track_order", "title": "Track order", "description": "Get the latest shipment status" }, { "id": "cancel_order", "title": "Cancel order", "description": "Cancel before dispatch" } ] } ] } } }}WhatsApp Flow message
{ "channel": "WHATSAPP", "from": "+15557654321", "to": "+15551234567", "message_type": "INTERACTIVE", "message": { "type": "interactive", "interactive": { "type": "flow", "body": { "text": "Complete your appointment details." }, "action": { "name": "flow", "parameters": { "flow_message_version": "3", "flow_token": "appointment-flow-token", "flow_id": "1234567890", "flow_cta": "Open form", "flow_action": "navigate", "flow_action_payload": { "screen": "APPOINTMENT_DETAILS", "data": { "appointment_id": "apt_123" } } } } } }}Sample Response
{ "success": true, "message": "Message sent successfully", "data": { "provider_message_id": "wamid.xxxxx", "status": "ACCEPTED" }}Status Codes
| Code | Description |
|---|---|
| 200 | Message was accepted for sending. |
| 400 | Request body is invalid, an unsupported/internal field was sent, the channel is not WHATSAPP, required template fields are missing, or WhatsApp session rules prevent the send. |
| 401 | Public API access token is missing, invalid, expired, or revoked. |
| 403 | Access token does not include the messages:send scope. |
| 404 | Template message could not be matched to an active Notifyy template. |
Headers
Public API OAuth bearer token.
Example: Bearer nfy_public_api_access_token
Request body media type.
Example: application/json
| Object | Description |
|---|---|
Authorization string | RequiredPublic API OAuth bearer token. Example: Bearer nfy_public_api_access_token |
Content-Type string | RequiredRequest body media type. Example: application/json |
Request body
Messaging channel. Defaults to WHATSAPP when omitted; only WHATSAPP is supported by this endpoint.
Example: WHATSAPP
WhatsApp business phone number configured in Notifyy.
Example: +15557654321
Recipient WhatsApp phone number.
Example: +15551234567
Message type. Common values include TEMPLATE, TEXT, IMAGE, VIDEO, AUDIO, DOCUMENT, STICKER, LOCATION, CONTACTS, and INTERACTIVE.
Example: TEMPLATE
Template name. Required when message_type is TEMPLATE.
Example: order_update
Template language code. Required when message_type is TEMPLATE.
Example: en
Meta-compatible WhatsApp message payload. Required for non-template messages. Template messages can omit this field when template_name and language_code are sent.
Optional attachment records forwarded with the message request when supported by the underlying message payload.
| Object | Description |
|---|---|
channel string | OptionalMessaging channel. Defaults to WHATSAPP when omitted; only WHATSAPP is supported by this endpoint. Example: WHATSAPP |
from string | RequiredWhatsApp business phone number configured in Notifyy. Example: +15557654321 |
to string | RequiredRecipient WhatsApp phone number. Example: +15551234567 |
message_type string | RequiredMessage type. Common values include TEMPLATE, TEXT, IMAGE, VIDEO, AUDIO, DOCUMENT, STICKER, LOCATION, CONTACTS, and INTERACTIVE. Example: TEMPLATE |
template_name string | OptionalTemplate name. Required when message_type is TEMPLATE. Example: order_update |
language_code string | OptionalTemplate language code. Required when message_type is TEMPLATE. Example: en |
message object | OptionalMeta-compatible WhatsApp message payload. Required for non-template messages. Template messages can omit this field when template_name and language_code are sent. |
attachments object[] | OptionalOptional attachment records forwarded with the message request when supported by the underlying message payload. |
Response fields
Indicates whether the Public API request succeeded.
Human-readable Public API message.
Provider message identifier when available.
Message send status returned by Notifyy.
Example: ACCEPTED
| Object | Description |
|---|---|
success boolean | Indicates whether the Public API request succeeded. |
message string | Human-readable Public API message. |
data.provider_message_id string | Provider message identifier when available. |
data.status string | Message send status returned by Notifyy. Example: ACCEPTED |