SENDO WhatsApp API

Send WhatsApp messages to your clients.


Send Message with template

POSThttps:/api.sendo.cloud/api/whatsapp/send-message

This endpoint is used to send WhatsApp messages to a specific destination using a template.

Required attributes


FieldTypeDescriptionDefault ValueOptionalExample
templateNamestringThe name of the template to use for the message.noneNotemplate-name
senderNumberstringThe phone number of the sender.noneNo+1234567890
recipientNumberstringThe phone number of the receiver.noneNo+1234567890
variablesobjectAn object that contains variables to be inserted into the body of the message.noneNo { "name": "John Doe", "age": 30, "city": "New York" }

Request body.


curl --location 'https:/api.sendo.cloud/api/whatsapp/send-message' 
--header 'apikey: API-KEY' 
--header 'Content-Type: application/json' 
--data-raw  '{
"templateName": "url_button_test",
"senderNumber": "593967793436",
"recipientNumber": "+50584533001",
"variables": {"nombre":"Jasson"}
}'
Response .
CodeDescription
200Successful
{
  "status": {
    "messageId": "68c9802d-1910-4dba-9048-4a6c98787a0e",
    "message": "Message received"
  }
}

Server responses.


Send Message without template

POSThttps:/api.sendo.cloud/api/whatsapp/interaction

This endpoint is used to send WhatsApp messages to a specific destination without a template.

NOTE: You may call this endpoint only once the user has engaged with your business, either by sending a message to your number or by replying to a message that was delivered through a template.

FieldTypeDescriptionDefault ValueOptionalCommentsExample
senderNumberstringThe phone number of the sender.noneNo1234567890
recipientNumberstringThe phone number of the receiver.noneNo+1234567890
typestringType of Messages such as text, video, imagen or documentnoneNotext

NOTE: See table below to know more about the types of messages.


Interaction Types

Text Message.
FieldTypeDescriptionDefault ValueOptionalCommentsExample
bodystringThe text of the message.noneNoHello world
preview_urlbooleanThe phone number of the receiver.noneYestrue


Request body.

curl --location 'https:/api.sendo.cloud/api/whatsapp/send-message' --header 'apikey: API-KEY' --header 'Content-Type: application/json' --data-raw '{
"senderNumber": "593967793436",
"recipientNumber": "+50584533001",
"type": "text",
"text": {"body":"This is an example message"}
}'
Response
CodeDescription
200Successful
{
  "status": {
    "messageId": "68c9802d-1910-4dba-9048-4a6c98787a0e",
    "message": "Message received"
  }
}

Server responses.

Image Message.
FieldTypeDescriptionDefault ValueOptionalCommentsExample
linkstringLink of the image.noneNohttps://www.sendo.cloud/images/logo.png
captionstringCaption of the image.noneYesThis is an example image

NOTE: Watch this table for supported images for META.


Request body.

curl --location 'https:/api.sendo.cloud/api/whatsapp/send-message' --header 'apikey: API-KEY' --header 'Content-Type: application/json' --data-raw '{
"senderNumber": "593967793436",
"recipientNumber": "+50584533001",
"type": "image",
"image": {"link":"https://www.sendo.cloud/images/logo.png","caption":"This is an example image"}
}'
Response
CodeDescription
200Successful
{
  "status": {
    "messageId": "68c9802d-1910-4dba-9048-4a6c98787a0e",
    "message": "Message received"
  }
}

Video Message.
FieldTypeDescriptionDefault ValueOptionalCommentsExample
linkstringLink of the video.noneNohttps://www.sendo.cloud/images/test.mp4
captionstringCaption of the video.noneYesThis is an example video

NOTE: Watch this table for supported images for META.


Request body.

curl --location 'https:/api.sendo.cloud/api/whatsapp/send-message' --header 'apikey: API-KEY' --header 'Content-Type: application/json' --data-raw '{
"senderNumber": "593967793436",
"recipientNumber": "+50584533001",
"type": "video",
"video": {"link":"https://www.sendo.cloud/images/test.mp4","caption":"This is an example video"}
}'
Response
CodeDescription
200Successful
{
  "status": {
    "messageId": "68c9802d-1910-4dba-9048-4a6c98787a0e",
    "message": "Message received"
  }
}

Document Message.
FieldTypeDescriptionDefault ValueOptionalCommentsExample
linkstringLink of the document.noneNohttps://www.sendo.cloud/images/test_document.pdf
filenamestringFilename of the document.noneNotest_document.pdf
captionstringCaption of the document.noneYesThis is an example document

NOTE: Watch this table for supported images for META.


Request body.

