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

# Get Recent Conversations

> Pull the latest customer conversations with optional platform and time-window filters.

## Endpoint

```bash theme={null}
GET https://api.thred.dev/v1/customers/recent
```

## Authentication

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

## Query Parameters

All filters are optional.

| Parameter   | Type   | Description                                                        |
| ----------- | ------ | ------------------------------------------------------------------ |
| `limit`     | number | Positive integer max result count                                  |
| `platforms` | string | Comma-separated values from: `chatgpt`, `gemini`, `pplx`, `claude` |
| `startDate` | number | Start timestamp (Unix milliseconds)                                |
| `endDate`   | number | End timestamp (Unix milliseconds)                                  |

## Response

Returns an array of conversation objects in the same schema as email/ID lookup:

```json theme={null}
[
  {
    "status": "completed",
    "name": "Sarah Johnson",
    "email": "sarah@example.com",
    "company": "TechCorp",
    "platform": "chatgpt",
    "summary": "Lead is comparing migration complexity between vendors.",
    "conversation": [
      {
        "role": "user",
        "content": "What would migration effort look like?"
      },
      {
        "role": "assistant",
        "content": "We need low-risk rollout and strong implementation support."
      }
    ],
    "progress": 100,
    "link": "https://app.thred.ai/share/<customerId>"
  }
]
```

## Error Responses

```json theme={null}
{
  "error": "Bad request",
  "message": "Limit must be a positive integer"
}
```

```json theme={null}
{
  "error": "Bad request",
  "message": "Invalid platform(s): foo. Must be one of: chatgpt, gemini, pplx, claude"
}
```

```json theme={null}
{
  "error": "Bad request",
  "message": "startDate must be a valid unix timestamp (milliseconds)"
}
```

```json theme={null}
{
  "error": "Bad request",
  "message": "endDate must be a valid unix timestamp (milliseconds)"
}
```

```json theme={null}
{
  "error": "Not found",
  "message": "No customers found"
}
```

## Examples

```bash theme={null}
curl -X GET "https://api.thred.dev/v1/customers/recent?limit=20&platforms=chatgpt,gemini" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```javascript theme={null}
const params = new URLSearchParams({
  limit: "20",
  platforms: "chatgpt,claude",
  startDate: String(Date.now() - 7 * 24 * 60 * 60 * 1000)
});

const response = await fetch(
  `https://api.thred.dev/v1/customers/recent?${params.toString()}`,
  {
    headers: { Authorization: "Bearer YOUR_API_KEY" }
  }
);

const data = await response.json();
console.log(data.length);
```
