Conversations API
List, retrieve, and manage chat conversations.
List Conversations
GET /v1/conversations
curl -X GET "https://api.chatmefy.com/v1/conversations?limit=20" \
-H "Authorization: Bearer YOUR_API_KEY"
# Response
{
"data": [
{
"id": "conv_abc123",
"bot_id": "bot_xyz",
"status": "active",
"visitor": {
"email": "john@company.com",
"name": "John Smith"
},
"messages_count": 12,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:45:00Z"
}
],
"meta": {
"total": 1250,
"page": 1,
"per_page": 20
}
}Query Parameters
limit integer Results per page (1-100, default 20)
page integer Page number (default 1)
status string Filter by status: active, ended, handoff
bot_id string Filter by specific bot
since ISO8601 Filter by created date
Get Single Conversation
GET /v1/conversations/:id
curl -X GET "https://api.chatmefy.com/v1/conversations/conv_abc123" \
-H "Authorization: Bearer YOUR_API_KEY"
# Response includes full conversation with messages
{
"data": {
"id": "conv_abc123",
"bot_id": "bot_xyz",
"status": "ended",
"visitor": {...},
"messages": [
{
"id": "msg_1",
"role": "bot",
"content": "Hello! How can I help you?",
"created_at": "2024-01-15T10:30:00Z"
},
{
"id": "msg_2",
"role": "user",
"content": "I have a question about pricing",
"created_at": "2024-01-15T10:30:15Z"
}
],
"lead": {...},
"metadata": {...}
}
}End Conversation
POST /v1/conversations/:id/end
curl -X POST "https://api.chatmefy.com/v1/conversations/conv_abc123/end" \
-H "Authorization: Bearer YOUR_API_KEY"
# Response
{
"data": {
"id": "conv_abc123",
"status": "ended",
"ended_at": "2024-01-15T10:45:00Z"
}
}