Comments
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
postIdstring
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
postIdstring
path
required
Request body
application/json
bodystring
required
parentIdstring
quotestring
suggestionstring
mentionIdsstring[]
internalboolean
{
"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
idstring
path
required
Request body
application/json
bodystring
required
mentionIdsstring[]
internalboolean
{
"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
idstring
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
idstring
path
required
Request body
application/json
bodystring
required
mentionIdsstring[]
{
"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
idstring
path
required
Request body
application/json
resolvedboolean
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
idstring
path
required
Request body
application/json
acceptboolean
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