curl --request PATCH \
--url https://data.otterly.ai/v1/reports/brand/{reportId}/annotations/{annotationId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "Launched spring campaign in the US"
}
'import requests
url = "https://data.otterly.ai/v1/reports/brand/{reportId}/annotations/{annotationId}"
payload = { "text": "Launched spring campaign in the US" }
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({text: 'Launched spring campaign in the US'})
};
fetch('https://data.otterly.ai/v1/reports/brand/{reportId}/annotations/{annotationId}', 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://data.otterly.ai/v1/reports/brand/{reportId}/annotations/{annotationId}",
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([
'text' => 'Launched spring campaign in the US'
]),
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://data.otterly.ai/v1/reports/brand/{reportId}/annotations/{annotationId}"
payload := strings.NewReader("{\n \"text\": \"Launched spring campaign in the US\"\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://data.otterly.ai/v1/reports/brand/{reportId}/annotations/{annotationId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"Launched spring campaign in the US\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.otterly.ai/v1/reports/brand/{reportId}/annotations/{annotationId}")
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 \"text\": \"Launched spring campaign in the US\"\n}"
response = http.request(request)
puts response.read_body{
"id": "01HXAN7K2YV9D3M8N0G6Q5R4S3",
"brandReportId": "01HXBR1DGM5XY8Z2N3KQ7VAW4P",
"date": "2025-04-10",
"type": "note",
"text": "Launched spring running campaign",
"createdBy": "4f7a1c2e9b8d4e6f",
"createdDate": "2025-04-10T09:15:00.000Z",
"updatedDate": "2025-04-10T09:15:00.000Z"
}{
"message": "Validation failed",
"target": "query",
"errors": [
{
"path": "country",
"message": "Required",
"code": "invalid_type"
}
]
}{
"message": "Report not found"
}{
"message": "Report not found"
}{
"message": "Report not found"
}{
"message": "Report not found"
}Edit a brand report note
Changes the text and/or date of a note; send at least one. Read-only fields (id, brandReportId, type, recommendationId, createdBy, createdDate, updatedDate) are ignored, so an item from the list can be sent back as is. Only notes can be edited: a recommendation annotation is a 403 (it can still be listed and deleted). An annotation that is not on this report is a 404.
curl --request PATCH \
--url https://data.otterly.ai/v1/reports/brand/{reportId}/annotations/{annotationId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "Launched spring campaign in the US"
}
'import requests
url = "https://data.otterly.ai/v1/reports/brand/{reportId}/annotations/{annotationId}"
payload = { "text": "Launched spring campaign in the US" }
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({text: 'Launched spring campaign in the US'})
};
fetch('https://data.otterly.ai/v1/reports/brand/{reportId}/annotations/{annotationId}', 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://data.otterly.ai/v1/reports/brand/{reportId}/annotations/{annotationId}",
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([
'text' => 'Launched spring campaign in the US'
]),
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://data.otterly.ai/v1/reports/brand/{reportId}/annotations/{annotationId}"
payload := strings.NewReader("{\n \"text\": \"Launched spring campaign in the US\"\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://data.otterly.ai/v1/reports/brand/{reportId}/annotations/{annotationId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"Launched spring campaign in the US\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://data.otterly.ai/v1/reports/brand/{reportId}/annotations/{annotationId}")
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 \"text\": \"Launched spring campaign in the US\"\n}"
response = http.request(request)
puts response.read_body{
"id": "01HXAN7K2YV9D3M8N0G6Q5R4S3",
"brandReportId": "01HXBR1DGM5XY8Z2N3KQ7VAW4P",
"date": "2025-04-10",
"type": "note",
"text": "Launched spring running campaign",
"createdBy": "4f7a1c2e9b8d4e6f",
"createdDate": "2025-04-10T09:15:00.000Z",
"updatedDate": "2025-04-10T09:15:00.000Z"
}{
"message": "Validation failed",
"target": "query",
"errors": [
{
"path": "country",
"message": "Required",
"code": "invalid_type"
}
]
}{
"message": "Report not found"
}{
"message": "Report not found"
}{
"message": "Report not found"
}{
"message": "Report not found"
}Authorizations
Provide your API key as a Bearer token: Authorization: Bearer YOUR_API_KEY.
Path Parameters
Brand report identifier.
1"01HX7K2YV9D3M8N0G6Q5R4S3T2"
Annotation identifier.
^[A-Za-z0-9_-]{1,64}$Body
Optional. New note text, 1 to 1000 characters after trimming.
1 - 1000Optional. New day to mark, YYYY-MM-DD.
Response
The updated note.
Annotation identifier.
1"01HX7K2YV9D3M8N0G6Q5R4S3T2"
Brand report the annotation belongs to.
1"01HX7K2YV9D3M8N0G6Q5R4S3T2"
Marked calendar day, YYYY-MM-DD.
note for a free-text note; recommendation for a recommendation marked as done in the app. Only notes can be created or edited through the API.
note, recommendation Annotation text.
Opaque identifier of the user who created the annotation.
Creation timestamp (ISO 8601).
Last update timestamp (ISO 8601).
Recommendation the annotation marks. Present only when type is recommendation.