curl --location 'https:/api.sendo.cloud/api/whatsapp/send-message' --header 'apikey: API-KEY' --header 'Content-Type: application/json' --data-raw '{
"senderNumber": "593967793436",
"recipientNumber": "+50584533001",
"type": "document",
"document": {"link":"https://www.sendo.cloud/images/test_document.pdf","filename":"test_document.pdf","caption":"This is an example document"}
}'
Response
CodeDescription
200Successful
{
  "status": {
    "messageId": "68c9802d-1910-4dba-9048-4a6c98787a0e",
    "message": "Message received"
  }
}

Audio Message.
FieldTypeDescriptionDefault ValueOptionalCommentsExample
linkstringLink of the audio.noneNohttps://www.sendo.cloud/images/test_audio.mp4

NOTE: Watch this table for supported images for META.


Request body.

curl --location 'https:/api.sendo.cloud/api/whatsapp/send-message' \
--header 'apikey: API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"senderNumber": "593967793436",
"recipientNumber": "+50584533001",
"type": "audio",
"audio": {"link":"https://www.sendo.cloud/images/test_audio.mp4"}
}'
Response
CodeDescription
200Successful
{
  "status": {
    "messageId": "68c9802d-1910-4dba-9048-4a6c98787a0e",
    "message": "Message received"
  }
}

Download Whatsapp Media File

GEThttps:/api.sendo.cloud/api/whatsapp/file?id=<FILE_ID>

This endpoint is used to download a file send by the user.

NOTE: This endpoint delivers the file via streaming, so the response is a stream of bytes.

FieldTypeDescriptionDefault ValueOptionalCommentsExample
FILE_IDstringThe id of the file given by META WhatsAppnoneNo1234567890


Response .
CodeDescription
200Successful
File is sent via streaming

Server responses.


Webhook

Callback

POSThttps://yourdomain/api/webhook

Webhooks allow you to receive real-time HTTP notifications about events in the Sendo Platform, such as event notifications or messages from customers.

Required Fields


FieldTypeDescriptionExample
message_idstringInternal message ID provided by Sendo8fe793e2-3a5e-452e-a92a-363666248098
waba_idstringWhatsApp business account ID generated by Meta432857389903424
valueobjectEvent metadata enriched by Meta, See Value Definition
fieldstringIndicates the type of Event that has been requested.messages

Request Body

Example Response : Status Event Update

{
  "message_id": "8fe793e2-3a5e-452e-a92a-363666248098",
  "waba_id": "432857389903424",
  "value": {
    "messaging_product": "whatsapp",
    "metadata": {
      "display_phone_number": "593967793436",
      "phone_number_id": "401156743081691"
    },
    "statuses": [
      {
        "id": "wamid.HBgLNTA1ODY3MjA3NzUVAgARGBIzM0U2M0VFNEM2Njc5ODU1ODEA",
        "status": "sent",
        "timestamp": "1737575163",
        "recipient_id": "50586720775",
        "conversation": {
          "id": "634fb63c5b96fa266692ca32f5494304",
          "expiration_timestamp": "1737661620",
          "origin": {
            "type": "marketing"
          }
        }
      }
    ]
  },
  "field": "messages"
}

Example 2 Response : Text sent by customer as reply

{
  "message_id": "8fe793e2-3a5e-452e-a92a-363666248098",
  "waba_id": "432857389903424",
  "value": {
    "messaging_product": "whatsapp",
    "metadata": {
      "display_phone_number": "593967793436",
      "phone_number_id": "401156743081691"
    },
    "contacts": [
      {
        "profile": {
          "name": "Jorge Argeñal"
        },
        "wa_id": "50586720775"
      }
    ],
    "messages": [
      {
        "from": "50586720775",
        "id": "wamid.HBgLNTA1ODY3MjA3NzUVAgASGBQzQTREQTFCRTU1MkFBOTIxMjlCMQA=",
        "timestamp": "1737575679",
        "text": {
          "body": "Si acepto"
        },
        "type": "text"
      }
    ]
  },
  "field": "messages"
}

Example 3 Response : Video sent by customer as reply

{
  "message_id": "8fe793e2-3a5e-452e-a92a-363666248098",
  "waba_id": "432857389903424",
  "value": {
    "messaging_product": "whatsapp",
    "metadata": {
      "display_phone_number": "593967793436",
      "phone_number_id": "401156743081691"
    },
    "contacts": [
      {
        "profile": {
          "name": "Jorge Argeñal"
        },
        "wa_id": "50586720775"
      }
    ],
    "messages": [
      {
        "from": "50586720775",
        "id": "wamid.HBgLNTA1ODY3MjA3NzUVAgASGBQzQTYxMDgxMTk1MUJBNkQ3MTkxQQA=",
        "timestamp": "1738183832",
        "type": "video",
        "video": {
          "caption": "Hola",
          "mime_type": "video/mp4",
          "sha256": "8D96O65u2ZpA+OQBdw1PvKQOH0dSDNtXENfnue8z8DM=",
          "id": "1804954366989548"
        }
      }
    ]
  },
  "field": "messages"
}

