Update a Motivation Code Group
curl --request PUT \
--url https://prod-api.raisedonors.com/api/MotivationCode/group/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"id": 123,
"description": "<string>",
"codes": [
{
"id": 123
}
]
}
'const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', id: 123, description: '<string>', codes: [{id: 123}]})
};
fetch('https://prod-api.raisedonors.com/api/MotivationCode/group/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://prod-api.raisedonors.com/api/MotivationCode/group/{id}"
payload = {
"name": "<string>",
"id": 123,
"description": "<string>",
"codes": [{ "id": 123 }]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://prod-api.raisedonors.com/api/MotivationCode/group/{id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
request.AddJsonBody("{\n \"name\": \"<string>\",\n \"id\": 123,\n \"description\": \"<string>\",\n \"codes\": [\n {\n \"id\": 123\n }\n ]\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://prod-api.raisedonors.com/api/MotivationCode/group/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'id' => 123,
'description' => '<string>',
'codes' => [
[
'id' => 123
]
]
]),
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.put("https://prod-api.raisedonors.com/api/MotivationCode/group/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"id\": 123,\n \"description\": \"<string>\",\n \"codes\": [\n {\n \"id\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod-api.raisedonors.com/api/MotivationCode/group/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"id\": 123,\n \"description\": \"<string>\",\n \"codes\": [\n {\n \"id\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyconst url = 'https://prod-api.raisedonors.com/api/MotivationCode/group/{id}';
const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', id: 123, description: '<string>', codes: [{id: 123}]})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"name": "Year-End 2025 Appeals",
"description": "All appeals that ran during the 2025 year-end campaign.",
"codes": [
{
"id": 6120,
"name": "Year-End Email Appeal"
},
{
"id": 6121,
"name": "Year-End Direct Mail"
}
]
}{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"errors": {
"code": [
"The code field is required."
]
},
"instance": "/api/MotivationCode/group/6120"
}{
"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/MotivationCode/group/{id}"
}MotivationCode
Update a Motivation Code Group
Updates a motivation code group’s name or description, or the set of codes it contains. Returns the updated group.
PUT
https://prod-api.raisedonors.com
/
api
/
MotivationCode
/
group
/
{id}
Update a Motivation Code Group
curl --request PUT \
--url https://prod-api.raisedonors.com/api/MotivationCode/group/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"id": 123,
"description": "<string>",
"codes": [
{
"id": 123
}
]
}
'const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', id: 123, description: '<string>', codes: [{id: 123}]})
};
fetch('https://prod-api.raisedonors.com/api/MotivationCode/group/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://prod-api.raisedonors.com/api/MotivationCode/group/{id}"
payload = {
"name": "<string>",
"id": 123,
"description": "<string>",
"codes": [{ "id": 123 }]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://prod-api.raisedonors.com/api/MotivationCode/group/{id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
request.AddJsonBody("{\n \"name\": \"<string>\",\n \"id\": 123,\n \"description\": \"<string>\",\n \"codes\": [\n {\n \"id\": 123\n }\n ]\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://prod-api.raisedonors.com/api/MotivationCode/group/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'id' => 123,
'description' => '<string>',
'codes' => [
[
'id' => 123
]
]
]),
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.put("https://prod-api.raisedonors.com/api/MotivationCode/group/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"id\": 123,\n \"description\": \"<string>\",\n \"codes\": [\n {\n \"id\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod-api.raisedonors.com/api/MotivationCode/group/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"id\": 123,\n \"description\": \"<string>\",\n \"codes\": [\n {\n \"id\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyconst url = 'https://prod-api.raisedonors.com/api/MotivationCode/group/{id}';
const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', id: 123, description: '<string>', codes: [{id: 123}]})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"name": "Year-End 2025 Appeals",
"description": "All appeals that ran during the 2025 year-end campaign.",
"codes": [
{
"id": 6120,
"name": "Year-End Email Appeal"
},
{
"id": 6121,
"name": "Year-End Direct Mail"
}
]
}{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"errors": {
"code": [
"The code field is required."
]
},
"instance": "/api/MotivationCode/group/6120"
}{
"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/MotivationCode/group/{id}"
}Authorizations
JWT Authorization header using the Bearer scheme. Example: "Authorization: Bearer {token}"
Path Parameters
The ID of the motivation code group.
Body
application/jsontext/jsonapplication/*+json
The motivation code group details to save, including the codes it contains.
The name of the motivation code group.
Required string length:
1 - 100The unique identifier of the motivation code group.
The description of the motivation code group.
Maximum string length:
1000The motivation codes to put in the group.
Show child attributes
Show child attributes
Last modified on July 28, 2026
Was this page helpful?
⌘I