Campaigns
Create a draft campaign
POST
/
v1
/
campaigns
Create a draft campaign
curl --request POST \
--url https://api-us.larynth.com/v1/campaigns \
--header 'Content-Type: application/json' \
--cookie lx_session= \
--data '
{
"assistant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"amd_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cps": 49,
"end_at": "2023-11-07T05:31:56Z",
"informational_category": "<string>",
"max_attempts": 5,
"max_concurrent": 500,
"number_ids": [
"<string>"
],
"retry_policy": {
"busy": "<string>",
"failed": "<string>",
"no_answer": "<string>",
"voicemail_left": "<string>"
},
"ring_timeout_s": 37,
"start_at": "2023-11-07T05:31:56Z",
"voicemail_message": "<string>",
"windows": [
{
"days": [
123
],
"end_minute": 720,
"start_minute": 719
}
]
}
'import requests
url = "https://api-us.larynth.com/v1/campaigns"
payload = {
"assistant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"amd_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cps": 49,
"end_at": "2023-11-07T05:31:56Z",
"informational_category": "<string>",
"max_attempts": 5,
"max_concurrent": 500,
"number_ids": ["<string>"],
"retry_policy": {
"busy": "<string>",
"failed": "<string>",
"no_answer": "<string>",
"voicemail_left": "<string>"
},
"ring_timeout_s": 37,
"start_at": "2023-11-07T05:31:56Z",
"voicemail_message": "<string>",
"windows": [
{
"days": [123],
"end_minute": 720,
"start_minute": 719
}
]
}
headers = {
"cookie": "lx_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'lx_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
assistant_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
amd_profile_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
cps: 49,
end_at: '2023-11-07T05:31:56Z',
informational_category: '<string>',
max_attempts: 5,
max_concurrent: 500,
number_ids: ['<string>'],
retry_policy: {
busy: '<string>',
failed: '<string>',
no_answer: '<string>',
voicemail_left: '<string>'
},
ring_timeout_s: 37,
start_at: '2023-11-07T05:31:56Z',
voicemail_message: '<string>',
windows: [{days: [123], end_minute: 720, start_minute: 719}]
})
};
fetch('https://api-us.larynth.com/v1/campaigns', 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://api-us.larynth.com/v1/campaigns",
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([
'assistant_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'amd_profile_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'cps' => 49,
'end_at' => '2023-11-07T05:31:56Z',
'informational_category' => '<string>',
'max_attempts' => 5,
'max_concurrent' => 500,
'number_ids' => [
'<string>'
],
'retry_policy' => [
'busy' => '<string>',
'failed' => '<string>',
'no_answer' => '<string>',
'voicemail_left' => '<string>'
],
'ring_timeout_s' => 37,
'start_at' => '2023-11-07T05:31:56Z',
'voicemail_message' => '<string>',
'windows' => [
[
'days' => [
123
],
'end_minute' => 720,
'start_minute' => 719
]
]
]),
CURLOPT_COOKIE => "lx_session=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-us.larynth.com/v1/campaigns"
payload := strings.NewReader("{\n \"assistant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"amd_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cps\": 49,\n \"end_at\": \"2023-11-07T05:31:56Z\",\n \"informational_category\": \"<string>\",\n \"max_attempts\": 5,\n \"max_concurrent\": 500,\n \"number_ids\": [\n \"<string>\"\n ],\n \"retry_policy\": {\n \"busy\": \"<string>\",\n \"failed\": \"<string>\",\n \"no_answer\": \"<string>\",\n \"voicemail_left\": \"<string>\"\n },\n \"ring_timeout_s\": 37,\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"voicemail_message\": \"<string>\",\n \"windows\": [\n {\n \"days\": [\n 123\n ],\n \"end_minute\": 720,\n \"start_minute\": 719\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "lx_session=")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-us.larynth.com/v1/campaigns")
.header("cookie", "lx_session=")
.header("Content-Type", "application/json")
.body("{\n \"assistant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"amd_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cps\": 49,\n \"end_at\": \"2023-11-07T05:31:56Z\",\n \"informational_category\": \"<string>\",\n \"max_attempts\": 5,\n \"max_concurrent\": 500,\n \"number_ids\": [\n \"<string>\"\n ],\n \"retry_policy\": {\n \"busy\": \"<string>\",\n \"failed\": \"<string>\",\n \"no_answer\": \"<string>\",\n \"voicemail_left\": \"<string>\"\n },\n \"ring_timeout_s\": 37,\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"voicemail_message\": \"<string>\",\n \"windows\": [\n {\n \"days\": [\n 123\n ],\n \"end_minute\": 720,\n \"start_minute\": 719\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-us.larynth.com/v1/campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'lx_session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"assistant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"amd_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cps\": 49,\n \"end_at\": \"2023-11-07T05:31:56Z\",\n \"informational_category\": \"<string>\",\n \"max_attempts\": 5,\n \"max_concurrent\": 500,\n \"number_ids\": [\n \"<string>\"\n ],\n \"retry_policy\": {\n \"busy\": \"<string>\",\n \"failed\": \"<string>\",\n \"no_answer\": \"<string>\",\n \"voicemail_left\": \"<string>\"\n },\n \"ring_timeout_s\": 37,\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"voicemail_message\": \"<string>\",\n \"windows\": [\n {\n \"days\": [\n 123\n ],\n \"end_minute\": 720,\n \"start_minute\": 719\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"amd_mode": "off",
"assistant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cps": 123,
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_attempts": 123,
"max_concurrent": 123,
"name": "<string>",
"number_ids": [
"<string>"
],
"purpose": "informational",
"retry_policy": {
"busy": "<string>",
"failed": "<string>",
"no_answer": "<string>",
"voicemail_left": "<string>"
},
"ring_timeout_s": 123,
"status": "draft",
"updated_at": "2023-11-07T05:31:56Z",
"windows": [
{
"days": [
123
],
"end_minute": 720,
"start_minute": 719
}
],
"amd_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"archived_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z",
"informational_category": "<string>",
"paused_reason": "user",
"start_at": "2023-11-07T05:31:56Z",
"voicemail_message": "<string>"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}Authorizations
sessionapiKey
Dashboard session cookie
Body
application/json
Required string length:
1 - 200Available options:
informational, telemarketing Available options:
off, hangup_on_machine, voicemail Required range:
x <= 50Informational campaigns only: the category an opt-out on this campaign revokes (FCC 26-67). Empty means an opt-out revokes every call
Pattern:
^[a-z][a-z0-9_]{1,40}$Required range:
1 <= x <= 10Required range:
1 <= x <= 1000Caller-ID pool
Maximum array length:
100Show child attributes
Show child attributes
Required range:
15 <= x <= 60Required string length:
1 - 1000Further restricts the legal calling windows
Maximum array length:
14Show child attributes
Show child attributes
Response
Created
Available options:
off, hangup_on_machine, voicemail Available options:
informational, telemarketing Show child attributes
Show child attributes
Available options:
draft, running, paused, completed, archived Show child attributes
Show child attributes
Available options:
user, credits_exhausted, window_closed, no_caller_id, compliance, operator ⌘I
Create a draft campaign
curl --request POST \
--url https://api-us.larynth.com/v1/campaigns \
--header 'Content-Type: application/json' \
--cookie lx_session= \
--data '
{
"assistant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"amd_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cps": 49,
"end_at": "2023-11-07T05:31:56Z",
"informational_category": "<string>",
"max_attempts": 5,
"max_concurrent": 500,
"number_ids": [
"<string>"
],
"retry_policy": {
"busy": "<string>",
"failed": "<string>",
"no_answer": "<string>",
"voicemail_left": "<string>"
},
"ring_timeout_s": 37,
"start_at": "2023-11-07T05:31:56Z",
"voicemail_message": "<string>",
"windows": [
{
"days": [
123
],
"end_minute": 720,
"start_minute": 719
}
]
}
'import requests
url = "https://api-us.larynth.com/v1/campaigns"
payload = {
"assistant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"amd_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cps": 49,
"end_at": "2023-11-07T05:31:56Z",
"informational_category": "<string>",
"max_attempts": 5,
"max_concurrent": 500,
"number_ids": ["<string>"],
"retry_policy": {
"busy": "<string>",
"failed": "<string>",
"no_answer": "<string>",
"voicemail_left": "<string>"
},
"ring_timeout_s": 37,
"start_at": "2023-11-07T05:31:56Z",
"voicemail_message": "<string>",
"windows": [
{
"days": [123],
"end_minute": 720,
"start_minute": 719
}
]
}
headers = {
"cookie": "lx_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'lx_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
assistant_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
amd_profile_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
cps: 49,
end_at: '2023-11-07T05:31:56Z',
informational_category: '<string>',
max_attempts: 5,
max_concurrent: 500,
number_ids: ['<string>'],
retry_policy: {
busy: '<string>',
failed: '<string>',
no_answer: '<string>',
voicemail_left: '<string>'
},
ring_timeout_s: 37,
start_at: '2023-11-07T05:31:56Z',
voicemail_message: '<string>',
windows: [{days: [123], end_minute: 720, start_minute: 719}]
})
};
fetch('https://api-us.larynth.com/v1/campaigns', 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://api-us.larynth.com/v1/campaigns",
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([
'assistant_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'amd_profile_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'cps' => 49,
'end_at' => '2023-11-07T05:31:56Z',
'informational_category' => '<string>',
'max_attempts' => 5,
'max_concurrent' => 500,
'number_ids' => [
'<string>'
],
'retry_policy' => [
'busy' => '<string>',
'failed' => '<string>',
'no_answer' => '<string>',
'voicemail_left' => '<string>'
],
'ring_timeout_s' => 37,
'start_at' => '2023-11-07T05:31:56Z',
'voicemail_message' => '<string>',
'windows' => [
[
'days' => [
123
],
'end_minute' => 720,
'start_minute' => 719
]
]
]),
CURLOPT_COOKIE => "lx_session=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-us.larynth.com/v1/campaigns"
payload := strings.NewReader("{\n \"assistant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"amd_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cps\": 49,\n \"end_at\": \"2023-11-07T05:31:56Z\",\n \"informational_category\": \"<string>\",\n \"max_attempts\": 5,\n \"max_concurrent\": 500,\n \"number_ids\": [\n \"<string>\"\n ],\n \"retry_policy\": {\n \"busy\": \"<string>\",\n \"failed\": \"<string>\",\n \"no_answer\": \"<string>\",\n \"voicemail_left\": \"<string>\"\n },\n \"ring_timeout_s\": 37,\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"voicemail_message\": \"<string>\",\n \"windows\": [\n {\n \"days\": [\n 123\n ],\n \"end_minute\": 720,\n \"start_minute\": 719\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "lx_session=")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-us.larynth.com/v1/campaigns")
.header("cookie", "lx_session=")
.header("Content-Type", "application/json")
.body("{\n \"assistant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"amd_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cps\": 49,\n \"end_at\": \"2023-11-07T05:31:56Z\",\n \"informational_category\": \"<string>\",\n \"max_attempts\": 5,\n \"max_concurrent\": 500,\n \"number_ids\": [\n \"<string>\"\n ],\n \"retry_policy\": {\n \"busy\": \"<string>\",\n \"failed\": \"<string>\",\n \"no_answer\": \"<string>\",\n \"voicemail_left\": \"<string>\"\n },\n \"ring_timeout_s\": 37,\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"voicemail_message\": \"<string>\",\n \"windows\": [\n {\n \"days\": [\n 123\n ],\n \"end_minute\": 720,\n \"start_minute\": 719\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-us.larynth.com/v1/campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'lx_session='
request["Content-Type"] = 'application/json'
request.body = "{\n \"assistant_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"amd_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cps\": 49,\n \"end_at\": \"2023-11-07T05:31:56Z\",\n \"informational_category\": \"<string>\",\n \"max_attempts\": 5,\n \"max_concurrent\": 500,\n \"number_ids\": [\n \"<string>\"\n ],\n \"retry_policy\": {\n \"busy\": \"<string>\",\n \"failed\": \"<string>\",\n \"no_answer\": \"<string>\",\n \"voicemail_left\": \"<string>\"\n },\n \"ring_timeout_s\": 37,\n \"start_at\": \"2023-11-07T05:31:56Z\",\n \"voicemail_message\": \"<string>\",\n \"windows\": [\n {\n \"days\": [\n 123\n ],\n \"end_minute\": 720,\n \"start_minute\": 719\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"amd_mode": "off",
"assistant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cps": 123,
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_attempts": 123,
"max_concurrent": 123,
"name": "<string>",
"number_ids": [
"<string>"
],
"purpose": "informational",
"retry_policy": {
"busy": "<string>",
"failed": "<string>",
"no_answer": "<string>",
"voicemail_left": "<string>"
},
"ring_timeout_s": 123,
"status": "draft",
"updated_at": "2023-11-07T05:31:56Z",
"windows": [
{
"days": [
123
],
"end_minute": 720,
"start_minute": 719
}
],
"amd_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"archived_at": "2023-11-07T05:31:56Z",
"end_at": "2023-11-07T05:31:56Z",
"informational_category": "<string>",
"paused_reason": "user",
"start_at": "2023-11-07T05:31:56Z",
"voicemail_message": "<string>"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"retry_at": "2023-11-07T05:31:56Z"
}