curl --request PUT \
--url https://api.aspect.inc/comments/{comment_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>",
"mentions": [
{
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"start_index": 123,
"end_index": 123
}
],
"attachment_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"timestamp": 123,
"duration": 123,
"private": true
}
'import requests
url = "https://api.aspect.inc/comments/{comment_id}"
payload = {
"text": "<string>",
"mentions": [
{
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"start_index": 123,
"end_index": 123
}
],
"attachment_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"timestamp": 123,
"duration": 123,
"private": True
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
text: '<string>',
mentions: [
{
user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
text: '<string>',
start_index: 123,
end_index: 123
}
],
attachment_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
timestamp: 123,
duration: 123,
private: true
})
};
fetch('https://api.aspect.inc/comments/{comment_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.aspect.inc/comments/{comment_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([
'text' => '<string>',
'mentions' => [
[
'user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'text' => '<string>',
'start_index' => 123,
'end_index' => 123
]
],
'attachment_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'timestamp' => 123,
'duration' => 123,
'private' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.aspect.inc/comments/{comment_id}"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"mentions\": [\n {\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"start_index\": 123,\n \"end_index\": 123\n }\n ],\n \"attachment_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"timestamp\": 123,\n \"duration\": 123,\n \"private\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.aspect.inc/comments/{comment_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"mentions\": [\n {\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"start_index\": 123,\n \"end_index\": 123\n }\n ],\n \"attachment_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"timestamp\": 123,\n \"duration\": 123,\n \"private\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aspect.inc/comments/{comment_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"<string>\",\n \"mentions\": [\n {\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"start_index\": 123,\n \"end_index\": 123\n }\n ],\n \"attachment_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"timestamp\": 123,\n \"duration\": 123,\n \"private\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"node_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"canvas_position": {
"x": 123,
"y": 123
},
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"timestamp": 123,
"duration": 123,
"anchor_position": {
"x": 50,
"y": 50
},
"annotation": [
{
"color": "<string>",
"stroke_width": 123,
"points": [
{
"x": 123,
"y": 123
}
],
"tool": "pen"
}
],
"page": 123,
"text_highlight": {
"text": "<string>",
"rects": [
{
"x": 0.5,
"y": 0.5,
"width": 0.5,
"height": 0.5
}
]
},
"is_resolved": true,
"private": true,
"number": 123,
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"avatar_url": "<string>"
},
"replies": "<array>",
"reactions": [
{
"reaction": "<string>",
"users": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"avatar_url": "<string>"
}
]
}
],
"mentions": [
{
"start_index": 123,
"end_index": 123,
"text": "<string>",
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"avatar_url": "<string>"
}
}
],
"attachments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"mime_type": "<string>",
"size_bytes": 123,
"uploaded": true,
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z"
}
],
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Update Comment
Update comment text (only comment author can update)
curl --request PUT \
--url https://api.aspect.inc/comments/{comment_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"text": "<string>",
"mentions": [
{
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"start_index": 123,
"end_index": 123
}
],
"attachment_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"timestamp": 123,
"duration": 123,
"private": true
}
'import requests
url = "https://api.aspect.inc/comments/{comment_id}"
payload = {
"text": "<string>",
"mentions": [
{
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"start_index": 123,
"end_index": 123
}
],
"attachment_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"timestamp": 123,
"duration": 123,
"private": True
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
text: '<string>',
mentions: [
{
user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
text: '<string>',
start_index: 123,
end_index: 123
}
],
attachment_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
timestamp: 123,
duration: 123,
private: true
})
};
fetch('https://api.aspect.inc/comments/{comment_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.aspect.inc/comments/{comment_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([
'text' => '<string>',
'mentions' => [
[
'user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'text' => '<string>',
'start_index' => 123,
'end_index' => 123
]
],
'attachment_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'timestamp' => 123,
'duration' => 123,
'private' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.aspect.inc/comments/{comment_id}"
payload := strings.NewReader("{\n \"text\": \"<string>\",\n \"mentions\": [\n {\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"start_index\": 123,\n \"end_index\": 123\n }\n ],\n \"attachment_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"timestamp\": 123,\n \"duration\": 123,\n \"private\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.aspect.inc/comments/{comment_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"text\": \"<string>\",\n \"mentions\": [\n {\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"start_index\": 123,\n \"end_index\": 123\n }\n ],\n \"attachment_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"timestamp\": 123,\n \"duration\": 123,\n \"private\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aspect.inc/comments/{comment_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"text\": \"<string>\",\n \"mentions\": [\n {\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"text\": \"<string>\",\n \"start_index\": 123,\n \"end_index\": 123\n }\n ],\n \"attachment_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"timestamp\": 123,\n \"duration\": 123,\n \"private\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resource_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"asset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"node_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"canvas_position": {
"x": 123,
"y": 123
},
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"text": "<string>",
"timestamp": 123,
"duration": 123,
"anchor_position": {
"x": 50,
"y": 50
},
"annotation": [
{
"color": "<string>",
"stroke_width": 123,
"points": [
{
"x": 123,
"y": 123
}
],
"tool": "pen"
}
],
"page": 123,
"text_highlight": {
"text": "<string>",
"rects": [
{
"x": 0.5,
"y": 0.5,
"width": 0.5,
"height": 0.5
}
]
},
"is_resolved": true,
"private": true,
"number": 123,
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"avatar_url": "<string>"
},
"replies": "<array>",
"reactions": [
{
"reaction": "<string>",
"users": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"avatar_url": "<string>"
}
]
}
],
"mentions": [
{
"start_index": 123,
"end_index": 123,
"text": "<string>",
"user": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_name": "<string>",
"last_name": "<string>",
"email": "<string>",
"avatar_url": "<string>"
}
}
],
"attachments": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"filename": "<string>",
"mime_type": "<string>",
"size_bytes": 123,
"uploaded": true,
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z",
"url": "<string>",
"url_expires_at": "2023-11-07T05:31:56Z"
}
],
"created": "2023-11-07T05:31:56Z",
"updated": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Aspect API key (sk_...) in Authorization header. 'Bearer ' optional.
Path Parameters
The ID of the comment to update
Body
API request schema for updating a comment
Updated comment text
User mentions in the comment
Show child attributes
Show child attributes
Attachment IDs to link to the comment (replaces existing)
Video timestamp in seconds (negative to clear)
Duration in seconds for range comments (negative to clear)
Whether this comment is private/internal (only for root comments)
Response
Successful Response
API response schema for a single comment with nested replies, reactions, mentions, and attachments
Canvas pin position in flow coordinates (absolute, or relative to the node origin when node_id is set)
Show child attributes
Show child attributes
Position for anchored comments on assets (x/y as percentages 0-100)
Show child attributes
Show child attributes
Pen/freehand drawing path
- PenPath
- LinePath
- ArrowPath
- BoxPath
Show child attributes
Show child attributes
Data for a text highlight comment
Show child attributes
Show child attributes
Lightweight user information for API responses
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes