💬 SalesByte

Conversations

List conversations and fetch message history via the API.

List conversations

GET /api/v1/conversations

Query parameters

ParamDescription
statusFilter by status (open, done)
unreadSet to true to show only unread conversations
limitMax results (default 20)

Example

curl "https://app.salesbyte.in/api/v1/conversations?unread=true&limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "success": true,
  "conversations": [
    {
      "id": "abc-123",
      "contact": {
        "id": "def-456",
        "name": "Rahul Sharma",
        "phone": "+919876543210"
      },
      "last_message": "I am interested in the offer",
      "last_message_at": "2026-06-20T10:30:00Z",
      "unread_count": 2,
      "status": "open"
    }
  ]
}

Get messages in a conversation

GET /api/v1/conversations/:id/messages

Returns the message history for a conversation, newest first.

Example

curl "https://app.salesbyte.in/api/v1/conversations/abc-123/messages" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "success": true,
  "messages": [
    {
      "id": "msg-789",
      "body": "I am interested in the offer",
      "from_contact": true,
      "delivery": "read",
      "created_at": "2026-06-20T10:30:00Z"
    }
  ]
}

On this page