> ## Documentation Index
> Fetch the complete documentation index at: https://help.suggix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# New Comments Trigger

> Retrieve recent comments in a Suggix workspace for a Zapier trigger.

## `GET /triggers/new-comments`

Returns recent, non-spam comments in the API key's workspace, newest first. The endpoint only checks comments created in the last 30 days.

### Query parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `post_id` | integer | No | Only return comments on this post. Must be a positive integer. |
| `limit` | integer | No | Maximum number of results, from 1 to 100. Defaults to 100 when omitted or invalid. |

### Request

```http theme={null}
GET https://www.suggix.com/v1/triggers/new-comments?post_id=367&limit=10
Authorization: Bearer sgx_api_your_key
```

### Successful response

`200 OK` returns an array of comment objects. An empty array means no matching comments were found in the lookback period.

```json theme={null}
[
  {
    "id": 432,
    "workspace_id": 7,
    "post_id": 367,
    "creator_id": 14,
    "reply_id": null,
    "root_reply_id": null,
    "text": "This would be useful for our team.",
    "is_pinned": false,
    "is_spam": false,
    "attachment": "",
    "likes": 0,
    "reply_count": 0,
    "creator_name": "Alex",
    "creator_email": "alex@example.com",
    "creator_photo_url": "https://example.com/avatar.png",
    "creator_is_admin": false,
    "liked": false,
    "created_at": 1791609328738,
    "updated_at": 1791609328738
  }
]
```

### Response fields

| Field | Type | Description |
| - | - | - |
| `id`, `workspace_id`, `post_id`, `creator_id` | integer | Comment, workspace, post, and creator identifiers. |
| `reply_id`, `root_reply_id` | integer or `null` | Parent comment and root comment identifiers for replies. |
| `text` | string | Comment text. |
| `is_pinned`, `is_spam` | boolean | Comment flags. Spam comments are excluded from this trigger. |
| `attachment` | string | Attachment data; empty when there is no attachment. |
| `likes`, `reply_count` | integer | Like and reply counts. `reply_count` may be omitted when zero. |
| `creator_name`, `creator_email`, `creator_photo_url` | string | Creator details; optional values may be omitted. |
| `creator_is_admin` | boolean | Whether the creator is a workspace administrator; may be omitted when false. |
| `reply_creator_name`, `reply_creator_email`, `reply_creator_photo_url` | string or `null` | Details about the author of the comment being replied to; included when applicable. |
| `reply_creator_is_admin` | boolean or `null` | Whether that parent comment's creator is an administrator. |
| `liked` | boolean | Whether the API key owner has liked this comment. |
| `created_at`, `updated_at` | integer | Unix timestamps in milliseconds. |
| `deleted_at` | integer | Deletion timestamp in milliseconds; omitted when not deleted. |

### Errors

| HTTP status | Response | Cause |
| - | - | - |
| `400` | `{"error":"invalid post_id"}` | `post_id` is not a positive integer. |
| `401` | `{"error":"invalid or missing API key"}` | The API key is absent or invalid. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.