Skip to content

Comments

The review comments on a draft, the same ones its comment panel shows.

4 endpoints

GET/groups/{groupId}/drafts/{draftId}/comments

Review comments on a draft, oldest first

Any key

Path

  • groupIduuidrequired

    A social group id from GET /groups.

  • draftIduuidrequired

    A draft id.

Query

  • limitinteger

    1 to 50, default 20

  • offsetinteger

    0 to 100000, default 0

  • resolvedstring

    Only resolved (true) or only open (false) threads. A reply's own flag is always false; its thread's first comment carries the state.

    truefalse
  • lanestring

    Only the team's comments, or only those the client sees.

    teamclient

Returns

200 with these fields; an error answers in the Error envelope.

  • countinteger

    -9007199254740991 to 9007199254740991

  • limitinteger

    -9007199254740991 to 9007199254740991

  • offsetinteger

    -9007199254740991 to 9007199254740991

  • nextstring or null
  • previousstring or null
curl https://postacio.com/api/v1/groups/$GROUP_ID/drafts/$DRAFT_ID/comments \
  -H "Authorization: Bearer $POSTACIO_API_KEY"
POST/groups/{groupId}/drafts/{draftId}/comments

Comment on a draft, or reply

Any keyIdempotency-Key

Comments are flat: a reply is a new comment. It is signed with the key's or agent's name, and @Name notifies that teammate or named reviewer.

Path

  • groupIduuidrequired

    A social group id from GET /groups.

  • draftIduuidrequired

    A draft id.

Headers

  • Idempotency-Keystring

    Up to 128 visible ASCII characters. Retrying with the same key and body within 24 hours replays the first answer (with Idempotent-Replayed: true) instead of doing the work twice; the same key with a different body is 422 idempotency_conflict.

    up to 128 characters

Body

  • bodystringrequired

    The comment. Name a teammate or a named reviewer with @Name to notify them.

    1 to 2000 characters

  • thread_post_indexinteger

    Attach the comment to one post of a thread (0 is the first). Omit for the draft as a whole.

    0 to 49

  • lanestring

    Who can read it: "team" (default) is the workspace only; "client" is also shown on the review link and the approval view.

    teamclient
  • reply_touuid

    Reply to a comment. The reply joins that comment's thread and takes its lane and thread post, so lane and thread_post_index are not sent with it.

Returns

201 with a Comment object; an error answers in the Error envelope.

curl -X POST https://postacio.com/api/v1/groups/$GROUP_ID/drafts/$DRAFT_ID/comments \
  -H "Authorization: Bearer $POSTACIO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "body": "Shorter hook? @Ana",
    "thread_post_index": 0
  }'
PATCH/groups/{groupId}/drafts/{draftId}/comments/{commentId}

Resolve or reopen a comment

Any key

Any comment on the draft, whoever wrote it. Setting the state it already has changes nothing.

Path

  • groupIduuidrequired

    A social group id from GET /groups.

  • draftIduuidrequired

    A draft id.

  • commentIduuidrequired

    A comment id from GET /comments.

Body

  • resolvedbooleanrequired

    true resolves the comment, false reopens it.

Returns

200 with a Comment object; an error answers in the Error envelope.

curl -X PATCH https://postacio.com/api/v1/groups/$GROUP_ID/drafts/$DRAFT_ID/comments/$COMMENT_ID \
  -H "Authorization: Bearer $POSTACIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "resolved": true
  }'
DELETE/groups/{groupId}/drafts/{draftId}/comments/{commentId}

Delete a comment

Any key

Any comment on the draft, whoever wrote it.

Path

  • groupIduuidrequired

    A social group id from GET /groups.

  • draftIduuidrequired

    A draft id.

  • commentIduuidrequired

    A comment id from GET /comments.

Returns

204 with no body; an error answers in the Error envelope.

curl -X DELETE https://postacio.com/api/v1/groups/$GROUP_ID/drafts/$DRAFT_ID/comments/$COMMENT_ID \
  -H "Authorization: Bearer $POSTACIO_API_KEY"

Ready to send your first draft?

Start your free trial, create a key in Settings, and call the API in a minute.