Conversations
WhatsApp and chat messaging interactions. Retrieve conversation history, messages, and metadata for your communication channels.
Endpoints
| Method | Endpoint | Description | Scope |
|---|---|---|---|
| GET | /conversations | List conversations with filters | conversations:read |
| GET | /conversations/{id} | Get a single conversation by ID | conversations:read |
| GET | /conversations/{id}/messages | Get all messages in a conversation | conversations:read |
PII Masking
The GET /conversations/{id}/messages endpoint supports the X-Exclude-PII: true header to automatically mask phone numbers and other personally identifiable information in the response.
Query Parameters
Available filters for GET /conversations
| Parameter | Type | Description |
|---|---|---|
| channelId | string | Filter by channel ID |
| campaignId | string | Filter by campaign ID |
| status | string | Filter by conversation status |
| dateFrom | ISO 8601 | Start date for date range filter |
| dateTo | ISO 8601 | End date for date range filter |
| page | integer | Page number (default: 1) |
| pageSize | integer | Items per page (default: 25, max: 100) |
Example Requests
List conversations for a channel:
curl https://api.auralytik.com/v1/conversations?channelId=ch_whatsapp&page=1&pageSize=10 \ -H "Authorization: Bearer YOUR_API_KEY"
Get messages with PII masking:
curl https://api.auralytik.com/v1/conversations/conv_123/messages \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "X-Exclude-PII: true"
Example Response
{
"data": [
{
"id": "conv_123",
"channelId": "ch_whatsapp",
"campaignId": "camp_456",
"status": "completed",
"participantCount": 2,
"messageCount": 14,
"startedAt": "2024-01-15T10:30:00Z",
"endedAt": "2024-01-15T10:45:22Z",
"createdAt": "2024-01-15T10:30:00Z"
}
],
"page": 1,
"pageSize": 10,
"totalCount": 523
}Messages Response
With X-Exclude-PII: true:
{
"conversationId": "conv_123",
"messages": [
{
"id": "msg_001",
"role": "customer",
"content": "Hi, I need help with my account ending in ****",
"timestamp": "2024-01-15T10:30:00Z"
},
{
"id": "msg_002",
"role": "agent",
"content": "Of course! I'd be happy to help. Let me look that up.",
"timestamp": "2024-01-15T10:30:15Z"
}
]
}More conversation features coming soon
Real-time conversation streaming, message search, and conversation tagging APIs are being developed.
Request API Access