# Blog Comments

Read, moderate, delete, bulk manage, and subscribe to blog comments through the Store API.

Use these endpoints to read, moderate, and delete blog comments. Reads require `read_blog`; moderation and deletion require `write_blog`. Responses include the author's email for moderation. Do not expose management responses as public comment data.

Comments have no replies. Shopper submissions use the hosted comment form and follow the store's comment and moderation settings. A repeated submission with the same receipt does not create a second comment. Spam and trash comments are deleted 30 days after they got that status, which sends `blog_comments/delete`; IP addresses and browser details are removed after 30 days and email addresses after 90 days. The store's settings response includes the retention notice.

Read page sizes and bulk caps from `/blog/comments/limits` instead of hard-coding them; `limit` outside 1 to `list_max_limit` is refused. Unknown or wrongly typed request fields are rejected with `STORE_API_BODY_PROPERTY_UNKNOWN` or `STORE_API_BODY_PROPERTY_INVALID`; a malformed comment id returns `STORE_API_INVALID_COMMENT_ID`.

Bulk moderation and deletion apply atomically to the requested existing comments. Write responses carry `requested_count` (distinct ids sent), `count` and `ids` (comments changed or deleted). A moderation call that does not change status returns `count` 0, says the comment already has that status, and emits no webhook. Webhook events describe each changed or deleted comment; `customer_id` is null for a guest, and `deletes_at` is null except on a spam or trash comment in `blog_comments/update`. Deleting a blog post also deletes its comments and emits their deletion events.

## Endpoints

## Blog Comment limits

`GET /api/2025-01/blog/comments/limits`

Returns pagination, search, bulk-operation, field, and moderation-status limits. `status_options` lists each status `value` with its English display `label`.

Scope: `read_blog`

```curl
curl 'https://api-store.tringify.com/api/2025-01/blog/comments/limits' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "data": {
    "author_email_max_length": 255,
    "author_name_max_length": 255,
    "bulk_delete_max_items": 100,
    "bulk_update_max_items": 100,
    "content_max_length": 5000,
    "list_max_limit": 100,
    "list_page_size": 20,
    "page_size_options": [
      20,
      50,
      100
    ],
    "search_max_length": 200,
    "status_options": [
      {
        "value": "pending",
        "label": "Pending"
      },
      {
        "value": "approved",
        "label": "Approved"
      },
      {
        "value": "spam",
        "label": "Spam"
      },
      {
        "value": "trash",
        "label": "Trash"
      }
    ]
  },
  "success": true
}
```

## List blog comments

`GET /api/2025-01/blog/comments`

Returns store-wide comments in newest-first order. Filter by status or post, or search author name, author email, and content. Each comment carries `status_display`, its `status` as shown in Tringify, in English.

Scope: `read_blog`

```curl
curl 'https://api-store.tringify.com/api/2025-01/blog/comments?limit=20&page=1&post_id=3a588f80-fd8c-4d46-af1b-00a1c4a7f85a&search=launch&status=pending' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "data": {
    "comments": [
      {
        "author_email": "avery@example.com",
        "author_name": "Avery Stone",
        "content": "Great update.",
        "created_at": "2026-08-31T08:00:00-04:00",
        "customer_id": null,
        "deletes_at": null,
        "id": "5ff7d4ea-3250-4a4d-9d26-07f64d917d31",
        "post_id": "3a588f80-fd8c-4d46-af1b-00a1c4a7f85a",
        "post_title": "Launch notes",
        "status": "pending",
        "status_display": "Pending"
      }
    ],
    "has_next": false,
    "limit": 20,
    "next_cursor": "",
    "page": 1,
    "total": 1
  },
  "success": true
}
```

## Get blog comment counts

`GET /api/2025-01/blog/comments/counts`

Returns the current pending, approved, spam, and trash counts for the store.

Scope: `read_blog`

```curl
curl 'https://api-store.tringify.com/api/2025-01/blog/comments/counts' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "data": {
    "approved": 8,
    "pending": 1,
    "spam": 0,
    "trash": 0
  },
  "success": true
}
```

## Get a blog comment

`GET /api/2025-01/blog/comments/{id}`

Returns the comment only when it belongs to the token's store. `status_display` is its `status` as shown in Tringify, in English.

Scope: `read_blog`

