**Version: 202601**

# Create comment

**POST** `/openapi/2026-01/comments`

Allows users to add a comment to a specific product.

## Request

**application/json**

**Body | Example**

**Body (required)**

- `comment` object (required)

  Comment

  - `product_id` string (required)

    Product's ID to which the comment belongs
  - `user_name` string (required)

    User name who posted the comment
  - `star` int32 (required)

    Rating provided by the user (range: 1 to 5)
  - `like` int32 (required)

    Number of likes for the comment
  - `created_at` string (required)

    Timestamp when the comment was created. Format: YYYY-MM-DD HH:mm:ss
  - `content` string (required)

    Content of the comment
  - `country` string

    Country code where the comment was created from (e.g., CN, US)
  - `images` string[]

    URLs of images attached to the comment, separated by semicolons

```json
{
  "comment": {
    "product_id": "string",
    "user_name": "string",
    "star": 0,
    "like": 0,
    "created_at": "string",
    "content": "string",
    "country": "string",
    "images": [
      "string"
    ]
  }
}
```

## Responses

**200**

OK

**application/json**

**Schema | Example**

**Schema**

- `code` string

  error code
- `message` string

  error message
- `data` object

  - `comment` object

    Comment

    - `id` int32

      Comment ID
    - `store_id` int32

      ID of the store where the comment was created
    - `user_name` string

      Name of the user who posted the comment
    - `email` string

      Email address of the user (if provided)
    - `star` string

      Rating provided by the user
    - `like` int32

      Number of likes for the comment
    - `content` string

      Content of the comment
    - `images` string[]

      List of image URLs attached to the comment
    - `status` int32

      Status of the comment: 1: published, 0: unpublished
    - `type` int32

      Type of the comment
    - `product_id` string

      ID of the product associated with the comment
    - `created_at` string

      Timestamp when the comment was created, ISO-8601 format:YYYY-MM-DD HH:mm:ss
    - `updated_at` string

      Timestamp when the comment was last updated, ISO-8601 format
    - `country` string

      Country code where the comment was created from
    - `is_featured` int32

      Indicates if the comment is featured (0: No, 1: Yes)
    - `is_verified` int32

      Indicates if the comment is verified (0: No, 1: Yes)
    - `client_id` string

      ID of the client who created the comment (if applicable)
    - `anonymous` int32

      Indicates if the comment was posted anonymously (0: No, 1: Yes)
    - `product_published` int32

      Whether the product is published

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "comment": {
      "id": 0,
      "store_id": 0,
      "user_name": "string",
      "email": "string",
      "star": "string",
      "like": 0,
      "content": "string",
      "images": [
        "string"
      ],
      "status": 0,
      "type": 0,
      "product_id": "string",
      "created_at": "string",
      "updated_at": "string",
      "country": "string",
      "is_featured": 0,
      "is_verified": 0,
      "client_id": "string",
      "anonymous": 0,
      "product_published": 0
    }
  }
}
```
