Skip to main content

1. Base URL

Use the following sandbox host for testing:
Replace the sandbox host with your assigned production CPaaS+ host when moving to production.

2. Sender Hash

The sender hash identifies the registered WhatsApp sender. It forms part of the message API endpoint:
Find the sender hash in the CPaaS+ Portal under Numbers in the WhatsApp channel. Example:
Replace this example with the sender hash assigned to your account.

3. Authentication

All API requests require a Bearer token in the Authorization header.
Generate the token from the API tab in the CPaaS+ Portal. Each token is associated with a specific WhatsApp sender account. Store the token securely. It cannot be viewed again in the Portal after generation. Tokens can be generated or revoked from the same API tab.

4. Request Headers

Include the following headers in API requests:
Use JSON for message request bodies. Media uploads use multipart/form-data.

5. Message Endpoint

Send WhatsApp messages using the following endpoint:
Replace {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:
Follow the field requirements for the relevant message type. Phone numbers included inside a contact-card object represent the contact details being shared, not the message recipient.

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 as image.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.