Skip to content

Comment

POST/api/v1/comments
POST
/api/v1/comments

Authorization

bearer_token
AuthorizationBearer <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
POST
/api/v1/comments/agent-audit

Authorization

bearer_token
AuthorizationBearer <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
GET
/api/v1/comments/moderation/flagged

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Query Parameters

filter?

Conditions as filter[][]=. Conditions on different fields all apply. in (any of) and all (every one of, on fields holding several values) take a comma-separated list (\, for a literal comma). exists takes true or false. Datetimes are RFC 3339, now, or a time before now such as -30m, -6h or -7d.

q?string

Full-text search over this list's searchable fields.

Length1 <= length <= 200
sort?string

Comma-separated sort keys, - for descending, at most 1. Keys: flagged_at, created_at, toxicity_score. Default: -toxicity_score.

limit?integer

Rows per page, 1 to 100 (default 50).

Range1 <= value <= 100
cursor?string

The page.next_cursor of the previous page. Cannot be combined with page.

page?integer

A 1-based page number, for jumping. Cannot be combined with cursor.

Range1 <= value
total?boolean

Set to true to include the number of matching rows in page.total.

Response 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",      "workspace_id": "string"    }  ],  "page": {    "has_more": true,    "next_cursor": "string",    "page": 0,    "total": 0  }}
GET/api/v1/comments/threads/{target_type}/{target_id}
GET
/api/v1/comments/threads/{target_type}/{target_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

target_type*string
target_id*string

Query Parameters

filter?

Conditions as filter[][]=. Conditions on different fields all apply. in (any of) and all (every one of, on fields holding several values) take a comma-separated list (\, for a literal comma). exists takes true or false. Datetimes are RFC 3339, now, or a time before now such as -30m, -6h or -7d.

q?string

Full-text search over this list's searchable fields.

Length1 <= length <= 200
sort?string

Comma-separated sort keys, - for descending, at most 2. Keys: depth, pinned, created_at. Default: created_at.

limit?integer

Rows per page, 1 to 100 (default 50).

Range1 <= value <= 100
cursor?string

The page.next_cursor of the previous page. Cannot be combined with page.

page?integer

A 1-based page number, for jumping. Cannot be combined with cursor.

Range1 <= value
total?boolean

Set to true to include the number of matching rows in page.total.

max_depth?integer

Maximum reply depth to return

Formatint32
Range0 <= value

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",      "workspace_id": "string"    }  ],  "page": {    "has_more": true,    "next_cursor": "string",    "page": 0,    "total": 0  },  "thread_id": "string"}
GET/api/v1/comments/{comment_id}
GET
/api/v1/comments/{comment_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

comment_id*string

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",  "workspace_id": "string"}
PATCH/api/v1/comments/{comment_id}
PATCH
/api/v1/comments/{comment_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

comment_id*string

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",  "workspace_id": "string"}
DELETE/api/v1/comments/{comment_id}
DELETE
/api/v1/comments/{comment_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

comment_id*string

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
POST
/api/v1/comments/{comment_id}/moderation

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

comment_id*string

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
POST
/api/v1/comments/{comment_id}/pin

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

comment_id*string

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
POST
/api/v1/comments/{comment_id}/reactions

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

comment_id*string

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}
DELETE
/api/v1/comments/{comment_id}/reactions/{reaction}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

comment_id*string
reaction*string

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}
PUT
/api/v1/comments/{comment_id}/reactions/{reaction}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

comment_id*string
reaction*string

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  }}