---
title: Comment
description: >-
  Manage the reader comments for articles (blog posts). Each article can have
  many comments. Some available actions include creating comments, updating
  comments, deleting comments, marking comments as spam, and approving
  comments. 
api_version: 2026-07
source_url:
  html: 'https://shopify.dev/docs/api/admin-rest/latest/resources/comment'
  md: 'https://shopify.dev/docs/api/admin-rest/latest/resources/comment.md'
api_name: admin-rest
api_type: rest
---

The REST Admin API is a legacy API as of October 1, 2024. Starting April 1, 2025, all new public apps must be built exclusively with the [GraphQL Admin API](https://shopify.dev/docs/api/admin-graphql). For details and migration steps, visit our [migration guide](https://shopify.dev/docs/apps/build/graphql/migrate).

# Comment

**Requires \`content\` access scope.:**

**Requires access to \[protected customer data]\(https://shopify.dev/apps/store/data-protection/protected-customer-data).:**

A comment is a reader's response to an article in a blog. Comments appear on the article page in reverse chronological order, typically after the article body. Just as a blog can have any number of articles, an article can have any number of comments.

![](https://shopify.dev/assets/api/reference/comment.png)

Article comments are a target for spammers, so Shopify blogs use a spam detection system to identify comments that are likely to be spam. Shop owners can also can mark comments as spam or not spam. Comments that are marked as spam are removed from the Shopify admin and don't appear in the blog.

\#

## Endpoints

* [post](https://shopify.dev/docs/api/admin-rest/latest/resources/comment.md#post-comments)

  [/admin/api/latest/comments.​json](https://shopify.dev/docs/api/admin-rest/latest/resources/comment.md#post-comments)

  Creates a comment for an article

  **deprecated**

* [post](https://shopify.dev/docs/api/admin-rest/latest/resources/comment.md#post-comments-comment-id-approve)

  [/admin/api/latest/comments/{comment\_​id}/approve.​json](https://shopify.dev/docs/api/admin-rest/latest/resources/comment.md#post-comments-comment-id-approve)

  Approves a comment

  [commentApprove](https://shopify.dev/docs/api/admin-graphql/latest/mutations/commentApprove?example=approves-a-comment)

* [post](https://shopify.dev/docs/api/admin-rest/latest/resources/comment.md#post-comments-comment-id-not-spam)

  [/admin/api/latest/comments/{comment\_​id}/not\_​spam.​json](https://shopify.dev/docs/api/admin-rest/latest/resources/comment.md#post-comments-comment-id-not-spam)

  Marks a comment as not spam

  [commentNotSpam](https://shopify.dev/docs/api/admin-graphql/latest/mutations/commentNotSpam?example=marks-a-comment-as-not-spam)

* [post](https://shopify.dev/docs/api/admin-rest/latest/resources/comment.md#post-comments-comment-id-remove)

  [/admin/api/latest/comments/{comment\_​id}/remove.​json](https://shopify.dev/docs/api/admin-rest/latest/resources/comment.md#post-comments-comment-id-remove)

  Removes a comment

  [commentDelete](https://shopify.dev/docs/api/admin-graphql/latest/mutations/commentDelete?example=removes-a-comment)

* [post](https://shopify.dev/docs/api/admin-rest/latest/resources/comment.md#post-comments-comment-id-restore)

  [/admin/api/latest/comments/{comment\_​id}/restore.​json](https://shopify.dev/docs/api/admin-rest/latest/resources/comment.md#post-comments-comment-id-restore)

  Restores a previously removed comment

  **deprecated**

* [post](https://shopify.dev/docs/api/admin-rest/latest/resources/comment.md#post-comments-comment-id-spam)

  [/admin/api/latest/comments/{comment\_​id}/spam.​json](https://shopify.dev/docs/api/admin-rest/latest/resources/comment.md#post-comments-comment-id-spam)

  Marks a comment as spam

  [commentSpam](https://shopify.dev/docs/api/admin-graphql/latest/mutations/commentSpam?example=marks-a-comment-as-spam)

* [get](https://shopify.dev/docs/api/admin-rest/latest/resources/comment.md#get-comments?since-id=118373535)

  [/admin/api/latest/comments.​json?since\_​id=118373535](https://shopify.dev/docs/api/admin-rest/latest/resources/comment.md#get-comments?since-id=118373535)

  Retrieves a list of comments

  [comments](https://shopify.dev/docs/api/admin-graphql/latest/queries/comments?example=retrieves-a-list-of-comments)

* [get](https://shopify.dev/docs/api/admin-rest/latest/resources/comment.md#get-comments-comment-id)

  [/admin/api/latest/comments/{comment\_​id}.​json](https://shopify.dev/docs/api/admin-rest/latest/resources/comment.md#get-comments-comment-id)

  Retrieves a single comment by its ID

  [comment](https://shopify.dev/docs/api/admin-graphql/latest/queries/comment?example=retrieves-a-single-comment-by-its-id)

* [get](https://shopify.dev/docs/api/admin-rest/latest/resources/comment.md#get-comments-count?article-id=134645308\&blog-id=241253187)

  [/admin/api/latest/comments/count.​json?article\_​id=134645308\&blog\_​id=241253187](https://shopify.dev/docs/api/admin-rest/latest/resources/comment.md#get-comments-count?article-id=134645308\&blog-id=241253187)

  Retrieves a count of comments

  [article](https://shopify.dev/docs/api/admin-graphql/latest/queries/article)

* [put](https://shopify.dev/docs/api/admin-rest/latest/resources/comment.md#put-comments-comment-id)

  [/admin/api/latest/comments/{comment\_​id}.​json](https://shopify.dev/docs/api/admin-rest/latest/resources/comment.md#put-comments-comment-id)

  Updates a comment of an article

  **deprecated**

***

## The Comment resource

### Properties

***

article\_id

A unique numeric identifier for the article that the comment belongs to.

***

author

[](https://shopify.dev/apps/store/data-protection/protected-customer-data)

The name of the author of the comment.

***

blog\_id

A unique numeric identifier for the blog containing the article that the comment belongs to.

***

body

The basic [Textile markup](https://en.wikipedia.org/wiki/Textile_\(markup_language\)) of a comment.

***

body\_html

The text of the comment, complete with HTML markup.

***

created\_at

**read-only**

The date and time ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format) when the comment was created.

***

email

[](https://shopify.dev/apps/store/data-protection/protected-customer-data)

The email address of the author of the comment.

***

id

**read-only**

A unique numeric identifier for the comment.

***

ip

[](https://shopify.dev/apps/store/data-protection/protected-customer-data)

The IP address from which the comment was posted.

***

published\_at

The date and time ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format) when the comment was published.

***

status

**read-only**

The status of the comment. Valid values:

* **pending**: The comment has been created but is awaiting spam detection. Depending on the result of the spam detection and the shop owner's comment preferences, this property will be transitioned to either `spam`, `unapproved`, or `approved`.
* **unapproved (default)**: The comment is awaiting approval by the shop owner. It's not visible to the readers of the blog.
* **published**: The comment has been approved (if the blog requires comments to be approved) and is visible to readers of the blog.
* **spam**: The comment has been marked as spam and removed from the Shopify admin. It's not visible to readers of the blog.
* **removed**: The comment has been removed by the shop owner. It's not visible to readers of the blog.

***

updated\_at

**read-only**

The date and time ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format) when the comment was last modified. When the comment is created, this matches the value of `created_at`. If the blog requires comments to be approved, then this value is updated to the date and time when the comment is approved.

***

user\_agent

The user agent string provided by the software used to create the comment (usually a browser).

***

{}

## The Comment resource

```json
{
  "article_id": 134645308,
  "author": "Soleone",
  "blog_id": 241253187,
  "body": "This is a _great_ article.",
  "body_html": "<p>This is a <em>great</em> article.</p>",
  "created_at": "2012-08-24T14:01:46-04:00",
  "email": "soleone@example.net",
  "id": 653537639,
  "ip": "127.0.0.1",
  "published_at": "2012-08-24T14:02:00-04:00",
  "status": "unapproved",
  "updated_at": "2012-08-24T14:02:00-04:00",
  "user_agent": "Mozilla/5.0"
}
```

***

## postCreates a comment for an article**deprecated**

Creates a comment for an article

### Parameters

***

api\_version

**string**

**required**

***

### Examples

### Create a comment for an article of a blog using basic Textile markup

### Request body

comment​[](https://shopify.dev/apps/store/data-protection/protected-customer-data)

**Comment resource**

comment.body:​"I like comments\nAnd I like posting them \*RESTfully\*."

The basic [Textile markup](https://en.wikipedia.org/wiki/Textile_\(markup_language\)) of a comment.

comment.author:​"Your name"[](https://shopify.dev/apps/store/data-protection/protected-customer-data)

The name of the author of the comment.

comment.email:​"your\@email.com"[](https://shopify.dev/apps/store/data-protection/protected-customer-data)

The email address of the author of the comment.

comment.ip:​"107.20.160.121"[](https://shopify.dev/apps/store/data-protection/protected-customer-data)

The IP address from which the comment was posted.

comment.blog\_​id:​241253187

A unique numeric identifier for the blog containing the article that the comment belongs to.

comment.article\_​id:​134645308

A unique numeric identifier for the article that the comment belongs to.

### Creating a comment without a body, author, and email fails and returns an error

### Request body

comment​[](https://shopify.dev/apps/store/data-protection/protected-customer-data)

**Comment resource**

comment.article\_​id:​134645308

A unique numeric identifier for the article that the comment belongs to.

post

## /admin/api/2026-07/comments.​json

```bash
curl -d '{"comment":{"body":"I like comments\nAnd I like posting them *RESTfully*.","author":"Your name","email":"your@email.com","ip":"107.20.160.121","blog_id":241253187,"article_id":134645308}}' \
-X POST "https://your-development-store.myshopify.com/admin/api/2026-07/comments.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"
```

{}

## Response

JSON

```json
HTTP/1.1 201 Created
{
  "comment": {
    "id": 757536354,
    "body": "I like comments\nAnd I like posting them *RESTfully*.",
    "body_html": "<p>I like comments<br>\nAnd I like posting them <strong>RESTfully</strong>.</p>",
    "author": "Your name",
    "email": "your@email.com",
    "status": "pending",
    "article_id": 134645308,
    "blog_id": 241253187,
    "created_at": "2026-07-01T12:16:42-04:00",
    "updated_at": "2026-07-01T12:16:42-04:00",
    "ip": "107.20.160.121",
    "user_agent": null,
    "published_at": null
  }
}
```

### examples

* #### Create a comment for an article of a blog using basic Textile markup

  #####

  ```curl
  curl -d '{"comment":{"body":"I like comments\nAnd I like posting them *RESTfully*.","author":"Your name","email":"your@email.com","ip":"107.20.160.121","blog_id":241253187,"article_id":134645308}}' \
  -X POST "https://your-development-store.myshopify.com/admin/api/2026-07/comments.json" \
  -H "X-Shopify-Access-Token: {access_token}" \
  -H "Content-Type: application/json"
  ```

  #### response

  ```json
  HTTP/1.1 201 Created{"comment":{"id":757536354,"body":"I like comments\nAnd I like posting them *RESTfully*.","body_html":"<p>I like comments<br>\nAnd I like posting them <strong>RESTfully</strong>.</p>","author":"Your name","email":"your@email.com","status":"pending","article_id":134645308,"blog_id":241253187,"created_at":"2026-07-01T12:16:42-04:00","updated_at":"2026-07-01T12:16:42-04:00","ip":"107.20.160.121","user_agent":null,"published_at":null}}
  ```

* #### Creating a comment without a body, author, and email fails and returns an error

  #####

  ```curl
  curl -d '{"comment":{"article_id":134645308}}' \
  -X POST "https://your-development-store.myshopify.com/admin/api/2026-07/comments.json" \
  -H "X-Shopify-Access-Token: {access_token}" \
  -H "Content-Type: application/json"
  ```

  #### response

  ```json
  HTTP/1.1 422 Unprocessable Entity{"errors":{"author":["can't be blank"],"body":["can't be blank"],"email":["must be formatted as an email"]}}
  ```

***

## postApproves a comment

[commentApprove](https://shopify.dev/docs/api/admin-graphql/latest/mutations/commentApprove?example=approves-a-comment)

Approves a comment

### Parameters

***

api\_version

**string**

**required**

***

comment\_id

**string**

**required**

***

### Examples

### Approve a comment and publish it to the blog

### Path parameters

comment\_​id=​653537639

**string**

**required**

post

## /admin/api/2026-07/comments/653537639/approve.​json

```bash
curl -d '{}' \
-X POST "https://your-development-store.myshopify.com/admin/api/2026-07/comments/653537639/approve.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"
```

{}

## Response

JSON

```json
HTTP/1.1 200 OK
{
  "published_at": "2026-07-01T12:16:41-04:00",
  "status": "published",
  "email": "soleone@example.net",
  "article_id": 134645308,
  "blog_id": 241253187,
  "author": "Soleone",
  "body": "Hi author, I really _like_ what you're doing there.",
  "body_html": "<p>Hi author, I really <em>like</em> what you're doing there.</p>",
  "id": 653537639,
  "created_at": "2026-07-01T12:15:55-04:00",
  "updated_at": "2026-07-01T12:16:41-04:00",
  "ip": "127.0.0.1",
  "user_agent": "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1"
}
```

### examples

* #### Approve a comment and publish it to the blog

  #####

  ```curl
  curl -d '{}' \
  -X POST "https://your-development-store.myshopify.com/admin/api/2026-07/comments/653537639/approve.json" \
  -H "X-Shopify-Access-Token: {access_token}" \
  -H "Content-Type: application/json"
  ```

  #### response

  ```json
  HTTP/1.1 200 OK{"published_at":"2026-07-01T12:16:41-04:00","status":"published","email":"soleone@example.net","article_id":134645308,"blog_id":241253187,"author":"Soleone","body":"Hi author, I really _like_ what you're doing there.","body_html":"<p>Hi author, I really <em>like</em> what you're doing there.</p>","id":653537639,"created_at":"2026-07-01T12:15:55-04:00","updated_at":"2026-07-01T12:16:41-04:00","ip":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1"}
  ```

***

## postMarks a comment as not spam

[commentNotSpam](https://shopify.dev/docs/api/admin-graphql/latest/mutations/commentNotSpam?example=marks-a-comment-as-not-spam)

Marks a comment as not spam

### Parameters

***

api\_version

**string**

**required**

***

comment\_id

**string**

**required**

***

### Examples

### Mark a comment as not spam, restoring it to an unapproved or published state

### Path parameters

comment\_​id=​653537639

**string**

**required**

post

## /admin/api/2026-07/comments/653537639/not\_​spam.​json

```bash
curl -d '{}' \
-X POST "https://your-development-store.myshopify.com/admin/api/2026-07/comments/653537639/not_spam.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"
```

{}

## Response

JSON

```json
HTTP/1.1 200 OK
{
  "published_at": "2026-07-01T12:16:40-04:00",
  "status": "published",
  "email": "soleone@example.net",
  "article_id": 134645308,
  "blog_id": 241253187,
  "author": "Soleone",
  "body": "Hi author, I really _like_ what you're doing there.",
  "body_html": "<p>Hi author, I really <em>like</em> what you're doing there.</p>",
  "id": 653537639,
  "created_at": "2026-07-01T12:15:55-04:00",
  "updated_at": "2026-07-01T12:16:40-04:00",
  "ip": "127.0.0.1",
  "user_agent": "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1"
}
```

### examples

* #### Mark a comment as not spam, restoring it to an unapproved or published state

  #####

  ```curl
  curl -d '{}' \
  -X POST "https://your-development-store.myshopify.com/admin/api/2026-07/comments/653537639/not_spam.json" \
  -H "X-Shopify-Access-Token: {access_token}" \
  -H "Content-Type: application/json"
  ```

  #### response

  ```json
  HTTP/1.1 200 OK{"published_at":"2026-07-01T12:16:40-04:00","status":"published","email":"soleone@example.net","article_id":134645308,"blog_id":241253187,"author":"Soleone","body":"Hi author, I really _like_ what you're doing there.","body_html":"<p>Hi author, I really <em>like</em> what you're doing there.</p>","id":653537639,"created_at":"2026-07-01T12:15:55-04:00","updated_at":"2026-07-01T12:16:40-04:00","ip":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1"}
  ```

***

## postRemoves a comment

[commentDelete](https://shopify.dev/docs/api/admin-graphql/latest/mutations/commentDelete?example=removes-a-comment)

Removes a comment

### Parameters

***

api\_version

**string**

**required**

***

comment\_id

**string**

**required**

***

### Examples

### Remove a comment

### Path parameters

comment\_​id=​653537639

**string**

**required**

post

## /admin/api/2026-07/comments/653537639/remove.​json

```bash
curl -d '{}' \
-X POST "https://your-development-store.myshopify.com/admin/api/2026-07/comments/653537639/remove.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"
```

{}

## Response

JSON

```json
HTTP/1.1 200 OK
{
  "published_at": null,
  "status": "removed",
  "email": "soleone@example.net",
  "article_id": 134645308,
  "blog_id": 241253187,
  "author": "Soleone",
  "body": "Hi author, I really _like_ what you're doing there.",
  "body_html": "<p>Hi author, I really <em>like</em> what you're doing there.</p>",
  "id": 653537639,
  "created_at": "2026-07-01T12:15:55-04:00",
  "updated_at": "2026-07-01T12:16:39-04:00",
  "ip": "127.0.0.1",
  "user_agent": "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1"
}
```

### examples

* #### Remove a comment

  #####

  ```curl
  curl -d '{}' \
  -X POST "https://your-development-store.myshopify.com/admin/api/2026-07/comments/653537639/remove.json" \
  -H "X-Shopify-Access-Token: {access_token}" \
  -H "Content-Type: application/json"
  ```

  #### response

  ```json
  HTTP/1.1 200 OK{"published_at":null,"status":"removed","email":"soleone@example.net","article_id":134645308,"blog_id":241253187,"author":"Soleone","body":"Hi author, I really _like_ what you're doing there.","body_html":"<p>Hi author, I really <em>like</em> what you're doing there.</p>","id":653537639,"created_at":"2026-07-01T12:15:55-04:00","updated_at":"2026-07-01T12:16:39-04:00","ip":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1"}
  ```

***

## postRestores a previously removed comment**deprecated**

Restores a previously removed comment

### Parameters

***

api\_version

**string**

**required**

***

comment\_id

**string**

**required**

***

### Examples

### Restore a removed comment

### Path parameters

comment\_​id=​653537639

**string**

**required**

post

## /admin/api/2026-07/comments/653537639/restore.​json

```bash
curl -d '{}' \
-X POST "https://your-development-store.myshopify.com/admin/api/2026-07/comments/653537639/restore.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"
```

{}

## Response

JSON

```json
HTTP/1.1 200 OK
{
  "published_at": "2026-07-01T12:16:40-04:00",
  "status": "published",
  "email": "soleone@example.net",
  "article_id": 134645308,
  "blog_id": 241253187,
  "author": "Soleone",
  "body": "Hi author, I really _like_ what you're doing there.",
  "body_html": "<p>Hi author, I really <em>like</em> what you're doing there.</p>",
  "id": 653537639,
  "created_at": "2026-07-01T12:15:55-04:00",
  "updated_at": "2026-07-01T12:16:40-04:00",
  "ip": "127.0.0.1",
  "user_agent": "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1"
}
```

### examples

* #### Restore a removed comment

  #####

  ```curl
  curl -d '{}' \
  -X POST "https://your-development-store.myshopify.com/admin/api/2026-07/comments/653537639/restore.json" \
  -H "X-Shopify-Access-Token: {access_token}" \
  -H "Content-Type: application/json"
  ```

  #### response

  ```json
  HTTP/1.1 200 OK{"published_at":"2026-07-01T12:16:40-04:00","status":"published","email":"soleone@example.net","article_id":134645308,"blog_id":241253187,"author":"Soleone","body":"Hi author, I really _like_ what you're doing there.","body_html":"<p>Hi author, I really <em>like</em> what you're doing there.</p>","id":653537639,"created_at":"2026-07-01T12:15:55-04:00","updated_at":"2026-07-01T12:16:40-04:00","ip":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1"}
  ```

***

## postMarks a comment as spam

[commentSpam](https://shopify.dev/docs/api/admin-graphql/latest/mutations/commentSpam?example=marks-a-comment-as-spam)

Marks a comment as spam

### Parameters

***

api\_version

**string**

**required**

***

comment\_id

**string**

**required**

***

### Examples

### Mark a comment as spam

### Path parameters

comment\_​id=​653537639

**string**

**required**

post

## /admin/api/2026-07/comments/653537639/spam.​json

```bash
curl -d '{}' \
-X POST "https://your-development-store.myshopify.com/admin/api/2026-07/comments/653537639/spam.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"
```

{}

## Response

JSON

```json
HTTP/1.1 200 OK
{
  "published_at": null,
  "status": "spam",
  "email": "soleone@example.net",
  "article_id": 134645308,
  "blog_id": 241253187,
  "author": "Soleone",
  "body": "Hi author, I really _like_ what you're doing there.",
  "body_html": "<p>Hi author, I really <em>like</em> what you're doing there.</p>",
  "id": 653537639,
  "created_at": "2026-07-01T12:15:55-04:00",
  "updated_at": "2026-07-01T12:16:39-04:00",
  "ip": "127.0.0.1",
  "user_agent": "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1"
}
```

### examples

* #### Mark a comment as spam

  #####

  ```curl
  curl -d '{}' \
  -X POST "https://your-development-store.myshopify.com/admin/api/2026-07/comments/653537639/spam.json" \
  -H "X-Shopify-Access-Token: {access_token}" \
  -H "Content-Type: application/json"
  ```

  #### response

  ```json
  HTTP/1.1 200 OK{"published_at":null,"status":"spam","email":"soleone@example.net","article_id":134645308,"blog_id":241253187,"author":"Soleone","body":"Hi author, I really _like_ what you're doing there.","body_html":"<p>Hi author, I really <em>like</em> what you're doing there.</p>","id":653537639,"created_at":"2026-07-01T12:15:55-04:00","updated_at":"2026-07-01T12:16:39-04:00","ip":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1"}
  ```

***

## getRetrieves a list of comments

[comments](https://shopify.dev/docs/api/admin-graphql/latest/queries/comments?example=retrieves-a-list-of-comments)

Retrieves a list of comments. **Note:** This endpoint implements pagination by using links that are provided in the response header. To learn more, refer to [Make paginated requests to the REST Admin API](https://shopify.dev/api/usage/pagination-rest).

### Parameters

***

api\_version

**string**

**required**

***

created\_at\_max

Show comments created before date (format: 2014-04-25T16:15:47-04:00).

***

created\_at\_min

Show comments created after date (format: 2014-04-25T16:15:47-04:00).

***

fields

Show only certain fields, specified by a comma-separated list of field names.

***

limit

**≤ 250**

**default 50**

The maximum number of results to retrieve.

***

published\_at\_max

Show comments published before date (format: 2014-04-25T16:15:47-04:00).

***

published\_at\_min

Show comments published after date (format: 2014-04-25T16:15:47-04:00).

***

published\_status

**default any**

Filter results by their published status.

* **published**: Show only published comments.

* **unpublished**: Show only unpublished comments.

* **any**: Show comments of any published status.

***

since\_id

Restrict results to after the specified ID.

***

status

Filter results by their status.

* **pending**: Show only pending comments.

* **published**: Show only published comments.

* **unapproved**: Show only unapproved comments.

***

updated\_at\_max

Show comments last updated before date (format: 2014-04-25T16:15:47-04:00).

***

updated\_at\_min

Show comments last updated after date (format: 2014-04-25T16:15:47-04:00).

***

### Examples

### Retrieve all comments for this shop after the specified ID

### Query parameters

since\_​id=​118373535

Restrict results to after the specified ID.

### Retrieve all the comments for a certain article of a blog

### Query parameters

article\_​id=​134645308

A unique numeric identifier for the article that the comment belongs to.

blog\_​id=​241253187

A unique numeric identifier for the blog containing the article that the comment belongs to.

### Retrieve all the comments for all the articles of a blog

### Query parameters

blog\_​id=​241253187

A unique numeric identifier for the blog containing the article that the comment belongs to.

### Retrieve all the comments for this shop

get

## /admin/api/2026-07/comments.​json?since\_​id=​118373535

```bash
curl -X GET "https://your-development-store.myshopify.com/admin/api/2026-07/comments.json?since_id=118373535" \
-H "X-Shopify-Access-Token: {access_token}"
```

{}

## Response

JSON

```json
HTTP/1.1 200 OK
{
  "comments": [
    {
      "id": 653537639,
      "body": "Hi author, I really _like_ what you're doing there.",
      "body_html": "<p>Hi author, I really <em>like</em> what you're doing there.</p>",
      "author": "Soleone",
      "email": "soleone@example.net",
      "status": "unapproved",
      "article_id": 134645308,
      "blog_id": 241253187,
      "created_at": "2026-07-01T12:15:55-04:00",
      "updated_at": "2026-07-01T12:15:55-04:00",
      "ip": "127.0.0.1",
      "user_agent": "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1",
      "published_at": null
    }
  ]
}
```

### examples

* #### Retrieve all comments for this shop after the specified ID

  #####

  ```curl
  curl -X GET "https://your-development-store.myshopify.com/admin/api/2026-07/comments.json?since_id=118373535" \
  -H "X-Shopify-Access-Token: {access_token}"
  ```

  #### response

  ```json
  HTTP/1.1 200 OK{"comments":[{"id":653537639,"body":"Hi author, I really _like_ what you're doing there.","body_html":"<p>Hi author, I really <em>like</em> what you're doing there.</p>","author":"Soleone","email":"soleone@example.net","status":"unapproved","article_id":134645308,"blog_id":241253187,"created_at":"2026-07-01T12:15:55-04:00","updated_at":"2026-07-01T12:15:55-04:00","ip":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1","published_at":null}]}
  ```

* #### Retrieve all the comments for a certain article of a blog

  #####

  ```curl
  curl -X GET "https://your-development-store.myshopify.com/admin/api/2026-07/comments.json?article_id=134645308&blog_id=241253187" \
  -H "X-Shopify-Access-Token: {access_token}"
  ```

* #### Retrieve all the comments for all the articles of a blog

  #####

  ```curl
  curl -X GET "https://your-development-store.myshopify.com/admin/api/2026-07/comments.json?blog_id=241253187" \
  -H "X-Shopify-Access-Token: {access_token}"
  ```

* #### Retrieve all the comments for this shop

  #####

  ```curl
  curl -X GET "https://your-development-store.myshopify.com/admin/api/2026-07/comments.json" \
  -H "X-Shopify-Access-Token: {access_token}"
  ```

***

## getRetrieves a single comment by its ID

[comment](https://shopify.dev/docs/api/admin-graphql/latest/queries/comment?example=retrieves-a-single-comment-by-its-id)

Retrieves a single comment by its ID

### Parameters

***

api\_version

**string**

**required**

***

comment\_id

**string**

**required**

***

fields

Show only certain fields, specified by a comma-separated list of field names.

***

### Examples

### Retrieve a single comment

### Path parameters

comment\_​id=​118373535

**string**

**required**

get

## /admin/api/2026-07/comments/118373535.​json

```bash
curl -X GET "https://your-development-store.myshopify.com/admin/api/2026-07/comments/118373535.json" \
-H "X-Shopify-Access-Token: {access_token}"
```

{}

## Response

JSON

```json
HTTP/1.1 200 OK
{
  "comment": {
    "id": 118373535,
    "body": "Hi author, I really _like_ what you're doing there.",
    "body_html": "<p>Hi author, I really <em>like</em> what you're doing there.</p>",
    "author": "Soleone",
    "email": "soleone@example.net",
    "status": "published",
    "article_id": 134645308,
    "blog_id": 241253187,
    "created_at": "2026-07-01T12:15:55-04:00",
    "updated_at": "2026-07-01T12:15:55-04:00",
    "ip": "127.0.0.1",
    "user_agent": "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1",
    "published_at": null
  }
}
```

### examples

* #### Retrieve a single comment

  #####

  ```curl
  curl -X GET "https://your-development-store.myshopify.com/admin/api/2026-07/comments/118373535.json" \
  -H "X-Shopify-Access-Token: {access_token}"
  ```

  #### response

  ```json
  HTTP/1.1 200 OK{"comment":{"id":118373535,"body":"Hi author, I really _like_ what you're doing there.","body_html":"<p>Hi author, I really <em>like</em> what you're doing there.</p>","author":"Soleone","email":"soleone@example.net","status":"published","article_id":134645308,"blog_id":241253187,"created_at":"2026-07-01T12:15:55-04:00","updated_at":"2026-07-01T12:15:55-04:00","ip":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1","published_at":null}}
  ```

***

## getRetrieves a count of comments

[article](https://shopify.dev/docs/api/admin-graphql/latest/queries/article)

Retrieves a count of comments

### Parameters

***

api\_version

**string**

**required**

***

created\_at\_max

Count comments created before date (format: 2014-04-25T16:15:47-04:00).

***

created\_at\_min

Count comments created after date (format: 2014-04-25T16:15:47-04:00).

***

published\_at\_max

Count comments published before date (format: 2014-04-25T16:15:47-04:00).

***

published\_at\_min

Count comments published after date (format: 2014-04-25T16:15:47-04:00).

***

published\_status

**default any**

Retrieve a count of comments with a given published status.

* **published**: Count only published comments.

* **unpublished**: Count only unpublished comments.

* **any**: Count comments of any published status.

***

status

Retrieve a count of comments with a given status.

* **pending**: Count pending comments.

* **published**: Count published comments.

* **unapproved**: Count unapproved comments.

***

updated\_at\_max

Count comments last updated before date (format: 2014-04-25T16:15:47-04:00).

***

updated\_at\_min

Count comments last updated after date (format: 2014-04-25T16:15:47-04:00).

***

### Examples

### Count all comments for a certain article of a blog

### Query parameters

article\_​id=​134645308

A unique numeric identifier for the article that the comment belongs to.

blog\_​id=​241253187

A unique numeric identifier for the blog containing the article that the comment belongs to.

### Count all the comments for all the articles of a blog

### Query parameters

blog\_​id=​241253187

A unique numeric identifier for the blog containing the article that the comment belongs to.

### Count all the comments for this shop

get

## /admin/api/2026-07/comments/count.​json?article\_​id=​134645308\&blog\_​id=​241253187

```bash
curl -X GET "https://your-development-store.myshopify.com/admin/api/2026-07/comments/count.json?article_id=134645308&blog_id=241253187" \
-H "X-Shopify-Access-Token: {access_token}"
```

{}

## Response

JSON

```json
HTTP/1.1 200 OK
{
  "count": 2
}
```

### examples

* #### Count all comments for a certain article of a blog

  #####

  ```curl
  curl -X GET "https://your-development-store.myshopify.com/admin/api/2026-07/comments/count.json?article_id=134645308&blog_id=241253187" \
  -H "X-Shopify-Access-Token: {access_token}"
  ```

  #### response

  ```json
  HTTP/1.1 200 OK{"count":2}
  ```

* #### Count all the comments for all the articles of a blog

  #####

  ```curl
  curl -X GET "https://your-development-store.myshopify.com/admin/api/2026-07/comments/count.json?blog_id=241253187" \
  -H "X-Shopify-Access-Token: {access_token}"
  ```

* #### Count all the comments for this shop

  #####

  ```curl
  curl -X GET "https://your-development-store.myshopify.com/admin/api/2026-07/comments/count.json" \
  -H "X-Shopify-Access-Token: {access_token}"
  ```

***

## putUpdates a comment of an article**deprecated**

Updates a comment of an article

### Parameters

***

api\_version

**string**

**required**

***

comment\_id

**string**

**required**

***

### Examples

### Update the body of an existing comment

### Path parameters

comment\_​id=​118373535

**string**

**required**

### Request body

comment​[](https://shopify.dev/apps/store/data-protection/protected-customer-data)

**Comment resource**

comment.id:​118373535

**read-only**

A unique numeric identifier for the comment.

comment.body:​"You can even update through a web service."

The basic [Textile markup](https://en.wikipedia.org/wiki/Textile_\(markup_language\)) of a comment.

comment.author:​"Your new name"[](https://shopify.dev/apps/store/data-protection/protected-customer-data)

The name of the author of the comment.

comment.email:​"your\@updated-email.com"[](https://shopify.dev/apps/store/data-protection/protected-customer-data)

The email address of the author of the comment.

comment.published\_​at:​"2026-07-01T16:16:39.464Z"

The date and time ([ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format) when the comment was published.

put

## /admin/api/2026-07/comments/118373535.​json

```bash
curl -d '{"comment":{"id":118373535,"body":"You can even update through a web service.","author":"Your new name","email":"your@updated-email.com","published_at":"2026-07-01T16:16:39.464Z"}}' \
-X PUT "https://your-development-store.myshopify.com/admin/api/2026-07/comments/118373535.json" \
-H "X-Shopify-Access-Token: {access_token}" \
-H "Content-Type: application/json"
```

{}

## Response

JSON

```json
HTTP/1.1 200 OK
{
  "comment": {
    "author": "Your new name",
    "body": "You can even update through a web service.",
    "email": "your@updated-email.com",
    "published_at": "2026-07-01T12:16:39-04:00",
    "article_id": 134645308,
    "blog_id": 241253187,
    "status": "published",
    "body_html": "<p>You can even update through a web service.</p>",
    "id": 118373535,
    "created_at": "2026-07-01T12:15:55-04:00",
    "updated_at": "2026-07-01T12:16:39-04:00",
    "ip": "127.0.0.1",
    "user_agent": "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1"
  }
}
```

### examples

* #### Update the body of an existing comment

  #####

  ```curl
  curl -d '{"comment":{"id":118373535,"body":"You can even update through a web service.","author":"Your new name","email":"your@updated-email.com","published_at":"2026-07-01T16:16:39.464Z"}}' \
  -X PUT "https://your-development-store.myshopify.com/admin/api/2026-07/comments/118373535.json" \
  -H "X-Shopify-Access-Token: {access_token}" \
  -H "Content-Type: application/json"
  ```

  #### response

  ```json
  HTTP/1.1 200 OK{"comment":{"author":"Your new name","body":"You can even update through a web service.","email":"your@updated-email.com","published_at":"2026-07-01T12:16:39-04:00","article_id":134645308,"blog_id":241253187,"status":"published","body_html":"<p>You can even update through a web service.</p>","id":118373535,"created_at":"2026-07-01T12:15:55-04:00","updated_at":"2026-07-01T12:16:39-04:00","ip":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1"}}
  ```