```curl
curl 'https://api-store.tringify.com/api/2025-01/blog/comments/5ff7d4ea-3250-4a4d-9d26-07f64d917d31' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "data": {
    "author_email": "avery@example.com",
    "author_name": "Avery Stone",
    "content": "Great update.",
    "created_at": "2026-08-31T08:00:00-04:00",
    "customer_id": null,
    "deletes_at": null,
    "id": "5ff7d4ea-3250-4a4d-9d26-07f64d917d31",
    "post_id": "3a588f80-fd8c-4d46-af1b-00a1c4a7f85a",
    "post_title": "Launch notes",
    "status": "pending",
    "status_display": "Pending"
  },
  "success": true
}
```

## Moderate a blog comment

`PUT /api/2025-01/blog/comments/{id}`

Sets status to pending, approved, spam, or trash. The change, audit record, and update webhook commit atomically. `requested_count` is 1; `count` is 1 when the status changed and 0 when the comment already had it (no webhook or audit record then, and the message says so).

Scope: `write_blog`

```curl
curl -X PUT 'https://api-store.tringify.com/api/2025-01/blog/comments/5ff7d4ea-3250-4a4d-9d26-07f64d917d31' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "status": "approved"
}'
```

Response:

```json
{
  "code": "BLOG_COMMENT_UPDATED",
  "data": {
    "count": 1,
    "ids": [
      "5ff7d4ea-3250-4a4d-9d26-07f64d917d31"
    ],
    "requested_count": 1
  },
  "message": "Comment updated.",
  "success": true
}
```

## Bulk moderate blog comments

`POST /api/2025-01/blog/comments/bulk-update-status`

Updates every selected comment atomically. If an id is invalid, missing, or belongs to another store, none are changed. `requested_count` is the number of distinct ids sent; `count` and `ids` cover the comments whose status changed (comments that already had the status are left as they are).

Scope: `write_blog`

```curl
curl -X POST 'https://api-store.tringify.com/api/2025-01/blog/comments/bulk-update-status' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "comment_ids": [
    "5ff7d4ea-3250-4a4d-9d26-07f64d917d31"
  ],
  "status": "approved"
}'
```

Response:

```json
{
  "code": "BLOG_COMMENTS_UPDATED",
  "data": {
    "count": 1,
    "ids": [
      "5ff7d4ea-3250-4a4d-9d26-07f64d917d31"
    ],
    "requested_count": 1
  },
  "message": "1 comment updated.",
  "success": true
}
```

## Delete a blog comment

`DELETE /api/2025-01/blog/comments/{id}`

Deletes the comment atomically with its audit record and delete webhook. This operation cannot be undone. `requested_count` and `count` are 1.

Scope: `write_blog`

```curl
curl -X DELETE 'https://api-store.tringify.com/api/2025-01/blog/comments/5ff7d4ea-3250-4a4d-9d26-07f64d917d31' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "code": "BLOG_COMMENT_DELETED",
  "data": {
    "count": 1,
    "ids": [
      "5ff7d4ea-3250-4a4d-9d26-07f64d917d31"
    ],
    "requested_count": 1
  },
  "message": "Comment deleted.",
  "success": true
}
```

## Bulk delete blog comments

`POST /api/2025-01/blog/comments/bulk-delete`

Deletes every selected comment atomically. If an id is invalid, missing, or belongs to another store, none are deleted. `requested_count` is the number of distinct ids sent and equals `count`.

Scope: `write_blog`

```curl
curl -X POST 'https://api-store.tringify.com/api/2025-01/blog/comments/bulk-delete' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "comment_ids": [
    "5ff7d4ea-3250-4a4d-9d26-07f64d917d31"
  ]
}'
```

Response:

```json
{
  "code": "BLOG_COMMENTS_DELETED",
  "data": {
    "count": 1,
    "ids": [
      "5ff7d4ea-3250-4a4d-9d26-07f64d917d31"
    ],
    "requested_count": 1
  },
  "message": "1 comment deleted.",
  "success": true
}
```

## Change matching blog comments

`POST /api/2025-01/blog/comments/bulk-operations`

