Comment
POST/api/v1/comments
Authorization
bearer_token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/comments" \ -H "Content-Type: application/json" \ -d '{ "body": { "text": "string" }, "target": { "id": "string", "type": "string" } }'{ "comment_id": "string", "created_at": "2019-08-24T14:15:22Z", "mentions": [ "string" ], "moderation_state": "pending", "thread_id": "string"}POST/api/v1/comments/agent-audit
Authorization
bearer_token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/comments/agent-audit" \ -H "Content-Type: application/json" \ -d '{ "body": { "text": "string" }, "target": { "id": "string", "type": "string" } }'{ "comment_id": "string", "created_at": "2019-08-24T14:15:22Z", "mentions": [ "string" ], "moderation_state": "pending", "thread_id": "string"}GET/api/v1/comments/moderation/flagged
Authorization
bearer_token In: header
Query Parameters
1-indexed page number
int640 <= valuePage size
int640 <= valueMinimum toxicity score filter
doubleResponse Body
application/json
curl -X GET "https://example.com/api/v1/comments/moderation/flagged"{ "comments": [ { "anonymous": true, "author": null, "body": { "format": "markdown", "spoiler": true, "text": "string" }, "comment_id": "string", "created_at": "2019-08-24T14:15:22Z", "deleted_at": "2019-08-24T14:15:22Z", "depth": 0, "mentions": [ "string" ], "moderation": null, "moderation_state": "pending", "parent_comment_id": "string", "path": [ "string" ], "pinned": true, "reaction_counts": { "property1": 0, "property2": 0 }, "target_id": "string", "target_type": "string", "thread_id": "string", "updated_at": "2019-08-24T14:15:22Z", "viewer_reactions": [ "string" ], "visibility": "public" } ], "pagination": { "has_more": true, "page": 0, "page_size": 0, "total": 0 }}GET/api/v1/comments/threads/{target_type}/{target_id}
Authorization
bearer_token In: header
Path Parameters
Query Parameters
1-indexed page number
int640 <= valuePage size
int640 <= valueMaximum reply depth to return
int320 <= valueSort order (asc or desc) by creation time
Value in
- "asc"
- "desc"
Whether to surface pinned comments first
Response Body
application/json
curl -X GET "https://example.com/api/v1/comments/threads/string/string"{ "comments": [ { "anonymous": true, "author": null, "body": { "format": "markdown", "spoiler": true, "text": "string" }, "comment_id": "string", "created_at": "2019-08-24T14:15:22Z", "deleted_at": "2019-08-24T14:15:22Z", "depth": 0, "mentions": [ "string" ], "moderation": null, "moderation_state": "pending", "parent_comment_id": "string", "path": [ "string" ], "pinned": true, "reaction_counts": { "property1": 0, "property2": 0 }, "target_id": "string", "target_type": "string", "thread_id": "string", "updated_at": "2019-08-24T14:15:22Z", "viewer_reactions": [ "string" ], "visibility": "public" } ], "pagination": { "has_more": true, "page": 0, "page_size": 0, "total": 0 }, "thread_id": "string"}GET/api/v1/comments/{comment_id}
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/comments/string"{ "anonymous": true, "author": null, "body": { "format": "markdown", "spoiler": true, "text": "string" }, "comment_id": "string", "created_at": "2019-08-24T14:15:22Z", "deleted_at": "2019-08-24T14:15:22Z", "depth": 0, "mentions": [ "string" ], "moderation": null, "moderation_state": "pending", "parent_comment_id": "string", "path": [ "string" ], "pinned": true, "reaction_counts": { "property1": 0, "property2": 0 }, "target_id": "string", "target_type": "string", "thread_id": "string", "updated_at": "2019-08-24T14:15:22Z", "viewer_reactions": [ "string" ], "visibility": "public"}PATCH/api/v1/comments/{comment_id}
Authorization
bearer_token In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X PATCH "https://example.com/api/v1/comments/string" \ -H "Content-Type: application/json" \ -d '{}'{ "anonymous": true, "author": null, "body": { "format": "markdown", "spoiler": true, "text": "string" }, "comment_id": "string", "created_at": "2019-08-24T14:15:22Z", "deleted_at": "2019-08-24T14:15:22Z", "depth": 0, "mentions": [ "string" ], "moderation": null, "moderation_state": "pending", "parent_comment_id": "string", "path": [ "string" ], "pinned": true, "reaction_counts": { "property1": 0, "property2": 0 }, "target_id": "string", "target_type": "string", "thread_id": "string", "updated_at": "2019-08-24T14:15:22Z", "viewer_reactions": [ "string" ], "visibility": "public"}DELETE/api/v1/comments/{comment_id}
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X DELETE "https://example.com/api/v1/comments/string"{ "comment_id": "string", "message": "string"}POST/api/v1/comments/{comment_id}/moderation
Authorization
bearer_token In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/comments/string/moderation" \ -H "Content-Type: application/json" \ -d '{ "state": "pending" }'{ "action_id": "string", "comment_id": "string", "from_state": "pending", "to_state": "pending"}POST/api/v1/comments/{comment_id}/pin
Authorization
bearer_token In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/comments/string/pin" \ -H "Content-Type: application/json" \ -d '{}'{ "comment_id": "string", "pinned": true}POST/api/v1/comments/{comment_id}/reactions
Authorization
bearer_token In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/comments/string/reactions" \ -H "Content-Type: application/json" \ -d '{ "reaction": "string" }'{ "comment_id": "string", "reaction": "string", "reaction_counts": { "property1": 0, "property2": 0 }}DELETE/api/v1/comments/{comment_id}/reactions/{reaction}
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X DELETE "https://example.com/api/v1/comments/string/reactions/string"{ "comment_id": "string", "reaction": "string", "reaction_counts": { "property1": 0, "property2": 0 }}PUT/api/v1/comments/{comment_id}/reactions/{reaction}
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X PUT "https://example.com/api/v1/comments/string/reactions/string"{ "comment_id": "string", "reacted": true, "reaction": "string", "reaction_counts": { "property1": 0, "property2": 0 }}