List All Segments
curl --request GET \
--url https://prod-api.raisedonors.com/api/Segment/list/{campaignId} \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://prod-api.raisedonors.com/api/Segment/list/{campaignId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://prod-api.raisedonors.com/api/Segment/list/{campaignId}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://prod-api.raisedonors.com/api/Segment/list/{campaignId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://prod-api.raisedonors.com/api/Segment/list/{campaignId}",
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;
}HttpResponse<String> response = Unirest.get("https://prod-api.raisedonors.com/api/Segment/list/{campaignId}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod-api.raisedonors.com/api/Segment/list/{campaignId}")
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_bodyconst url = 'https://prod-api.raisedonors.com/api/Segment/list/{campaignId}';
const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"items": [
{
"id": 5120,
"campaignId": 88,
"campaignName": "Year-End Giving 2025",
"name": "Year-End Email",
"description": "Email appeal segment for the year-end campaign.",
"code": "YE25-EMAIL",
"externalIdentifier": "ye25-email",
"totalDonors": 268,
"totalGifts": 301,
"totalGiftAmount": "$56,290.00",
"averageGiftAmount": "$187.01",
"medianGiftAmount": "$100.00",
"highestGiftAmount": "$1,000.00",
"totalVisitors": 3820,
"conversionRate": "7.9%",
"createdDateTime": "2025-10-15T09:05:00Z",
"modifiedDateTime": "2025-11-15T08:00:00Z"
},
{
"id": 5121,
"campaignId": 88,
"campaignName": "Year-End Giving 2025",
"name": "Year-End Direct Mail",
"description": "Direct mail appeal segment for the year-end campaign.",
"code": "YE25-DM",
"externalIdentifier": "ye25-dm",
"totalDonors": 144,
"totalGifts": 166,
"totalGiftAmount": "$31,050.00",
"averageGiftAmount": "$187.05",
"medianGiftAmount": "$75.00",
"highestGiftAmount": "$2,500.00",
"totalVisitors": 2022,
"conversionRate": "8.2%",
"createdDateTime": "2025-10-15T09:07:00Z",
"modifiedDateTime": "2025-11-15T08:00:00Z"
}
],
"total": 2
}{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"errors": {
"take": [
"take must be between 1 and 1000."
]
},
"instance": "/api/Segment/list/88"
}{
"type": "https://tools.ietf.org/html/rfc7235#section-3.1",
"title": "Unauthorized",
"status": 401,
"detail": "The Authorization header is missing, malformed, or carries a token that is expired or revoked.",
"instance": "/api/Segment/list/{campaignId}"
}Segment
List All Segments
Returns a paginated list of segments.
GET
https://prod-api.raisedonors.com
/
api
/
Segment
/
list
/
{campaignId}
List All Segments
curl --request GET \
--url https://prod-api.raisedonors.com/api/Segment/list/{campaignId} \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://prod-api.raisedonors.com/api/Segment/list/{campaignId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://prod-api.raisedonors.com/api/Segment/list/{campaignId}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://prod-api.raisedonors.com/api/Segment/list/{campaignId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://prod-api.raisedonors.com/api/Segment/list/{campaignId}",
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;
}HttpResponse<String> response = Unirest.get("https://prod-api.raisedonors.com/api/Segment/list/{campaignId}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod-api.raisedonors.com/api/Segment/list/{campaignId}")
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_bodyconst url = 'https://prod-api.raisedonors.com/api/Segment/list/{campaignId}';
const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"items": [
{
"id": 5120,
"campaignId": 88,
"campaignName": "Year-End Giving 2025",
"name": "Year-End Email",
"description": "Email appeal segment for the year-end campaign.",
"code": "YE25-EMAIL",
"externalIdentifier": "ye25-email",
"totalDonors": 268,
"totalGifts": 301,
"totalGiftAmount": "$56,290.00",
"averageGiftAmount": "$187.01",
"medianGiftAmount": "$100.00",
"highestGiftAmount": "$1,000.00",
"totalVisitors": 3820,
"conversionRate": "7.9%",
"createdDateTime": "2025-10-15T09:05:00Z",
"modifiedDateTime": "2025-11-15T08:00:00Z"
},
{
"id": 5121,
"campaignId": 88,
"campaignName": "Year-End Giving 2025",
"name": "Year-End Direct Mail",
"description": "Direct mail appeal segment for the year-end campaign.",
"code": "YE25-DM",
"externalIdentifier": "ye25-dm",
"totalDonors": 144,
"totalGifts": 166,
"totalGiftAmount": "$31,050.00",
"averageGiftAmount": "$187.05",
"medianGiftAmount": "$75.00",
"highestGiftAmount": "$2,500.00",
"totalVisitors": 2022,
"conversionRate": "8.2%",
"createdDateTime": "2025-10-15T09:07:00Z",
"modifiedDateTime": "2025-11-15T08:00:00Z"
}
],
"total": 2
}{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"errors": {
"take": [
"take must be between 1 and 1000."
]
},
"instance": "/api/Segment/list/88"
}{
"type": "https://tools.ietf.org/html/rfc7235#section-3.1",
"title": "Unauthorized",
"status": 401,
"detail": "The Authorization header is missing, malformed, or carries a token that is expired or revoked.",
"instance": "/api/Segment/list/{campaignId}"
}Pass a
campaignId to get the segments of one campaign, and use filter for a free-text search.
For condition-based searches, use Query Segments.
Authorizations
JWT Authorization header using the Bearer scheme. Example: "Authorization: Bearer {token}"
Path Parameters
The optional campaign ID to filter segments.
Query Parameters
A free-text search term. Only segments whose name, code, or description match the term are returned.
The number of records to skip before the first record returned. Use it with take to page through the results.
The maximum number of records to return in this page of results.
The field to sort the results by (case-insensitive).
The direction to sort the results. Set to true to sort in descending order.
When true, includes the related records for each item in the response. Not every list has extra records to return, and it can slow down large result sets.
Last modified on July 28, 2026
Was this page helpful?