> ## 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 Conversation by Email

> Look up one customer record by email and return transcript status, summary, and signals.

## Endpoint

```bash theme={null}
GET https://api.thred.dev/v1/customers?email=<email>
```

## Authentication

Include your API key in the Authorization header:

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

## Query Parameters

| Parameter | Type   | Required | Description                  |
| --------- | ------ | -------- | ---------------------------- |
| `email`   | string | Yes      | The customer's email address |

## Response

### Processing Response

Returned while processing is still in progress:

```json theme={null}
{
  "status": "processing",
  "name": "Sarah Johnson",
  "email": "sarah@example.com",
  "company": "TechCorp",
  "platform": "chatgpt",
  "progress": 25
}
```

### Completed Response

Returned after processing completes:

```json theme={null}
{
  "status": "completed",
  "name": "Sarah Johnson",
  "email": "sarah@example.com",
  "company": "TechCorp",
  "platform": "chatgpt",
  "productsDiscussed": ["Starter", "Pro"],
  "insights": {
    "mainConcerns": [],
    "buyingSignals": [],
    "competitorsConsidered": []
  },
  "suggestions": ["Prioritize ROI proof points"],
  "summary": "Lead is evaluating integration depth and onboarding effort.",
  "conversation": [
    {
      "role": "user",
      "content": "How quickly can your team implement this?"
    },
    {
      "role": "assistant",
      "content": "We can usually launch in about two weeks."
    }
  ],
  "progress": 100,
  "link": "https://app.thred.ai/share/<customerId>"
}
```

## Error Responses

```json theme={null}
{
  "error": "Bad request",
  "message": "Email query parameter is required"
}
```

```json theme={null}
{
  "error": "Bad request",
  "message": "Invalid email format"
}
```

```json theme={null}
{
  "error": "Not found",
  "message": "Customer not found with this email"
}
```

```json theme={null}
{
  "error": "Not found",
  "message": "No chat data found for this customer"
}
```

## Examples

```bash theme={null}
curl -X GET "https://api.thred.dev/v1/customers?email=sarah@example.com" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```javascript theme={null}
const email = "sarah@example.com";
const response = await fetch(
  `https://api.thred.dev/v1/customers?email=${encodeURIComponent(email)}`,
  {
    method: "GET",
    headers: {
      Authorization: "Bearer YOUR_API_KEY"
    }
  }
);

const data = await response.json();
console.log(data.status, data.summary);
```
