List campaigns with pagination
curl --request GET \
--url https://api.tryhamsa.com/v1/voice-agents/campaigns \
--header 'Authorization: <api-key>'import requests
url = "https://api.tryhamsa.com/v1/voice-agents/campaigns"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.tryhamsa.com/v1/voice-agents/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.tryhamsa.com/v1/voice-agents/campaigns",
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: <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://api.tryhamsa.com/v1/voice-agents/campaigns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://api.tryhamsa.com/v1/voice-agents/campaigns")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryhamsa.com/v1/voice-agents/campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Campaigns retrieved successfully",
"messageKey": "CAMPAIGNS_RETRIEVED_SUCCESSFULLY",
"data": {
"campaigns": [
{
"id": "a8f7656f-098b-4c43-b165-7cfd2cc8ac50",
"name": "Q1 Customer Outreach",
"status": "SCHEDULED",
"sendType": "NOW",
"scheduledDate": "2025-12-01T09:00:00Z",
"scheduledTimezone": "America/New_York",
"timeRange": {
"days": [
"MONDAY",
"TUESDAY",
"WEDNESDAY"
],
"startCallingTime": "09:00",
"endCallingTime": "17:00"
},
"reservedConcurrency": 10,
"projectId": "48f7656f-098b-4c43-b165-7cfd2cc8ac30",
"voiceAgentId": "68f7656f-098b-4c43-b165-7cfd2cc8ac40",
"recipientsCount": 100,
"createdAt": "2025-12-06T10:00:00.000Z",
"updatedAt": "2025-12-06T10:00:00.000Z"
}
],
"totalCount": 50,
"returnedCount": 10
}
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}Outbound Campaigns
List Campaigns
Retrieves a paginated list of campaigns with optional filtering by voice agent and search query.
GET
/
v1
/
voice-agents
/
campaigns
List campaigns with pagination
curl --request GET \
--url https://api.tryhamsa.com/v1/voice-agents/campaigns \
--header 'Authorization: <api-key>'import requests
url = "https://api.tryhamsa.com/v1/voice-agents/campaigns"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.tryhamsa.com/v1/voice-agents/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.tryhamsa.com/v1/voice-agents/campaigns",
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: <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://api.tryhamsa.com/v1/voice-agents/campaigns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://api.tryhamsa.com/v1/voice-agents/campaigns")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryhamsa.com/v1/voice-agents/campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Campaigns retrieved successfully",
"messageKey": "CAMPAIGNS_RETRIEVED_SUCCESSFULLY",
"data": {
"campaigns": [
{
"id": "a8f7656f-098b-4c43-b165-7cfd2cc8ac50",
"name": "Q1 Customer Outreach",
"status": "SCHEDULED",
"sendType": "NOW",
"scheduledDate": "2025-12-01T09:00:00Z",
"scheduledTimezone": "America/New_York",
"timeRange": {
"days": [
"MONDAY",
"TUESDAY",
"WEDNESDAY"
],
"startCallingTime": "09:00",
"endCallingTime": "17:00"
},
"reservedConcurrency": 10,
"projectId": "48f7656f-098b-4c43-b165-7cfd2cc8ac30",
"voiceAgentId": "68f7656f-098b-4c43-b165-7cfd2cc8ac40",
"recipientsCount": 100,
"createdAt": "2025-12-06T10:00:00.000Z",
"updatedAt": "2025-12-06T10:00:00.000Z"
}
],
"totalCount": 50,
"returnedCount": 10
}
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}Authorizations
Pass the API key in the Authorization header, You need to put Token keyword before the API key. e.g. 'Authorization: Token '
Query Parameters
Optional voice agent ID to filter campaigns.
Example:
"68f7656f-098b-4c43-b165-7cfd2cc8ac40"
Number of items to return per page.
Example:
10
Number of items to skip (offset).
Example:
0
Search query for campaign name or campaign ID.
Example:
"Q1 Customer"
Was this page helpful?
⌘I