Template

POST              Create Template

HEADERS

Authorization

{token}

				
					con{
    "template_name": "{template name}",
    "language": [
        "{lang code}"
    ],
    "template_type": "template",
    "template_category": "MARKETING/TRANSACTIONAL",
    "components": {
        "header": {
            "type": "image/video/document",
            "example": "{sample media url}"
        },
        "body": {
            "text": "{body text}"
        },
        "footer": {
            "text": "{footer text}"
        },
        "buttons": {
            "type": "call_to_action",
            "elements": [
                {
                    "label": "{phone number label}",
                    "contact_no": "{phone number with + and country code}"
                },
                {
                    "label": "{url label}",
                    "type": "static/dynamic",
                    "website": "{url with https}"
                }
            ]
        }
    }
}ole.log( 'Code is Poetry' );
				
			
Body

raw (json)

				
					{
    "template_name": "{template name}",
    "language": [
        "{lang code}"
    ],
    "template_type": "template",
    "template_category": "MARKETING/TRANSACTIONAL",
    "components": {
        "header": {
            "type": "image/video/document",
            "example": "{sample media url}"
        },
        "body": {
            "text": "{body text}"
        },
        "footer": {
            "text": "{footer text}"
        },
        "buttons": {
            "type": "call_to_action",
            "elements": [
                {
                    "label": "{phone number label}",
                    "contact_no": "{phone number with + and country code}"
                },
                {
                    "label": "{url label}",
                    "type": "static/dynamic",
                    "website": "{url with https}"
                }
            ]
        }
    }
}
				
			

GET           View Template Message

View Template message API helps you download all the approved and rejected list of templates added in the account.

HEADERS

Authorization

{token}

				
					curl --location 'https://apis.rmlconnect.net/wba/templates' \
--header 'Authorization: {token}' \
--data ''
				
			
Single Send Message

POST       Send Template Message API

API details:

This API is used to Broadcast WhatsApp pre-approved Messages (templates) to end user  

API Request Details
header Field Breakdown:

 header is a JSON string consisting of a set of mandatory keys that define the text or multimedia based header section of a template:

body Field Breakdown:

  body is a JSON string consisting of a text key that defines the variables of a template:

button Field Breakdown:

button is a JSON string consisting of a set of mandatory keys that define the dynamic variable pf the call to action url redirection button of a template:

Success Response Structure:

For every success request, a JSON response is sent with key as status, message, and request_id.

Failed Response Structure:

For every failed request, a JSON response is sent with key as status, message, and reason.

Note

  • TPS around 100 provided multi-threading is implemented and utilize keepalive connections option in HTTP Client to minimize SSL overhead and latency.
  • Templates are triggered to users who are out of 24 hour window.
HEADERS
Content-Type                 application/json
Authorization                 {token}

Body     raw

				
					{
	"phone": "{mobile number}",
    "extra": "{your value}",
    "enable_acculync": true,
	"media": {
		"type": "media_template",
		"template_name": "{your template}",
		"lang_code": "{lang_code}",
		"header": [
            {
                "image": {
                    "link": "{sample image url hosted publicly starting with https:// and ending with file extension}",
                    "file_name": "{sample media name and ending with file extension}"
                }
            }
        ],
		"body": [
			{
        		"text": "{variable}"
        	},
        	{
        		"text": "{variable}"
        	}
		],
        "button": [
        	{
        		"button_no": "0/1",
                "url": "{dynamic_url variable}"
        	}
        ]
	}
}
				
			

POST            Send flow template Copy

API details:

This API is used to Broadcast WhatsApp pre-approved Messages( templates) to end user  

API Request Details

media Field Breakdown:

media is a JSON string consisting of a set of mandatory keys that define the multimedia or button sections of a session response:

header Field Breakdown:

 header is a JSON string consisting of a set of mandatory keys that define the button based header section of a session response:

body Field Breakdown:

 body is a JSON string consisting of a text that defines the button options in session message:

button Field Breakdown:

button is a JSON string consisting of a set of mandatory keys of the button options in session message:

Success Response Structure:

For every success request, a JSON response is sent with key as status, message, and request_id.

Failed Response Structure:

For every failed request, a JSON response is sent with key as status, message, and reason.

Note

  • TPS around 100 provided multi-threading is implemented and utilize keepalive connections option in HTTP Client to minimize SSL overhead and latency.
  • End user incoming messages are received on callback shared by the the brand for the WhatsApp number. Response to those messages are sent using Session API.
  • Session works on rolling window concept which means brand’s get 24 hour to reply back from the last incoming messages timestamp.
  • Timestamp shared on callback is in unix timestamp.
  • Buttons are of 2 types: Interactive List menu (max 10) and Quick reply button (max 3).
  • Interactive list menu button supports only text in header.
  • Quick reply button supports both text and multimedia in header.

HEADERS

Content-Type                 application/json
Authorization                 {token}

Bulk Upload

POST      File Upload

HEADERS
Content-Type                 application/json
Authorization                 {token}
PARAMS
source             UI
debug              True

Body                  formdata

File                                                           
filename                        {file name}
file_mimetype              text/plain or text/csv
message                       {payload}
campaign_type            generalized/personalisd
				
					curl --location 'https://apis.rmlconnect.net/wba/v1/messages' \
--header 'Content-Type: application/json' \
--header 'Authorization: {token}' \
--data '{
	"phone": "{mobile number}",
    "extra": "{your value}",
    "enable_acculync": true,
	"media": {
		"type": "media_template",
		"template_name": "{your template}",
		"lang_code": "{lang_code}",
		"body": [
			{
        		"text": "{variable}"
        	},
        	{
        		"text": "{variable}"
        	}
		],
        "button": [
        	{
        		"button_no": "0/1",
                "url": "{dynamic_url variable}"
        	}
        ]
	}
}'
				
			
				
					{
  "message": "message received successfully",
  "status": "processing",
  "request_id": "794c3fd4-f142-11eb-8e02-0242ac120005"
}
				
			
				
					curl --location 'https://apis.rmlconnect.net/wba/v1/messages' \
--header 'Content-Type: application/json' \
--header 'Authorization: {token}' \
--data '{
    "phone": "{mobile number}",
    "text": "{sample text}",
    "enable_acculync": true,
    "extra": "{your value}"
}'
				
			
				
					{
  "message": "message received successfully",
  "status": "processing",
  "request_id": "794c3fd4-f142-11eb-8e02-0242ac120005"
}
				
			
				
					curl --location 'https://apis.rmlconnect.net/wba/v2/upload?source=UI' \
--header 'Authorization: {token}' \
--form 'file=@"/path/to/file"' \
--form 'filename="{file name}"' \
--form 'file_mimetype="text/plain or text/csv"' \
--form 'message="{payload}"' \
--form 'campaign_type="generalized/personalised"'
				
			

POST                 Send Bulk Campaign

HEADERS

Authorization                 {token}
Content-Type                 application/json
 
PARAMS
source             UI
debug              True

Body                  Raw