cURL
curl --request POST \
--url https://api.example.com/api/PledgeV2 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"amountPledged": 123,
"pledgeDate": "2023-11-07T05:31:56Z",
"expectedFulfillmentDate": "2023-11-07T05:31:56Z",
"contactId": 123,
"customFields": [
{
"name": "<string>",
"dataType": "<string>",
"value": "<string>",
"displayName": "<string>"
}
],
"currencyCode": "<string>",
"segmentId": 123,
"projectId": 123,
"giftAskId": 123,
"isPrivate": true,
"payments": [
{
"expectedPaymentDate": "2023-11-07T05:31:56Z",
"expectedAmount": 123
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
amountPledged: 123,
pledgeDate: '2023-11-07T05:31:56Z',
expectedFulfillmentDate: '2023-11-07T05:31:56Z',
contactId: 123,
customFields: [
{
name: '<string>',
dataType: '<string>',
value: '<string>',
displayName: '<string>'
}
],
currencyCode: '<string>',
segmentId: 123,
projectId: 123,
giftAskId: 123,
isPrivate: true,
payments: [{expectedPaymentDate: '2023-11-07T05:31:56Z', expectedAmount: 123}]
})
};
fetch('https://api.example.com/api/PledgeV2', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/api/PledgeV2"
payload = {
"amountPledged": 123,
"pledgeDate": "2023-11-07T05:31:56Z",
"expectedFulfillmentDate": "2023-11-07T05:31:56Z",
"contactId": 123,
"customFields": [
{
"name": "<string>",
"dataType": "<string>",
"value": "<string>",
"displayName": "<string>"
}
],
"currencyCode": "<string>",
"segmentId": 123,
"projectId": 123,
"giftAskId": 123,
"isPrivate": True,
"payments": [
{
"expectedPaymentDate": "2023-11-07T05:31:56Z",
"expectedAmount": 123
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.example.com/api/PledgeV2");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"amountPledged\": 123,\n \"pledgeDate\": \"2023-11-07T05:31:56Z\",\n \"expectedFulfillmentDate\": \"2023-11-07T05:31:56Z\",\n \"contactId\": 123,\n \"customFields\": [\n {\n \"name\": \"<string>\",\n \"dataType\": \"<string>\",\n \"value\": \"<string>\",\n \"displayName\": \"<string>\"\n }\n ],\n \"currencyCode\": \"<string>\",\n \"segmentId\": 123,\n \"projectId\": 123,\n \"giftAskId\": 123,\n \"isPrivate\": true,\n \"payments\": [\n {\n \"expectedPaymentDate\": \"2023-11-07T05:31:56Z\",\n \"expectedAmount\": 123\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://api.example.com/api/PledgeV2",
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([
'amountPledged' => 123,
'pledgeDate' => '2023-11-07T05:31:56Z',
'expectedFulfillmentDate' => '2023-11-07T05:31:56Z',
'contactId' => 123,
'customFields' => [
[
'name' => '<string>',
'dataType' => '<string>',
'value' => '<string>',
'displayName' => '<string>'
]
],
'currencyCode' => '<string>',
'segmentId' => 123,
'projectId' => 123,
'giftAskId' => 123,
'isPrivate' => true,
'payments' => [
[
'expectedPaymentDate' => '2023-11-07T05:31:56Z',
'expectedAmount' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json-patch+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://api.example.com/api/PledgeV2")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"amountPledged\": 123,\n \"pledgeDate\": \"2023-11-07T05:31:56Z\",\n \"expectedFulfillmentDate\": \"2023-11-07T05:31:56Z\",\n \"contactId\": 123,\n \"customFields\": [\n {\n \"name\": \"<string>\",\n \"dataType\": \"<string>\",\n \"value\": \"<string>\",\n \"displayName\": \"<string>\"\n }\n ],\n \"currencyCode\": \"<string>\",\n \"segmentId\": 123,\n \"projectId\": 123,\n \"giftAskId\": 123,\n \"isPrivate\": true,\n \"payments\": [\n {\n \"expectedPaymentDate\": \"2023-11-07T05:31:56Z\",\n \"expectedAmount\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/PledgeV2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"amountPledged\": 123,\n \"pledgeDate\": \"2023-11-07T05:31:56Z\",\n \"expectedFulfillmentDate\": \"2023-11-07T05:31:56Z\",\n \"contactId\": 123,\n \"customFields\": [\n {\n \"name\": \"<string>\",\n \"dataType\": \"<string>\",\n \"value\": \"<string>\",\n \"displayName\": \"<string>\"\n }\n ],\n \"currencyCode\": \"<string>\",\n \"segmentId\": 123,\n \"projectId\": 123,\n \"giftAskId\": 123,\n \"isPrivate\": true,\n \"payments\": [\n {\n \"expectedPaymentDate\": \"2023-11-07T05:31:56Z\",\n \"expectedAmount\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyconst url = 'https://api.example.com/api/PledgeV2';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
amountPledged: 123,
pledgeDate: '2023-11-07T05:31:56Z',
expectedFulfillmentDate: '2023-11-07T05:31:56Z',
contactId: 123,
customFields: [
{
name: '<string>',
dataType: '<string>',
value: '<string>',
displayName: '<string>'
}
],
currencyCode: '<string>',
segmentId: 123,
projectId: 123,
giftAskId: 123,
isPrivate: true,
payments: [{expectedPaymentDate: '2023-11-07T05:31:56Z', expectedAmount: 123}]
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"customFields": [
{
"name": "<string>",
"dataType": "<string>",
"value": "<string>",
"displayName": "<string>"
}
],
"id": 123,
"contactId": 123,
"amountPledged": 123,
"pledgeDate": "2023-11-07T05:31:56Z",
"expectedFulfillmentDate": "2023-11-07T05:31:56Z",
"createDateTimeUtc": "2023-11-07T05:31:56Z",
"createdByUser": "<string>",
"modifiedDateTimeUtc": "2023-11-07T05:31:56Z",
"modifiedByUser": "<string>",
"segmentId": 123,
"segment": "<string>",
"projectId": 123,
"project": "<string>",
"giftAskId": 123,
"isPrivate": true,
"payments": [
{
"id": 123,
"expectedPaymentDate": "2023-11-07T05:31:56Z",
"expectedAmount": 123,
"giftId": 123,
"actualAmount": 123
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Pledges
Create a Pledge
POST
/
api
/
PledgeV2
cURL
curl --request POST \
--url https://api.example.com/api/PledgeV2 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"amountPledged": 123,
"pledgeDate": "2023-11-07T05:31:56Z",
"expectedFulfillmentDate": "2023-11-07T05:31:56Z",
"contactId": 123,
"customFields": [
{
"name": "<string>",
"dataType": "<string>",
"value": "<string>",
"displayName": "<string>"
}
],
"currencyCode": "<string>",
"segmentId": 123,
"projectId": 123,
"giftAskId": 123,
"isPrivate": true,
"payments": [
{
"expectedPaymentDate": "2023-11-07T05:31:56Z",
"expectedAmount": 123
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
amountPledged: 123,
pledgeDate: '2023-11-07T05:31:56Z',
expectedFulfillmentDate: '2023-11-07T05:31:56Z',
contactId: 123,
customFields: [
{
name: '<string>',
dataType: '<string>',
value: '<string>',
displayName: '<string>'
}
],
currencyCode: '<string>',
segmentId: 123,
projectId: 123,
giftAskId: 123,
isPrivate: true,
payments: [{expectedPaymentDate: '2023-11-07T05:31:56Z', expectedAmount: 123}]
})
};
fetch('https://api.example.com/api/PledgeV2', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.example.com/api/PledgeV2"
payload = {
"amountPledged": 123,
"pledgeDate": "2023-11-07T05:31:56Z",
"expectedFulfillmentDate": "2023-11-07T05:31:56Z",
"contactId": 123,
"customFields": [
{
"name": "<string>",
"dataType": "<string>",
"value": "<string>",
"displayName": "<string>"
}
],
"currencyCode": "<string>",
"segmentId": 123,
"projectId": 123,
"giftAskId": 123,
"isPrivate": True,
"payments": [
{
"expectedPaymentDate": "2023-11-07T05:31:56Z",
"expectedAmount": 123
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.example.com/api/PledgeV2");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"amountPledged\": 123,\n \"pledgeDate\": \"2023-11-07T05:31:56Z\",\n \"expectedFulfillmentDate\": \"2023-11-07T05:31:56Z\",\n \"contactId\": 123,\n \"customFields\": [\n {\n \"name\": \"<string>\",\n \"dataType\": \"<string>\",\n \"value\": \"<string>\",\n \"displayName\": \"<string>\"\n }\n ],\n \"currencyCode\": \"<string>\",\n \"segmentId\": 123,\n \"projectId\": 123,\n \"giftAskId\": 123,\n \"isPrivate\": true,\n \"payments\": [\n {\n \"expectedPaymentDate\": \"2023-11-07T05:31:56Z\",\n \"expectedAmount\": 123\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://api.example.com/api/PledgeV2",
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([
'amountPledged' => 123,
'pledgeDate' => '2023-11-07T05:31:56Z',
'expectedFulfillmentDate' => '2023-11-07T05:31:56Z',
'contactId' => 123,
'customFields' => [
[
'name' => '<string>',
'dataType' => '<string>',
'value' => '<string>',
'displayName' => '<string>'
]
],
'currencyCode' => '<string>',
'segmentId' => 123,
'projectId' => 123,
'giftAskId' => 123,
'isPrivate' => true,
'payments' => [
[
'expectedPaymentDate' => '2023-11-07T05:31:56Z',
'expectedAmount' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json-patch+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://api.example.com/api/PledgeV2")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"amountPledged\": 123,\n \"pledgeDate\": \"2023-11-07T05:31:56Z\",\n \"expectedFulfillmentDate\": \"2023-11-07T05:31:56Z\",\n \"contactId\": 123,\n \"customFields\": [\n {\n \"name\": \"<string>\",\n \"dataType\": \"<string>\",\n \"value\": \"<string>\",\n \"displayName\": \"<string>\"\n }\n ],\n \"currencyCode\": \"<string>\",\n \"segmentId\": 123,\n \"projectId\": 123,\n \"giftAskId\": 123,\n \"isPrivate\": true,\n \"payments\": [\n {\n \"expectedPaymentDate\": \"2023-11-07T05:31:56Z\",\n \"expectedAmount\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/PledgeV2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json-patch+json'
request.body = "{\n \"amountPledged\": 123,\n \"pledgeDate\": \"2023-11-07T05:31:56Z\",\n \"expectedFulfillmentDate\": \"2023-11-07T05:31:56Z\",\n \"contactId\": 123,\n \"customFields\": [\n {\n \"name\": \"<string>\",\n \"dataType\": \"<string>\",\n \"value\": \"<string>\",\n \"displayName\": \"<string>\"\n }\n ],\n \"currencyCode\": \"<string>\",\n \"segmentId\": 123,\n \"projectId\": 123,\n \"giftAskId\": 123,\n \"isPrivate\": true,\n \"payments\": [\n {\n \"expectedPaymentDate\": \"2023-11-07T05:31:56Z\",\n \"expectedAmount\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_bodyconst url = 'https://api.example.com/api/PledgeV2';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
amountPledged: 123,
pledgeDate: '2023-11-07T05:31:56Z',
expectedFulfillmentDate: '2023-11-07T05:31:56Z',
contactId: 123,
customFields: [
{
name: '<string>',
dataType: '<string>',
value: '<string>',
displayName: '<string>'
}
],
currencyCode: '<string>',
segmentId: 123,
projectId: 123,
giftAskId: 123,
isPrivate: true,
payments: [{expectedPaymentDate: '2023-11-07T05:31:56Z', expectedAmount: 123}]
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));{
"customFields": [
{
"name": "<string>",
"dataType": "<string>",
"value": "<string>",
"displayName": "<string>"
}
],
"id": 123,
"contactId": 123,
"amountPledged": 123,
"pledgeDate": "2023-11-07T05:31:56Z",
"expectedFulfillmentDate": "2023-11-07T05:31:56Z",
"createDateTimeUtc": "2023-11-07T05:31:56Z",
"createdByUser": "<string>",
"modifiedDateTimeUtc": "2023-11-07T05:31:56Z",
"modifiedByUser": "<string>",
"segmentId": 123,
"segment": "<string>",
"projectId": 123,
"project": "<string>",
"giftAskId": 123,
"isPrivate": true,
"payments": [
{
"id": 123,
"expectedPaymentDate": "2023-11-07T05:31:56Z",
"expectedAmount": 123,
"giftId": 123,
"actualAmount": 123
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Body
application/json-patch+jsonapplication/jsontext/jsonapplication/*+json
Available options:
0, 1, 2, 3, 4, 5, 6, 7, 8, 10 Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
OK
Show child attributes
Show child attributes
Available options:
0, 1, 2, 3, 4, 5, 6, 7, 8, 10 Available options:
0, 1, 2, 3, 4 Show child attributes
Show child attributes
Last modified on April 23, 2026
Was this page helpful?
⌘I