---
title: "Get all conversations within a date range"
description: "Returns conversations (grouped by contact) that had message activity\nwithin the specified date range. Designed for CRM integrations that need\nto pull \"all chat records from the day prior\" without knowing phone numbers.\n"
---

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

Path: Channel Automation API › Conversations

`GET /api/conversations/recent`

Returns conversations (grouped by contact) that had message activity
within the specified date range. Designed for CRM integrations that need
to pull "all chat records from the day prior" without knowing phone numbers.

## Authentication

Requires one of the following:

- `ApiKeyAuth`, apiKey, in header, header `X-API-Key`, format `API_KEY`
- `BearerAuth`, http, header `Authorization`, format `JWT`

## Query parameters

- `since` (`get/api/conversations/recent.query.since`; string, required) — Start of date range (ISO 8601 or YYYY-MM-DD). Inclusive.
  - format `date-time`
- `until` (`get/api/conversations/recent.query.until`; string, optional) — End of date range (ISO 8601 or YYYY-MM-DD). Defaults to now. Exclusive.
  - format `date-time`
- `format` (`get/api/conversations/recent.query.format`; string, optional) — Response format: - `default`: Simple text strings prefixed with "Agent:" or "Contact:" - `detailed`: Full message objects with timestamp, direction, channel, and body
  - one of `"default"`, `"detailed"`; default `"default"`
- `include_agent` (`get/api/conversations/recent.query.include_agent`; boolean, optional) — Include messages sent by human agents
  - default `true`
- `include_bot` (`get/api/conversations/recent.query.include_bot`; boolean, optional) — Include messages sent by automations (flows, sequences, keywords)
  - default `true`
- `limit` (`get/api/conversations/recent.query.limit`; integer, optional) — Maximum number of conversations (contacts) to return
  - min 1; max 200; default `50`
- `offset` (`get/api/conversations/recent.query.offset`; integer, optional) — Number of conversations to skip (for pagination)
  - min 0; default `0`

## Header parameters

- `X-Workspace-Id` (`get/api/conversations/recent.header.X-Workspace-Id`; string, required) — Workspace ID for data isolation

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://api.channelautomation.com/api/conversations/recent?since=2026-04-03' \
  --header 'X-API-Key: <X-API-Key>' \
  --header 'X-Workspace-Id: 15213'
```

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/conversations/recent?since=2026-04-03';
const options = {method: 'GET', headers: {'X-Workspace-Id': '15213', 'X-API-Key': '<X-API-Key>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.channelautomation.com/api/conversations/recent?since=2026-04-03"

headers = {
    "X-Workspace-Id": "15213",
    "X-API-Key": "<X-API-Key>"
}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Conversations retrieved successfully

### 400

Invalid request parameters

### 401

Authentication required

#### Example

```json
{
  "error": "Authentication required",
  "success": false
}
```

- `error` (`get/api/conversations/recent.response.401.error`; string, optional)
  - example `"Authentication required"`
- `success` (`get/api/conversations/recent.response.401.success`; boolean, optional)
  - example `false`

### 500

Internal server error

#### Example

```json
{
  "error": "Internal server error",
  "details": "string",
  "success": false
}
```

- `error` (`get/api/conversations/recent.response.500.error`; string, optional)
  - example `"Internal server error"`
- `details` (`get/api/conversations/recent.response.500.details`; string, optional)
- `success` (`get/api/conversations/recent.response.500.success`; boolean, optional)
  - example `false`


Source: https://developer.channelautomations.com/api/get-api-conversations-recent/index.md
