Update a comment
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");curl_easy_setopt(hnd, CURLOPT_URL, "https://api.focal.inc/v1/comments/f34a811b-a8c1-408a-9faf-1291a8c009a5");
struct curl_slist *headers = NULL;headers = curl_slist_append(headers, "Idempotency-Key: looker-sync-2027-03-04-0001");headers = curl_slist_append(headers, "Authorization: Bearer <token>");headers = curl_slist_append(headers, "Content-Type: application/json");curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{ \"body\": \"Can we get the logo into the first two seconds?\" }");
CURLcode ret = curl_easy_perform(hnd);using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Patch, RequestUri = new Uri("https://api.focal.inc/v1/comments/f34a811b-a8c1-408a-9faf-1291a8c009a5"), Headers = { { "Idempotency-Key", "looker-sync-2027-03-04-0001" }, { "Authorization", "Bearer <token>" }, }, Content = new StringContent("{ \"body\": \"Can we get the logo into the first two seconds?\" }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://api.focal.inc/v1/comments/f34a811b-a8c1-408a-9faf-1291a8c009a5"
payload := strings.NewReader("{ \"body\": \"Can we get the logo into the first two seconds?\" }")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Idempotency-Key", "looker-sync-2027-03-04-0001") 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(res) fmt.Println(string(body))
}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.focal.inc/v1/comments/f34a811b-a8c1-408a-9faf-1291a8c009a5")) .header("Idempotency-Key", "looker-sync-2027-03-04-0001") .header("Authorization", "Bearer <token>") .header("Content-Type", "application/json") .method("PATCH", HttpRequest.BodyPublishers.ofString("{ \"body\": \"Can we get the logo into the first two seconds?\" }")) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");RequestBody body = RequestBody.create(mediaType, "{ \"body\": \"Can we get the logo into the first two seconds?\" }");Request request = new Request.Builder() .url("https://api.focal.inc/v1/comments/f34a811b-a8c1-408a-9faf-1291a8c009a5") .patch(body) .addHeader("Idempotency-Key", "looker-sync-2027-03-04-0001") .addHeader("Authorization", "Bearer <token>") .addHeader("Content-Type", "application/json") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'PATCH', url: 'https://api.focal.inc/v1/comments/f34a811b-a8c1-408a-9faf-1291a8c009a5', headers: { 'Idempotency-Key': 'looker-sync-2027-03-04-0001', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, data: {body: 'Can we get the logo into the first two seconds?'}};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api.focal.inc/v1/comments/f34a811b-a8c1-408a-9faf-1291a8c009a5';const options = { method: 'PATCH', headers: { 'Idempotency-Key': 'looker-sync-2027-03-04-0001', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"body":"Can we get the logo into the first two seconds?"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")val body = RequestBody.create(mediaType, "{ \"body\": \"Can we get the logo into the first two seconds?\" }")val request = Request.Builder() .url("https://api.focal.inc/v1/comments/f34a811b-a8c1-408a-9faf-1291a8c009a5") .patch(body) .addHeader("Idempotency-Key", "looker-sync-2027-03-04-0001") .addHeader("Authorization", "Bearer <token>") .addHeader("Content-Type", "application/json") .build()
val response = client.newCall(request).execute()use std::str::FromStr;use serde_json::json;use reqwest;
#[tokio::main]pub async fn main() { let url = "https://api.focal.inc/v1/comments/f34a811b-a8c1-408a-9faf-1291a8c009a5";
let payload = json!({"body": "Can we get the logo into the first two seconds?"});
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Idempotency-Key", "looker-sync-2027-03-04-0001".parse().unwrap()); headers.insert("Authorization", "Bearer <token>".parse().unwrap()); headers.insert("Content-Type", "application/json".parse().unwrap());
let client = reqwest::Client::new(); let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url) .headers(headers) .json(&payload) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request PATCH \ --url https://api.focal.inc/v1/comments/f34a811b-a8c1-408a-9faf-1291a8c009a5 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: looker-sync-2027-03-04-0001' \ --data '{ "body": "Can we get the logo into the first two seconds?" }'wget --quiet \ --method PATCH \ --header 'Idempotency-Key: looker-sync-2027-03-04-0001' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --body-data '{ "body": "Can we get the logo into the first two seconds?" }' \ --output-document \ - https://api.focal.inc/v1/comments/f34a811b-a8c1-408a-9faf-1291a8c009a5Replace a comment’s text. Only the comment’s author can edit it; anyone else gets 404.
Mentions added by an edit are not notified — only a new comment notifies the people it mentions.
Required scope: comments:write. Rate-limit cost: 10. Honors an optional Idempotency-Key.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
f34a811b-a8c1-408a-9faf-1291a8c009a5Header Parameters
Section titled “Header Parameters”Example
looker-sync-2027-03-04-0001Client-generated key (≤255 chars) for safe retries. A retry with the same key replays the original response instead of re-applying the write; reusing a key with a different body → 400, an in-flight key → 409. Required on POST; optional on PATCH/DELETE. A UUID v4 is recommended — generate one per logical write and reuse it only for retries of that write.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The comment body as Markdown (≤10000 characters). Mentions are written <@user_id> — the user’s id in angle brackets after an @ — and render in the app as that person’s name. Every mentioned user must be a member of the comment’s space, and each one is notified by email and in the app when the comment is created.
Example
Can we get the logo into the first two seconds?Responses
Section titled “Responses”OK
object
object
The comment text as Markdown. Mentions are written <@user_id> — the user’s id in angle brackets after an @ — and render in the app as that person’s name. Formatting the editor offers that Markdown can’t express (underline, colour) is dropped, keeping its text.
user for a Focal account; guest for someone commenting through a collection share link, who has no account.
The commenting user; null for a guest.
The author’s display name — the user’s name, or the name a guest typed. null when a guest left it blank.
The media the comment is on, or null for a comment on a board row itself.
The version of the media the comment was left on. A media keeps its comments across versions, so this can be older than the current one.
The board the comment was left on, or null for a comment made in the media library.
The board row (task) the comment was left on, or null for a comment made in the media library.
The comment this one replies to, or null for a top-level comment. Threads are one level deep: every reply points at the thread’s top-level comment.
Where on the media the comment is anchored: a moment (or stretch) of a video, a page, and shapes drawn over the media. null when the comment isn’t anchored to a spot on the media.
object
Seconds into the video the comment is pinned to. Only videos have one. null when the comment isn’t pinned to a moment.
End, in seconds, of the stretch of video the comment covers. null when the comment marks a single moment.
The page (counting from 1) of a multi-page media. null otherwise.
The ad-mockup preview the drawings were made over (e.g. InstagramFeed). When set, frame and the drawing coordinates are in that mockup’s layout rather than over the media itself. null when drawn on the media itself.
The size of the image the drawing coordinates are measured in. Divide a coordinate by it to get a fraction of the frame, or scale it by media.width / frame.width for the media’s pixels. null on comments drawn before this was recorded, when the coordinate space is unknown: the media’s pixels, possibly downscaled to a preview of at most 2560×1600 for images.
object
Width of the frame in pixels.
Height of the frame in pixels.
Shapes drawn over the media. Empty when the comment is only pinned to a moment or a page.
A rectangle outline. Coordinates are pixels within the annotation’s frame, measured from its top-left corner. For drawings created through the API, frame is the media’s own width × height.
object
The stroke colour as a CSS hex code, e.g. #9d2dff.
Left edge of the rectangle.
Top edge of the rectangle.
Width of the rectangle.
Height of the rectangle.
A freehand line through points, in order. Coordinates are pixels within the annotation’s frame, measured from its top-left corner. For drawings created through the API, frame is the media’s own width × height.
object
The stroke colour as a CSS hex code, e.g. #9d2dff.
The line’s points.
An arrow pointing from from to to. Coordinates are pixels within the annotation’s frame, measured from its top-left corner. For drawings created through the API, frame is the media’s own width × height.
object
The stroke colour as a CSS hex code, e.g. #9d2dff.
Where the arrow starts, as [x, y].
Where the arrow points, as [x, y].
Everyone mentioned in body, once each.
object
The mentioned user’s name as it was when mentioned.
Emoji reactions, one entry per emoji anyone used.
object
The reaction, as the app’s icon name.
Who reacted with this emoji.
Browser URL that opens the comment’s media or board row in the Focal web app, with its comments showing.
How many replies the comment has. Always 0 on a reply.
The comment’s replies, oldest first. Always empty on a reply.
object
The comment text as Markdown. Mentions are written <@user_id> — the user’s id in angle brackets after an @ — and render in the app as that person’s name. Formatting the editor offers that Markdown can’t express (underline, colour) is dropped, keeping its text.
user for a Focal account; guest for someone commenting through a collection share link, who has no account.
The commenting user; null for a guest.
The author’s display name — the user’s name, or the name a guest typed. null when a guest left it blank.
The media the comment is on, or null for a comment on a board row itself.
The version of the media the comment was left on. A media keeps its comments across versions, so this can be older than the current one.
The board the comment was left on, or null for a comment made in the media library.
The board row (task) the comment was left on, or null for a comment made in the media library.
The comment this one replies to, or null for a top-level comment. Threads are one level deep: every reply points at the thread’s top-level comment.
Where on the media the comment is anchored: a moment (or stretch) of a video, a page, and shapes drawn over the media. null when the comment isn’t anchored to a spot on the media.
object
Seconds into the video the comment is pinned to. Only videos have one. null when the comment isn’t pinned to a moment.
End, in seconds, of the stretch of video the comment covers. null when the comment marks a single moment.
The page (counting from 1) of a multi-page media. null otherwise.
The ad-mockup preview the drawings were made over (e.g. InstagramFeed). When set, frame and the drawing coordinates are in that mockup’s layout rather than over the media itself. null when drawn on the media itself.
The size of the image the drawing coordinates are measured in. Divide a coordinate by it to get a fraction of the frame, or scale it by media.width / frame.width for the media’s pixels. null on comments drawn before this was recorded, when the coordinate space is unknown: the media’s pixels, possibly downscaled to a preview of at most 2560×1600 for images.
object
Width of the frame in pixels.
Height of the frame in pixels.
Shapes drawn over the media. Empty when the comment is only pinned to a moment or a page.
A rectangle outline. Coordinates are pixels within the annotation’s frame, measured from its top-left corner. For drawings created through the API, frame is the media’s own width × height.
object
The stroke colour as a CSS hex code, e.g. #9d2dff.
Left edge of the rectangle.
Top edge of the rectangle.
Width of the rectangle.
Height of the rectangle.
A freehand line through points, in order. Coordinates are pixels within the annotation’s frame, measured from its top-left corner. For drawings created through the API, frame is the media’s own width × height.
object
The stroke colour as a CSS hex code, e.g. #9d2dff.
The line’s points.
An arrow pointing from from to to. Coordinates are pixels within the annotation’s frame, measured from its top-left corner. For drawings created through the API, frame is the media’s own width × height.
object
The stroke colour as a CSS hex code, e.g. #9d2dff.
Where the arrow starts, as [x, y].
Where the arrow points, as [x, y].
Everyone mentioned in body, once each.
object
The mentioned user’s name as it was when mentioned.
Emoji reactions, one entry per emoji anyone used.
object
The reaction, as the app’s icon name.
Who reacted with this emoji.
Browser URL that opens the comment’s media or board row in the Focal web app, with its comments showing.
Example
{ "data": { "id": "f34a811b-a8c1-408a-9faf-1291a8c009a5", "body": "Can we get the logo into the first two seconds?", "author_type": "user", "author_id": "cfebb6ef-f092-4591-a6e3-e6667ab5a252", "author_name": "Maya Chen", "space_id": "6916bc3d-e1ab-425b-ac25-eefada01a9a2", "media_id": "786beeda-55ac-4025-bf6e-43b2918e84a9", "media_version_id": "f0a180e0-f387-47fa-9c26-11e144d1f0f6", "board_id": null, "row_id": null, "reply_to_id": null, "annotation": { "timestamp": 0.5, "timestamp_end": 2, "page": null, "mockup": null, "frame": { "width": 1080, "height": 1350 }, "drawings": [ { "type": "rectangle", "color": "#9d2dff", "x": 64, "y": 80, "width": 320, "height": 180 } ] }, "mentions": [ { "user_id": "5bc4dea2-9cc6-4e2a-a6ee-9156752c9646", "name": "Jonas Berg" } ], "reactions": [ { "emoji": "thumbs-up", "user_ids": [ "5bc4dea2-9cc6-4e2a-a6ee-9156752c9646" ] } ], "created_at": "2027-03-04T10:15:00Z", "updated_at": "2027-03-06T14:42:00Z", "html_url": "https://app.focal.inc/spaces/6916bc3d-e1ab-425b-ac25-eefada01a9a2/library?file=786beeda-55ac-4025-bf6e-43b2918e84a9&folder=80539d38-3a8e-48f8-929b-8c0e9a22ab43", "reply_count": 1, "replies": [ { "id": "fe202603-d056-49f6-9c4a-3bca6d05819e", "body": "Done – new cut is uploaded as v2.", "author_type": "user", "author_id": "5bc4dea2-9cc6-4e2a-a6ee-9156752c9646", "author_name": "Jonas Berg", "space_id": "6916bc3d-e1ab-425b-ac25-eefada01a9a2", "media_id": "786beeda-55ac-4025-bf6e-43b2918e84a9", "media_version_id": "f0a180e0-f387-47fa-9c26-11e144d1f0f6", "board_id": null, "row_id": null, "reply_to_id": "f34a811b-a8c1-408a-9faf-1291a8c009a5", "annotation": null, "mentions": [ { "user_id": "5bc4dea2-9cc6-4e2a-a6ee-9156752c9646", "name": "Jonas Berg" } ], "reactions": [ { "emoji": "thumbs-up", "user_ids": [ "5bc4dea2-9cc6-4e2a-a6ee-9156752c9646" ] } ], "created_at": "2027-03-06T14:42:00Z", "updated_at": "2027-03-06T14:42:00Z", "html_url": "https://app.focal.inc/spaces/6916bc3d-e1ab-425b-ac25-eefada01a9a2/library?file=786beeda-55ac-4025-bf6e-43b2918e84a9&folder=80539d38-3a8e-48f8-929b-8c0e9a22ab43" } ] }}The request was malformed (invalid cursor, unknown type, validation failure, etc.). error.code is bad_request.
Canonical error envelope. code is stable across releases and intended for programmatic handling; message is human-readable. details only appears for validation failures and lists the offending fields.
object
object
object
Example
{ "error": { "code": "bad_request", "message": "Invalid request body", "details": [ { "field": "space_id", "issue": "Invalid UUID" } ] }}Missing, invalid, or disabled token. error.code is unauthenticated.
Canonical error envelope. code is stable across releases and intended for programmatic handling; message is human-readable. details only appears for validation failures and lists the offending fields.
object
object
object
Example
{ "error": { "code": "unauthenticated", "message": "Bearer token is missing or invalid" }}The token doesn’t have the scope this endpoint requires. error.code is forbidden.
Canonical error envelope. code is stable across releases and intended for programmatic handling; message is human-readable. details only appears for validation failures and lists the offending fields.
object
object
object
Example
{ "error": { "code": "forbidden", "message": "Token doesn't have the required scope" }}Resource doesn’t exist or is outside the token’s space allow-list. The two cases share a response shape so a restricted token can’t probe for the existence of out-of-scope spaces. error.code is not_found.
Canonical error envelope. code is stable across releases and intended for programmatic handling; message is human-readable. details only appears for validation failures and lists the offending fields.
object
object
object
Example
{ "error": { "code": "not_found", "message": "Not found" }}The request conflicts with the current state. Most commonly a concurrent request carrying the same Idempotency-Key is still in flight. error.code is conflict.
Canonical error envelope. code is stable across releases and intended for programmatic handling; message is human-readable. details only appears for validation failures and lists the offending fields.
object
object
object
Example
{ "error": { "code": "conflict", "message": "A request with this Idempotency-Key is already being processed" }}Rate limit exceeded. error.code is rate_limited. Wait the number of seconds in the Retry-After header before retrying. Quotas are per-token; see the “Rate limiting” section at the top of this document.
Canonical error envelope. code is stable across releases and intended for programmatic handling; message is human-readable. details only appears for validation failures and lists the offending fields.
object
object
object
Example
{ "error": { "code": "rate_limited", "message": "Rate limit of 1000 units per 60s exceeded (this request cost 5)" }}Headers
Section titled “Headers”Example
12Seconds to wait before retrying.