Save an authored donor intelligence profile
Requires the donor_intelligence feature and route permissions. Every client_id route is restricted to the authenticated organization, including platform administrators using workspace routes. Stored profiles are filtered against current email-privacy state; obsolete privacy snapshots are concealed. Legacy wealth-insights URLs are equivalent aliases. Requires body client_id matching the current organization. snapshotData, askData and relationshipMapData are serialized JSON strings. Reserves and spends donor-profile AI capacity while persisting the profile; the email-privacy stamp is server-authored.
curl --request POST \
--url https://api.gratona.com/v1/admin/donors/donor-intelligence/{donor_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"client_id": 123,
"status": "<string>",
"snapshotData": "{}",
"askData": "{}",
"deepDiveMd": "<string>",
"messagingMd": "<string>",
"relationshipMapData": "{}"
}
'import requests
url = "https://api.gratona.com/v1/admin/donors/donor-intelligence/{donor_id}"
payload = {
"client_id": 123,
"status": "<string>",
"snapshotData": "{}",
"askData": "{}",
"deepDiveMd": "<string>",
"messagingMd": "<string>",
"relationshipMapData": "{}"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
client_id: 123,
status: '<string>',
snapshotData: '{}',
askData: '{}',
deepDiveMd: '<string>',
messagingMd: '<string>',
relationshipMapData: '{}'
})
};
fetch('https://api.gratona.com/v1/admin/donors/donor-intelligence/{donor_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gratona.com/v1/admin/donors/donor-intelligence/{donor_id}",
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([
'client_id' => 123,
'status' => '<string>',
'snapshotData' => '{}',
'askData' => '{}',
'deepDiveMd' => '<string>',
'messagingMd' => '<string>',
'relationshipMapData' => '{}'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gratona.com/v1/admin/donors/donor-intelligence/{donor_id}"
payload := strings.NewReader("{\n \"client_id\": 123,\n \"status\": \"<string>\",\n \"snapshotData\": \"{}\",\n \"askData\": \"{}\",\n \"deepDiveMd\": \"<string>\",\n \"messagingMd\": \"<string>\",\n \"relationshipMapData\": \"{}\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gratona.com/v1/admin/donors/donor-intelligence/{donor_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"client_id\": 123,\n \"status\": \"<string>\",\n \"snapshotData\": \"{}\",\n \"askData\": \"{}\",\n \"deepDiveMd\": \"<string>\",\n \"messagingMd\": \"<string>\",\n \"relationshipMapData\": \"{}\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/donors/donor-intelligence/{donor_id}")
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'
request.body = "{\n \"client_id\": 123,\n \"status\": \"<string>\",\n \"snapshotData\": \"{}\",\n \"askData\": \"{}\",\n \"deepDiveMd\": \"<string>\",\n \"messagingMd\": \"<string>\",\n \"relationshipMapData\": \"{}\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Saved successfully.",
"data": {
"donor_intelligence_profile": {
"id": 123,
"user_id": 123,
"client_id": 123,
"donor_id": 123,
"status": "<string>",
"deepDiveMd": "<string>",
"messagingMd": "<string>",
"intelligence_mode": "<string>",
"verification_level": "<string>",
"donor_intelligence_run_id": 123,
"ai_credit_ledger_entry_id": 123,
"pricing_version": "<string>",
"stale_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"snapshotData": "<string>",
"askData": "<string>",
"relationshipMapData": "<string>"
},
"usage": {
"distinct_donor_count": 123,
"donor_intelligence_profile_count": 123,
"profile_capacity_total": 123,
"available_profile_runs": 123,
"has_ai_capacity": true,
"ai_capacity": {
"available_credits": 123,
"reserved_credits": 123,
"spent_credits": 123,
"included_plan_granted": 123,
"included_plan_remaining": 123,
"annual_pack_remaining": 123,
"top_up_remaining": 123,
"display_label": "<string>",
"paid_runs_disabled": true,
"expiring_soon": [
{
"credits": 123,
"expires_at": "2023-11-07T05:31:56Z",
"source_type": "<string>"
}
],
"top_up": {
"credits": 123,
"price_cents": 123,
"currency": "<string>"
},
"action_rates": {},
"recent_entries": [
{
"id": 123,
"client_id": 123,
"user_id": 123,
"entry_type": "<string>",
"action_type": "<string>",
"credit_delta": 123,
"balance_after_credits": 123,
"amount_cents": 123,
"currency": "<string>",
"source_type": "<string>",
"source_id": "<string>",
"run_id": 123,
"expires_at": "2023-11-07T05:31:56Z",
"pricing_version": "<string>",
"idempotency_key": "<string>",
"stripe_payment_intent_id": "<string>",
"note": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"metadata_json": {}
}
]
}
}
}
}{
"message": "Unauthorized",
"status": "error"
}{
"status": "error",
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"status": "error",
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}{
"status": "error",
"message": "<string>",
"code": "<string>",
"errors": {}
}Authorizations
Passport bearer token authentication for legacy admin sessions.
Path Parameters
Donor id.
Body
Request fields accepted by this operation. Omitted optional properties retain the behavior described above.
Validation: required|integer.
Validation: required|string.
Required valid JSON string.
"{}"
Required valid JSON string.
"{}"
Validation: required|string.
Validation: required|string.
Required valid JSON string.
"{}"
curl --request POST \
--url https://api.gratona.com/v1/admin/donors/donor-intelligence/{donor_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"client_id": 123,
"status": "<string>",
"snapshotData": "{}",
"askData": "{}",
"deepDiveMd": "<string>",
"messagingMd": "<string>",
"relationshipMapData": "{}"
}
'import requests
url = "https://api.gratona.com/v1/admin/donors/donor-intelligence/{donor_id}"
payload = {
"client_id": 123,
"status": "<string>",
"snapshotData": "{}",
"askData": "{}",
"deepDiveMd": "<string>",
"messagingMd": "<string>",
"relationshipMapData": "{}"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
client_id: 123,
status: '<string>',
snapshotData: '{}',
askData: '{}',
deepDiveMd: '<string>',
messagingMd: '<string>',
relationshipMapData: '{}'
})
};
fetch('https://api.gratona.com/v1/admin/donors/donor-intelligence/{donor_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gratona.com/v1/admin/donors/donor-intelligence/{donor_id}",
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([
'client_id' => 123,
'status' => '<string>',
'snapshotData' => '{}',
'askData' => '{}',
'deepDiveMd' => '<string>',
'messagingMd' => '<string>',
'relationshipMapData' => '{}'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gratona.com/v1/admin/donors/donor-intelligence/{donor_id}"
payload := strings.NewReader("{\n \"client_id\": 123,\n \"status\": \"<string>\",\n \"snapshotData\": \"{}\",\n \"askData\": \"{}\",\n \"deepDiveMd\": \"<string>\",\n \"messagingMd\": \"<string>\",\n \"relationshipMapData\": \"{}\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.gratona.com/v1/admin/donors/donor-intelligence/{donor_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"client_id\": 123,\n \"status\": \"<string>\",\n \"snapshotData\": \"{}\",\n \"askData\": \"{}\",\n \"deepDiveMd\": \"<string>\",\n \"messagingMd\": \"<string>\",\n \"relationshipMapData\": \"{}\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/donors/donor-intelligence/{donor_id}")
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'
request.body = "{\n \"client_id\": 123,\n \"status\": \"<string>\",\n \"snapshotData\": \"{}\",\n \"askData\": \"{}\",\n \"deepDiveMd\": \"<string>\",\n \"messagingMd\": \"<string>\",\n \"relationshipMapData\": \"{}\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Saved successfully.",
"data": {
"donor_intelligence_profile": {
"id": 123,
"user_id": 123,
"client_id": 123,
"donor_id": 123,
"status": "<string>",
"deepDiveMd": "<string>",
"messagingMd": "<string>",
"intelligence_mode": "<string>",
"verification_level": "<string>",
"donor_intelligence_run_id": 123,
"ai_credit_ledger_entry_id": 123,
"pricing_version": "<string>",
"stale_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"snapshotData": "<string>",
"askData": "<string>",
"relationshipMapData": "<string>"
},
"usage": {
"distinct_donor_count": 123,
"donor_intelligence_profile_count": 123,
"profile_capacity_total": 123,
"available_profile_runs": 123,
"has_ai_capacity": true,
"ai_capacity": {
"available_credits": 123,
"reserved_credits": 123,
"spent_credits": 123,
"included_plan_granted": 123,
"included_plan_remaining": 123,
"annual_pack_remaining": 123,
"top_up_remaining": 123,
"display_label": "<string>",
"paid_runs_disabled": true,
"expiring_soon": [
{
"credits": 123,
"expires_at": "2023-11-07T05:31:56Z",
"source_type": "<string>"
}
],
"top_up": {
"credits": 123,
"price_cents": 123,
"currency": "<string>"
},
"action_rates": {},
"recent_entries": [
{
"id": 123,
"client_id": 123,
"user_id": 123,
"entry_type": "<string>",
"action_type": "<string>",
"credit_delta": 123,
"balance_after_credits": 123,
"amount_cents": 123,
"currency": "<string>",
"source_type": "<string>",
"source_id": "<string>",
"run_id": 123,
"expires_at": "2023-11-07T05:31:56Z",
"pricing_version": "<string>",
"idempotency_key": "<string>",
"stripe_payment_intent_id": "<string>",
"note": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"metadata_json": {}
}
]
}
}
}
}{
"message": "Unauthorized",
"status": "error"
}{
"status": "error",
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"status": "error",
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}{
"status": "error",
"message": "<string>",
"code": "<string>",
"errors": {}
}