---
metadata:
  - name: generator
    content: Diplodoc Platform v5.64.2
alternate:
  - https://yandex.ru/support/wiki/en/api-ref/comments/pagescomments__create_comment.md
  - https://yandex.ru/support/wiki/ru/api-ref/comments/pagescomments__create_comment.md
  - href: https://yandex.ru/support/wiki/en/api-ref/comments/pagescomments__create_comment.md
    type: text/markdown
    title: Markdown version
  - href: https://yandex.ru/support/wiki/en/llms.txt?revision=r21947862
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/support/wiki/en/llms.txt?revision=r21947862

<div class="openapi">

# Create Comment

<!-- markdownlint-disable-file -->

Adds a comment to the page. The user must have read access to the page. Comments
must be enabled in the organization and on the page.

To reply in an existing thread, pass its initial comment in `thread_id`. The `parent_id` field
specifies the comment that the reply addresses. This field alone does not add the new
comment to the thread.

For common headers and authentication methods, see [Access to the API](https://yandex.ru/support/wiki/en/api-ref/access.md#headers). For sample scenarios, see [API usage examples](https://yandex.ru/support/wiki/en/api-ref/examples.md).

## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-post);margin-bottom: 12px">

<div class="openapi__request">

POST {.openapi__method}
```text translate=no
https://api.wiki.yandex.net/v1/pages/{idx}/comments
```

</div>

</div>

</div>

### Path parameters

#|
|| **Name** | **Description** ||
||

_idx_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Page ID. The value of `idx` is the same as the `id` field value in the response to `GET /v1/pages?slug=…` or `POST /v1/pages`.
{.table-cell}
||
|#{.json-schema-properties}

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "body": "example",
  "inline_text": "example",
  "parent_id": 0,
  "thread_id": 0
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_body_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

The comment text

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_inline_text_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

The fragment of page text that the comment refers to

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_parent_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

ID of the comment on this page to reply to
{.table-cell}
||
||

_thread_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

ID of the initial comment in a thread on this page. Omit the field to start a new discussion.
{.table-cell}
||
|#{.json-schema-properties}

</div>

## Responses

<div class="openapi__response__code__200">

## 200 OK

OK

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "id": 0,
  "body": "example",
  "inline_text": "example",
  "parent_id": 0,
  "author": {
    "id": 0,
    "identity": {
      "uid": "example",
      "cloud_uid": "example"
    },
    "username": "example",
    "display_name": "example",
    "is_dismissed": true,
    "affiliation": "example"
  },
  "thread_id": 0,
  "created_at": "2025-01-01T00:00:00Z",
  "is_deleted": true,
  "resolve_status": "resolved",
  "reactions": [
    {
      "type": "like",
      "author": null,
      "created_at": "2025-01-01T00:00:00Z"
    }
  ]
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_author_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **UserSchema**

  **Type**: [UserSchema](#entity-UserSchema)

  User information

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "identity": {
      "uid": "example",
      "cloud_uid": "example"
    },
    "username": "example",
    "display_name": "example",
    "is_dismissed": true,
    "affiliation": "example"
  }
  ```

  {% endcut %}

{% endcut %}

Comment author

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "identity": {
    "uid": "example",
    "cloud_uid": "example"
  },
  "username": "example",
  "display_name": "example",
  "is_dismissed": true,
  "affiliation": "example"
}
```

{% endcut %}
{.table-cell}
||
||

_body_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Comment text

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_created_at_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;date-time&gt;

Date and time the comment was created

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
||

_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Unique comment ID
{.table-cell}
||
||

_is_deleted_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: boolean

Indicates whether the comment has been deleted
{.table-cell}
||
||

_reactions_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: [CommentReactionSchema](#entity-CommentReactionSchema)[]

Reactions to the comment

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "type": "like",
    "author": {
      "id": 0,
      "identity": null,
      "username": "example",
      "display_name": "example",
      "is_dismissed": true,
      "affiliation": "example"
    },
    "created_at": "2025-01-01T00:00:00Z"
  }
]
```

{% endcut %}
{.table-cell}
||
||

_resolve_status_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **CommentResolveStatus**

  **Type**: [CommentResolveStatus](#entity-CommentResolveStatus)

  Comment resolution status:
  - `resolved`: The comment is resolved.
  - `unresolved`: The comment is unresolved.

  _Enum:_{.json-schema-reset .json-schema-value} `resolved`, `unresolved`

{% endcut %}

Comment resolution status

_Example:_{.json-schema-reset .json-schema-example} `resolved`
{.table-cell}
||
||

_inline_text_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Text the comment is attached to (for inline comments)

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_parent_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

ID of the parent comment (for replies in a thread)
{.table-cell}
||
||

_thread_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Comment thread ID
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### UserIdentity {#entity-UserIdentity}

User identifier

#|
|| **Name** | **Description** ||
||

_cloud_uid_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

User identifier in the cloud

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_uid_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Yandex user ID

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "uid": "example",
  "cloud_uid": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### UserSchema {#entity-UserSchema}

User information

#|
|| **Name** | **Description** ||
||

_affiliation_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

User affiliation

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_display_name_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

User display name

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Internal user identifier
{.table-cell}
||
||

_is_dismissed_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: boolean

The user is dismissed
{.table-cell}
||
||

_username_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

User login

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_identity_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **UserIdentity**

  **Type**: [UserIdentity](#entity-UserIdentity)

  User identifier

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "uid": "example",
    "cloud_uid": "example"
  }
  ```

  {% endcut %}

