0% found this document useful (0 votes)
2 views4 pages

Zigchat API

The document provides API payload formats for triggering event-based workflows and sending WhatsApp messages using pre-approved templates through Zigchat. It includes sample cURL commands for sending event messages and templates, along with expected success and failure response formats. Additionally, it outlines a webhook cURL command for the Stylespeaks event with required headers and data structure.

Uploaded by

mehul.thakar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views4 pages

Zigchat API

The document provides API payload formats for triggering event-based workflows and sending WhatsApp messages using pre-approved templates through Zigchat. It includes sample cURL commands for sending event messages and templates, along with expected success and failure response formats. Additionally, it outlines a webhook cURL command for the Stylespeaks event with required headers and data structure.

Uploaded by

mehul.thakar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Zigchat - API PAYLOADs

1. Format for triggering event based workflow


This is an api in which custom params can be sent in context
variables,corresponding to which a workflow will be configured
Sample payload

curl --location --request POST 'https://api.zigchat.com/api/v1/botify/send-event-message' \


--header 'access-key: XXXXmbLXi6y1c9VmwlFKVXa0Kuci3yhiL6XXXX' \
--header 'access-secret:
jtNIF7aKCaiMIWbpeVU2Lxxxxxj1b7Xq9UUE4FEZ5jSCOvavsuafruQAt6igE7BDueEEoFJoWlJ' \
--header 'ts: 1681xx14572' \
--header 'Input-token:
7c19c9fac91890ce5bxxxxxx1ce92b42d0a95e48649aa57158cb9acb804075e16b8b265550d31009ab6df7d9a914a
ea077eb8060c427xxxxxxb061e' \
--header 'Content-Type: application/json' \
--data-raw '{
"company_handle": "9188XXXXXXXX",
"channel_type": "WA_XXXX",
"send_now": "true",
"event_name": "tgowa_51",
"to": "918829971661",
"context_variables": {
"name":"test"
}
}'

2. Format for sending Whatsapp message (Pre Approved template
Sample payload

curl --location --request POST 'https://api.zigchat.com/api/v1/botify/send-


template' \
--header 'access-key: 8rY6jacohxxxxxxxMYRIz2nnNW0W88k33ZXh6' \
--header 'access-secret:
RkTnE4I2fZsEMBkxxxxxxxgYGhOZPGZZQavOiqB1XBoS2v5zF' \
--header 'ts: 1683xxx6121' \
--header 'Input-token:
21ba1f8c227b7665d02xxxxxxdde13257c4d931bb32c741b9a17f91dada564368
c77eb4af3f0bfbf1c4d7f73b1824caxx0903999357' \
--header 'Content-Type: application/json' \
--data-raw '{
"template_id": 4684,
"to": "9188296*****",
"company_handle": "918xxxx7694",
"channel_type": "WA_INFOBIP",
"header": {
"placeholder":
"https://s3.ap-south-1.amazonaws.com/girnar-botify/template-media/
cvhROBJzPUlDYCcF9h9DBB7LQ90aWdR846iX7pOu1683890668031/
dreamcast_m-badge.png"
},
"data_attributes": {
"1": "test1",
“2”:”var 2”
},
"buttons": [
{
"index": 1,
"Follow us on Insta": "https://www.instagram.com/hbs_india/"
}
]
}'

Responses:

Success

{
"timestamp": 1684321258695,
"status": 200,
"message": null,
"error": null,
"result": null,
"transaction_id": "14a0761f-33be-4f33-9186-d700deb3bac1",
"http_status": "OK"
}

Failure


"timestamp": 1684321344291,
"status": 400,
"error": "Bad Request",

3. ZigChat Webhook Curl(Stylespeaks)

curl --location --request POST 'https://api.zigchat.com/api/v1/event/stylespeaks' \


--header 'content-type: application/json' \
--header 'organization-id: 368' \
--data-raw '{
"name": "Anuj",
"customer number": 918829971661
}'

You might also like