staqlydocs
REST APIAPI referencePosts

Leave a comment on a previewed post

Leave a comment on a previewed post (no credentials; 20 per 10 minutes per address, 30 an hour per link)

Every request sends Authorization: Bearer ...: the access token in local mode, an API key stk_... in cloud mode. Use Send to try it against your cloud instance with your API key.

POST
/v1/previews/{token}/comments

Path Parameters

token*string

The preview link's token

Request Body

application/json
  1. body
name*string

Who is commenting

Lengthlength <= 80
email?string

Optional; shown to the team only

body*string
Lengthlength <= 2000
quote?string

The words of the post the comment is about; they must be in the text named by channel_id and part

Lengthlength <= 500
channel_id?string

The channel's version the comment is about

part?integer

0: the post's text (default); n: the n-th comment of its thread

Range0 <= value
anchor_start?integer

Where the quote starts (UTF-16 code units); when it doesn't match, the quote's first occurrence is used

anchor_end?integer

Where it ends (exclusive)

parent_id?string

Reply to this thread (a reply takes no quote)

Response Body

Created

application/json
  1. response

One comment of a feedback thread. A thread starts with a comment whose parent_id is empty; it may mark a passage of the post (quote, in part part of channel channel_id's version). Replies carry the thread's first comment as parent_id.

id*string
post_id*string
parent_id*string

The thread's first comment; empty for that first comment

author_name*string
author_email?string

Only for the team

author_kind*string

reviewer: left on a preview page; team: a person of the workspace, an API key or an agent

Value in"reviewer""team"
body*string
quote*string

The marked words (empty for a general comment and for replies)

channel_id*string

The channel's version the passage is in; empty: the shared text

part*integer

0: the post's text; n: the n-th comment of its thread

anchor_start*integer

Where the passage starts in that text now, in UTF-16 code units (as browsers count); -1 when there is none

anchor_end*integer

Where it ends (exclusive); -1 when there is none

text_changed*boolean

The marked words are no longer in the text; quote keeps them

resolved_at*|

When the thread was resolved (first comments only)

Formatdate-time
resolved_by*string

Who resolved it

created_at*string
Formatdate-time
curl -X POST 'https://staqly.example.com/v1/previews/string/comments' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "body": "string"}'
{  "id": "string",  "post_id": "string",  "parent_id": "string",  "author_name": "string",  "author_email": "string",  "author_kind": "reviewer",  "body": "string",  "quote": "string",  "channel_id": "string",  "part": 0,  "anchor_start": 0,  "anchor_end": 0,  "text_changed": true,  "resolved_at": "2019-08-24T14:15:22Z",  "resolved_by": "string",  "created_at": "2019-08-24T14:15:22Z"}