{% endcut %}

User identifier in the system

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "uid": "example",
  "cloud_uid": "example"
}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "identity": {
    "uid": "example",
    "cloud_uid": "example"
  },
  "username": "example",
  "display_name": "example",
  "is_dismissed": true,
  "affiliation": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### CommentResolveStatus {#entity-CommentResolveStatus}

Comment resolution status:
- `resolved`: The comment is resolved.
- `unresolved`: The comment is unresolved.

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `resolved`, `unresolved`

</div>

<div class="openapi-entity">

### ReactionType {#entity-ReactionType}

Comment reaction type:
- `like`: Like.
- `hooray`: Hooray.
- `confused`: Confused.
- `heart`: Heart.
- `rocket`: Rocket.
- `eyes`: Seen.
- `fire`: Fire.
- `ok`: OK.
- `facepalm`: Facepalm.
- `check`: Check mark.
- `laugh`: Laugh.
- `dislike`: Dislike.

**Type**: string

_Enum:_{.json-schema-reset .json-schema-value} `like`, `hooray`, `confused`, `heart`, `rocket`, `eyes`, `fire`, `ok`, `facepalm`, `check`, `laugh`, `dislike`

</div>

<div class="openapi-entity">

### CommentReactionSchema {#entity-CommentReactionSchema}

#|
|| **Name** | **Description** ||
||

_author_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **UserSchema**

  **Type**: [UserSchema](#entity-UserSchema)

  User information

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "id": 0,
    "identity": {
      "uid": "example",
      "cloud_uid": "example"
    },
    "username": "example",
    "display_name": "example",
    "is_dismissed": true,
    "affiliation": "example"
  }
  ```

  {% endcut %}

{% endcut %}

User who added the reaction

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "identity": {
    "uid": "example",
    "cloud_uid": "example"
  },
  "username": "example",
  "display_name": "example",
  "is_dismissed": true,
  "affiliation": "example"
}
```

{% endcut %}
{.table-cell}
||
||

_created_at_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;date-time&gt;

Date and time when the reaction was added

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
||

_type_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
{% cut "**All of 1 type**" %}{.json-schema-combinators data-marker=and}

- **ReactionType**

  **Type**: [ReactionType](#entity-ReactionType)

  Comment reaction type:
  - `like`: Like.
  - `hooray`: Hooray.
  - `confused`: Confused.
  - `heart`: Heart.
  - `rocket`: Rocket.
  - `eyes`: Seen.
  - `fire`: Fire.
  - `ok`: OK.
  - `facepalm`: Facepalm.
  - `check`: Check mark.
  - `laugh`: Laugh.
  - `dislike`: Dislike.

  _Enum:_{.json-schema-reset .json-schema-value} `like`, `hooray`, `confused`, `heart`, `rocket`, `eyes`, `fire`, `ok`, `facepalm`, `check`, `laugh`, `dislike`

{% endcut %}

Reaction type

_Example:_{.json-schema-reset .json-schema-example} `like`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "type": "like",
  "author": {
    "id": 0,
    "identity": {
      "uid": "example",
      "cloud_uid": "example"
    },
    "username": "example",
    "display_name": "example",
    "is_dismissed": true,
    "affiliation": "example"
  },
  "created_at": "2025-01-01T00:00:00Z"
}
```

{% endcut %}

</div>

</div>

</div>

[*Deprecated]: No longer supported, please use an alternative and newer version.