Create a comment (top-level or one-level reply)
POST
/v1/posts/{postId}/comments
const url = 'https://api.spirby.com/v1/posts/example/comments';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"body":{"json":"example","text":"example"},"parentId":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.spirby.com/v1/posts/example/comments \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "body": { "json": "example", "text": "example" }, "parentId": "example" }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” postId
required
string
Request Body
Section titled “Request Body ” Media type application/json
object
body
required
object
json
text
required
string
parentId
string
Example generated
{ "body": { "json": "example", "text": "example" }, "parentId": "example"}Responses
Section titled “ Responses ”Successful response
Media type application/json
object
data
Example generated
{ "data": "example"}Missing or invalid API key
Media type application/json
object
error
required
object
code
required
string
details
object
key
additional properties
message
required
string
Example generated
{ "error": { "code": "example", "details": { "additionalProperty": "example" }, "message": "example" }}Scope insufficient (ERR_SCOPE_INSUFFICIENT) or org in readonly billing state (ERR_FORBIDDEN)
Media type application/json
object
error
required
object
code
required
string
details
object
key
additional properties
message
required
string
Example generated
{ "error": { "code": "example", "details": { "additionalProperty": "example" }, "message": "example" }}Validation failed
Media type application/json
object
error
required
object
code
required
string
details
object
key
additional properties
message
required
string
Example generated
{ "error": { "code": "example", "details": { "additionalProperty": "example" }, "message": "example" }}Rate limit exceeded
Media type application/json
object
error
required
object
code
required
string
details
object
key
additional properties
message
required
string
Example generated
{ "error": { "code": "example", "details": { "additionalProperty": "example" }, "message": "example" }}Internal error
Media type application/json
object
error
required
object
code
required
string
details
object
key
additional properties
message
required
string
Example generated
{ "error": { "code": "example", "details": { "additionalProperty": "example" }, "message": "example" }}