WhatsApp API

Engage closely with your customers on WhatsApp through our API, using the most intuitive approach: craft custom messages in text, image, audio, and document formats, and send them immediately to target recipients.

Normal Text

API Sample Code

curl --location --request POST 'https://app.pingbix.com/WAApi/send' \
--form 'userid="Pingbix"' \
--form 'password="xxxxx"' \
--form 'msg="You have to check out this amazing messaging service https://www.whatsapp.com/"' \
--form 'wabaNumber="911234567890"' \
--form 'duplicatecheck="true"' \
--form 'output="json"' \
--form 'mobile="919999999999"' \
--form 'sendMethod="quick"' \
--form 'msgType="text"' \
--form 'previewUrl="true"' \
--form 'scheduleTime="2022-01-20 00:00:00"'
                

Fields Rule

FieldDescription
TextMaximum character length for text is 4096 characters.
preview_urlValues should be true|false. If you set to true, preview of URL will be shown.

Media - Audio

API Sample Code

curl --location --request POST 'https://app.pingbix.com/WAApi/send' \
--form 'userid="Pingbix"' \
--form 'password="xxxxx"' \
--form 'mediaUrl="https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_700KB.mp3"' \
--form 'wabaNumber="911234567890"' \
--form 'duplicatecheck="true"' \
--form 'mobile="919999999999"' \
--form 'sendMethod="quick"' \
--form 'msgType="media"' \
--form 'mediaType="audio"' \
--form 'output="json"' \
--form 'scheduleTime="2022-01-20 00:00:00"'
                    

Fields Rule

FieldDescription
Audio Extensionsaudio/aac, audio/mp4, audio/amr, audio/mpeg,
audio/ogg; codecs=opus
Note: The base audio/ogg type is not supported.
Max Media SizePost-Processing Media Size after encryption should be 16 MB
captionCaption NOT allowed in Audio types messages.
linkRequired when type is audio.
The protocol and URL of the media to be sent. Use only with HTTP/HTTPS URLs. Do not use this field when message type is set to text.

Media - Document

API Sample Code (With Caption)

curl --location --request POST 'https://app.pingbix.com/WAApi/send' \
--form 'userid="Pingbix"' \
--form 'password="xxxxx"' \
--form 'mediaUrl="https://assets.ctfassets.net/l3l0sjr15nav/29D2yYGKlHNm0fB2YM1uW4/8e638080a0603252b1a50f35ae8762fd/Get_Started_With_Smallpdf.pdf"' \
--form 'wabaNumber="911234567890"' \
--form 'duplicatecheck="true"' \
--form 'mobile="919999999999"' \
--form 'sendMethod="quick"' \
--form 'msgType="media"' \
--form 'caption="Hello this is caption"' \
--form 'mediaType="document"' \
--form 'fileName="TestFile.pdf"' \
--form 'output="json"' \
--form 'scheduleTime="2022-01-20 00:00:00"'
                    

Fields Rule

FieldDescription
Document ExtensionsAny valid MIME-type.
Max Media SizePost-Processing Media Size after encryption should be 100 MB
filenameOptional Describes the filename for the specific document. Use only with document media.
captionMaximum characters length for caption is 1024 characters.
linkRequired when type is document.
The protocol and URL of the media to be sent. Use only with HTTP/HTTPS URLs.

Media - Image

API Sample Code (With Caption)

curl --location --request POST 'https://app.pingbix.com/WAApi/send' \
--form 'userid="Pingbix"' \
--form 'password="xxxxx"' \
--form 'mediaUrl="https://asia.olympus-imaging.com/content/000107507.jpg"' \
--form 'wabaNumber="911234567890"' \
--form 'duplicatecheck="true"' \
--form 'mobile="919999999999"' \
--form 'sendMethod="quick"' \
--form 'msgType="media"' \
--form 'caption="Hello this is caption"' \
--form 'mediaType="image"' \
--form 'output="json"' \
--form 'scheduleTime="2022-01-20 00:00:00"'
                    

Fields Rule

FieldDescription
Image Extensionsimage/jpeg, image/png
Max Media SizePost-Processing Media Size after encryption should be 5 MB
captionOptional Maximum characters length for caption is 1024 characters.
linkRequired when type is image.
The protocol and URL of the media to be sent. Use only with HTTP/HTTPS URLs.

Media - Video

API Sample Code (With Caption)

curl --location --request POST 'https://app.pingbix.com/WAApi/send' \
--form 'userid="Pingbix"' \
--form 'password="xxxxx"' \
--form 'mediaUrl="https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4"' \
--form 'wabaNumber="911234567890"' \
--form 'duplicatecheck="true"' \
--form 'mobile="919999999999"' \
--form 'sendMethod="quick"' \
--form 'msgType="media"' \
--form 'caption="Hello this is caption"' \
--form 'mediaType="video"' \
--form 'output="json"' \
--form 'scheduleTime="2022-01-20 00:00:00"'
                    

Fields Rule

FieldDescription
Video Extensionsvideo/mp4, video/3gpp
Max Media SizePost-Processing Media Size after encryption should be 16 MB
captionMaximum characters length for caption is 1024 characters.
linkRequired when type is video.
The protocol and URL of the media to be sent. Use only with HTTP/HTTPS URLs.

