POST /v1/posts/\{post_id\}/comments
Service: community · operationId: (none)
Required scopes
(no scope declared — review service config)
Path parameters
post_id(string) required —
Request body
{
"type": "object",
"properties": {
"author_id": {
"type": "string",
"minLength": 1
},
"brand_id": {
"type": "string",
"minLength": 1
},
"body": {
"type": "string",
"minLength": 1
},
"parent_comment_id": {
"type": [
"string",
"null"
]
}
},
"required": [
"author_id",
"brand_id",
"body"
]
}Responses
201 Comment created
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"post_id": {
"type": "string"
},
"author_id": {
"type": "string"
},
"brand_id": {
"type": "string"
},
"parent_comment_id": {
"type": [
"string",
"null"
]
},
"body": {
"type": "string"
},
"created_at": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"edited_at": {
"type": [
"string",
"null"
]
},
"deleted_at": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"post_id",
"author_id",
"brand_id",
"parent_comment_id",
"body",
"created_at",
"updated_at",
"edited_at",
"deleted_at"
]
}400 Validation error
{
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"error",
"message"
]
}404 Post not found
{
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"error",
"message"
]
}423 Post locked
{
"type": "object",
"properties": {
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"error",
"message"
]
}Example
curl -X POST https://community.platform.loop.health/v1/posts/{post_id}/comments \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ ... }'Related
services/community— service overview- All endpoints — directory across services
- Auth model — how scopes are enforced