Create a comment thread on a document
You're viewing API version
2026-09, which is deprecated and stops working on October 1, 2027. To move your integration, see Upgrading to 2026-10.POST
Start a new comment thread on a document with an initial message. Mention users by passing their user IDs in mentions.
header
AuthorizationBearer <token>Personal API key, e.g. Authorization: Bearer sajn_sk_.... Not scope-limited — acts as the issuing user.
id*stringIdempotency-Key?stringMakes 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.
Length
length <= 255Body
application/json- body
body*stringInitial message body for the new thread
Length
1 <= lengthexcerpt?|Optional excerpt of the document content the thread refers to
mentions?array<string>User IDs mentioned in the message
visibility?stringSHARED makes the thread visible to every party on the document; INTERNAL (the default) keeps it to the workspace
Value in
"INTERNAL""SHARED"200
application/json- response
id*stringdocumentId*string|nullstatus*stringValue in
"OPEN""RESOLVED"visibility*stringValue in
"INTERNAL""SHARED"excerpt*string|nullcreatedAt*unknownupdatedAt*unknownresolvedAt*unknowncreatedBy*|nullresolvedBy*|nullmessages*array<>curl -X POST 'https://app.sajn.se/api/v1/documents/string/comments' \ -H 'authorization: string' \ -H 'Content-Type: application/json' \ -d '{ "body": "string"}'Example Response
{ "id": "string", "documentId": "string", "status": "OPEN", "visibility": "INTERNAL", "excerpt": "string", "createdAt": null, "updatedAt": null, "resolvedAt": null, "createdBy": { "id": "string", "name": "string", "email": "string" }, "resolvedBy": { "id": "string", "name": "string", "email": "string" }, "messages": [ { "id": "string", "threadId": "string", "parentId": "string", "authorType": "USER", "body": "string", "mentions": [ "string" ], "createdAt": null, "editedAt": null, "deletedAt": null, "author": { "id": "string", "name": "string", "email": "string" } } ]}Was this page helpful?