Follow-ups
Create a follow-up type
POST
/
follow-up-types
Create a follow-up type
curl --request POST \
--url https://shortext.ny-corp.io/api/v2.0/follow-up-types \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"color": "#22c55e",
"delay_minutes": 60,
"interval_minutes": 1440,
"max_follow_ups": 2,
"active": true,
"overrides": [
{
"channel_id": "<string>",
"delay_minutes": 123,
"interval_minutes": 123,
"max_follow_ups": 123
}
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://shortext.ny-corp.io/api/v2.0/follow-up-types",
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([
'name' => '<string>',
'description' => '<string>',
'color' => '#22c55e',
'delay_minutes' => 60,
'interval_minutes' => 1440,
'max_follow_ups' => 2,
'active' => true,
'overrides' => [
[
'channel_id' => '<string>',
'delay_minutes' => 123,
'interval_minutes' => 123,
'max_follow_ups' => 123
]
]
]),
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({
name: '<string>',
description: '<string>',
color: '#22c55e',
delay_minutes: 60,
interval_minutes: 1440,
max_follow_ups: 2,
active: true,
overrides: [
{
channel_id: '<string>',
delay_minutes: 123,
interval_minutes: 123,
max_follow_ups: 123
}
]
})
};
fetch('https://shortext.ny-corp.io/api/v2.0/follow-up-types', 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-up-types"
payload = {
"name": "<string>",
"description": "<string>",
"color": "#22c55e",
"delay_minutes": 60,
"interval_minutes": 1440,
"max_follow_ups": 2,
"active": True,
"overrides": [
{
"channel_id": "<string>",
"delay_minutes": 123,
"interval_minutes": 123,
"max_follow_ups": 123
}
]
}
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": "FUI-XXXXX",
"name": "<string>",
"slug": "payment_follow_up",
"description": "<string>",
"color": "<string>",
"delay_minutes": 123,
"interval_minutes": 123,
"max_follow_ups": 123,
"active": true,
"overrides": [
{
"channel_id": "<string>",
"delay_minutes": 123,
"interval_minutes": 123,
"max_follow_ups": 123
}
],
"created_at": "2023-11-07T05:31:56Z"
},
"token": "<string>",
"trace_id": "<string>"
}Authorizations
Company API key, sent as Authorization: Bearer <key>. Create it in the dashboard (Developer > API Keys) with the permissions the integration needs.
Body
application/json
On update, only the fields given change; overrides, when given, replaces them all.
Required on creation
Maximum string length:
255Example:
"#22c55e"
Required range:
x >= 1Example:
60
Required range:
x >= 1Example:
1440
Required range:
1 <= x <= 10Example:
2
Show child attributes
Show child attributes
Response
200 - application/json
Always HTTP 200: the outcome is in success and code (absolute value of the response code).
⌘I
Create a follow-up type
curl --request POST \
--url https://shortext.ny-corp.io/api/v2.0/follow-up-types \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"color": "#22c55e",
"delay_minutes": 60,
"interval_minutes": 1440,
"max_follow_ups": 2,
"active": true,
"overrides": [
{
"channel_id": "<string>",
"delay_minutes": 123,
"interval_minutes": 123,
"max_follow_ups": 123
}
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://shortext.ny-corp.io/api/v2.0/follow-up-types",
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([
'name' => '<string>',
'description' => '<string>',
'color' => '#22c55e',
'delay_minutes' => 60,
'interval_minutes' => 1440,
'max_follow_ups' => 2,
'active' => true,
'overrides' => [
[
'channel_id' => '<string>',
'delay_minutes' => 123,
'interval_minutes' => 123,
'max_follow_ups' => 123
]
]
]),
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({
name: '<string>',
description: '<string>',
color: '#22c55e',
delay_minutes: 60,
interval_minutes: 1440,
max_follow_ups: 2,
active: true,
overrides: [
{
channel_id: '<string>',
delay_minutes: 123,
interval_minutes: 123,
max_follow_ups: 123
}
]
})
};
fetch('https://shortext.ny-corp.io/api/v2.0/follow-up-types', 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-up-types"
payload = {
"name": "<string>",
"description": "<string>",
"color": "#22c55e",
"delay_minutes": 60,
"interval_minutes": 1440,
"max_follow_ups": 2,
"active": True,
"overrides": [
{
"channel_id": "<string>",
"delay_minutes": 123,
"interval_minutes": 123,
"max_follow_ups": 123
}
]
}
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": "FUI-XXXXX",
"name": "<string>",
"slug": "payment_follow_up",
"description": "<string>",
"color": "<string>",
"delay_minutes": 123,
"interval_minutes": 123,
"max_follow_ups": 123,
"active": true,
"overrides": [
{
"channel_id": "<string>",
"delay_minutes": 123,
"interval_minutes": 123,
"max_follow_ups": 123
}
],
"created_at": "2023-11-07T05:31:56Z"
},
"token": "<string>",
"trace_id": "<string>"
}