curl --request POST \
--url 'https://sandbox.circularo.com/api/v1/inbox/comment/{id}?token=' \
--header 'Content-Type: application/json' \
--data '
{
"comment": "Processed <b>as requested</b>, see <a href=\"https://example.com/report\">the report</a>.",
"commentAnchor": {
"page": 2,
"position": {
"percentHeight": 0.05,
"percentWidth": 0.3,
"percentX": 0.15,
"percentY": 0.3
}
},
"commentAttachment": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"isPublicComment": true,
"threadParentId": "9f1c4e2ab7d4423d8a6f0c5e3b7d1a92"
}
'import requests
url = "https://sandbox.circularo.com/api/v1/inbox/comment/{id}?token="
payload = {
"comment": "Processed <b>as requested</b>, see <a href=\"https://example.com/report\">the report</a>.",
"commentAnchor": {
"page": 2,
"position": {
"percentHeight": 0.05,
"percentWidth": 0.3,
"percentX": 0.15,
"percentY": 0.3
}
},
"commentAttachment": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"isPublicComment": True,
"threadParentId": "9f1c4e2ab7d4423d8a6f0c5e3b7d1a92"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
comment: 'Processed <b>as requested</b>, see <a href="https://example.com/report">the report</a>.',
commentAnchor: {
page: 2,
position: {percentHeight: 0.05, percentWidth: 0.3, percentX: 0.15, percentY: 0.3}
},
commentAttachment: 's1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj',
isPublicComment: true,
threadParentId: '9f1c4e2ab7d4423d8a6f0c5e3b7d1a92'
})
};
fetch('https://sandbox.circularo.com/api/v1/inbox/comment/{id}?token=', 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://sandbox.circularo.com/api/v1/inbox/comment/{id}?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'comment' => 'Processed <b>as requested</b>, see <a href="https://example.com/report">the report</a>.',
'commentAnchor' => [
'page' => 2,
'position' => [
'percentHeight' => 0.05,
'percentWidth' => 0.3,
'percentX' => 0.15,
'percentY' => 0.3
]
],
'commentAttachment' => 's1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj',
'isPublicComment' => true,
'threadParentId' => '9f1c4e2ab7d4423d8a6f0c5e3b7d1a92'
]),
CURLOPT_HTTPHEADER => [
"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://sandbox.circularo.com/api/v1/inbox/comment/{id}?token="
payload := strings.NewReader("{\n \"comment\": \"Processed <b>as requested</b>, see <a href=\\\"https://example.com/report\\\">the report</a>.\",\n \"commentAnchor\": {\n \"page\": 2,\n \"position\": {\n \"percentHeight\": 0.05,\n \"percentWidth\": 0.3,\n \"percentX\": 0.15,\n \"percentY\": 0.3\n }\n },\n \"commentAttachment\": \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\",\n \"isPublicComment\": true,\n \"threadParentId\": \"9f1c4e2ab7d4423d8a6f0c5e3b7d1a92\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://sandbox.circularo.com/api/v1/inbox/comment/{id}?token=")
.header("Content-Type", "application/json")
.body("{\n \"comment\": \"Processed <b>as requested</b>, see <a href=\\\"https://example.com/report\\\">the report</a>.\",\n \"commentAnchor\": {\n \"page\": 2,\n \"position\": {\n \"percentHeight\": 0.05,\n \"percentWidth\": 0.3,\n \"percentX\": 0.15,\n \"percentY\": 0.3\n }\n },\n \"commentAttachment\": \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\",\n \"isPublicComment\": true,\n \"threadParentId\": \"9f1c4e2ab7d4423d8a6f0c5e3b7d1a92\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/inbox/comment/{id}?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"comment\": \"Processed <b>as requested</b>, see <a href=\\\"https://example.com/report\\\">the report</a>.\",\n \"commentAnchor\": {\n \"page\": 2,\n \"position\": {\n \"percentHeight\": 0.05,\n \"percentWidth\": 0.3,\n \"percentX\": 0.15,\n \"percentY\": 0.3\n }\n },\n \"commentAttachment\": \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\",\n \"isPublicComment\": true,\n \"threadParentId\": \"9f1c4e2ab7d4423d8a6f0c5e3b7d1a92\"\n}"
response = http.request(request)
puts response.read_body{
"historyId": "9f1c4e2ab7d4423d8a6f0c5e3b7d1a92",
"status": "SUCCESS"
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 409,
"type": "RESOURCE:STATE_CONFLICT",
"message": "Resource state conflict",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Comment on a document
POST /inbox/comment/{id}
Adds a comment to the history of a document workflow, which is how the discussion around a document is kept on the document itself. The comment changes nothing else - the workflow keeps its state, its recipients and the action it is waiting for - so use it whenever something has to be said without acting on the document. To comment while taking an action, send the text as the comment of POST /inbox/action instead.
Mentioning someone in the text notifies them, and the owner of the document is notified of every comment they did not write themselves. Mentioned documents are resolved to their titles for readers who may see them.
A document whose workflow has already finished - completed, rejected, cancelled or expired - takes further comments only while the tenant allows commenting on finished documents.
A document holds at most 250 comments - replies and deleted comments, which keep their place in its history, included - and at most 50 drawings in them.
Token authorization: Authorize using a token — either a session token obtained from login or an API key — to call this endpoint.
Required user rights: add_comments
curl --request POST \
--url 'https://sandbox.circularo.com/api/v1/inbox/comment/{id}?token=' \
--header 'Content-Type: application/json' \
--data '
{
"comment": "Processed <b>as requested</b>, see <a href=\"https://example.com/report\">the report</a>.",
"commentAnchor": {
"page": 2,
"position": {
"percentHeight": 0.05,
"percentWidth": 0.3,
"percentX": 0.15,
"percentY": 0.3
}
},
"commentAttachment": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"isPublicComment": true,
"threadParentId": "9f1c4e2ab7d4423d8a6f0c5e3b7d1a92"
}
'import requests
url = "https://sandbox.circularo.com/api/v1/inbox/comment/{id}?token="
payload = {
"comment": "Processed <b>as requested</b>, see <a href=\"https://example.com/report\">the report</a>.",
"commentAnchor": {
"page": 2,
"position": {
"percentHeight": 0.05,
"percentWidth": 0.3,
"percentX": 0.15,
"percentY": 0.3
}
},
"commentAttachment": "s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj",
"isPublicComment": True,
"threadParentId": "9f1c4e2ab7d4423d8a6f0c5e3b7d1a92"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
comment: 'Processed <b>as requested</b>, see <a href="https://example.com/report">the report</a>.',
commentAnchor: {
page: 2,
position: {percentHeight: 0.05, percentWidth: 0.3, percentX: 0.15, percentY: 0.3}
},
commentAttachment: 's1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj',
isPublicComment: true,
threadParentId: '9f1c4e2ab7d4423d8a6f0c5e3b7d1a92'
})
};
fetch('https://sandbox.circularo.com/api/v1/inbox/comment/{id}?token=', 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://sandbox.circularo.com/api/v1/inbox/comment/{id}?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'comment' => 'Processed <b>as requested</b>, see <a href="https://example.com/report">the report</a>.',
'commentAnchor' => [
'page' => 2,
'position' => [
'percentHeight' => 0.05,
'percentWidth' => 0.3,
'percentX' => 0.15,
'percentY' => 0.3
]
],
'commentAttachment' => 's1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj',
'isPublicComment' => true,
'threadParentId' => '9f1c4e2ab7d4423d8a6f0c5e3b7d1a92'
]),
CURLOPT_HTTPHEADER => [
"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://sandbox.circularo.com/api/v1/inbox/comment/{id}?token="
payload := strings.NewReader("{\n \"comment\": \"Processed <b>as requested</b>, see <a href=\\\"https://example.com/report\\\">the report</a>.\",\n \"commentAnchor\": {\n \"page\": 2,\n \"position\": {\n \"percentHeight\": 0.05,\n \"percentWidth\": 0.3,\n \"percentX\": 0.15,\n \"percentY\": 0.3\n }\n },\n \"commentAttachment\": \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\",\n \"isPublicComment\": true,\n \"threadParentId\": \"9f1c4e2ab7d4423d8a6f0c5e3b7d1a92\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://sandbox.circularo.com/api/v1/inbox/comment/{id}?token=")
.header("Content-Type", "application/json")
.body("{\n \"comment\": \"Processed <b>as requested</b>, see <a href=\\\"https://example.com/report\\\">the report</a>.\",\n \"commentAnchor\": {\n \"page\": 2,\n \"position\": {\n \"percentHeight\": 0.05,\n \"percentWidth\": 0.3,\n \"percentX\": 0.15,\n \"percentY\": 0.3\n }\n },\n \"commentAttachment\": \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\",\n \"isPublicComment\": true,\n \"threadParentId\": \"9f1c4e2ab7d4423d8a6f0c5e3b7d1a92\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.circularo.com/api/v1/inbox/comment/{id}?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"comment\": \"Processed <b>as requested</b>, see <a href=\\\"https://example.com/report\\\">the report</a>.\",\n \"commentAnchor\": {\n \"page\": 2,\n \"position\": {\n \"percentHeight\": 0.05,\n \"percentWidth\": 0.3,\n \"percentX\": 0.15,\n \"percentY\": 0.3\n }\n },\n \"commentAttachment\": \"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj\",\n \"isPublicComment\": true,\n \"threadParentId\": \"9f1c4e2ab7d4423d8a6f0c5e3b7d1a92\"\n}"
response = http.request(request)
puts response.read_body{
"historyId": "9f1c4e2ab7d4423d8a6f0c5e3b7d1a92",
"status": "SUCCESS"
}{
"status": 400,
"type": "VALIDATION:INPUT_INVALID",
"message": "Invalid input",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 401,
"type": "AUTH:UNAUTHORIZED",
"message": "Authentication failed",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 403,
"type": "AUTH:ACCESS_DENIED",
"message": "Access denied",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}{
"status": 409,
"type": "RESOURCE:STATE_CONFLICT",
"message": "Resource state conflict",
"requestId": "3fa85f6457174562b3fc2c963f66afa6"
}Authorizations
Path Parameters
Query Parameters
Gives every mentioned user read access to the document, so a person can be pulled into the discussion even when the document was never shared with them. Without it, only users who can already read the document are recognized as mentions. Together with isPublicComment it also sends a view share to mentioned e-mail addresses that have no access yet.
Body
Comment written by a user. May carry basic formatting — bold, italic, underline, https links and bullet lists; everything else is stripped on input. Must contain visible text. Write @username or @email to mention a person and #doc:<definition>:<id> to mention another document, which is rendered as that document's title. Required here unless the deprecated query parameter is used or the comment carries a commentAttachment.
2000"Processed <b>as requested</b>, see <a href=\"https://example.com/report\">the report</a>."
Identifier of a drawing the comment carries - a PNG image of at most 1048576 bytes that the caller uploaded and that is not used anywhere yet. The settings of the document owner must allow drawings in comments. The drawing is kept with the document but never listed among its attachments; it is downloaded by its identifier, and a reply's drawing has the visibility of its thread. A comment carrying one needs no text.
1^[a-z0-9]+$"s1pss1atbzli272pinbt48n2ssy96ax2pwgqrz5qyzklwxg1kl0tq6anvz1p97xj"
Response
The comment was written into the document workflow history.