API reference

Comments

12 endpoints, served at https://orbitwrite.com/api/v1. Each one lists the credentials it accepts, its parameters and every response it can give.

List review comments for a composer group, or across a workspace#

GET/api/v1/comments

With groupId: that group's whole comment list, oldest first, plus the caller's mute and read state for it. A brand-new unsaved draft (no group row yet) returns an empty result. Without it: every comment in the workspace (organizationId), newest first and cursor-paged, filterable by resolved, kind, suggestionStatus and suggestionType; the mute and read state then cover the threads on the page, and postMuted is always false. The filters and cursor belong to the workspace listing and are refused alongside groupId.

Authentication

A signed-in session only. The Orbitwrite app calls this; an API key is refused.

Query parameters

groupIdstring

At least 1 character.

organizationIdstring

The workspace to list when groupId is omitted. Defaults to the session's active workspace.

At least 1 character.

limitinteger

Workspace listing page size (default 50).

Between 1 and 100.

cursorstring

Opaque cursor from a previous response's nextCursor. Omit for the first page.

resolvedstring

Only resolved rows, or only open ones. A decided suggestion counts as resolved. Omit for both.

  • "true"
  • "false"
kindstring
  • "comment"
  • "suggestion"
suggestionStatusstring | string[]

A suggestion's decision state. Repeat for OR.

suggestionTypestring | string[]

Which edit a suggestion tracks. Repeat for OR (e.g. ?suggestionType=insert&suggestionType=replace).

Responses

200CommentsList

Comments, with the caller's mute and read state for the group (or the page's threads).

Response attributes
okbooleanRequired
commentsComment[]Required
Child attributes
idstringRequired
groupIdstringRequired

The composer group (post) the comment hangs off.

parentIdstring | nullRequired
accountIdstring | nullRequired
threadPositionnumber | nullRequired
quotestring | nullRequired
bodystringRequired
attachmentsCommentAttachment[]Required
Child attributes
urlstringRequired
mimeTypestringRequired
mentionsCommentMention[]Required
Child attributes
userIdstringRequired
namestringRequired
reactionsCommentReaction[]Required
Child attributes
emojistringRequired
countnumberRequired
reactedByMebooleanRequired
resolvedbooleanRequired
createdAtnumberRequired

Epoch ms.

authorobjectRequired
Child attributes
idstringRequired
namestringRequired
avatarUrlstring | nullRequired
kindstringRequired

"comment" (default) or "suggestion" — a tracked insert/delete made in suggestion mode.

  • "comment"
  • "suggestion"
suggestionTypestring | nullRequired
  • "insert"
  • "delete"
  • "replace"
  • null
suggestionStatusstring | nullRequired
  • "pending"
  • "accepted"
  • "rejected"
  • null
postMutedbooleanRequired
mutedThreadIdsstring[]Required
readStateobjectRequired

threadId → lastReadAt (epoch ms) for the requesting user.

nextCursorstring | nullRequired

Workspace listing only: pass back as cursor for the next page; null on the last page. Always null for one group, which is returned whole.

400Error

Invalid request

Response attributes
errorstringRequired
issuesany[]
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
403Error

Not a member of the organization

Response attributes
errorstringRequired
issuesany[]
GET /api/v1/comments
curl -X GET "https://orbitwrite.com/api/v1/comments" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY"
Response
{
  "ok": true,
  "comments": [
    {
      "id": "string",
      "groupId": "string",
      "parentId": "string",
      "accountId": "string",
      "threadPosition": 0,
      "quote": "string",
      "body": "string",
      "attachments": [
        {
          "url": "string",
          "mimeType": "string"
        }
      ],
      "mentions": [
        {
          "userId": "string",
          "name": "string"
        }
      ],
      "reactions": [
        {
          "emoji": "string",
          "count": 0,
          "reactedByMe": true
        }
      ],
      "resolved": true,
      "createdAt": 0,
      "author": {
        "id": "string",
        "name": "string",
        "avatarUrl": "string"
      },
      "kind": "comment",
      "suggestionType": "insert",
      "suggestionStatus": "pending"
    }
  ],
  "postMuted": true,
  "mutedThreadIds": [
    "string"
  ],
  "readState": {},
  "nextCursor": "string"
}

Create a comment#

POST/api/v1/comments

Adds a top-level review comment (or a tracked suggestion) to a composer group. Any member of the group's organization may comment; a suggestion also needs a plan that includes suggested edits (Pro and up). Retrying with the same id is idempotent.

Authentication

A signed-in session only. The Orbitwrite app calls this; an API key is refused.

Body application/json

groupIdstringRequired

The composer group the comment belongs to.

At least 1 character.

idstring

Format uuid.

accountIdstring | null
threadPositionnumber | null
quotestring | null
bodystring
kindstring
  • "comment"
  • "suggestion"
suggestionTypestring
  • "insert"
  • "delete"
  • "replace"

Responses

200CreatedComment

The comment was created; id is the persisted id.

Response attributes
okbooleanRequired
idstringRequired
400Error

Invalid request

Response attributes
errorstringRequired
issuesany[]
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
403Error

