AAtlas CRM

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.

POST/messages

cURL

POST
bash
curl --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"}'

Authorization

Public API OAuth access token

messages:send

Sample Request Body

json
{  "channel": "WHATSAPP",  "from": "+15557654321",  "to": "+15551234567",  "message_type": "TEMPLATE",  "template_name": "order_update",  "language_code": "en"}

Additional Examples

Text message

json
{  "channel": "WHATSAPP",  "from": "+15557654321",  "to": "+15551234567",  "message_type": "TEXT",  "message": {    "type": "text",    "text": {      "body": "Hello, your booking is confirmed."    }  }}

Image message

json
{  "channel": "WHATSAPP",  "from": "+15557654321",  "to": "+15551234567",  "message_type": "IMAGE",  "message": {    "type": "image",    "image": {      "link": "https://example.com/image.jpg",      "caption": "Your receipt"    }  }}

Video message

json
{  "channel": "WHATSAPP",  "from": "+15557654321",  "to": "+15551234567",  "message_type": "VIDEO",  "message": {    "type": "video",    "video": {      "link": "https://example.com/demo.mp4",      "caption": "Product demo"    }  }}

Audio message

json
{  "channel": "WHATSAPP",  "from": "+15557654321",  "to": "+15551234567",  "message_type": "AUDIO",  "message": {    "type": "audio",    "audio": {      "link": "https://example.com/voice-note.mp3"    }  }}

Document message

json
{  "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

json
{  "channel": "WHATSAPP",  "from": "+15557654321",  "to": "+15551234567",  "message_type": "STICKER",  "message": {    "type": "sticker",    "sticker": {      "link": "https://example.com/sticker.webp"    }  }}

Location message

json
{  "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

json
{  "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

json
{  "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

json
{  "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

json
{  "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

json
{  "success": true,  "message": "Message sent successfully",  "data": {    "provider_message_id": "wamid.xxxxx",    "status": "ACCEPTED"  }}

Status Codes

CodeDescription
200Message was accepted for sending.
400Request 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.
401Public API access token is missing, invalid, expired, or revoked.
403Access token does not include the messages:send scope.
404Template message could not be matched to an active Notifyy template.

Headers

AuthorizationstringRequired

Public API OAuth bearer token.

Example: Bearer nfy_public_api_access_token

Content-TypestringRequired

Request body media type.

Example: application/json

Request body

channelstringOptional

Messaging channel. Defaults to WHATSAPP when omitted; only WHATSAPP is supported by this endpoint.

Example: WHATSAPP

fromstringRequired

WhatsApp business phone number configured in Notifyy.

Example: +15557654321

tostringRequired

Recipient WhatsApp phone number.

Example: +15551234567

message_typestringRequired

Message type. Common values include TEMPLATE, TEXT, IMAGE, VIDEO, AUDIO, DOCUMENT, STICKER, LOCATION, CONTACTS, and INTERACTIVE.

Example: TEMPLATE

template_namestringOptional

Template name. Required when message_type is TEMPLATE.

Example: order_update

language_codestringOptional

Template language code. Required when message_type is TEMPLATE.

Example: en

messageobjectOptional

Meta-compatible WhatsApp message payload. Required for non-template messages. Template messages can omit this field when template_name and language_code are sent.

attachmentsobject[]Optional

Optional attachment records forwarded with the message request when supported by the underlying message payload.

Response fields

successboolean

Indicates whether the Public API request succeeded.

messagestring

Human-readable Public API message.

data.provider_message_idstring

Provider message identifier when available.

data.statusstring

Message send status returned by Notifyy.

Example: ACCEPTED