Create a Campaign
curl --request POST \
--url https://prod-api.raisedonors.com/api/Campaign \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"description": "<string>",
"startDateTimeUtc": "2023-11-07T05:31:56Z",
"endDateTimeUtc": "2023-11-07T05:31:56Z",
"givingGoal": 123,
"hasGivingGoal": true,
"totalGiftGoal": 123,
"hasTotalGiftGoal": true,
"averageGiftGoal": 123,
"hasAverageGiftGoal": true,
"crmKey": "<string>",
"crmKeys": {},
"applySegmentToRecurringGifts": true,
"canSync": true,
"segments": [
{
"campaignId": 123,
"name": "<string>",
"code": "<string>",
"description": "<string>",
"externalIdentifier": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
startDate: '2023-11-07T05:31:56Z',
endDate: '2023-11-07T05:31:56Z',
description: '<string>',
startDateTimeUtc: '2023-11-07T05:31:56Z',
endDateTimeUtc: '2023-11-07T05:31:56Z',
givingGoal: 123,
hasGivingGoal: true,
totalGiftGoal: 123,
hasTotalGiftGoal: true,
averageGiftGoal: 123,
hasAverageGiftGoal: true,
crmKey: '<string>',
crmKeys: {},
applySegmentToRecurringGifts: true,
canSync: true,
segments: [
{
campaignId: 123,
name: '<string>',
code: '<string>',
description: '<string>',
externalIdentifier: '<string>'
}
]
})
};
fetch('https://prod-api.raisedonors.com/api/Campaign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://prod-api.raisedonors.com/api/Campaign"
payload = {
"name": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"description": "<string>",
"startDateTimeUtc": "2023-11-07T05:31:56Z",
"endDateTimeUtc": "2023-11-07T05:31:56Z",
"givingGoal": 123,
"hasGivingGoal": True,
"totalGiftGoal": 123,
"hasTotalGiftGoal": True,
"averageGiftGoal": 123,
"hasAverageGiftGoal": True,
"crmKey": "<string>",
"crmKeys": {},
"applySegmentToRecurringGifts": True,
"canSync": True,
"segments": [
{
"campaignId": 123,
"name": "<string>",
"code": "<string>",
"description": "<string>",
"externalIdentifier": "<string>"
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://prod-api.raisedonors.com/api/Campaign");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
request.AddJsonBody("{\n \"name\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"startDateTimeUtc\": \"2023-11-07T05:31:56Z\",\n \"endDateTimeUtc\": \"2023-11-07T05:31:56Z\",\n \"givingGoal\": 123,\n \"hasGivingGoal\": true,\n \"totalGiftGoal\": 123,\n \"hasTotalGiftGoal\": true,\n \"averageGiftGoal\": 123,\n \"hasAverageGiftGoal\": true,\n \"crmKey\": \"<string>\",\n \"crmKeys\": {},\n \"applySegmentToRecurringGifts\": true,\n \"canSync\": true,\n \"segments\": [\n {\n \"campaignId\": 123,\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"description\": \"<string>\",\n \"externalIdentifier\": \"<string>\"\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://prod-api.raisedonors.com/api/Campaign",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'startDate' => '2023-11-07T05:31:56Z',
'endDate' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'startDateTimeUtc' => '2023-11-07T05:31:56Z',
'endDateTimeUtc' => '2023-11-07T05:31:56Z',
'givingGoal' => 123,
'hasGivingGoal' => true,
'totalGiftGoal' => 123,
'hasTotalGiftGoal' => true,
'averageGiftGoal' => 123,
'hasAverageGiftGoal' => true,
'crmKey' => '<string>',
'crmKeys' => [
],
'applySegmentToRecurringGifts' => true,
'canSync' => true,
'segments' => [
[
'campaignId' => 123,
'name' => '<string>',
'code' => '<string>',
'description' => '<string>',
'externalIdentifier' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://prod-api.raisedonors.com/api/Campaign")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"startDateTimeUtc\": \"2023-11-07T05:31:56Z\",\n \"endDateTimeUtc\": \"2023-11-07T05:31:56Z\",\n \"givingGoal\": 123,\n \"hasGivingGoal\": true,\n \"totalGiftGoal\": 123,\n \"hasTotalGiftGoal\": true,\n \"averageGiftGoal\": 123,\n \"hasAverageGiftGoal\": true,\n \"crmKey\": \"<string>\",\n \"crmKeys\": {},\n \"applySegmentToRecurringGifts\": true,\n \"canSync\": true,\n \"segments\": [\n {\n \"campaignId\": 123,\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"description\": \"<string>\",\n \"externalIdentifier\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod-api.raisedonors.com/api/Campaign")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"startDateTimeUtc\": \"2023-11-07T05:31:56Z\",\n \"endDateTimeUtc\": \"2023-11-07T05:31:56Z\",\n \"givingGoal\": 123,\n \"hasGivingGoal\": true,\n \"totalGiftGoal\": 123,\n \"hasTotalGiftGoal\": true,\n \"averageGiftGoal\": 123,\n \"hasAverageGiftGoal\": true,\n \"crmKey\": \"<string>\",\n \"crmKeys\": {},\n \"applySegmentToRecurringGifts\": true,\n \"canSync\": true,\n \"segments\": [\n {\n \"campaignId\": 123,\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"description\": \"<string>\",\n \"externalIdentifier\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyconst url = 'https://prod-api.raisedonors.com/api/Campaign';
const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
startDate: '2023-11-07T05:31:56Z',
endDate: '2023-11-07T05:31:56Z',
description: '<string>',
startDateTimeUtc: '2023-11-07T05:31:56Z',
endDateTimeUtc: '2023-11-07T05:31:56Z',
givingGoal: 123,
hasGivingGoal: true,
totalGiftGoal: 123,
hasTotalGiftGoal: true,
averageGiftGoal: 123,
hasAverageGiftGoal: true,
crmKey: '<string>',
crmKeys: {},
applySegmentToRecurringGifts: true,
canSync: true,
segments: [
{
campaignId: 123,
name: '<string>',
code: '<string>',
description: '<string>',
externalIdentifier: '<string>'
}
]
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"id": 88,
"name": "Year-End Giving 2025",
"description": "Year-end multi-channel giving campaign.",
"startDate": "2025-11-01",
"endDate": "2025-12-31",
"duration": "60",
"canSync": true,
"crmKey": "2011",
"crmKeyUrls": {
"VirtuousCRM": {
"crmKey": "2011",
"url": "https://app.virtuoussoftware.com/Generosity/Campaign/Detail/2011"
}
},
"applySegmentToRecurringGifts": true,
"givingGoal": 250000,
"givingGoalFormatted": "$250,000.00",
"hasGivingGoal": true,
"raisedAmount": "$87,340.00",
"raisedPercentage": 34.9,
"totalGiftGoal": 600,
"hasTotalGiftGoal": true,
"totalGifts": 467,
"totalGiftsPercentage": 77.8,
"totalDonors": 412,
"averageGiftGoal": 250,
"averageGiftGoalFormatted": "$250.00",
"averageGiftAmount": "$187.02",
"hasAverageGiftGoal": true,
"totalVisitors": 5842,
"conversionRate": "8.0%",
"createdDateTime": "2025-10-15T09:00:00Z",
"modifiedDateTime": "2025-11-15T08:00:00Z"
}{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"errors": {
"name": [
"The name field is required."
]
},
"instance": "/api/Campaign"
}{
"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/Campaign"
}Campaign
Create a Campaign
Creates a campaign.
POST
https://prod-api.raisedonors.com
/
api
/
Campaign
Create a Campaign
curl --request POST \
--url https://prod-api.raisedonors.com/api/Campaign \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"description": "<string>",
"startDateTimeUtc": "2023-11-07T05:31:56Z",
"endDateTimeUtc": "2023-11-07T05:31:56Z",
"givingGoal": 123,
"hasGivingGoal": true,
"totalGiftGoal": 123,
"hasTotalGiftGoal": true,
"averageGiftGoal": 123,
"hasAverageGiftGoal": true,
"crmKey": "<string>",
"crmKeys": {},
"applySegmentToRecurringGifts": true,
"canSync": true,
"segments": [
{
"campaignId": 123,
"name": "<string>",
"code": "<string>",
"description": "<string>",
"externalIdentifier": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
startDate: '2023-11-07T05:31:56Z',
endDate: '2023-11-07T05:31:56Z',
description: '<string>',
startDateTimeUtc: '2023-11-07T05:31:56Z',
endDateTimeUtc: '2023-11-07T05:31:56Z',
givingGoal: 123,
hasGivingGoal: true,
totalGiftGoal: 123,
hasTotalGiftGoal: true,
averageGiftGoal: 123,
hasAverageGiftGoal: true,
crmKey: '<string>',
crmKeys: {},
applySegmentToRecurringGifts: true,
canSync: true,
segments: [
{
campaignId: 123,
name: '<string>',
code: '<string>',
description: '<string>',
externalIdentifier: '<string>'
}
]
})
};
fetch('https://prod-api.raisedonors.com/api/Campaign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://prod-api.raisedonors.com/api/Campaign"
payload = {
"name": "<string>",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"description": "<string>",
"startDateTimeUtc": "2023-11-07T05:31:56Z",
"endDateTimeUtc": "2023-11-07T05:31:56Z",
"givingGoal": 123,
"hasGivingGoal": True,
"totalGiftGoal": 123,
"hasTotalGiftGoal": True,
"averageGiftGoal": 123,
"hasAverageGiftGoal": True,
"crmKey": "<string>",
"crmKeys": {},
"applySegmentToRecurringGifts": True,
"canSync": True,
"segments": [
{
"campaignId": 123,
"name": "<string>",
"code": "<string>",
"description": "<string>",
"externalIdentifier": "<string>"
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://prod-api.raisedonors.com/api/Campaign");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
request.AddJsonBody("{\n \"name\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"startDateTimeUtc\": \"2023-11-07T05:31:56Z\",\n \"endDateTimeUtc\": \"2023-11-07T05:31:56Z\",\n \"givingGoal\": 123,\n \"hasGivingGoal\": true,\n \"totalGiftGoal\": 123,\n \"hasTotalGiftGoal\": true,\n \"averageGiftGoal\": 123,\n \"hasAverageGiftGoal\": true,\n \"crmKey\": \"<string>\",\n \"crmKeys\": {},\n \"applySegmentToRecurringGifts\": true,\n \"canSync\": true,\n \"segments\": [\n {\n \"campaignId\": 123,\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"description\": \"<string>\",\n \"externalIdentifier\": \"<string>\"\n }\n ]\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://prod-api.raisedonors.com/api/Campaign",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'startDate' => '2023-11-07T05:31:56Z',
'endDate' => '2023-11-07T05:31:56Z',
'description' => '<string>',
'startDateTimeUtc' => '2023-11-07T05:31:56Z',
'endDateTimeUtc' => '2023-11-07T05:31:56Z',
'givingGoal' => 123,
'hasGivingGoal' => true,
'totalGiftGoal' => 123,
'hasTotalGiftGoal' => true,
'averageGiftGoal' => 123,
'hasAverageGiftGoal' => true,
'crmKey' => '<string>',
'crmKeys' => [
],
'applySegmentToRecurringGifts' => true,
'canSync' => true,
'segments' => [
[
'campaignId' => 123,
'name' => '<string>',
'code' => '<string>',
'description' => '<string>',
'externalIdentifier' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://prod-api.raisedonors.com/api/Campaign")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"startDateTimeUtc\": \"2023-11-07T05:31:56Z\",\n \"endDateTimeUtc\": \"2023-11-07T05:31:56Z\",\n \"givingGoal\": 123,\n \"hasGivingGoal\": true,\n \"totalGiftGoal\": 123,\n \"hasTotalGiftGoal\": true,\n \"averageGiftGoal\": 123,\n \"hasAverageGiftGoal\": true,\n \"crmKey\": \"<string>\",\n \"crmKeys\": {},\n \"applySegmentToRecurringGifts\": true,\n \"canSync\": true,\n \"segments\": [\n {\n \"campaignId\": 123,\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"description\": \"<string>\",\n \"externalIdentifier\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod-api.raisedonors.com/api/Campaign")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"startDate\": \"2023-11-07T05:31:56Z\",\n \"endDate\": \"2023-11-07T05:31:56Z\",\n \"description\": \"<string>\",\n \"startDateTimeUtc\": \"2023-11-07T05:31:56Z\",\n \"endDateTimeUtc\": \"2023-11-07T05:31:56Z\",\n \"givingGoal\": 123,\n \"hasGivingGoal\": true,\n \"totalGiftGoal\": 123,\n \"hasTotalGiftGoal\": true,\n \"averageGiftGoal\": 123,\n \"hasAverageGiftGoal\": true,\n \"crmKey\": \"<string>\",\n \"crmKeys\": {},\n \"applySegmentToRecurringGifts\": true,\n \"canSync\": true,\n \"segments\": [\n {\n \"campaignId\": 123,\n \"name\": \"<string>\",\n \"code\": \"<string>\",\n \"description\": \"<string>\",\n \"externalIdentifier\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyconst url = 'https://prod-api.raisedonors.com/api/Campaign';
const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
startDate: '2023-11-07T05:31:56Z',
endDate: '2023-11-07T05:31:56Z',
description: '<string>',
startDateTimeUtc: '2023-11-07T05:31:56Z',
endDateTimeUtc: '2023-11-07T05:31:56Z',
givingGoal: 123,
hasGivingGoal: true,
totalGiftGoal: 123,
hasTotalGiftGoal: true,
averageGiftGoal: 123,
hasAverageGiftGoal: true,
crmKey: '<string>',
crmKeys: {},
applySegmentToRecurringGifts: true,
canSync: true,
segments: [
{
campaignId: 123,
name: '<string>',
code: '<string>',
description: '<string>',
externalIdentifier: '<string>'
}
]
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"id": 88,
"name": "Year-End Giving 2025",
"description": "Year-end multi-channel giving campaign.",
"startDate": "2025-11-01",
"endDate": "2025-12-31",
"duration": "60",
"canSync": true,
"crmKey": "2011",
"crmKeyUrls": {
"VirtuousCRM": {
"crmKey": "2011",
"url": "https://app.virtuoussoftware.com/Generosity/Campaign/Detail/2011"
}
},
"applySegmentToRecurringGifts": true,
"givingGoal": 250000,
"givingGoalFormatted": "$250,000.00",
"hasGivingGoal": true,
"raisedAmount": "$87,340.00",
"raisedPercentage": 34.9,
"totalGiftGoal": 600,
"hasTotalGiftGoal": true,
"totalGifts": 467,
"totalGiftsPercentage": 77.8,
"totalDonors": 412,
"averageGiftGoal": 250,
"averageGiftGoalFormatted": "$250.00",
"averageGiftAmount": "$187.02",
"hasAverageGiftGoal": true,
"totalVisitors": 5842,
"conversionRate": "8.0%",
"createdDateTime": "2025-10-15T09:00:00Z",
"modifiedDateTime": "2025-11-15T08:00:00Z"
}{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"errors": {
"name": [
"The name field is required."
]
},
"instance": "/api/Campaign"
}{
"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/Campaign"
}name and the startDate/endDate range identify it; set givingGoal, totalGiftGoal, or averageGiftGoal with the matching has* flag to track progress against a goal, and include segments to create the campaign’s segments in the same request. Returns the created campaign with its new id.Authorizations
Body
application/jsontext/jsonapplication/*+json
The campaign request.
Response
OK
Represents the detailed view of a campaign returned by create, update, and single-campaign retrieval endpoints.
Was this page helpful?