Not a member of the organization

Response attributes
errorstringRequired
issuesany[]
404Error

Group not found

Response attributes
errorstringRequired
issuesany[]
POST /api/v1/comments
curl -X POST "https://orbitwrite.com/api/v1/comments" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "groupId": "string"
}'
Response
{
  "ok": true,
  "id": "string"
}

Mute or unmute the whole post's comments#

PUT/api/v1/comments/post-mute

Sets the caller's post-level subscription: muted unsubscribes them from all comment activity on the group. Per-user — nobody else's notifications change.

Authentication

A signed-in session only. The Orbitwrite app calls this; an API key is refused.

Body application/json

groupIdstringRequired

The composer group the comment belongs to.

At least 1 character.

mutedbooleanRequired

Responses

200CommentActionResult

The operation was applied

Response attributes
okbooleanRequired
400Error

Invalid request

Response attributes
errorstringRequired
issuesany[]
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
403Error

Not a member of the organization

Response attributes
errorstringRequired
issuesany[]
404Error

Group not found

Response attributes
errorstringRequired
issuesany[]
PUT /api/v1/comments/post-mute
curl -X PUT "https://orbitwrite.com/api/v1/comments/post-mute" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "groupId": "string",
  "muted": true
}'
Response
{
  "ok": true
}

Mark all comment threads as read#

POST/api/v1/comments/read-all

Stamps the caller's read marker for every thread in the group at now.

Authentication

A signed-in session only. The Orbitwrite app calls this; an API key is refused.

Body application/json

groupIdstringRequired

The composer group the comment belongs to.

At least 1 character.

Responses

200CommentActionResult

The operation was applied

Response attributes
okbooleanRequired
400Error

Invalid request

Response attributes
errorstringRequired
issuesany[]
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
403Error

Not a member of the organization

Response attributes
errorstringRequired
issuesany[]
404Error

Group not found

Response attributes
errorstringRequired
issuesany[]
POST /api/v1/comments/read-all
curl -X POST "https://orbitwrite.com/api/v1/comments/read-all" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "groupId": "string"
}'
Response
{
  "ok": true
}

Reply to a comment#

POST/api/v1/comments/{id}/replies

Adds a reply under a top-level comment. Replies can't nest further. Retrying with the same id is idempotent.

Authentication

A signed-in session only. The Orbitwrite app calls this; an API key is refused.

Path parameters

idstringRequired

At least 1 character.

Body application/json

groupIdstringRequired

The composer group the comment belongs to.

At least 1 character.

idstring

Format uuid.

bodystring

Responses

200CreatedComment

The reply was created; id is the persisted id.

Response attributes
okbooleanRequired
idstringRequired
400Error

Invalid request

Response attributes
errorstringRequired
issuesany[]
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
403Error

Not a member of the organization

Response attributes
errorstringRequired
issuesany[]
404Error

Group or parent comment not found

Response attributes
errorstringRequired
issuesany[]
POST /api/v1/comments/{id}/replies
curl -X POST "https://orbitwrite.com/api/v1/comments/{id}/replies" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "groupId": "string"
}'
Response
{
  "ok": true,
  "id": "string"
}

Edit a comment#

PATCH/api/v1/comments/{id}

Author-only: updates a comment's (or reply's) body, attachments and mentions. Suggestion quote-sync edits also carry quote.

Authentication

A signed-in session only. The Orbitwrite app calls this; an API key is refused.

Path parameters

idstringRequired

At least 1 character.

Body application/json

groupIdstringRequired

The composer group the comment belongs to.

At least 1 character.

bodystring
quotestring | null

Responses

200CommentActionResult

The operation was applied

Response attributes
okbooleanRequired
400Error

Invalid request

Response attributes
errorstringRequired
issuesany[]
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
403Error

Not a member of the organization

Response attributes
errorstringRequired
issuesany[]
404Error

Group not found

Response attributes
errorstringRequired
issuesany[]
PATCH /api/v1/comments/{id}
curl -X PATCH "https://orbitwrite.com/api/v1/comments/{id}" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "groupId": "string"
}'
Response
{
  "ok": true
}

Delete a comment#

DELETE/api/v1/comments/{id}

Removes a comment or reply. Authors delete their own; a caller with comment:manageAny (manager and up) may also remove someone else's. Deleting a top-level comment removes its whole thread.

Authentication

A signed-in session only. The Orbitwrite app calls this; an API key is refused.

Path parameters

idstringRequired

At least 1 character.

Query parameters

groupIdstringRequired

At least 1 character.

Responses

200CommentActionResult

The operation was applied

Response attributes
okbooleanRequired
400Error

Invalid request

Response attributes
errorstringRequired
issuesany[]
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
403Error

Not a member of the organization

Response attributes
errorstringRequired
issuesany[]
404Error

Group not found

Response attributes
errorstringRequired
issuesany[]
DELETE /api/v1/comments/{id}
curl -X DELETE "https://orbitwrite.com/api/v1/comments/{id}?groupId=groupId" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY"
Response
{
  "ok": true
}

Resolve or reopen a comment thread#

PUT/api/v1/comments/{id}/resolved