Example 4 Response : Image sent by customer as reply

{
  "message_id": "8fe793e2-3a5e-452e-a92a-363666248098",
  "waba_id": "432857389903424",
  "value": {
    "messaging_product": "whatsapp",
    "metadata": {
      "display_phone_number": "593967793436",
      "phone_number_id": "401156743081691"
    },
    "contacts": [
      {
        "profile": {
          "name": "Jorge Argeñal"
        },
        "wa_id": "50586720775"
      }
    ],
    "messages": [
      {
        "from": "50586720775",
        "id": "wamid.HBgLNTA1ODY3MjA3NzUVAgASGBQzQUQyQURFMDI1OUEzRDlCQzQ3RAA=",
        "timestamp": "1738183940",
        "type": "image",
        "image": {
          "caption": "Hola",
          "mime_type": "image/jpeg",
          "sha256": "jVIbmT753LbDCN5/msrHSOE2DKEPbwfvltygDNRTdpo=",
          "id": "957620909803014"
        }
      }
    ]
  },
  "field": "messages"
}

Example 5 Response : Document sent by customer as reply

{
  "message_id": "8fe793e2-3a5e-452e-a92a-363666248098",
  "waba_id": "432857389903424",
  "value": {
    "messaging_product": "whatsapp",
    "metadata": {
      "display_phone_number": "593967793436",
      "phone_number_id": "401156743081691"
    },
    "contacts": [
      {
        "profile": {
          "name": "Jorge Argeñal"
        },
        "wa_id": "50586720775"
      }
    ],
    "messages": [
      {
        "from": "50586720775",
        "id": "wamid.HBgLNTA1ODY3MjA3NzUVAgASGBQzQTk0ODlBNzQ4M0U4NzdBMDE5RgA=",
        "timestamp": "1738184020",
        "type": "document",
        "document": {
          "caption": "Hola",
          "filename": "01_BTS_Sendo_v1.0-2.docx",
          "mime_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
          "sha256": "pX/nG5rjWwc+FY7vZSCmJGbkyXpVTW+/IPNL+1jZRMk=",
          "id": "2143224972803342"
        }
      }
    ]
  },
  "field": "messages"
}

Callback Response

The webhook expects an HTTP code response which might be:

CodeDescription
200Successful with return data
201Successful with no return data
204Successful with no return data

Attribute Definitions

Value

FieldTypeDescriptionExample
messaging_productstringType of product or service in Meta
metadataobjectObject containing sender details.
contactsobjectObject containing destination details
statusesobjectObject containing message event details, including sent, delivered, read, and other statuses. See Statuses Definition
messagesobjectObject containing message attributes. See Messages Definition

Statuses

FieldTypeDescription
idstringWhatsApp message ID provided by Meta
statusstringStatus event
timestampstringDate and time when the event occurred.
recipient_idstringCustomer phone number
conversationobjectObject containing conversation details

Messages

FieldTypeDescription
idstringWhatsApp message ID provided by Meta
timestampstringDate and time when the event occurred.
fromstringCustomer phone number
textobjectObject containing text details.
videoobjectObject containing video details.
imageobjectObject containing image details
documentobjectObject containing document details.
typestringType of Messages such as text, video, image or document


META Support Media Types

Image

Image TypeExtensionMIME TypeMax Size
JPEG.jpgimage/jpeg5MB
PNG.pngimage/png5MB

Video

NOTE: Only H.264 video codec and AAC audio codec supported. Single audio stream or no audio stream only.

Video TypeExtensionMIME TypeMax Size
3GPP.3gpvideo/3gpp16MB
MP4 Video.mp4video/mp416MB

Document

Document TypeExtensionMIME TypeMax Size
Text.txttext/plain100 MB
Microsoft Excel.xlsapplication/vnd.ms-excel100 MB
Microsoft Excel.xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet100 MB
Microsoft Word.docapplication/msword100 MB
Microsoft Word.docxapplication/vnd.openxmlformats-officedocument.wordprocessingml.document100 MB
Microsoft PowerPoint.pptapplication/vnd.ms-powerpoint100 MB
Microsoft PowerPoint.pptxapplication/vnd.openxmlformats-officedocument.presentationml.presentation100 MB
PDF.pdfapplication/pdf100 MB

Audio

Audio TypeExtensionMIME TypeMax Size
AAC.aacaudio/aac16 MB
AMR.amraudio/amr16 MB
MP3.mp3audio/mpeg16 MB
MP4 Audio.m4aaudio/mp416 MB
OGG Audio.oggaudio/ogg (OPUS codecs only; base audio/ogg not supported; mono input only)16 MB