Selects every blog comment matching `filter` when the request is made (at most 100000) and applies `action` to them in the background, in steps of at most the bulk limits (`bulk_update_max_items`, `bulk_delete_max_items`). Actions: `update_status` moderates each blog comment as Bulk moderate blog comments does; `delete` permanently deletes each blog comment as Bulk delete blog comments does. Returns HTTP 202 with the operation; poll Get blog comment bulk operation until its status is no longer queued. Blog Comments created or changed to match after the request are not included. A store runs one blog comment bulk operation at a time. Reusing `operation_id` with the same `action`, `filter` and `params` returns the existing operation; a different request returns 409.

Scope: `write_blog`

```curl
curl -X POST 'https://api-store.tringify.com/api/2025-01/blog/comments/bulk-operations' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "action": "delete",
  "filter": {
    "status": "spam"
  },
  "operation_id": "7f4ed2c8-2fa5-4c63-9d9b-7ac5366dc651"
}'
```

Response:

```json
{
  "success": true,
  "code": "BLOG_COMMENTS_BULK_DELETE_QUEUED",
  "message": "Deleting 1,200 comments in the background.",
  "data": {
    "operation": {
      "id": "7f4ed2c8-2fa5-4c63-9d9b-7ac5366dc651",
      "action": "delete",
      "status": "queued",
      "filter": {
        "status": "spam"
      },
      "params": {},
      "total": 1200,
      "processed": 0,
      "succeeded": 0,
      "failed": 0,
      "failures": [],
      "summary": "Deleting comments: 0 of 1200 done.",
      "created_at": "2026-11-22T10:00:00+05:30"
    }
  }
}
```

## Get blog comment bulk operation

`GET /api/2025-01/blog/comments/bulk-operations/{operationId}`

Use the operation UUID returned when queueing it, or `current` for the store's running operation (or, when none runs, its newest finished one not yet acknowledged). `status` is queued (running), completed, cancelled or failed. `processed` rises from 0 to `total` as the operation works through the blog comments it selected; `succeeded` and `failed` split it (blog comments the action leaves as they were count as succeeded). `failures` lists each blog comment the action could not change with its `code` and `reason` (NOT_FOUND when it was already gone); the first 500 are kept, `failed` counts them all. `summary` is the operation's state in the caller's language. A failed operation keeps what it had already done; `error` says why it stopped. Operations remain available for 30 days after they finish. `current` returns `operation: null` when there is nothing to show.

Scope: `write_blog`

```curl
curl 'https://api-store.tringify.com/api/2025-01/blog/comments/bulk-operations/7f4ed2c8-2fa5-4c63-9d9b-7ac5366dc651' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "success": true,
  "code": "BLOG_COMMENTS_BULK_DELETE_PARTIAL",
  "message": "1,199 comments deleted. 1 comment could not be deleted.",
  "data": {
    "operation": {
      "id": "7f4ed2c8-2fa5-4c63-9d9b-7ac5366dc651",
      "action": "delete",
      "status": "completed",
      "filter": {
        "status": "spam"
      },
      "params": {},
      "total": 1200,
      "processed": 1200,
      "succeeded": 1199,
      "failed": 1,
      "failures": [
        {
          "id": "3a588f80-fd8c-4d46-af1b-00a1c4a7f85a",
          "title": "",
          "code": "NOT_FOUND",
          "reason": "Not found"
        }
      ],
      "summary": "1,199 comments deleted. 1 comment could not be deleted.",
      "created_at": "2026-11-22T10:00:00+05:30",
      "finished_at": "2026-11-22T10:00:06+05:30"
    }
  }
}
```

## Cancel blog comment bulk operation

`POST /api/2025-01/blog/comments/bulk-operations/{operationId}/cancel`

Stops the operation; the step in progress is rolled back. Blog Comments already changed stay changed; the others are left as they were. Returns the operation with status cancelled.

Scope: `write_blog`

```curl
curl -X POST 'https://api-store.tringify.com/api/2025-01/blog/comments/bulk-operations/7f4ed2c8-2fa5-4c63-9d9b-7ac5366dc651/cancel' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "success": true,
  "code": "BLOG_COMMENTS_BULK_DELETE_CANCELLED",
  "message": "Stopped. 200 comments were deleted before you stopped; the others were kept.",
  "data": {
    "operation": {
      "id": "7f4ed2c8-2fa5-4c63-9d9b-7ac5366dc651",
      "action": "delete",
      "status": "cancelled",
      "filter": {
        "status": "spam"
      },
      "params": {},
      "total": 1200,
      "processed": 200,
      "succeeded": 200,
      "failed": 0,
      "failures": [],
      "summary": "Stopped. 200 comments were deleted before you stopped; the others were kept.",
      "created_at": "2026-11-22T10:00:00+05:30",
      "finished_at": "2026-11-22T10:00:04+05:30"
    }
  }
}
```

