Create a comment
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");curl_easy_setopt(hnd, CURLOPT_URL, "https://api.focal.inc/v1/comments");
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, "{ \"media_id\": \"786beeda-55ac-4025-bf6e-43b2918e84a9\", \"row_id\": \"6eee0a1d-ef35-45ee-b1c9-b95f1f54d652\", \"reply_to_id\": \"f34a811b-a8c1-408a-9faf-1291a8c009a5\", \"body\": \"Can we get the logo into the first two seconds?\", \"annotation\": { \"timestamp\": 0.5, \"timestamp_end\": 2, \"page\": 1, \"drawings\": [ { \"type\": \"rectangle\", \"color\": \"#9d2dff\", \"x\": 64, \"y\": 80, \"width\": 320, \"height\": 180 } ] } }");
CURLcode ret = curl_easy_perform(hnd);using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://api.focal.inc/v1/comments"), Headers = { { "Idempotency-Key", "looker-sync-2027-03-04-0001" }, { "Authorization", "Bearer <token>" }, }, Content = new StringContent("{ \"media_id\": \"786beeda-55ac-4025-bf6e-43b2918e84a9\", \"row_id\": \"6eee0a1d-ef35-45ee-b1c9-b95f1f54d652\", \"reply_to_id\": \"f34a811b-a8c1-408a-9faf-1291a8c009a5\", \"body\": \"Can we get the logo into the first two seconds?\", \"annotation\": { \"timestamp\": 0.5, \"timestamp_end\": 2, \"page\": 1, \"drawings\": [ { \"type\": \"rectangle\", \"color\": \"#9d2dff\", \"x\": 64, \"y\": 80, \"width\": 320, \"height\": 180 } ] } }") { 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"
payload := strings.NewReader("{ \"media_id\": \"786beeda-55ac-4025-bf6e-43b2918e84a9\", \"row_id\": \"6eee0a1d-ef35-45ee-b1c9-b95f1f54d652\", \"reply_to_id\": \"f34a811b-a8c1-408a-9faf-1291a8c009a5\", \"body\": \"Can we get the logo into the first two seconds?\", \"annotation\": { \"timestamp\": 0.5, \"timestamp_end\": 2, \"page\": 1, \"drawings\": [ { \"type\": \"rectangle\", \"color\": \"#9d2dff\", \"x\": 64, \"y\": 80, \"width\": 320, \"height\": 180 } ] } }")
req, _ := http.NewRequest("POST", 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")) .header("Idempotency-Key", "looker-sync-2027-03-04-0001") .header("Authorization", "Bearer <token>") .header("Content-Type", "application/json") .method("POST", HttpRequest.BodyPublishers.ofString("{ \"media_id\": \"786beeda-55ac-4025-bf6e-43b2918e84a9\", \"row_id\": \"6eee0a1d-ef35-45ee-b1c9-b95f1f54d652\", \"reply_to_id\": \"f34a811b-a8c1-408a-9faf-1291a8c009a5\", \"body\": \"Can we get the logo into the first two seconds?\", \"annotation\": { \"timestamp\": 0.5, \"timestamp_end\": 2, \"page\": 1, \"drawings\": [ { \"type\": \"rectangle\", \"color\": \"#9d2dff\", \"x\": 64, \"y\": 80, \"width\": 320, \"height\": 180 } ] } }")) .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, "{ \"media_id\": \"786beeda-55ac-4025-bf6e-43b2918e84a9\", \"row_id\": \"6eee0a1d-ef35-45ee-b1c9-b95f1f54d652\", \"reply_to_id\": \"f34a811b-a8c1-408a-9faf-1291a8c009a5\", \"body\": \"Can we get the logo into the first two seconds?\", \"annotation\": { \"timestamp\": 0.5, \"timestamp_end\": 2, \"page\": 1, \"drawings\": [ { \"type\": \"rectangle\", \"color\": \"#9d2dff\", \"x\": 64, \"y\": 80, \"width\": 320, \"height\": 180 } ] } }");Request request = new Request.Builder() .url("https://api.focal.inc/v1/comments") .post(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: 'POST', url: 'https://api.focal.inc/v1/comments', headers: { 'Idempotency-Key': 'looker-sync-2027-03-04-0001', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, data: { media_id: '786beeda-55ac-4025-bf6e-43b2918e84a9', row_id: '6eee0a1d-ef35-45ee-b1c9-b95f1f54d652', reply_to_id: 'f34a811b-a8c1-408a-9faf-1291a8c009a5', body: 'Can we get the logo into the first two seconds?', annotation: { timestamp: 0.5, timestamp_end: 2, page: 1, drawings: [{type: 'rectangle', color: '#9d2dff', x: 64, y: 80, width: 320, height: 180}] } }};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api.focal.inc/v1/comments';const options = { method: 'POST', headers: { 'Idempotency-Key': 'looker-sync-2027-03-04-0001', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"media_id":"786beeda-55ac-4025-bf6e-43b2918e84a9","row_id":"6eee0a1d-ef35-45ee-b1c9-b95f1f54d652","reply_to_id":"f34a811b-a8c1-408a-9faf-1291a8c009a5","body":"Can we get the logo into the first two seconds?","annotation":{"timestamp":0.5,"timestamp_end":2,"page":1,"drawings":[{"type":"rectangle","color":"#9d2dff","x":64,"y":80,"width":320,"height":180}]}}'};
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, "{ \"media_id\": \"786beeda-55ac-4025-bf6e-43b2918e84a9\", \"row_id\": \"6eee0a1d-ef35-45ee-b1c9-b95f1f54d652\", \"reply_to_id\": \"f34a811b-a8c1-408a-9faf-1291a8c009a5\", \"body\": \"Can we get the logo into the first two seconds?\", \"annotation\": { \"timestamp\": 0.5, \"timestamp_end\": 2, \"page\": 1, \"drawings\": [ { \"type\": \"rectangle\", \"color\": \"#9d2dff\", \"x\": 64, \"y\": 80, \"width\": 320, \"height\": 180 } ] } }")val request = Request.Builder() .url("https://api.focal.inc/v1/comments") .post(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 serde_json::json;use reqwest;
#[tokio::main]pub async fn main() { let url = "https://api.focal.inc/v1/comments";
let payload = json!({ "media_id": "786beeda-55ac-4025-bf6e-43b2918e84a9", "row_id": "6eee0a1d-ef35-45ee-b1c9-b95f1f54d652", "reply_to_id": "f34a811b-a8c1-408a-9faf-1291a8c009a5", "body": "Can we get the logo into the first two seconds?", "annotation": json!({ "timestamp": 0.5, "timestamp_end": 2, "page": 1, "drawings": ( json!({ "type": "rectangle", "color": "#9d2dff", "x": 64, "y": 80, "width": 320, "height": 180 }) ) }) });
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.post(url) .headers(headers) .json(&payload) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request POST \ --url https://api.focal.inc/v1/comments \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: looker-sync-2027-03-04-0001' \ --data '{ "media_id": "786beeda-55ac-4025-bf6e-43b2918e84a9", "row_id": "6eee0a1d-ef35-45ee-b1c9-b95f1f54d652", "reply_to_id": "f34a811b-a8c1-408a-9faf-1291a8c009a5", "body": "Can we get the logo into the first two seconds?", "annotation": { "timestamp": 0.5, "timestamp_end": 2, "page": 1, "drawings": [ { "type": "rectangle", "color": "#9d2dff", "x": 64, "y": 80, "width": 320, "height": 180 } ] } }'wget --quiet \ --method POST \ --header 'Idempotency-Key: looker-sync-2027-03-04-0001' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --body-data '{ "media_id": "786beeda-55ac-4025-bf6e-43b2918e84a9", "row_id": "6eee0a1d-ef35-45ee-b1c9-b95f1f54d652", "reply_to_id": "f34a811b-a8c1-408a-9faf-1291a8c009a5", "body": "Can we get the logo into the first two seconds?", "annotation": { "timestamp": 0.5, "timestamp_end": 2, "page": 1, "drawings": [ { "type": "rectangle", "color": "#9d2dff", "x": 64, "y": 80, "width": 320, "height": 180 } ] } }' \ --output-document \ - https://api.focal.inc/v1/commentsComment on a media or a board row (task), or reply to an existing comment. Pass exactly one of media_id, row_id or reply_to_id.
A top-level media comment can carry an annotation: pin it to a moment of a video with timestamp (seconds), to a page of a multi-page media with page, and draw over an image or video with drawings in the media’s pixel coordinates — read width, height, duration and page_count from the media first.
Mentions are written <@user_id> — the user’s id in angle brackets after an @ — and render in the app as that person’s name. Mentioned users and, for a reply, the thread’s author are notified, and the comment is posted to any Slack channel subscribed to where it was left — exactly as a comment typed in the app.
A comment is posted as the person behind the credentials — the user who authorized the connection, or the API token’s creator — and only its author can edit or archive it.
Required scope: comments:write. Rate-limit cost: 10. An Idempotency-Key header is required.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header 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 media whose comments to read or write. Covers comments made on it anywhere — in the library and in the board media player.
Example
786beeda-55ac-4025-bf6e-43b2918e84a9The board row (task) whose comments to read or write.
Example
6eee0a1d-ef35-45ee-b1c9-b95f1f54d652Reply to this comment instead of starting a new thread. The reply joins the thread’s media or row, so send it without media_id or row_id. Replying to a reply adds to the same thread.
Example
f34a811b-a8c1-408a-9faf-1291a8c009a5The 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?Anchor a top-level media comment to a spot on the media, as the app’s media player does: pin it to a moment of a video, to a page, and/or draw over it. Set at least one of timestamp, page or a non-empty drawings. Only with media_id. The anchor is fixed once the comment is created.
object
Seconds into the video the comment is pinned to. Only videos have one.
Example
0.5End, in seconds, of the stretch of video the comment covers. Leave it out to mark a single moment; when set it must be at least timestamp.
Example
2The page (counting from 1) of a multi-page media. Only for media with more than one page.
Example
1Shapes to draw over the media (≤50), for images and videos. Every coordinate must lie within the media’s width × height.
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 (#rrggbb or #rgb).
Example
#9d2dffLeft edge of the rectangle.
Example
64Top edge of the rectangle.
Example
80Width of the rectangle.
Example
320Height of the rectangle.
Example
180A 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 (#rrggbb or #rgb).
Example
#9d2dffThe line’s points (2–1000).
Example
[ [ 64, 80 ], [ 210, 142 ], [ 388, 260 ]]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 (#rrggbb or #rgb).
Example
#9d2dffWhere the arrow starts, as [x, y].
Example
[ 120, 700]Where the arrow points, as [x, y].
Example
[ 420, 520]Responses
Section titled “Responses”Created
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.