Get a conversation
GET
/api/v2/conversations/{username_or_id}Returns one contact's messages. The first page has the newest messages; each further page goes back in time. Messages within a page are oldest first.
conversation has the same fields as on the contact object, plus has_unread and message_count, the number of messages included in messages.
Rate limit 300 requests per minute
Headers
x-api-keyheaderRequiredYour API key.
Content-Typeheaderapplication/json. Not needed for this request.
Path parameters
username_or_idstringRequiredInstagram username or contact id.
Query parameters
message_limitinteger1 to 100. Default 30.
pagestringThe
next_pagevalue from the previous response, to load older messages.fieldsstringContact details:
basic(default) orfull.
Errors
| Error | When |
|---|---|
400 invalid_message_limitinvalid_fieldsinvalid_page | A query parameter has a value that is not allowed. |
404 contact_not_found | No contact with that username or id in your organization. |
curl "https://app.dmtracker.ai/api/v2/conversations/jane.fitness?message_limit=50" \
-H "x-api-key: $DMTRACKER_API_KEY" \
-H "Content-Type: application/json"{
"status": "success",
"data": {
"contact": {
"id": "7c1e9a52-3f4b-4d2a-9e61-0b8f2d5c4a17",
"username": "jane.fitness",
"full_name": "Jane Cooper",
"profile_picture": null
},
"conversation": {
"last_message_at": "2026-10-21T15:14:50.000+00:00",
"last_message_from": "user",
"last_message": "Happy to help! Want me to send you the program details?",
"last_contact_message_at": "2026-10-21T15:12:47.000+00:00",
"first_contact_message_at": "2026-10-21T15:12:47.000+00:00",
"can_reply": false,
"reply_window_expires_at": "2026-10-22T15:12:47.000+00:00",
"has_unread": false,
"message_count": 2
},
"messages": [
{
"id": 23686,
"from": "contact",
"sent_by": null,
"text": "Hi! How much is the coaching program?",
"preview": "Hi! How much is the coaching program?",
"message_type": "text",
"media": null,
"reaction_emoji": null,
"template_buttons": null,
"is_reply": false,
"sent_at": "2026-10-21T15:12:47.000+00:00"
},
{
"id": 23687,
"from": "user",
"sent_by": "alex@yourcompany.com",
"text": "Happy to help! Want me to send you the program details?",
"preview": "Happy to help! Want me to send you the program details?",
"message_type": "text",
"media": null,
"reaction_emoji": null,
"template_buttons": null,
"is_reply": false,
"sent_at": "2026-10-21T15:14:50.000+00:00"
}
]
},
"has_more": false,
"next_page": null
}