> For the complete documentation index, see [llms.txt](https://docs.clearfeed.ai/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clearfeed.ai/api/reference/api-reference/quick-replies.md).

# Quick Replies

List and create the Quick Replies configured for your account. To import a large set of Quick Replies, for example from a spreadsheet, call the create endpoint once per Quick Reply.

{% hint style="info" %}
`POST` requests require an API token with **Read & Write** scope. `GET` requests work with a **Read-only** token. See the [Authentication Guide](/api/quick-start/authentication-guide.md) for how to generate a token.
{% endhint %}

## Quick Reply Object

Quick Replies are represented as JSON objects with the following properties:

<table data-full-width="true"><thead><tr><th width="250">Name</th><th width="150">Type</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td>number</td><td>The ID of the Quick Reply.</td></tr><tr><td>name</td><td>string</td><td>The name of the Quick Reply. Unique within the account.</td></tr><tr><td>message</td><td>string</td><td>The content of the Quick Reply, in HTML.</td></tr><tr><td>is_available_to_all_collections</td><td>boolean</td><td>Whether the Quick Reply is available in all current and future collections.</td></tr><tr><td>collection_ids</td><td>number array</td><td>IDs of the collections the Quick Reply is available in. Empty when <code>is_available_to_all_collections</code> is <code>true</code>. See <a href="/api/reference/api-reference/collections.md#get-collections">Get Collections</a>.</td></tr><tr><td>created_at</td><td>string</td><td>The timestamp when the Quick Reply was created.</td></tr><tr><td>updated_at</td><td>string</td><td>The timestamp when the Quick Reply was last updated.</td></tr></tbody></table>

## Get Quick Replies

<mark style="color:blue;">`GET`</mark> `https://api.clearfeed.app/v1/rest/quick-replies`

Returns all Quick Replies in the account.

{% tabs %}
{% tab title="200: OK" %}

```json
{
  "quick_replies": [
    {
      "id": 1,
      "name": "Greeting",
      "message": "<p>Hi there, thanks for reaching out!</p>",
      "is_available_to_all_collections": true,
      "collection_ids": [],
      "created_at": "2026-10-04T21:54:39.757Z",
      "updated_at": "2026-10-04T21:54:39.757Z"
    },
    {
      "id": 2,
      "name": "Refund Policy",
      "message": "<p>Refunds are processed within <b>5 business days</b>.</p>",
      "is_available_to_all_collections": false,
      "collection_ids": [1, 2],
      "created_at": "2026-10-04T21:54:40.053Z",
      "updated_at": "2026-10-04T21:54:40.053Z"
    }
  ]
}
```

{% endtab %}

{% tab title="403: Forbidden" %}

```json
{
  "message": "Forbidden resource",
  "error": "FORBIDDEN"
}
```

{% endtab %}
{% endtabs %}

## Create a Quick Reply

<mark style="color:blue;">`POST`</mark> `https://api.clearfeed.app/v1/rest/quick-replies`

Creates a single Quick Reply.

### Request Body

| Name                                                                  | Type         | Description                                                                                                                                                                                                       |
| --------------------------------------------------------------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name<mark style="color:red;">\*</mark>                                | string       | Quick Reply name, up to 255 characters. Must be unique within the account. Only alphanumeric characters, spaces, apostrophes, underscores, and hyphens are allowed.                                               |
| message<mark style="color:red;">\*</mark>                             | string       | The content of the Quick Reply, in HTML (e.g. `<p>Hello</p>`). Plain text is rejected.                                                                                                                            |
| is\_available\_to\_all\_collections<mark style="color:red;">\*</mark> | boolean      | Set to `true` to make the Quick Reply available in all current and future collections.                                                                                                                            |
| collection\_ids<mark style="color:red;">\*</mark>                     | number array | IDs of the collections to make the Quick Reply available in (see [Get Collections](/api/reference/api-reference/collections.md#get-collections)). Must be empty when `is_available_to_all_collections` is `true`. |

### Example cURL Request

```bash
curl --location 'https://api.clearfeed.app/v1/rest/quick-replies' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
  "name": "Refund Policy",
  "message": "<p>Refunds are processed within <b>5 business days</b>.</p>",
  "is_available_to_all_collections": false,
  "collection_ids": [1, 2]
}'
```

{% tabs %}
{% tab title="201: Created" %}

```json
{
  "quick_reply": {
    "id": 2,
    "name": "Refund Policy",
    "message": "<p>Refunds are processed within <b>5 business days</b>.</p>",
    "is_available_to_all_collections": false,
    "collection_ids": [1, 2],
    "created_at": "2026-10-04T21:54:40.053Z",
    "updated_at": "2026-10-04T21:54:40.053Z"
  }
}
```

{% endtab %}

{% tab title="400: Bad Request" %}
Returned when a collection ID doesn't exist in the account, when `message` isn't HTML, or when `is_available_to_all_collections` is `true` and `collection_ids` isn't empty.

```json
{
  "message": "Collections not found: 999",
  "error": "BAD_REQUEST"
}
```

{% endtab %}

{% tab title="403: Forbidden" %}

```json
{
  "message": "This API token has read-only access and cannot perform write operations.",
  "error": "FORBIDDEN"
}
```

{% endtab %}

{% tab title="409: Conflict" %}

```json
{
  "message": "A Quick Reply with this name already exists. Please try a different name.",
  "error": "CONFLICT"
}
```

{% endtab %}
{% endtabs %}

### Notes

* Leading and trailing spaces in `name` are trimmed, and `message` is sanitized before it is saved.
* These operations are recorded in [audit logs](/api/reference/api-reference/audit-logs.md) as `Listed quick replies` and `Created quick reply` under the `QuickReply` resource type.
