Skip to main content
POST
Create a comment thread on a document

Authorizations

Authorization
string
header
required

Personal API key, e.g. Authorization: Bearer sajn_sk_.... Not scope-limited — acts as the issuing user.

Headers

Sajn-Version
enum<string>

API version for this request. Without it, the request uses the organization's default version; an organization without a default is pinned to the latest version by its first request.

Available options:
2026-09,
2026-10
Idempotency-Key
string

Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header Idempotent-Replayed: true); the same key with a different request returns 400.

Maximum string length: 255

Path Parameters

id
string
required

The document ID.

Body

application/json

Body

body
string
required

Initial message body for the new thread

Minimum string length: 1
excerpt
string | null

Optional excerpt of the document content the thread refers to

mentions
string[]

User IDs mentioned in the message

visibility
enum<string>

SHARED makes the thread visible to every party on the document; INTERNAL (the default) keeps it to the workspace

Available options:
INTERNAL,
SHARED

Response

200

id
string
required

The comment thread ID.

documentId
string | null
required

The document ID.

status
enum<string>
required

Whether the thread is open or resolved.

Available options:
OPEN,
RESOLVED
visibility
enum<string>
required

If SHARED, every party on the document sees the thread. If INTERNAL, only the workspace does.

Available options:
INTERNAL,
SHARED
excerpt
string | null
required

The document text the thread refers to.

createdAt
string<date-time>
required

When the comment thread was created.

updatedAt
string<date-time>
required

When the comment thread was last updated.

resolvedAt
string<date-time> | null
required

When the thread was resolved. Null while it's open.

createdBy
object | null
required

Who wrote it. Null when the author no longer exists.

resolvedBy
object | null
required

Who wrote it. Null when the author no longer exists.

messages
object[]
required

The thread's messages, oldest first.