Comments

Embed
Preview of the card
<a href="https://indrava.forumulate.com/docs/ref-comments"><img src="https://indrava.forumulate.com/docs/_api/public/orgs/e421ace4-3e78-4ed8-9818-7b4899cf3aa0/spaces/2bcc7f09-4489-40af-85d8-9fdd3f3da314/pages/043da87c-3c34-46c8-9125-2771732e693c/social-card.svg?v=3e7ae33eec8b" alt="Comments" width="600" height="315"></a>
GET http://localhost:4000/api/v1/posts/{postId}/comments

List a post's comments

Oldest first. A reply has parentId; a comment on a passage has quote, and a suggested edit also suggestion with its suggestionState. mentions are Atlas user ids.

Parameters

postId
string
path
required

Code samples

cURL
curl -X GET "http://localhost:4000/api/v1/posts/{postId}/comments" \
  -H "Authorization: Bearer $API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
{}
Option 1
{}
Option 2
{}
POST http://localhost:4000/api/v1/posts/{postId}/comments

Comment on a post, or on a passage of it, or suggest an edit

With quote the comment is about that passage; with suggestion as well it proposes replacing the passage with that text (accept it with POST /posts/comments/{id}/suggestion). mentionIds tells those teammates.

Parameters

postId
string
path
required

Request body

application/json
body
string
required
parentId
string
quote
string
suggestion
string
mentionIds
string[]
internal
boolean
= true
{
  "body": "string",
  "parentId": "string",
  "quote": "string",
  "suggestion": "string",
  "mentionIds": [
    "string"
  ],
  "internal": true
}

Code samples

cURL
curl -X POST "http://localhost:4000/api/v1/posts/{postId}/comments" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"body":"string","parentId":"string","quote":"string","suggestion":"string","mentionIds":["string"],"internal":true}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
{}
Option 1
{}
Option 2
{}
POST http://localhost:4000/api/v1/posts/comments/{id}/replies

Reply to a comment

Parameters

id
string
path
required

Request body

application/json
body
string
required
mentionIds
string[]
internal
boolean
= true
{
  "body": "string",
  "mentionIds": [
    "string"
  ],
  "internal": true
}

Code samples

cURL
curl -X POST "http://localhost:4000/api/v1/posts/comments/{id}/replies" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"body":"string","mentionIds":["string"],"internal":true}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
{}
Option 1
{}
Option 2
{}
DELETE http://localhost:4000/api/v1/posts/comments/{id}

Delete your own comment (or any, for those who manage the workspace)

Parameters

id
string
path
required

Code samples

cURL
curl -X DELETE "http://localhost:4000/api/v1/posts/comments/{id}" \
  -H "Authorization: Bearer $API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
{}
Option 1
{}
Option 2
{}
PATCH http://localhost:4000/api/v1/posts/comments/{id}

Edit your own comment

Parameters

id
string
path
required

Request body

application/json
body
string
required
mentionIds
string[]
{
  "body": "string",
  "mentionIds": [
    "string"
  ]
}

Code samples

cURL
curl -X PATCH "http://localhost:4000/api/v1/posts/comments/{id}" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"body":"string","mentionIds":["string"]}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
{}
Option 1
{}
Option 2
{}
POST http://localhost:4000/api/v1/posts/comments/{id}/resolve

Settle or reopen a comment thread

Parameters

id
string
path
required

Request body

application/json
resolved
boolean
required
{
  "resolved": true
}

Code samples

cURL
curl -X POST "http://localhost:4000/api/v1/posts/comments/{id}/resolve" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"resolved":true}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
{}
Option 1
{}
Option 2
{}
POST http://localhost:4000/api/v1/posts/comments/{id}/suggestion

Accept or reject a suggested edit

Parameters

id
string
path
required

Request body

application/json
accept
boolean
required
{
  "accept": true
}

Code samples

cURL
curl -X POST "http://localhost:4000/api/v1/posts/comments/{id}/suggestion" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"accept":true}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 OK
Example
{}
Option 1
{}
Option 2
{}
Updated