curl --request POST \
--url https://tawked.com/v1/applications/{application}/campaigns/{campaign}/follow-up \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"after_hours": 36,
"template_language": "<string>",
"template_name": "<string>",
"mapping": {
"body": [
{
"fallback": "<string>",
"value": "<string>"
}
],
"buttons": [
{
"fallback": "<string>",
"value": "<string>"
}
],
"cards": {
"product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"slots": {
"body": [
{
"value": "<string>"
}
],
"buttons": [
{
"value": "<string>"
}
]
},
"source": "products"
},
"header": {
"fallback": "<string>",
"value": "<string>"
}
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
after_hours: 36,
template_language: '<string>',
template_name: '<string>',
mapping: {
body: JSON.stringify([{fallback: '<string>', value: '<string>'}]),
buttons: [{fallback: '<string>', value: '<string>'}],
cards: {
product_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
slots: {body: JSON.stringify([{value: '<string>'}]), buttons: [{value: '<string>'}]},
source: 'products'
},
header: {fallback: '<string>', value: '<string>'}
}
})
};
fetch('https://tawked.com/v1/applications/{application}/campaigns/{campaign}/follow-up', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tawked.com/v1/applications/{application}/campaigns/{campaign}/follow-up",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'after_hours' => 36,
'template_language' => '<string>',
'template_name' => '<string>',
'mapping' => [
'body' => [
[
'fallback' => '<string>',
'value' => '<string>'
]
],
'buttons' => [
[
'fallback' => '<string>',
'value' => '<string>'
]
],
'cards' => [
'product_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'slots' => [
'body' => [
[
'value' => '<string>'
]
],
'buttons' => [
[
'value' => '<string>'
]
]
],
'source' => 'products'
],
'header' => [
'fallback' => '<string>',
'value' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://tawked.com/v1/applications/{application}/campaigns/{campaign}/follow-up"
payload = {
"after_hours": 36,
"template_language": "<string>",
"template_name": "<string>",
"mapping": {
"body": [
{
"fallback": "<string>",
"value": "<string>"
}
],
"buttons": [
{
"fallback": "<string>",
"value": "<string>"
}
],
"cards": {
"product_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"slots": {
"body": [{ "value": "<string>" }],
"buttons": [{ "value": "<string>" }]
},
"source": "products"
},
"header": {
"fallback": "<string>",
"value": "<string>"
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {}
}{
"error": "<string>",
"message": "<string>",
"fields": {},
"needs": "<string>",
"next": "<string>",
"did_you_mean": [
{}
],
"human_action": {
"reason": "connect_whatsapp",
"url": "<string>",
"say": "<string>",
"then": "<string>"
},
"approval": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"operation": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>",
"fields": {},
"needs": "<string>",
"next": "<string>",
"did_you_mean": [
{}
],
"human_action": {
"reason": "connect_whatsapp",
"url": "<string>",
"say": "<string>",
"then": "<string>"
},
"approval": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"operation": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>",
"fields": {},
"needs": "<string>",
"next": "<string>",
"did_you_mean": [
{}
],
"human_action": {
"reason": "connect_whatsapp",
"url": "<string>",
"say": "<string>",
"then": "<string>"
},
"approval": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"operation": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>",
"fields": {},
"needs": "<string>",
"next": "<string>",
"did_you_mean": [
{}
],
"human_action": {
"reason": "connect_whatsapp",
"url": "<string>",
"say": "<string>",
"then": "<string>"
},
"approval": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"operation": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>",
"fields": {},
"needs": "<string>",
"next": "<string>",
"did_you_mean": [
{}
],
"human_action": {
"reason": "connect_whatsapp",
"url": "<string>",
"say": "<string>",
"then": "<string>"
},
"approval": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"operation": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>",
"fields": {},
"needs": "<string>",
"next": "<string>",
"did_you_mean": [
{}
],
"human_action": {
"reason": "connect_whatsapp",
"url": "<string>",
"say": "<string>",
"then": "<string>"
},
"approval": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"operation": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"human_action": {
"reason": "connect_whatsapp",
"url": "<string>",
"say": "<string>",
"then": "<string>"
},
"approval": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"operation": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
},
"message": "<string>",
"fields": {},
"needs": "<string>",
"next": "<string>",
"did_you_mean": [
{}
]
}{
"error": "<string>",
"message": "<string>",
"fields": {},
"needs": "<string>",
"next": "<string>",
"did_you_mean": [
{}
],
"human_action": {
"reason": "connect_whatsapp",
"url": "<string>",
"say": "<string>",
"then": "<string>"
},
"approval": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"operation": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}campaigns.campaigns.follow_up
This messages customers again and charges each follow-up as a campaign message. Refusals, each answered before any approval is asked: campaign_ended (completed or cancelled for good), offer_ended, follow_up_late, and follow_up_template for a template that cannot be sent as mapped (not approved, not marketing, no stop instruction, a variable left out).
curl --request POST \
--url https://tawked.com/v1/applications/{application}/campaigns/{campaign}/follow-up \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"after_hours": 36,
"template_language": "<string>",
"template_name": "<string>",
"mapping": {
"body": [
{
"fallback": "<string>",
"value": "<string>"
}
],
"buttons": [
{
"fallback": "<string>",
"value": "<string>"
}
],
"cards": {
"product_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"slots": {
"body": [
{
"value": "<string>"
}
],
"buttons": [
{
"value": "<string>"
}
]
},
"source": "products"
},
"header": {
"fallback": "<string>",
"value": "<string>"
}
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
after_hours: 36,
template_language: '<string>',
template_name: '<string>',
mapping: {
body: JSON.stringify([{fallback: '<string>', value: '<string>'}]),
buttons: [{fallback: '<string>', value: '<string>'}],
cards: {
product_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
slots: {body: JSON.stringify([{value: '<string>'}]), buttons: [{value: '<string>'}]},
source: 'products'
},
header: {fallback: '<string>', value: '<string>'}
}
})
};
fetch('https://tawked.com/v1/applications/{application}/campaigns/{campaign}/follow-up', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tawked.com/v1/applications/{application}/campaigns/{campaign}/follow-up",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'after_hours' => 36,
'template_language' => '<string>',
'template_name' => '<string>',
'mapping' => [
'body' => [
[
'fallback' => '<string>',
'value' => '<string>'
]
],
'buttons' => [
[
'fallback' => '<string>',
'value' => '<string>'
]
],
'cards' => [
'product_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'slots' => [
'body' => [
[
'value' => '<string>'
]
],
'buttons' => [
[
'value' => '<string>'
]
]
],
'source' => 'products'
],
'header' => [
'fallback' => '<string>',
'value' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://tawked.com/v1/applications/{application}/campaigns/{campaign}/follow-up"
payload = {
"after_hours": 36,
"template_language": "<string>",
"template_name": "<string>",
"mapping": {
"body": [
{
"fallback": "<string>",
"value": "<string>"
}
],
"buttons": [
{
"fallback": "<string>",
"value": "<string>"
}
],
"cards": {
"product_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"slots": {
"body": [{ "value": "<string>" }],
"buttons": [{ "value": "<string>" }]
},
"source": "products"
},
"header": {
"fallback": "<string>",
"value": "<string>"
}
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {}
}{
"error": "<string>",
"message": "<string>",
"fields": {},
"needs": "<string>",
"next": "<string>",
"did_you_mean": [
{}
],
"human_action": {
"reason": "connect_whatsapp",
"url": "<string>",
"say": "<string>",
"then": "<string>"
},
"approval": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"operation": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>",
"fields": {},
"needs": "<string>",
"next": "<string>",
"did_you_mean": [
{}
],
"human_action": {
"reason": "connect_whatsapp",
"url": "<string>",
"say": "<string>",
"then": "<string>"
},
"approval": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"operation": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>",
"fields": {},
"needs": "<string>",
"next": "<string>",
"did_you_mean": [
{}
],
"human_action": {
"reason": "connect_whatsapp",
"url": "<string>",
"say": "<string>",
"then": "<string>"
},
"approval": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"operation": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>",
"fields": {},
"needs": "<string>",
"next": "<string>",
"did_you_mean": [
{}
],
"human_action": {
"reason": "connect_whatsapp",
"url": "<string>",
"say": "<string>",
"then": "<string>"
},
"approval": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"operation": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>",
"fields": {},
"needs": "<string>",
"next": "<string>",
"did_you_mean": [
{}
],
"human_action": {
"reason": "connect_whatsapp",
"url": "<string>",
"say": "<string>",
"then": "<string>"
},
"approval": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"operation": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>",
"fields": {},
"needs": "<string>",
"next": "<string>",
"did_you_mean": [
{}
],
"human_action": {
"reason": "connect_whatsapp",
"url": "<string>",
"say": "<string>",
"then": "<string>"
},
"approval": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"operation": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"human_action": {
"reason": "connect_whatsapp",
"url": "<string>",
"say": "<string>",
"then": "<string>"
},
"approval": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"operation": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
},
"message": "<string>",
"fields": {},
"needs": "<string>",
"next": "<string>",
"did_you_mean": [
{}
]
}{
"error": "<string>",
"message": "<string>",
"fields": {},
"needs": "<string>",
"next": "<string>",
"did_you_mean": [
{}
],
"human_action": {
"reason": "connect_whatsapp",
"url": "<string>",
"say": "<string>",
"then": "<string>"
},
"approval": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"operation": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}
}Authorizations
Headers
One per intended change (1 to 128 printable ASCII characters): a retry with the same key and the same request answers the stored 2xx with Idempotent-Replayed: true, for 24 hours. A 428 approval_required is never stored: send the approved request again with the same key or none. An answer that carried a secret shown once is never kept: its replay answers 409 idempotency_secret_not_replayable with the id of what it made.
1 - 128