Coop
API Reference

Conversations

List conversations, view message threads, and look up by participant.

GET /api/v1/conversations

List conversations, ordered by most recent activity.

Query parameters

ParameterTypeDefaultDescription
searchstringFilter by participant name, phone, or email
pagenumber1Page number
limitnumber20Results per page

Response 200

{
  "data": [
    {
      "id": "conv_123",
      "participant": "+15551234567",
      "participantName": "Jane Smith",
      "lastMessage": "Thanks, see you then!",
      "lastMessageAt": "2025-01-15T14:22:00Z",
      "unreadCount": 0,
      "isGroup": false
    }
  ],
  "pagination": { "page": 1, "limit": 20, "total": 48, "totalPages": 3 }
}

GET /api/v1/conversations/:id

Get a conversation and its messages.

Query parameters

ParameterTypeDefaultDescription
pagenumber1Page of messages within the conversation
limitnumber20Messages per page

GET /api/v1/conversations/lookup

Find a conversation by participant.

Query parameters

ParameterTypeRequiredDescription
participantstringYesPhone number or email

Response 200

Returns the matching conversation, or 404 if none exists.

On this page