WhatsApp for Business messaging. The Sinch WhatsApp Business Messaging API provides a rich, enterprise grade messaging solution for clients who wish to communicate with their customers via WhatsApp.
The Sinch WhatsApp Business Messaging API provides a rich, enterprise grade messaging solution for clients who wish to communicate with their customers via WhatsApp.
With over 1.5 billion users globally using WhatsApp regularly to communicate with friends and family, it really does represent the digital extension of the users living room. It’s the inner circle of your customer’s communication so bringing your trusted brand communications to that inner circle has huge potential.
Integrating the Sinch WhatsApp Business Messaging API with your own backend systems enables Rich, High fidelity, contextual conversations to be established via the WhatsApp channel.
Try out the WhatsApp API live in our new tutorial here WhatsApp Tutorial.
The Sinch WhatsApp API securely authenticates via a bot identifier and bearer token pair. During the initial client on boarding process, these will be provided by your account manager.
To be able to authenticate the access token needs to be passed. For all WhatsApp end-points it's required to set the bearer token in the authorization HTTP header like:
Authorization: Bearer AbCdEf123456. Where the string
AbCdEf123456 is the bearer authorization token.
If no authentication header is present or if the bearer token is invalid, the API will respond with HTTP 401 Unauthorized.
|Security scheme type||HTTP|
|HTTP Authorization Scheme||bearer|
Responses with status
400 Bad Request,
403 Forbidden, and
500 Internal Server Error will present a JSON object in the body explaining the error.
It has the following structure:
||A error message describing the general error.||
||Human readable description of the error. Can be used for debugging.||
The following WhatsApp URLs can be used by the WhatsApp API. There are servers in the US and the EU. The link related to the region in which the Sender ID has been provisioned should be used. Note that these URLs can't be used interchangeably.
The following Swagger UI URLs can be used to test our API.
|Authorization||Bearer token described above||Always|
||When body provided|
Any media file sent through the Sinch WhatsApp API will be processed before it's sent to the recipient. While the maximum file size for every uploaded media is 100 MB, be aware that the file also needs to meet the post-processing limits listed below. This means that a message with a file size that's larger than the post-processing limits is not guaranteed to be sent successfully. The result will depend on whether WhatsApp's post-processing of the media file can reduce the file size sufficiently or not.
|Message type||Supported content types||Post-processing size limit|
|document||Any content type listed for other message types,
Video files must have H.264 video codec and AAC audio codec.
Media URLs in callbacks expire after seven days.
WhatsApp allows formatting your messages. Use these formatting symbols to format a message:
|Asterisk (*)||Bold||This is *nice*.|
|Underscore (_)||Italics||She said _yes_!|
|Tilde (~)||What a ~rainy~ sunny day!|
|Three backticks (```)||
To use emojis in text, encode them with UTF-16 unicode.
|:white-check-mark:||\u2705 repair the car|
|:musical-keyboard:||I like \uD83C\uDFB9|
Following language codes are supported for template messages
A business can provide a simple method via a Web Page, or embedded within a QR-Code to enable an end user to initiate a conversation through the WhatsApp Business API. While not a specific endpoint of the WhatsApp Business API, this method has been tested to work. From the businesses perspective, this avoids initial notification charges as the conversation is customer initiated. Furthermore, because the customer care session is immediately activated, an implicit 24 hour opt-in enables the business to reply during that time period.
The business would be advised to obtain an explicit, compliant opt-in during that initial customer care session to enable the business to initiate a future conversation using a notification (Template)
Conversation start URL:
With path variable parameters:
|phone||Your WhatsApp Business Account phone number||E.164 format without '+' sign. example 447537453580||Yes|
|text||Message content to be sent to your account||Any text||No|
Example to open conversation with +44 7537 453580:
Example to send message with content "Text message content" to +44 7537 453580: