List Campaign Contacts
curl --request GET \
--url https://api.ravan.ai/api/v1/campaigns/{id}/contacts \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.ravan.ai/api/v1/campaigns/{id}/contacts"
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://api.ravan.ai/api/v1/campaigns/{id}/contacts', 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.ravan.ai/api/v1/campaigns/{id}/contacts",
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://api.ravan.ai/api/v1/campaigns/{id}/contacts"
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://api.ravan.ai/api/v1/campaigns/{id}/contacts")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ravan.ai/api/v1/campaigns/{id}/contacts")
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,
"message": "<string>",
"data": [
{
"id": "<string>",
"contact_id": "<string>",
"name": "<string>",
"phone": "<string>",
"email": "<string>",
"status": "<string>",
"attempt_count": 123,
"last_attempted_at": "<string>",
"next_retry_at": "<string>",
"call_duration_sec": 123,
"error_message": "<string>",
"call_session_id": "<string>",
"tags": [
"<string>"
]
}
],
"meta": {
"total": 123,
"limit": 123,
"offset": 123
}
}Campaign API
List Campaign Contacts
List Campaign Contacts.
GET
/
api
/
v1
/
campaigns
/
{id}
/
contacts
List Campaign Contacts
curl --request GET \
--url https://api.ravan.ai/api/v1/campaigns/{id}/contacts \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.ravan.ai/api/v1/campaigns/{id}/contacts"
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://api.ravan.ai/api/v1/campaigns/{id}/contacts', 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.ravan.ai/api/v1/campaigns/{id}/contacts",
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://api.ravan.ai/api/v1/campaigns/{id}/contacts"
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://api.ravan.ai/api/v1/campaigns/{id}/contacts")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ravan.ai/api/v1/campaigns/{id}/contacts")
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,
"message": "<string>",
"data": [
{
"id": "<string>",
"contact_id": "<string>",
"name": "<string>",
"phone": "<string>",
"email": "<string>",
"status": "<string>",
"attempt_count": 123,
"last_attempted_at": "<string>",
"next_retry_at": "<string>",
"call_duration_sec": 123,
"error_message": "<string>",
"call_session_id": "<string>",
"tags": [
"<string>"
]
}
],
"meta": {
"total": 123,
"limit": 123,
"offset": 123
}
}Authorizations
string
required
Your Agni API key used to authenticate the request. Pass it in the
X-Api-Key header. Find or rotate it from your Ravan AI account settings.Path Parameters
string
required
The unique ID of the resource in the path. Use the ID returned by the related create or list endpoint.
Query Parameters
integer
The maximum number of records to return. Use this with
offset or pagination fields to page through results.integer
The number of records to skip before returning results. Use this with
limit for pagination.Response
boolean
Whether the request succeeded.
string
Human-readable status message.
array
Array of CampaignContact objects with call status details.
object
Pagination metadata.

