---
title: "Update comments"

doc_type: openapi
doc_category: openapi
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-rest-api/online-store/comments/update-comments'
  md: 'https://developer.shopline.com/docs/admin-rest-api/online-store/comments/update-comments.md'
---
# Update comments

- **Base URL:** `https://{handle}.myshopline.com/admin/openapi`
- **Required Scopes:** `write_content`
- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** RESTful

## Endpoint

```http
PUT /store/comments/:comment_id.json
```

## Base URL

* `https://{handle}.myshopline.com/admin/openapi`

  * `{handle}`: `handle` : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is `open001.myshopline.com` , the store handle is `open001` .

## Required Permissions

* `write_content`

## Request

### Path Parameters

* `comment_id`

  string (required)

  Comment id

### Request Headers

* `Content-Type`

  string (required)

  The field must be set to the fixed value `application/json; charset=utf-8`.

* `Authorization`

  string (required)

   The access token for the API resource. Refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. 

### Request Body

* `body`

  string

  Comment content

* `body_html`

  string

  Body content with html markings

* `email`

  string

  Comment on the e-mail address of the author

* `ip`

  string

  Ip to post a review

* `published_at`

  string

  Time to post a review ISO 8601

* `author`

  string

  Author of the review

## Response

### Status Codes

* `200`

  For the complete list of codes and messages, see [Http status code](https://developer.shopline.com/docs/apps/api-instructions-for-use/http-status-code.md?lang=en).

* `401`

  

* `429`

  

### Response Headers

* `traceId`

  A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise.

### Response Body

#### 200

* `comment`

  object

  Review information

  * `updated_at`

    string

    Update time ISO 8601

  * `body`

    string

    Comment content

  * `ip`

    string

    Ip to post a review

  * `user_agent`

    string

    User agent

  * `email`

    string

    Comment on the e-mail address of the author

  * `id`

    string

    Comment id

  * `create_at`

    string

    Created time for reviews ISO 8601

  * `published_at`

    string

    Time to post a review ISO 8601

  * `blog_collection_id`

    string

    Comment on the blog collection id for articles belonging to

  * `status`

    string

    Comment status , post value : unapproved ( default state , comment waiting to be approved , c end does not show this state comment ) ; published : ( posted state , and visible to users on the end of c ) ; spam : ( garbage review , c end )Removed : ( review is marked as deleted status , not visible for users on the end of the c )

  * `blog_id`

    string

    Comment on blog id

  * `author`

    string

    Author of the review

  * `body_html`

    string

    Body content with html markings


#### 401

* `errors`

  string

  Error message. 


#### 429

* `errors`

  string

  Error message. 


## OpenAPI Definition

```json
{
  "externalDocs": {
    "description": "Permission point used by the interface is `write_content` , For more information about the use of permission points, see",
    "url": "ec20/3cv5d7wpfgr6a8z5/xabczf5442284vkq?lang=en",
    "errorTableDescription": ""
  },
  "operationId": "e5FW00y0",
  "parameters": [
    {
      "name": "comment_id",
      "in": "path",
      "description": "Comment id",
      "required": true,
      "style": "simple",
      "schema": {
        "name": "comment_id",
        "description": "Comment id",
        "type": "string",
        "example": ""
      },
      "example": "",
      "examples": {
        "Update review": {
          "value": "638040c6a0a9ba4487960880"
        }
      }
    },
    {
      "name": "Content-Type",
      "in": "header",
      "description": "The field must be set to the fixed value `application/json; charset=utf-8`.",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Content-Type",
        "type": "string",
        "example": "application/json; charset=utf-8"
      }
    },
    {
      "name": "Authorization",
      "in": "header",
      "description": " The access token for the API resource. Refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. ",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Authorization",
        "description": " The access token for the API. Please refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then put the obtained access token into the API request header in Bearer Token.",
        "type": "string",
        "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
      },
      "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "body": {
              "name": "body",
              "description": "Comment content",
              "type": "string",
              "example": "demo-content"
            },
            "body_html": {
              "name": "body_html",
              "description": "Body content with html markings",
              "type": "string",
              "example": "<p>demo-content</p>"
            },
            "email": {
              "name": "email",
              "description": "Comment on the e-mail address of the author",
              "type": "string",
              "example": "demo@qq.com"
            },
            "ip": {
              "name": "ip",
              "description": "Ip to post a review",
              "type": "string",
              "example": "172.28.173.136"
            },
            "published_at": {
              "name": "published_at",
              "description": "Time to post a review ISO 8601",
              "type": "string",
              "example": "2022-08-03T10:45:00+08:00\t\n"
            },
            "author": {
              "name": "author",
              "description": "Author of the review",
              "type": "string",
              "example": "demo-author"
            }
          },
          "example": {
            "body_html": "<p>demo-content</p>",
            "email": "demo@qq.com",
            "ip": "172.28.173.136",
            "published_at": "2022-08-03T10:45:00+08:00\t\n",
            "author": "demo-author",
            "body": "demo-content"
          }
        },
        "examples": {
          "Update review": {
            "value": {
              "email": "demo@qq.com",
              "ip": "172.28.173.136",
              "published_at": "2022-08-03T10:45:00+08:00\t\n",
              "author": "demo-author",
              "body": "demo-content",
              "body_html": "<p>demo-content</p>"
            }
          }
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "description": "For the complete list of codes and messages, see [Http status code](https://developer.shopline.com/docs/apps/api-instructions-for-use/http-status-code.md?lang=en).",
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "comment": {
                "name": "comment",
                "description": "Review information",
                "type": "object",
                "properties": {
                  "updated_at": {
                    "name": "updated_at",
                    "description": "Update time ISO 8601",
                    "type": "string",
                    "example": "2022-08-03T10:45:00+08:00\t\n"
                  },
                  "body": {
                    "name": "body",
                    "description": "Comment content",
                    "type": "string",
                    "example": "demo-content"
                  },
                  "ip": {
                    "name": "ip",
                    "description": "Ip to post a review",
                    "type": "string",
                    "example": "172.28.173.136"
                  },
                  "user_agent": {
                    "name": "user_agent",
                    "description": "User agent",
                    "type": "string",
                    "example": ""
                  },
                  "email": {
                    "name": "email",
                    "description": "Comment on the e-mail address of the author",
                    "type": "string",
                    "example": "demo@qq.com"
                  },
                  "id": {
                    "name": "id",
                    "description": "Comment id",
                    "type": "string",
                    "example": "63aaa20f6b7b014b289c0765"
                  },
                  "create_at": {
                    "name": "create_at",
                    "description": "Created time for reviews ISO 8601",
                    "type": "string",
                    "example": "2022-08-03T10:45:00+08:00\t\n"
                  },
                  "published_at": {
                    "name": "published_at",
                    "description": "Time to post a review ISO 8601",
                    "type": "string",
                    "example": "2022-08-03T10:45:00+08:00\t\n"
                  },
                  "blog_collection_id": {
                    "name": "blog_collection_id",
                    "description": "Comment on the blog collection id for articles belonging to",
                    "type": "string",
                    "example": "639bfda0ee877c4a9bd600b6"
                  },
                  "status": {
                    "name": "status",
                    "description": "Comment status , post value : unapproved ( default state , comment waiting to be approved , c end does not show this state comment ) ; published : ( posted state , and visible to users on the end of c ) ; spam : ( garbage review , c end )Removed : ( review is marked as deleted status , not visible for users on the end of the c )",
                    "type": "string",
                    "example": "unapproved"
                  },
                  "blog_id": {
                    "name": "blog_id",
                    "description": "Comment on blog id",
                    "type": "string",
                    "example": "63a2afa527797d5cedcecb52"
                  },
                  "author": {
                    "name": "author",
                    "description": "Author of the review",
                    "type": "string",
                    "example": "demo-author"
                  },
                  "body_html": {
                    "name": "body_html",
                    "description": "Body content with html markings",
                    "type": "string",
                    "example": "<p>demo-content</p>"
                  }
                },
                "example": {
                  "author": "demo-author",
                  "blog_collection_id": "639bfda0ee877c4a9bd600b6",
                  "email": "demo@qq.com",
                  "ip": "172.28.173.136",
                  "create_at": "2022-08-03T10:45:00+08:00\t\n",
                  "id": "63aaa20f6b7b014b289c0765",
                  "body": "demo-content",
                  "published_at": "2022-08-03T10:45:00+08:00\t\n",
                  "status": "unapproved",
                  "user_agent": "",
                  "body_html": "<p>demo-content</p>",
                  "blog_id": "63a2afa527797d5cedcecb52",
                  "updated_at": "2022-08-03T10:45:00+08:00\t\n"
                }
              }
            },
            "example": {
              "comment": {
                "body": "demo-content",
                "id": "63aaa20f6b7b014b289c0765",
                "author": "demo-author",
                "updated_at": "2022-08-03T10:45:00+08:00\t\n",
                "blog_id": "63a2afa527797d5cedcecb52",
                "email": "demo@qq.com",
                "blog_collection_id": "639bfda0ee877c4a9bd600b6",
                "status": "unapproved",
                "create_at": "2022-08-03T10:45:00+08:00\t\n",
                "user_agent": "",
                "ip": "172.28.173.136",
                "published_at": "2022-08-03T10:45:00+08:00\t\n",
                "body_html": "<p>demo-content</p>"
              }
            }
          },
          "examples": {
            "Update review": {
              "value": {
                "comment": {
                  "email": "demo@qq.com",
                  "ip": "172.28.173.136",
                  "status": "published",
                  "published_at": "2022-08-03T10:45:00+08:00",
                  "updated_at": "2022-12-27T20:52:25+08:00",
                  "body": "demo-content",
                  "create_at": "2022-11-25T12:12:54+08:00",
                  "id": "638040c6a0a9ba4487960880",
                  "author": "demo-author",
                  "blog_collection_id": "632c137a0fe5b42e60a04b62",
                  "blog_id": "63357995840927149ba6c75c",
                  "body_html": "<p>demo-content</p>"
                }
              }
            }
          }
        }
      }
    },
    "401": {
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "Error message. ",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    },
    "429": {
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "Error message. ",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "method": "put",
  "path": "/store/comments/:comment_id.json",
  "servers": [
    {
      "url": "https://{handle}.myshopline.com/admin/openapi",
      "variables": {
        "handle": {
          "default": "openapiceshidianpu",
          "description": "`handle` : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is `open001.myshopline.com` , the store handle is `open001` ."
        }
      }
    }
  ],
  "info": {
    "title": "Update comments",
    "version": "v20270301"
  },
  "authIndexes": [
    "write_content"
  ]
}
```