## Acknowledge blog comment bulk operation

`POST /api/2025-01/blog/comments/bulk-operations/{operationId}/acknowledge`

After presenting a finished result, acknowledge its UUID so `current` no longer returns it. It stays readable by UUID for 30 days. Repeating it is safe. A running operation cannot be acknowledged.

Scope: `write_blog`

```curl
curl -X POST 'https://api-store.tringify.com/api/2025-01/blog/comments/bulk-operations/7f4ed2c8-2fa5-4c63-9d9b-7ac5366dc651/acknowledge' \
  -H "Authorization: Bearer YOUR_STORE_API_TOKEN"
```

Response:

```json
{
  "success": true,
  "data": {
    "acknowledged": true
  }
}
```

## Fields

| Field | Type | Create | Update | Required | Translatable |
| --- | --- | --- | --- | --- | --- |
| `author_name` | string | No | No | - | No |
| `author_email` | string | No | No | - | No |
| `content` | string | No | No | - | No |
| `post_id` | string (UUID) | No | No | - | No |
| `post_title` | string | No | No | - | No |
| `customer_id` | string (UUID) | No | No | - | No |
| `status` | string | No | Yes | update | No |
| `status_display` | string | No | No | - | No |
| `created_at` | string (RFC 3339) | No | No | - | No |
| `deletes_at` | string (RFC 3339) | No | No | - | No |

## Webhook events

Subscribe to these events to keep your integration in sync with blog comments. Each event shows the required Store API scope and store permission, the available payload fields, and an example payload. Subscription setup is validated against those permissions; delivery is always restricted to the subscription's store.

## Blog comment received

Event: `blog_comments/create` · App scope: `read_blog` · Staff permission: `blog:write`

Fired when a shopper submits a blog comment (pending or approved per the store's moderation setting).

```json
{
  "blog_comment": {
    "author_name": "Avery Stone",
    "content": "Great update.",
    "created_at": "2026-09-01T12:00:00-04:00",
    "customer_id": null,
    "deletes_at": null,
    "id": "5ff7d4ea-3250-4a4d-9d26-07f64d917d31",
    "post_id": "3a588f80-fd8c-4d46-af1b-00a1c4a7f85a",
    "post_slug": "launch-notes",
    "post_title": "Launch notes",
    "status": "pending"
  }
}
```

## Blog comment updated

Event: `blog_comments/update` · App scope: `read_blog` · Staff permission: `blog:write`

Fired when a merchant changes a blog comment's moderation status.

```json
{
  "blog_comment": {
    "author_name": "Avery Stone",
    "content": "Great update.",
    "created_at": "2026-09-01T12:00:00-04:00",
    "customer_id": null,
    "deletes_at": "2026-10-01T12:00:00-04:00",
    "id": "5ff7d4ea-3250-4a4d-9d26-07f64d917d31",
    "post_id": "3a588f80-fd8c-4d46-af1b-00a1c4a7f85a",
    "post_slug": "launch-notes",
    "post_title": "Launch notes",
    "status": "spam"
  }
}
```

## Blog comment deleted

Event: `blog_comments/delete` · App scope: `read_blog` · Staff permission: `blog:write`

Fired when a merchant permanently deletes a blog comment, when deleting one or more parent posts cascades their comments, and when a spam or trash comment is deleted automatically 30 days after it got that status. The payload's deletes_at is null.

```json
{
  "blog_comment": {
    "author_name": "Avery Stone",
    "content": "Great update.",
    "created_at": "2026-09-01T12:00:00-04:00",
    "customer_id": null,
    "deletes_at": null,
    "id": "5ff7d4ea-3250-4a4d-9d26-07f64d917d31",
    "post_id": "3a588f80-fd8c-4d46-af1b-00a1c4a7f85a",
    "post_slug": "launch-notes",
    "post_title": "Launch notes",
    "status": "trash"
  }
}
```

