Get All Inbound Campaigns
curl --request GET \
--url https://api.getmalakai.com/campaigns/inbound \
--header 'Authorization: <authorization>' \
--header 'x-access-token: <x-access-token>'import requests
url = "https://api.getmalakai.com/campaigns/inbound"
headers = {
"Authorization": "<authorization>",
"x-access-token": "<x-access-token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: '<authorization>', 'x-access-token': '<x-access-token>'}
};
fetch('https://api.getmalakai.com/campaigns/inbound', 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.getmalakai.com/campaigns/inbound",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"x-access-token: <x-access-token>"
],
]);
$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://api.getmalakai.com/campaigns/inbound"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("x-access-token", "<x-access-token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.getmalakai.com/campaigns/inbound")
.header("Authorization", "<authorization>")
.header("x-access-token", "<x-access-token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getmalakai.com/campaigns/inbound")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
request["x-access-token"] = '<x-access-token>'
response = http.request(request)
puts response.read_body{
"data": {},
"data.analytics.Total Calls Made": 123,
"campaigns": [
{}
],
"campaigns.id": "<string>",
"campaigns.user_id": "<string>",
"campaigns.campaign_name": "<string>",
"campaigns.phone_number": "<string>",
"campaigns.agent_id": "<string>",
"campaigns.transfer_numbers": {},
"campaigns.ml_campaign_id": "<string>",
"campaigns.status": "<string>",
"campaigns.model": "<string>",
"campaigns.state": "<string>",
"campaigns.created_at": "<string>",
"campaigns.updated_at": "<string>",
"campaigns.workflow_id": "<string>",
"campaigns.total_events": 123,
"agent.agent_name": "<string>",
"agent.opening_message": "<string>",
"agent.qualification_scenario": "<string>",
"agent.goals": "<string>",
"agent.background": "<string>",
"agent.example_scenario": "<string>"
}Inbound
Get All Inbound Campaigns
Retrieve a list of all inbound existing campaigns
GET
campaigns
/
inbound
Get All Inbound Campaigns
curl --request GET \
--url https://api.getmalakai.com/campaigns/inbound \
--header 'Authorization: <authorization>' \
--header 'x-access-token: <x-access-token>'import requests
url = "https://api.getmalakai.com/campaigns/inbound"
headers = {
"Authorization": "<authorization>",
"x-access-token": "<x-access-token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: '<authorization>', 'x-access-token': '<x-access-token>'}
};
fetch('https://api.getmalakai.com/campaigns/inbound', 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.getmalakai.com/campaigns/inbound",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"x-access-token: <x-access-token>"
],
]);
$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://api.getmalakai.com/campaigns/inbound"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("x-access-token", "<x-access-token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.getmalakai.com/campaigns/inbound")
.header("Authorization", "<authorization>")
.header("x-access-token", "<x-access-token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getmalakai.com/campaigns/inbound")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
request["x-access-token"] = '<x-access-token>'
response = http.request(request)
puts response.read_body{
"data": {},
"data.analytics.Total Calls Made": 123,
"campaigns": [
{}
],
"campaigns.id": "<string>",
"campaigns.user_id": "<string>",
"campaigns.campaign_name": "<string>",
"campaigns.phone_number": "<string>",
"campaigns.agent_id": "<string>",
"campaigns.transfer_numbers": {},
"campaigns.ml_campaign_id": "<string>",
"campaigns.status": "<string>",
"campaigns.model": "<string>",
"campaigns.state": "<string>",
"campaigns.created_at": "<string>",
"campaigns.updated_at": "<string>",
"campaigns.workflow_id": "<string>",
"campaigns.total_events": 123,
"agent.agent_name": "<string>",
"agent.opening_message": "<string>",
"agent.qualification_scenario": "<string>",
"agent.goals": "<string>",
"agent.background": "<string>",
"agent.example_scenario": "<string>"
}Headers
string
required
Your API key for authentication. Prefix with
Bearer .string
required
Your access token for authentication.
Response
object
Contains campaign analytics and campaign details.
number
Total number of inbound calls made.
object[]
An array of inbound campaign objects.
Campaign Fields
string
Unique identifier for the campaign.
string
Identifier of the user who owns the campaign.
string
Name of the inbound campaign.
string
Associated phone number ID.
string
ID of the assigned agent for the campaign.
object
Map of configured transfer numbers.
string
ID for ML-related tracking (nullable).
string
Campaign status (nullable).
string
Name of AI model used in the campaign.
string
Current running state of the campaign.
string
ISO timestamp of when the campaign was created.
string
ISO timestamp of the last update to the campaign.
string
ID of the associated workflow (nullable).
number
Number of events recorded for the campaign.
Nested: campaigns.agent
string
Name of the assigned agent.
string
Greeting message used by the agent.
string
Criteria to determine how to qualify the caller.
string
Campaign goals for the agent.
string
Background knowledge required by the agent.
string
Sample dialogue or use case for the agent.
Response Example
{
"responseCode": 2000,
"message": "Inbound campaigns fetched successfully",
"data": {
"analytics": {
"Total Calls Made": 4
},
"campaigns": [
{
"id": "********",
"user_id": "********",
"campaign_name": "new inbound campaign",
"phone_number": "********",
"agent_id": "********",
"transfer_numbers": {
"": ""
},
"ml_campaign_id": null,
"status": null,
"model": "Claude 3 Haiku",
"created_at": "2025-06-27T11:40:34.133Z",
"workflow_id": null,
"updated_at": "2025-06-27T11:40:34.133Z",
"state": "running",
"userCallers": {
"phone_number": "********",
"phone_number_details": {
"phoneNumber": "********",
"origin": "twilio",
"status": "in-use",
"friendlyName": "(309) 387-0017"
}
},
"agent": {
"agent_name": "Andrew Hamilton",
"opening_message": "Thank you for calling. How can I assist you today?",
"qualification_scenario": "The caller needs to be transferred to the appropriate department based on their request.",
"goals": "Determine which department the caller needs to be transferred to and complete the transfer efficiently.",
"background": "The agent should be familiar with the different departments and their responsibilities in order to direct the caller to the right place.",
"example_scenario": "Agent: Thank you for calling. How can I assist you today? Caller: I need to speak with someone in the sales department. Agent: Okay, let me transfer you to our sales department. One moment please. [Transfer to sales department]"
},
"total_events": 2
}
]
}
}