Sets the thread's resolved state. Any member of the group's organization may resolve — not just the author.

Authentication

A signed-in session only. The Orbitwrite app calls this; an API key is refused.

Path parameters

idstringRequired

At least 1 character.

Body application/json

groupIdstringRequired

The composer group the comment belongs to.

At least 1 character.

resolvedbooleanRequired

Responses

200CommentActionResult

The operation was applied

Response attributes
okbooleanRequired
400Error

Invalid request

Response attributes
errorstringRequired
issuesany[]
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
403Error

Not a member of the organization

Response attributes
errorstringRequired
issuesany[]
404Error

Group not found

Response attributes
errorstringRequired
issuesany[]
PUT /api/v1/comments/{id}/resolved
curl -X PUT "https://orbitwrite.com/api/v1/comments/{id}/resolved" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "groupId": "string",
  "resolved": true
}'
Response
{
  "ok": true
}

Add or remove an emoji reaction#

PUT/api/v1/comments/{id}/reaction

Sets the caller's reaction with one emoji on a comment or reply.

Authentication

A signed-in session only. The Orbitwrite app calls this; an API key is refused.

Path parameters

idstringRequired

At least 1 character.

Body application/json

groupIdstringRequired

The composer group the comment belongs to.

At least 1 character.

emojistringRequired

At least 1 character.

reactedbooleanRequired

Desired end state: true adds the caller's reaction, false removes it. Idempotent either way.

Responses

200CommentActionResult

The operation was applied

Response attributes
okbooleanRequired
400Error

Invalid request

Response attributes
errorstringRequired
issuesany[]
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
403Error

Not a member of the organization

Response attributes
errorstringRequired
issuesany[]
404Error

Group or comment not found

Response attributes
errorstringRequired
issuesany[]
PUT /api/v1/comments/{id}/reaction
curl -X PUT "https://orbitwrite.com/api/v1/comments/{id}/reaction" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "groupId": "string",
  "emoji": "string",
  "reacted": true
}'
Response
{
  "ok": true
}

Accept or reject a suggestion#

POST/api/v1/comments/{id}/decision

Decides a tracked suggestion, marking it resolved. The decision is terminal: retrying the same decision is idempotent, flipping it is a conflict.

Authentication

A signed-in session only. The Orbitwrite app calls this; an API key is refused.

Path parameters

idstringRequired

At least 1 character.

Body application/json

groupIdstringRequired

The composer group the comment belongs to.

At least 1 character.

decisionstringRequired
  • "accepted"
  • "rejected"

Responses

200CommentActionResult

The operation was applied

Response attributes
okbooleanRequired
400Error

Invalid request

Response attributes
errorstringRequired
issuesany[]
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
403Error

Not a member of the organization

Response attributes
errorstringRequired
issuesany[]
404Error

Group or suggestion not found

Response attributes
errorstringRequired
issuesany[]
409Error

The suggestion was already decided the other way

Response attributes
errorstringRequired
issuesany[]
POST /api/v1/comments/{id}/decision
curl -X POST "https://orbitwrite.com/api/v1/comments/{id}/decision" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "groupId": "string",
  "decision": "accepted"
}'
Response
{
  "ok": true
}

Mute or unmute a comment thread#

PUT/api/v1/comments/{id}/mute

Sets the caller's mute state for one thread (a top-level comment): muted threads stop notifying them. Per-user — nobody else's notifications change.

Authentication

A signed-in session only. The Orbitwrite app calls this; an API key is refused.

Path parameters

idstringRequired

At least 1 character.

Body application/json

groupIdstringRequired

The composer group the comment belongs to.

At least 1 character.

mutedbooleanRequired

Responses

200CommentActionResult

The operation was applied

Response attributes
okbooleanRequired
400Error

Invalid request

Response attributes
errorstringRequired
issuesany[]
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
403Error

Not a member of the organization

Response attributes
errorstringRequired
issuesany[]
404Error

Group not found

Response attributes
errorstringRequired
issuesany[]
PUT /api/v1/comments/{id}/mute
curl -X PUT "https://orbitwrite.com/api/v1/comments/{id}/mute" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "groupId": "string",
  "muted": true
}'
Response
{
  "ok": true
}

Mark a comment thread as read#

PUT/api/v1/comments/{id}/read

Stamps the caller's read marker for one thread (a top-level comment) at now.

Authentication

A signed-in session only. The Orbitwrite app calls this; an API key is refused.

Path parameters

idstringRequired

At least 1 character.

Body application/json

groupIdstringRequired

The composer group the comment belongs to.

At least 1 character.

Responses

200CommentActionResult

The operation was applied

Response attributes
okbooleanRequired
400Error

Invalid request

Response attributes
errorstringRequired
issuesany[]
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
403Error

Not a member of the organization

Response attributes
errorstringRequired
issuesany[]
404Error

Group not found

Response attributes
errorstringRequired
issuesany[]
PUT /api/v1/comments/{id}/read
curl -X PUT "https://orbitwrite.com/api/v1/comments/{id}/read" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "groupId": "string"
}'
Response
{
  "ok": true
}