1. Base URL
Use the following sandbox host for testing:2. Sender Hash
The sender hash identifies the registered WhatsApp sender. It forms part of the message API endpoint:3. Authentication
All API requests require a Bearer token in theAuthorization header.
4. Request Headers
Include the following headers in API requests:multipart/form-data.
5. Message Endpoint
Send WhatsApp messages using the following endpoint:{Sender Hash} with your registered sender’s hash.
Specify the message type in the JSON request body. For example, text messages use "type": "text", while image messages use "type": "image" and include an image object.
6. Recipient Number Format
Pass the recipient’s WhatsApp number in international format without the leading+ sign.
Example:
7. Media Messages
Image, audio, video, document, and sticker messages use a media ID to reference an uploaded file. Upload the media first, then pass the returned ID in the appropriate message object, such asimage.id or audio.id.
The media upload endpoint and full request schema are not specified here. Refer to the available media upload documentation for those details.
8. Integration Considerations
- Use the sandbox host for testing and your assigned production host for live traffic.
- Obtain the sender hash from the CPaaS+ Portal.
- Generate and securely store the Bearer token.
- Format recipient numbers without a leading
+sign. - Upload media before sending messages that reference a media ID.
- Check the 24-hour customer-service window described in Integration Notes.