Get campaign workflow
curl --request GET \
--url https://www.agentcallback.com/api/campaigns/{id}/workflow \
--header 'x-api-key: <api-key>'import requests
url = "https://www.agentcallback.com/api/campaigns/{id}/workflow"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://www.agentcallback.com/api/campaigns/{id}/workflow', 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://www.agentcallback.com/api/campaigns/{id}/workflow",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.agentcallback.com/api/campaigns/{id}/workflow"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.agentcallback.com/api/campaigns/{id}/workflow")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.agentcallback.com/api/campaigns/{id}/workflow")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"workflow_config": {
"retryOutcomes": [
"CALLEE_DID_NOT_PICKUP",
"VOICE_MAIL"
],
"attempts": [
{
"day": 0,
"startTime": "00:00",
"doubleDial": false
},
{
"day": 1,
"startTime": "16:00",
"doubleDial": true
},
{
"day": 3,
"startTime": "10:00",
"doubleDial": false
}
],
"timezone": "America/Los_Angeles"
},
"timezone": "<string>",
"campaign_timezone": "<string>",
"working_hours": {
"weekly": {
"monday": [
{
"start": "09:00",
"end": "17:00"
}
],
"tuesday": [
{
"start": "09:00",
"end": "17:00"
}
],
"wednesday": [
{
"start": "09:00",
"end": "17:00"
}
],
"thursday": [
{
"start": "09:00",
"end": "17:00"
}
],
"friday": [
{
"start": "09:00",
"end": "17:00"
}
],
"saturday": [
{
"start": "09:00",
"end": "17:00"
}
],
"sunday": [
{
"start": "09:00",
"end": "17:00"
}
]
}
},
"working_hours_timezone": "<string>",
"status": "<string>",
"scheduled_start_time": "2023-11-07T05:31:56Z",
"scheduled_timezone": "<string>"
}{
"success": false,
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"details": "<string>",
"code": "<string>"
}Returns the campaign’s workflow and the schedule context used to evaluate its attempts.
GET
/
api
/
campaigns
/
{id}
/
workflow
Get campaign workflow
curl --request GET \
--url https://www.agentcallback.com/api/campaigns/{id}/workflow \
--header 'x-api-key: <api-key>'import requests
url = "https://www.agentcallback.com/api/campaigns/{id}/workflow"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://www.agentcallback.com/api/campaigns/{id}/workflow', 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://www.agentcallback.com/api/campaigns/{id}/workflow",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.agentcallback.com/api/campaigns/{id}/workflow"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://www.agentcallback.com/api/campaigns/{id}/workflow")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.agentcallback.com/api/campaigns/{id}/workflow")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"workflow_config": {
"retryOutcomes": [
"CALLEE_DID_NOT_PICKUP",
"VOICE_MAIL"
],
"attempts": [
{
"day": 0,
"startTime": "00:00",
"doubleDial": false
},
{
"day": 1,
"startTime": "16:00",
"doubleDial": true
},
{
"day": 3,
"startTime": "10:00",
"doubleDial": false
}
],
"timezone": "America/Los_Angeles"
},
"timezone": "<string>",
"campaign_timezone": "<string>",
"working_hours": {
"weekly": {
"monday": [
{
"start": "09:00",
"end": "17:00"
}
],
"tuesday": [
{
"start": "09:00",
"end": "17:00"
}
],
"wednesday": [
{
"start": "09:00",
"end": "17:00"
}
],
"thursday": [
{
"start": "09:00",
"end": "17:00"
}
],
"friday": [
{
"start": "09:00",
"end": "17:00"
}
],
"saturday": [
{
"start": "09:00",
"end": "17:00"
}
],
"sunday": [
{
"start": "09:00",
"end": "17:00"
}
]
}
},
"working_hours_timezone": "<string>",
"status": "<string>",
"scheduled_start_time": "2023-11-07T05:31:56Z",
"scheduled_timezone": "<string>"
}{
"success": false,
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"success": false,
"error": "<string>",
"details": "<string>",
"code": "<string>"
}Authorizations
Create and manage API keys in your AgentCallback account under Dashboard > API Keys.
Path Parameters
Campaign identifier
Response
Campaign workflow
Example:
true
A chronological, multi-attempt calling sequence for each campaign contact.
Show child attributes
Show child attributes
Example:
{
"retryOutcomes": ["CALLEE_DID_NOT_PICKUP", "VOICE_MAIL"],
"attempts": [
{
"day": 0,
"startTime": "00:00",
"doubleDial": false
},
{
"day": 1,
"startTime": "16:00",
"doubleDial": true
},
{
"day": 3,
"startTime": "10:00",
"doubleDial": false
}
],
"timezone": "America/Los_Angeles"
}
Effective workflow timezone.
Show child attributes
Show child attributes
⌘I