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

# GET /v1/replies — List and Filter Classified Replies

> GET /v1/replies — Returns classified inbound replies for your workspace. Filter by campaign ID to scope results to a specific campaign.

When a lead responds to one of your outbound sequences, Leadterra automatically classifies the reply and surfaces it through this endpoint. Each reply object includes the sender's email, the campaign it belongs to, a classification label (such as `interested` or `out_of_office`), a snippet of the thread, and the timestamp it was received. You can retrieve all replies across your workspace or narrow the results to a single campaign using the `campaignId` query parameter.

## Endpoint

```bash theme={null}
GET /v1/replies
```

## Authorization

All requests must include a valid API key in the `Authorization` header as a Bearer token.

```bash theme={null}
Authorization: Bearer sk_live_YOUR_KEY
```

## Query Parameters

<ParamField query="campaignId" type="string">
  When provided, the response is filtered to include only replies associated with the specified campaign. Omit this parameter to retrieve replies across all campaigns in your workspace.
</ParamField>

## Example Request

```bash theme={null}
curl -G https://app.leadterra.co/v1/replies \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  --data-urlencode "campaignId=camp_123"
```

## Response Fields

The response is an array of reply objects. Each object contains the following fields:

<ResponseField name="id" type="string">
  The unique identifier for this reply.
</ResponseField>

<ResponseField name="email" type="string">
  The email address of the lead who sent the reply.
</ResponseField>

<ResponseField name="campaignId" type="string">
  The ID of the campaign that generated the outbound thread this reply belongs to.
</ResponseField>

<ResponseField name="classification" type="string">
  Leadterra's automated classification of the reply intent. Possible values:

  * `interested` — the lead has expressed positive intent or requested more information.
  * `not_interested` — the lead has declined or asked to stop outreach.
  * `out_of_office` — an automated out-of-office or vacation reply was detected.
  * `bounce` — the message could not be delivered and generated a delivery failure notice.
  * `unsubscribe` — the lead explicitly requested removal from future emails.
</ResponseField>

<ResponseField name="receivedAt" type="string">
  ISO 8601 timestamp indicating when the reply was received by Leadterra.
</ResponseField>

<ResponseField name="threadSnippet" type="string">
  A short excerpt from the reply body, suitable for displaying in a list view or feeding into a downstream agent prompt.
</ResponseField>

## Example Response

```json theme={null}
[
  {
    "id": "rpl_001",
    "email": "ava@example.com",
    "campaignId": "camp_123",
    "classification": "interested",
    "receivedAt": "2025-06-10T14:22:00Z",
    "threadSnippet": "Hi, this looks really interesting — can you send over more details on pricing?"
  },
  {
    "id": "rpl_002",
    "email": "ben@example.com",
    "campaignId": "camp_123",
    "classification": "out_of_office",
    "receivedAt": "2025-06-10T15:05:00Z",
    "threadSnippet": "I'm currently out of the office until June 17th. I'll respond when I return."
  }
]
```

<Tip>
  **Prefer webhooks over polling.** If you're building an agent or automation that needs to react to replies in real time, register a webhook for the `reply.received` event instead of repeatedly polling this endpoint. See the [Webhooks](/api-reference/webhooks) reference for setup instructions. Use `GET /v1/replies` for on-demand lookups, dashboards, or back-filling historical data.
</Tip>

## Error Codes

| Code  | Meaning                                                                              |
| ----- | ------------------------------------------------------------------------------------ |
| `400` | Bad Request — a query parameter is malformed or contains an invalid value.           |
| `401` | Unauthorized — your API key is missing, invalid, or revoked.                         |
| `404` | Not Found — no campaign exists for the provided `campaignId` in your workspace.      |
| `422` | Unprocessable Entity — the request could not be processed due to a validation error. |
