Email Calendar
Edit my donor comment
Compatibility donor-comment interface backed by the collaboration thread. IDs can be positive legacy IDs or negative IDs for newer comments; zero is invalid. Requires current donor/thread access. Support sessions can read but cannot write. Only the author may edit. Optional revision detects concurrent changes and returns409 when stale.
PATCH
/
donors
/
{donor_id}
/
comments
/
{comment_id}
Edit my donor comment
curl --request PATCH \
--url https://api.gratona.com/v1/donors/{donor_id}/comments/{comment_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"body": "<string>",
"revision": 2
}
'import requests
url = "https://api.gratona.com/v1/donors/{donor_id}/comments/{comment_id}"
payload = {
"body": "<string>",
"revision": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({body: JSON.stringify('<string>'), revision: 2})
};
fetch('https://api.gratona.com/v1/donors/{donor_id}/comments/{comment_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/donors/{donor_id}/comments/{comment_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'body' => '<string>',
'revision' => 2
]),
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/donors/{donor_id}/comments/{comment_id}"
payload := strings.NewReader("{\n \"body\": \"<string>\",\n \"revision\": 2\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.gratona.com/v1/donors/{donor_id}/comments/{comment_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"<string>\",\n \"revision\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/donors/{donor_id}/comments/{comment_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"body\": \"<string>\",\n \"revision\": 2\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"donor_id": 123,
"user_id": 123,
"author_name": "<string>",
"author_email": "<string>",
"body": "<string>",
"revision": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"permissions": {
"edit": true,
"delete": true
}
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Not Found",
"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
bearerAuthapiKeyAuth
Passport bearer token authentication for legacy admin sessions.
Body
application/json
Request fields accepted by this operation. Omitted optional properties retain the behavior described above.
Response
Edit my donor comment response.
Show child attributes
Show child attributes
⌘I
Edit my donor comment
curl --request PATCH \
--url https://api.gratona.com/v1/donors/{donor_id}/comments/{comment_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"body": "<string>",
"revision": 2
}
'import requests
url = "https://api.gratona.com/v1/donors/{donor_id}/comments/{comment_id}"
payload = {
"body": "<string>",
"revision": 2
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({body: JSON.stringify('<string>'), revision: 2})
};
fetch('https://api.gratona.com/v1/donors/{donor_id}/comments/{comment_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/donors/{donor_id}/comments/{comment_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'body' => '<string>',
'revision' => 2
]),
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/donors/{donor_id}/comments/{comment_id}"
payload := strings.NewReader("{\n \"body\": \"<string>\",\n \"revision\": 2\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.gratona.com/v1/donors/{donor_id}/comments/{comment_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"<string>\",\n \"revision\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/donors/{donor_id}/comments/{comment_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"body\": \"<string>\",\n \"revision\": 2\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"donor_id": 123,
"user_id": 123,
"author_name": "<string>",
"author_email": "<string>",
"body": "<string>",
"revision": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"permissions": {
"edit": true,
"delete": true
}
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Not Found",
"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."
}