Conversations

WhatsApp and chat messaging interactions. Retrieve conversation history, messages, and metadata for your communication channels.

Endpoints

MethodEndpointDescriptionScope
GET/conversationsList conversations with filtersconversations:read
GET/conversations/{id}Get a single conversation by IDconversations:read
GET/conversations/{id}/messagesGet all messages in a conversationconversations: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

ParameterTypeDescription
channelIdstringFilter by channel ID
campaignIdstringFilter by campaign ID
statusstringFilter by conversation status
dateFromISO 8601Start date for date range filter
dateToISO 8601End date for date range filter
pageintegerPage number (default: 1)
pageSizeintegerItems 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