Conversational Messaging
When contacts reply to your messages, EZ Texting organizes the exchange into conversations — threaded, per-contact message histories that capture both inbound (from the contact) and outbound (from you) messages. Use the Conversations API to build inbox-style experiences, track reply activity, and manage conversation state.
List conversations
GET /v1/conversationsretrieves your conversations with pagination. Each conversation includes the contact's phone number, the most recent message, timestamps, and current state (read/unread, active/archived).
curl --request GET \
--url https://a.eztexting.com/v1/conversations \
--header 'accept: application/json' \
--user 'your_username:your_password'Read a conversation thread
Retrieve the full message history for a specific conversation with GET /v1/conversations/conversation/{userNumber}/{contactNumber}. Note the path uses your EZ Texting number and the contact's phone number (not an ID). Results include both inbound and outbound messages in chronological order.
# Read the message history for a conversation
# Path uses your number and the contact's number
curl --request GET \
--url "https://a.eztexting.com/v1/conversations/conversation/15550001111/15551234567?page=0&size=50" \
--header "Authorization: Basic $(echo -n 'your_username:your_password' | base64)"Manage conversation state
Conversations have two independent state dimensions: active vs. archived and read vs. unread. Archive resolved conversations to keep your inbox clean (the message history is preserved). Use read/unread to track which threads need attention.
# Archive a resolved conversation
curl --request POST \
--url "https://a.eztexting.com/v1/conversations/conversation/15550001111/15551234567/archive" \
--header "Authorization: Basic $(echo -n 'your_username:your_password' | base64)"
# Restore an archived conversation
curl --request POST \
--url "https://a.eztexting.com/v1/conversations/conversation/15550001111/15551234567/restore" \
--header "Authorization: Basic $(echo -n 'your_username:your_password' | base64)"
# Mark messages as read (pass an array of message IDs)
curl --request POST \
--url https://a.eztexting.com/v1/conversations/messages/read \
--header "Authorization: Basic $(echo -n 'your_username:your_password' | base64)" \
--header "Content-Type: application/json" \
--data '{"idList": ["msg_001", "msg_002", "msg_003"]}'
# Mark messages as unread (flag for follow-up)
curl --request POST \
--url https://a.eztexting.com/v1/conversations/messages/unread \
--header "Authorization: Basic $(echo -n 'your_username:your_password' | base64)" \
--header "Content-Type: application/json" \
--data '{"idList": ["msg_001"]}'State combinations
| State | Meaning |
|---|---|
| Active + Unread | New or needs attention — incoming message not yet reviewed |
| Active + Read | Reviewed, still open — being handled or awaiting response |
| Archived + Read | Resolved — conversation complete, moved out of active inbox |
| Archived + Unread | Flagged for later — archived but marked for revisit |
Replying to conversations
There is no separate "reply" endpoint. To reply within a conversation, send a transactional message via POST /v1/messageswith the contact's number in toNumbers. The reply is automatically threaded into the existing conversation. See Transactional Messaging.
Building a support inbox
The typical workflow for building an inbox with the Conversations API:
- Detect inbound messages — Subscribe to the
inbound_text.receivedwebhook event for real-time notifications. - List conversations — Call
GET /v1/conversationsto populate your inbox. - Read the thread — Load the full history when an agent opens a conversation. Mark it as read.
- Respond — Send a reply via
POST /v1/messages. It's automatically threaded. - Resolve — Archive the conversation to move it out of the active inbox.
- Reopen if needed — Restore with the
/restoreendpoint if the contact follows up.
Endpoints reference
| Endpoint | Method | Description |
|---|---|---|
/v1/conversations | GET | List conversations (paginated) |
/v1/conversations/conversation/{userNumber}/{contactNumber} | GET | Get messages in a conversation |
.../archive | POST | Archive a conversation |
.../restore | POST | Restore an archived conversation |
/v1/conversations/messages/read | POST | Mark messages as read (body: idList) |
/v1/conversations/messages/unread | POST | Mark messages as unread (body: idList) |
Error handling
| Status | Meaning | What to do |
|---|---|---|
400 | Bad Request | Check query parameters or phone number format. |
401 | Unauthorized | Credentials invalid or token expired. Refresh your token. |
404 | Not Found | The conversation doesn't exist for that number pair. |
429 | Rate Limited | 200 req/min exceeded. Wait for X-Rate-Limit-Retry-After-Milliseconds. |
500 | Server Error | Retry with exponential backoff. |
Next steps
- Transactional Messaging — Send 1:1 messages that start or continue conversations
- Marketing Campaigns — Send 1:many messages (replies become conversations)
- Contact Management — Manage the contacts behind your conversations
- Automations — Auto-respond to inbound messages with webhooks
- API Reference — Full interactive endpoint documentation