Create Comment

Request

POST

https://api.wiki.yandex.net/v1/pages/{idx}/comments

Path parameters

Name

Description

idx

Type: integer

Body

application/json
{
  "body": "example",
  "inline_text": "example",
  "parent_id": 0,
  "thread_id": 0
}

Name

Description

body

Type: string

Example: example

inline_text

Type: string

Example: example

parent_id

Type: integer

thread_id

Type: integer

Responses

200 OK

OK

Body

application/json
{
  "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"
    }
  ]
}

Name

Description

author

All of 1 type
  • UserSchema

    Type: UserSchema

    Information about the user

    Example
    {
      "id": 0,
      "identity": {
        "uid": "example",
        "cloud_uid": "example"
      },
      "username": "example",
      "display_name": "example",
      "is_dismissed": true,
      "affiliation": "example"
    }
    

Comment author

Example
{
  "id": 0,
  "identity": {
    "uid": "example",
    "cloud_uid": "example"
  },
  "username": "example",
  "display_name": "example",
  "is_dismissed": true,
  "affiliation": "example"
}

body

Type: string

Comment text

Example: example

created_at

Type: string<date-time>

Date and time the comment was created

Example: 2025-01-01T00:00:00Z

id

Type: integer

Unique comment identifier

is_deleted

Type: boolean

Comment deletion flag

reactions

Type: CommentReactionSchema[]

Reactions to the comment

Example
[
  {
    "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"
  }
]

resolve_status

All of 1 type
  • CommentResolveStatus

    Type: CommentResolveStatus

    Comment resolve status:

    • resolved — the comment is resolved
    • unresolved — the comment is not resolved

    Enum: resolved, unresolved

Comment resolve status

Example: resolved

inline_text

Type: string

The text the comment is attached to (for inline comments)

Example: example

parent_id

Type: integer

The ID of the parent comment (for replies in a thread)

thread_id

Type: integer

Comment thread ID

UserIdentity

User identifier

Name

Description

cloud_uid

Type: string

User identifier in the cloud (for the external instance)

Example: example

uid

Type: string

User identifier in Yandex (for the internal instance)

Example: example

Example
{
  "uid": "example",
  "cloud_uid": "example"
}

UserSchema

Information about the user

Name

Description

affiliation

Type: string

User affiliation (for example, yandex, external)

Example: example

display_name

Type: string

User display name

Example: example

id

Type: integer

Internal user identifier

is_dismissed

Type: boolean

The user has been dismissed

username

Type: string

User login

Example: example

identity

All of 1 type
  • UserIdentity

    Type: UserIdentity

    User identifier

    Example
    {
      "uid": "example",
      "cloud_uid": "example"
    }
    

User identifier in the system

Example
{
  "uid": "example",
  "cloud_uid": "example"
}
Example
{
  "id": 0,
  "identity": {
    "uid": "example",
    "cloud_uid": "example"
  },
  "username": "example",
  "display_name": "example",
  "is_dismissed": true,
  "affiliation": "example"
}

CommentResolveStatus

Comment resolve status:

  • resolved — the comment is resolved
  • unresolved — the comment is not resolved

Type: string

Enum: resolved, unresolved

ReactionType

Comment reaction type:

  • like — like
  • hooray — hooray
  • confused — confused
  • heart — heart
  • rocket — rocket
  • eyes — eyes
  • fire — fire
  • ok — ok
  • facepalm — facepalm
  • check — check mark
  • laugh — laugh
  • dislike — dislike

Type: string

Enum: like, hooray, confused, heart, rocket, eyes, fire, ok, facepalm, check, laugh, dislike

CommentReactionSchema

Name

Description

author

Type: UserSchema

Information about the user

Example
{
  "id": 0,
  "identity": {
    "uid": "example",
    "cloud_uid": "example"
  },
  "username": "example",
  "display_name": "example",
  "is_dismissed": true,
  "affiliation": "example"
}

created_at

Type: string<date-time>

Example: 2025-01-01T00:00:00Z

type

Type: ReactionType

Comment reaction type:

  • like — like
  • hooray — hooray
  • confused — confused
  • heart — heart
  • rocket — rocket
  • eyes — eyes
  • fire — fire
  • ok — ok
  • facepalm — facepalm
  • check — check mark
  • laugh — laugh
  • dislike — dislike

Enum: like, hooray, confused, heart, rocket, eyes, fire, ok, facepalm, check, laugh, dislike

Example
{
  "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"
}