Location

API Sample Code

curl --location --request POST 'https://app.pingbix.com/WAApi/send' \
--form 'userid="Pingbix"' \
--form 'password="xxxxx"' \
--form 'wabaNumber="911234567890"' \
--form 'duplicatecheck="true"' \
--form 'mobile="919999999999"' \
--form 'sendMethod="quick"' \
--form 'msgType="location"' \
--form 'output="json"' \
--form 'scheduleTime="2022-01-20 00:00:00"' \
--form 'msg="{
\"longitude\": -122.425332,
\"latitude\": 37.758056,
\"name\": \"Facebook HQ\",
\"address\": \"1 Hacker Way, Menlo Park, CA 94025\"
}"'
                    

Fields Rule

FieldDescription
longitudeRequired. Longitude of the location.
latitudeRequired. Latitude of the location.
nameOptional. Name of the location.
addressOptional. Address of the location. Only displayed if name is present.

Sticker

API Sample Code

curl --location --request POST 'https://app.pingbix.com/WAApi/send' \
--form 'userid="Pingbix"' \
--form 'password="xxxxx"' \
--form 'msg="{
  \"link\": \"https://img-05.stickers.cloud/packs/4536baa9-c14b-4d3e-964a-0cd4871eb11c/webp/431e0c1c-a10a-428d-a0bc-c7ad0741b940.webp\"
}"' \
--form 'wabaNumber="911234567890"' \
--form 'duplicatecheck="true"' \
--form 'output="json"' \
--form 'mobile="919999999999"' \
--form 'sendMethod="quick"' \
--form 'msgType="sticker"'
                    

Fields Rule

FieldDescription
linkRequired when type is sticker. The protocol and URL of the media to be sent. Use only with HTTP/HTTPS URLs.
msgTypemsgType needs to be sticker.

Interactive - Messages With Buttons

API Sample Code

curl --location --request POST 'https://app.pingbix.com/WAApi/send' \
--form 'userid="Pingbix"' \
--form 'password="xxxxx"' \
--form 'wabaNumber="911234567890"' \
--form 'duplicatecheck="true"' \
--form 'mobile="919999999999"' \
--form 'sendMethod="quick"' \
--form 'msgType="reply"' \
--form 'scheduleTime="2022-01-20 00:00:00"' \
--form 'output="json"' \
--form 'msg="{
  \"header\": {
    \"type\": \"text\",
    \"text\": \"This the header\"
  },
  \"body\": {
    \"text\": \"This is body\"
  },
  \"footer\": {
    \"text\": \"This is footer\"
  },
  \"action\": {
    \"buttons\": [
      {\"type\": \"reply\", \"reply\": {\"id\": \"id1\", \"title\": \"Button1\"}},
      {\"type\": \"reply\", \"reply\": {\"id\": \"id2\", \"title\": \"Button2\"}},
      {\"type\": \"reply\", \"reply\": {\"id\": \"id3\", \"title\": \"Button3\"}}
    ]
  }
}"'
                    

Fields Rule

FieldDescription
headerOptional. If included, set type to `text` and add a `text` field.
bodyRequired. Your message's body.
footerOptional. Your message's footer.
actionRequired. Contains the `buttons` array. You can have up to 3 buttons.

Interactive - Media With Buttons

API Sample Code (Image)

curl --location --request POST 'https://app.pingbix.com/WAApi/send' \
--form 'userid="Pingbix"' \
--form 'password="xxxxx"' \
--form 'wabaNumber="911234567890"' \
--form 'duplicatecheck="true"' \
--form 'mobile="919999999999"' \
--form 'sendMethod="quick"' \
--form 'msgType="reply"' \
--form 'mediaType="image"' \
--form 'output="json"' \
--form 'msg="{
  \"header\": {
    \"type\": \"image\",
    \"image\": {
      \"link\": \"https://asia.olympus-imaging.com/content/000107507.jpg\"
    }
  },
  \"body\": { \"text\": \"This is body\" },
  \"footer\": { \"text\": \"This is footer\" },
  \"action\": {
    \"buttons\": [
      {\"type\": \"reply\", \"reply\": {\"id\": \"id1\", \"title\": \"Button1\"}}
    ]
  }
}"'
                    

Fields Rule

FieldDescription
headerRequired for media. Set `type` to `image`, `video`, or `document`. Include the corresponding object with a `link`.
bodyRequired. Your message's body.
footerOptional. Your message's footer.
actionRequired. Contains the `buttons` array.

Frequently Asked Questions

How do I start using WhatsApp messaging with Pingbix?

To use WhatsApp messaging with Pingbix, you first have to create an account on the Pingbix platform. Upon registration, you will need to follow the setup instructions to integrate your WhatsApp Business API into Pingbix. Right after the integration, you can compose and send messages to your customers via the platform.

Is there a limit to the number of messages I can send via the WhatsApp Business API?

No, there is no specific limit to the number of messages you can send. However, WhatsApp imposes restrictions based on message types (session vs. template messages) and customer engagement rules.

How secure is my communication on WhatsApp via Pingbix?

All communications you send via Pingbix through WhatsApp are encrypted end-to-end. This means that your messages are kept safe. We adhere to a strict security policy regarding the safeguarding of your data and ensure your communication remains private and confidential.