ChakraHQ APIs
HomeSign In
HomeSign In
  1. Whatsapp
  • API Keys
  • Response Format
  • Whatsapp
    • Inbound Events Webhook
    • Pass Through APIs
      • Create WhatsApp Message Template (pass-through)
      • List WhatsApp Message Templates (pass-through)
      • Update WhatsApp Message Template (pass-through)
    • Send Whatsapp Template Message For Process
      POST
    • Send Whatsapp Template Message For A Phone Number
      POST
    • Upload Public Media
      POST
    • Whatsapp Messages API (pass-through)
      POST
  • Platform
    • Process
      • Fetch Process By Id
      • List Processes
      • Create Process
      • Update Process
      • Update Process By Primary Key
      • Delete Process
      • Delete Process By Primary Key Value
      • Bulk Create Process API
      • Bulk Update Process API
    • Task
      • Create Task API
    • User
      • List Users API
      • List Users API (V2)
      • Fetch User API
      • Fetch User API (V2)
      • Update User API
    • Photo
      • Fetch Photo API
      • Upload Photo API
      • Upload Photo API With Id
    • Background Job
      • Fetch Background Job
      • Fetch Background Job Entries API
    • Fetch Config
      GET
  1. Whatsapp

Send Whatsapp Template Message For Process

POST
https://api.chakrahq.com/v1/ext/plugin/whatsapp/{pluginId}/process/{procedureShortId}/{primaryKeyOrId}/send-template-message
This API allows you to send a whatsapp template message for a process

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Path Params
pluginId
string 
required
The whatsapp plugin id where you have connected your whatsapp account. Its an UUID. You can copy it from the plugin details page url /admin/plugin/d83e1d23-50b8-4d87-8f92-842a0ac516f6 The last part of the url is the plugin id
procedureShortId
string 
required
This is the short id of the procedure to which the process bleongs to. Commmon procedure shortIds are lead, ticket, case, ...
primaryKeyOrId
string 
required
Provide the primary key or the uuid of the process for whom you want to send the template
Body Params application/json
whatsappPhoneNumberId
string 
required
Provide the whatsapp phone number id for the phone number you are going to use to send this message. Connected phone numbers and their Ids can be found in the plugin page
templateName
string 
required
Provide the whatsapp template name here
mapping
array[object (MappingType) {2}] 
optional
An array of mappings of tempalte parameters and their values. Should be in MappingType format
schemaPropertyName
string 
required
The property name - for template {{1}}, 1 is the schemaPropertyName
schemaPropertyValue
string 
required
The value mapped to this property
imageUrl
string 
optional
If your template contains an image attachment, you need to provide a public url where the target image is hosted. You can use public media upload api to generate this url
videoUrl
string 
optional
If your template contains an video attachment, you need to provide a public url where the target video is hosted. You can use public media upload api to generate this url
documentUrl
string 
optional
If your template contains an document attachment, you need to provide a public url where the target document is hosted. You can use public media upload api to generate this url
headerMapping
array[object (MappingType) {2}] 
optional
An array of mappings of header template parameters and their values. Should be in MappingType format
schemaPropertyName
string 
required
The property name - for template {{1}}, 1 is the schemaPropertyName
schemaPropertyValue
string 
required
The value mapped to this property
buttonMapping
array[object (MappingType) {2}] 
optional
An array of mappings of button template parameters and their values. Should be in MappingType format
schemaPropertyName
string 
required
The property name - for template {{1}}, 1 is the schemaPropertyName
schemaPropertyValue
string 
required
The value mapped to this property
Example
{
    "whatsappPhoneNumberId": "775966265503012",
    "templateName": "christmas_promo_23",
    "mapping": [
        {
            "schemaPropertyName": "1",
            "schemaPropertyValue": "John"
        }
    ],
    "imageUrl": "https://chakra-public-media.chakrahq.com/5fc9f8e3-af4a-4f29-bfd8-6c02e3abe3ee/2024-10-17/9b755981-74f7-4cde-b495-cd7039991964.png",
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.chakrahq.com/v1/ext/plugin/whatsapp//process///send-template-message' \
--header 'Content-Type: application/json' \
--data-raw '{
    "whatsappPhoneNumberId": "775966265503012",
    "templateName": "christmas_promo_23",
    "mapping": [
        {
            "schemaPropertyName": "1",
            "schemaPropertyValue": "John"
        }
    ],
    "imageUrl": "https://chakra-public-media.chakrahq.com/5fc9f8e3-af4a-4f29-bfd8-6c02e3abe3ee/2024-10-17/9b755981-74f7-4cde-b495-cd7039991964.png",
}'

Responses

🟢200Success
application/json
Body
_data
object 
required
id
string 
required
createdAt
integer 
required
updatedAt
integer 
required
externalId
string 
required
provider
string 
required
dataType
string 
required
body
object 
required
text
string 
required
attachments
null 
required
deliveryStatus
string 
required
direction
string 
required
timestamp
integer 
required
context
object 
required
adhocAgent
null 
required
source
object 
required
team
string 
required
chat
null 
required
plugin
string 
required
contact
null 
required
user
string 
required
procedure
null 
required
process
string 
required
campaign
null 
required
inReplyTo
null 
required
_errors
array[string]
optional
Example
{
	"_data": {
		"id": "359e676b-624f-45e9-833d-e109ae414557",
		"createdAt": 1729231290842,
		"updatedAt": 1729231290842,
		"externalId": "wamid.HBgMOTE5OTAxMjU4NDMzFQIAERgSRjE4OEZFM0UyOTc1ODMyOUZEAA==",
		"provider": "WHATSAPP",
		"dataType": "text",
		"body": {
			"body": "Hi John,\nThis christmas decorate make your loved ones happier with Chakra Wellness products. Visit our website to know more!\n❄🎄"
		},
		"text": "Hi John,\nThis christmas decorate make your loved ones happier with Chakra Wellness products. Visit our website to know more!\n❄🎄",
		"attachments": null,
		"deliveryStatus": "SENT",
		"direction": "OUTBOUND",
		"timestamp": 1729231290387,
		"context": {
			"contactIdentifier": "919901258433",
			"messageTemplateId": "e296d971-305c-4009-a9b6-2cb7fd1ee3cf"
		},
		"adhocAgent": null,
		"source": {
			"sourceId": "send-template-message-for-process",
			"sourceType": "API"
		},
		"team": "5fc9f8e3-af4a-4f29-bfd8-6c02e3abe3ee",
		"chat": null,
		"plugin": "d83e1d23-50b8-4d87-8f92-842a0ac516f6",
		"contact": null,
		"user": "5bc39b1d-5aa7-48a3-9436-51c103a18a3b",
		"procedure": null,
		"process": "b656bf3b-4248-47f9-b145-c64452ae2b00",
		"campaign": null,
		"inReplyTo": null
	}
}
Previous
Update WhatsApp Message Template (pass-through)
Next
Send Whatsapp Template Message For A Phone Number
Built with