Follow-ups
Reschedule a follow-up
Moves the next follow-up of a scheduled one.
POST
/
follow-ups
/
{id}
/
reschedule
Reschedule a follow-up
curl --request POST \
--url https://shortext.ny-corp.io/api/v2.0/follow-ups/{id}/reschedule \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scheduled_at": "2023-11-07T05:31:56Z"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://shortext.ny-corp.io/api/v2.0/follow-ups/{id}/reschedule",
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([
'scheduled_at' => '2023-11-07T05:31:56Z'
]),
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;
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({scheduled_at: '2023-11-07T05:31:56Z'})
};
fetch('https://shortext.ny-corp.io/api/v2.0/follow-ups/{id}/reschedule', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://shortext.ny-corp.io/api/v2.0/follow-ups/{id}/reschedule"
payload = { "scheduled_at": "2023-11-07T05:31:56Z" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"code": 1000,
"message": "Request success.",
"body": {
"id": "FUP-XXXXX",
"status": "scheduled",
"type": {
"id": "FUI-XXXXX",
"name": "<string>"
},
"conversation_id": "<string>",
"channel": "whatsapp",
"contact": {
"id": "<string>",
"name": "<string>",
"identifier": "<string>"
},
"campaign_id": "<string>",
"reason": "<string>",
"message": "<string>",
"set_by": "ai",
"scheduled_at": "2023-11-07T05:31:56Z",
"sent": 123,
"max_follow_ups": 123,
"last_sent_at": "2023-11-07T05:31:56Z",
"failed": 123,
"last_error": "<string>",
"closed_at": "2023-11-07T05:31:56Z",
"closed_by": "customer_replied",
"note": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"token": "<string>",
"trace_id": "<string>"
}Autorisations
Réponse
200 - application/json
Always HTTP 200: the outcome is in success and code (absolute value of the response code).
⌘I
Reschedule a follow-up
curl --request POST \
--url https://shortext.ny-corp.io/api/v2.0/follow-ups/{id}/reschedule \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"scheduled_at": "2023-11-07T05:31:56Z"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://shortext.ny-corp.io/api/v2.0/follow-ups/{id}/reschedule",
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([
'scheduled_at' => '2023-11-07T05:31:56Z'
]),
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;
}const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({scheduled_at: '2023-11-07T05:31:56Z'})
};
fetch('https://shortext.ny-corp.io/api/v2.0/follow-ups/{id}/reschedule', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://shortext.ny-corp.io/api/v2.0/follow-ups/{id}/reschedule"
payload = { "scheduled_at": "2023-11-07T05:31:56Z" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"code": 1000,
"message": "Request success.",
"body": {
"id": "FUP-XXXXX",
"status": "scheduled",
"type": {
"id": "FUI-XXXXX",
"name": "<string>"
},
"conversation_id": "<string>",
"channel": "whatsapp",
"contact": {
"id": "<string>",
"name": "<string>",
"identifier": "<string>"
},
"campaign_id": "<string>",
"reason": "<string>",
"message": "<string>",
"set_by": "ai",
"scheduled_at": "2023-11-07T05:31:56Z",
"sent": 123,
"max_follow_ups": 123,
"last_sent_at": "2023-11-07T05:31:56Z",
"failed": 123,
"last_error": "<string>",
"closed_at": "2023-11-07T05:31:56Z",
"closed_by": "customer_replied",
"note": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"token": "<string>",
"trace_id": "<string>"
}