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.5bn 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 is 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 and
401 Unauthorized 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.|
We recently added support for a EU server. We are currently working to add a production server in Asia, so stay tuned!
The following WhatsApp URLs can be used by the WhatsApp API. We have servers in the US and the EU. Link related to the region in which the Sender ID has been provisioned should be used. Note, those URLs cannot be used interchangeably.
The following Swagger UI URLs can be used to test our API.
|Authorization||Bearer token described above||Always|
|Content-Type||Should be ||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 can be compressed to meet the post-processing limits listed below.
|Message type||Supported content types||Post-processing size limit|
|document||Any content type listed for other message types,||100 MB|
Video files must have H.264 video codec and AAC audio codec.
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 (```)||```print 'Success';```|
To use emojis in text, encode them with UTF-16 unicode.
|\u2705 repair the car|
|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. E.g. 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:
Updated 17 days ago
Get started today