Skip to main content
POST
/
api
/
v1
/
documents
/
{id}
/
comments
Create a comment thread on a document
curl --request POST \
  --url https://app.sajn.se/api/v1/documents/{id}/comments \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --data '
{
  "body": "<string>",
  "excerpt": "<string>",
  "mentions": [
    "<string>"
  ]
}
'
{
  "id": "<string>",
  "documentId": "<string>",
  "excerpt": "<string>",
  "createdAt": "<unknown>",
  "updatedAt": "<unknown>",
  "resolvedAt": "<string>",
  "createdBy": {
    "id": "<string>",
    "name": "<string>",
    "email": "<string>"
  },
  "resolvedBy": {
    "id": "<string>",
    "name": "<string>",
    "email": "<string>"
  },
  "messages": [
    {
      "id": "<string>",
      "threadId": "<string>",
      "parentId": "<string>",
      "body": "<string>",
      "mentions": [
        "<string>"
      ],
      "createdAt": "<string>",
      "editedAt": "<string>",
      "deletedAt": "<string>",
      "author": {
        "id": "<string>",
        "name": "<string>",
        "email": "<string>"
      }
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.sajn.se/llms.txt

Use this file to discover all available pages before exploring further.

Headers

authorization
string
required

Bearer token for API authentication

Path Parameters

id
string
required

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

Response

200

id
string
required
documentId
string | null
required
status
enum<string>
required
Available options:
OPEN,
RESOLVED
excerpt
string | null
required
createdAt
any
required
updatedAt
any
required
resolvedAt
string | null
required
createdBy
object
required
resolvedBy
object
required
messages
object[]
required