Update the recipient's profile fields
Saves edits the recipient made in the profile form. The accepted body keys depend on the program — they’re driven by the program’s HysForm entity form fields and (for P2P programs) an optional peer_to_peer_profile sub-object containing facebook/twitter/instagram/linkedin and a free-form bio. Validation rules come from getRecipientProfileValidationRules() plus getPeerToPeerProfileValidationRules() when applicable.
curl --request PUT \
--url https://api.gratona.com/v1/frontend/recipient-portal/{client_id}/{session_id}/profile \
--header 'Content-Type: application/json' \
--header 'session_id: <api-key>' \
--data '
{
"peer_to_peer_profile": {
"facebook": "<string>",
"twitter": "<string>",
"instagram": "<string>",
"linkedin": "<string>",
"bio": "<string>"
}
}
'import requests
url = "https://api.gratona.com/v1/frontend/recipient-portal/{client_id}/{session_id}/profile"
payload = { "peer_to_peer_profile": {
"facebook": "<string>",
"twitter": "<string>",
"instagram": "<string>",
"linkedin": "<string>",
"bio": "<string>"
} }
headers = {
"session_id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {session_id: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
peer_to_peer_profile: {
facebook: '<string>',
twitter: '<string>',
instagram: '<string>',
linkedin: '<string>',
bio: '<string>'
}
})
};
fetch('https://api.gratona.com/v1/frontend/recipient-portal/{client_id}/{session_id}/profile', 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/frontend/recipient-portal/{client_id}/{session_id}/profile",
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([
'peer_to_peer_profile' => [
'facebook' => '<string>',
'twitter' => '<string>',
'instagram' => '<string>',
'linkedin' => '<string>',
'bio' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"session_id: <api-key>"
],
]);
$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/frontend/recipient-portal/{client_id}/{session_id}/profile"
payload := strings.NewReader("{\n \"peer_to_peer_profile\": {\n \"facebook\": \"<string>\",\n \"twitter\": \"<string>\",\n \"instagram\": \"<string>\",\n \"linkedin\": \"<string>\",\n \"bio\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("session_id", "<api-key>")
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.put("https://api.gratona.com/v1/frontend/recipient-portal/{client_id}/{session_id}/profile")
.header("session_id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"peer_to_peer_profile\": {\n \"facebook\": \"<string>\",\n \"twitter\": \"<string>\",\n \"instagram\": \"<string>\",\n \"linkedin\": \"<string>\",\n \"bio\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/frontend/recipient-portal/{client_id}/{session_id}/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["session_id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"peer_to_peer_profile\": {\n \"facebook\": \"<string>\",\n \"twitter\": \"<string>\",\n \"instagram\": \"<string>\",\n \"linkedin\": \"<string>\",\n \"bio\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"profile": {},
"peer_to_peer_profile": {}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}Authorizations
Legacy session-id header retained for backwards compatibility with older first-party clients. New integrations should prefer bearerAuth or apiKeyAuth.
Body
Dynamic field map keyed by field_key from the program's HysForm, plus optional peer_to_peer_profile. Values are typically strings; checkbox/multi-select fields may be arrays.
Show child attributes
Show child attributes
curl --request PUT \
--url https://api.gratona.com/v1/frontend/recipient-portal/{client_id}/{session_id}/profile \
--header 'Content-Type: application/json' \
--header 'session_id: <api-key>' \
--data '
{
"peer_to_peer_profile": {
"facebook": "<string>",
"twitter": "<string>",
"instagram": "<string>",
"linkedin": "<string>",
"bio": "<string>"
}
}
'import requests
url = "https://api.gratona.com/v1/frontend/recipient-portal/{client_id}/{session_id}/profile"
payload = { "peer_to_peer_profile": {
"facebook": "<string>",
"twitter": "<string>",
"instagram": "<string>",
"linkedin": "<string>",
"bio": "<string>"
} }
headers = {
"session_id": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {session_id: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
peer_to_peer_profile: {
facebook: '<string>',
twitter: '<string>',
instagram: '<string>',
linkedin: '<string>',
bio: '<string>'
}
})
};
fetch('https://api.gratona.com/v1/frontend/recipient-portal/{client_id}/{session_id}/profile', 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/frontend/recipient-portal/{client_id}/{session_id}/profile",
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([
'peer_to_peer_profile' => [
'facebook' => '<string>',
'twitter' => '<string>',
'instagram' => '<string>',
'linkedin' => '<string>',
'bio' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"session_id: <api-key>"
],
]);
$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/frontend/recipient-portal/{client_id}/{session_id}/profile"
payload := strings.NewReader("{\n \"peer_to_peer_profile\": {\n \"facebook\": \"<string>\",\n \"twitter\": \"<string>\",\n \"instagram\": \"<string>\",\n \"linkedin\": \"<string>\",\n \"bio\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("session_id", "<api-key>")
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.put("https://api.gratona.com/v1/frontend/recipient-portal/{client_id}/{session_id}/profile")
.header("session_id", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"peer_to_peer_profile\": {\n \"facebook\": \"<string>\",\n \"twitter\": \"<string>\",\n \"instagram\": \"<string>\",\n \"linkedin\": \"<string>\",\n \"bio\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/frontend/recipient-portal/{client_id}/{session_id}/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["session_id"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"peer_to_peer_profile\": {\n \"facebook\": \"<string>\",\n \"twitter\": \"<string>\",\n \"instagram\": \"<string>\",\n \"linkedin\": \"<string>\",\n \"bio\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"profile": {},
"peer_to_peer_profile": {}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}