curl --request PUT \
--url https://prod-api.raisedonors.com/api/Donor/{id}/email/{emailId}/set-primary \
--header 'Authorization: <api-key>'const options = {method: 'PUT', headers: {Authorization: '<api-key>'}};
fetch('https://prod-api.raisedonors.com/api/Donor/{id}/email/{emailId}/set-primary', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://prod-api.raisedonors.com/api/Donor/{id}/email/{emailId}/set-primary"
headers = {"Authorization": "<api-key>"}
response = requests.put(url, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://prod-api.raisedonors.com/api/Donor/{id}/email/{emailId}/set-primary");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
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/Donor/{id}/email/{emailId}/set-primary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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.put("https://prod-api.raisedonors.com/api/Donor/{id}/email/{emailId}/set-primary")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod-api.raisedonors.com/api/Donor/{id}/email/{emailId}/set-primary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_bodyconst url = 'https://prod-api.raisedonors.com/api/Donor/{id}/email/{emailId}/set-primary';
const options = {method: 'PUT', headers: {Authorization: '<api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"id": 300101,
"donorId": 200234,
"typeDisplay": "Home Email",
"value": "marcus.castellano@example.org",
"secondaryValue": null,
"isPrimary": true,
"isOptedIn": true,
"isValid": true,
"isEmail": true,
"isPhone": false,
"isBounced": false,
"countryCode": null
}{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"errors": {
"email": [
"A valid email address is required."
],
"lastName": [
"The lastName field is required."
]
},
"instance": "/api/Donor/200234/email/300101/set-primary"
}{
"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/Donor/{id}/email/{emailId}/set-primary"
}Set Primary Donor Email Address
Makes an email address the donor’s primary one, clearing isPrimary on the address that held it before.
curl --request PUT \
--url https://prod-api.raisedonors.com/api/Donor/{id}/email/{emailId}/set-primary \
--header 'Authorization: <api-key>'const options = {method: 'PUT', headers: {Authorization: '<api-key>'}};
fetch('https://prod-api.raisedonors.com/api/Donor/{id}/email/{emailId}/set-primary', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://prod-api.raisedonors.com/api/Donor/{id}/email/{emailId}/set-primary"
headers = {"Authorization": "<api-key>"}
response = requests.put(url, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://prod-api.raisedonors.com/api/Donor/{id}/email/{emailId}/set-primary");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
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/Donor/{id}/email/{emailId}/set-primary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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.put("https://prod-api.raisedonors.com/api/Donor/{id}/email/{emailId}/set-primary")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod-api.raisedonors.com/api/Donor/{id}/email/{emailId}/set-primary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_bodyconst url = 'https://prod-api.raisedonors.com/api/Donor/{id}/email/{emailId}/set-primary';
const options = {method: 'PUT', headers: {Authorization: '<api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"id": 300101,
"donorId": 200234,
"typeDisplay": "Home Email",
"value": "marcus.castellano@example.org",
"secondaryValue": null,
"isPrimary": true,
"isOptedIn": true,
"isValid": true,
"isEmail": true,
"isPhone": false,
"isBounced": false,
"countryCode": null
}{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"errors": {
"email": [
"A valid email address is required."
],
"lastName": [
"The lastName field is required."
]
},
"instance": "/api/Donor/200234/email/300101/set-primary"
}{
"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/Donor/{id}/email/{emailId}/set-primary"
}email.Authorizations
JWT Authorization header using the Bearer scheme. Example: "Authorization: Bearer {token}"
Path Parameters
The ID of the donor.
The ID of the email address.
Response
OK
Represents a donor contact method model.
The unique identifier of the contact method.
The unique identifier of the donor.
The type of contact method, such as Email, Phone, or Mobile.
0, 10, 11, 12, 20, 21, 22, 99 The display name of the contact method type.
The email address or phone number itself.
The extension or other secondary part of the value.
Whether this is the donor's primary contact method of its type.
Whether the donor has opted in to being contacted at this value.
Whether the contact method is valid.
Whether the contact method is an email address.
Whether the contact method is a phone number.
Whether email sent to this address has bounced.
The country calling code of the phone number, such as 1 for the United States.
Was this page helpful?