Communications
Update a note
Updates a note body and optionally its category, including notes on archived profiles. Requires notes_manage and profile access. Supplying expected_updated_at prevents overwriting a changed note.
PUT
/
notes
/
{id}
Update a note
curl --request PUT \
--url https://api.gratona.com/v2/notes/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"note": "Updated meeting notes",
"categories": "Meeting",
"expected_updated_at": "2026-10-20T09:00:00Z"
}
'import requests
url = "https://api.gratona.com/v2/notes/{id}"
payload = {
"note": "Updated meeting notes",
"categories": "Meeting",
"expected_updated_at": "2026-10-20T09:00:00Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
note: 'Updated meeting notes',
categories: 'Meeting',
expected_updated_at: '2026-10-20T09:00:00Z'
})
};
fetch('https://api.gratona.com/v2/notes/{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/v2/notes/{id}",
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([
'note' => 'Updated meeting notes',
'categories' => 'Meeting',
'expected_updated_at' => '2026-10-20T09:00:00Z'
]),
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/v2/notes/{id}"
payload := strings.NewReader("{\n \"note\": \"Updated meeting notes\",\n \"categories\": \"Meeting\",\n \"expected_updated_at\": \"2026-10-20T09:00:00Z\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.gratona.com/v2/notes/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"note\": \"Updated meeting notes\",\n \"categories\": \"Meeting\",\n \"expected_updated_at\": \"2026-10-20T09:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v2/notes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"note\": \"Updated meeting notes\",\n \"categories\": \"Meeting\",\n \"expected_updated_at\": \"2026-10-20T09:00:00Z\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Note updated successfully",
"data": {
"id": 4422,
"record_type": "donor",
"record_id": 12345,
"note": "Called to thank the donor.",
"category": {
"id": 7,
"category": "Phone call"
},
"donor": {
"id": 12345,
"username": "alex",
"email": "alex@example.com"
},
"created_by": {
"id": 1024,
"name": "Alex Staff"
},
"created_at": "2026-10-20T09:00:00Z",
"updated_at": "2026-10-20T09:00:00Z"
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "No Note was found",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}Authorizations
bearerAuthapiKeyAuth
Passport bearer token authentication for legacy admin sessions.
Path Parameters
ID of the note within the caller's organization.
Body
application/json
Updated note and optional concurrency check.
Replacement body. Validation rule: required|min:3|string.
Minimum string length:
3Example:
"Updated meeting notes"
Replacement category name; omitted, null or blank values keep the existing category. Validation rule: nullable|string|max:255.
Maximum string length:
255Example:
"Meeting"
Previous updated_at value. A mismatch returns 422. Validation rule: sometimes|nullable|date.
Example:
"2026-10-20T09:00:00Z"
⌘I
Update a note
curl --request PUT \
--url https://api.gratona.com/v2/notes/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"note": "Updated meeting notes",
"categories": "Meeting",
"expected_updated_at": "2026-10-20T09:00:00Z"
}
'import requests
url = "https://api.gratona.com/v2/notes/{id}"
payload = {
"note": "Updated meeting notes",
"categories": "Meeting",
"expected_updated_at": "2026-10-20T09:00:00Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
note: 'Updated meeting notes',
categories: 'Meeting',
expected_updated_at: '2026-10-20T09:00:00Z'
})
};
fetch('https://api.gratona.com/v2/notes/{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/v2/notes/{id}",
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([
'note' => 'Updated meeting notes',
'categories' => 'Meeting',
'expected_updated_at' => '2026-10-20T09:00:00Z'
]),
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/v2/notes/{id}"
payload := strings.NewReader("{\n \"note\": \"Updated meeting notes\",\n \"categories\": \"Meeting\",\n \"expected_updated_at\": \"2026-10-20T09:00:00Z\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.gratona.com/v2/notes/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"note\": \"Updated meeting notes\",\n \"categories\": \"Meeting\",\n \"expected_updated_at\": \"2026-10-20T09:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v2/notes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"note\": \"Updated meeting notes\",\n \"categories\": \"Meeting\",\n \"expected_updated_at\": \"2026-10-20T09:00:00Z\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Note updated successfully",
"data": {
"id": 4422,
"record_type": "donor",
"record_id": 12345,
"note": "Called to thank the donor.",
"category": {
"id": 7,
"category": "Phone call"
},
"donor": {
"id": 12345,
"username": "alex",
"email": "alex@example.com"
},
"created_by": {
"id": 1024,
"name": "Alex Staff"
},
"created_at": "2026-10-20T09:00:00Z",
"updated_at": "2026-10-20T09:00:00Z"
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "No Note was found",
"status": "error"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}