WhatsApp Integration Docs

Table of Contents

• Prerequisites
• HTTP Request
• Request Body
• JSON Representation
• Response Body

Prerequisites

You have verified WhatsApp Business API.You have template messages approved.You have already created an API Campaign.

HTTP Request

POST https://backend.api-wa.co/campaign/digintra/api

Request Body

The request body contains data with the following structure:

JSON Representation

{
 "apiKey": string,
 "campaignName": string,
 "destination": string,
 "userName": string,
 "source": string,
 "media": {
    "url": string,
    "filename": string
 },
 "templateParams": [
   string
 ],
 "tags": [
   string
 ],
 "attributes": {
   "attribute_name": string
 }
}

Example Postman Request

Step 1 – Setup request type to “POST”

Step 2 – Setup URL

Step 3 – Choose body type “raw”

Step 4 – Select “JSON” type

Step 5 – Set content of the request

NOTES:

  • Optional fields are not necessary for the request payload
  • The medial URL provided in the media object should be publically accessible, otherwise, the request will be rejected
  • The length of the template params array should be equal to the number of params required in the campaign whose name is provided in campaignName field. Otherwise, the request will be rejected
  • Tags should be created in your project before using them. It can be done by anyone with manager level access
  • If a tag doesn’t exist in your project, it will be ignored
  • Attributes should be added to the project before using them. It can be done by anyone with manager level access
  • If an attribute doesn’t exist in your project, it will be ignored

Response Body

If successful, the response body will return a status of 200.