GET /v1/instagram/dm/conversations/{conversation_id}
Instagram DM conversation API: read messages and replies by id
Returns one Instagram DM conversation with every message, oldest first, including the person's replies. Send the conversation_id from the DM API answer; refresh=true reads Instagram for new replies first.
- Price
- $0.0005 per call
- Batch
- No
- Failed calls
- Not charged
Example request
curl
curl 'https://api.virev.ai/v1/instagram/dm/conversations/21?refresh=true' \
-H "Authorization: Bearer $VIREV_API_KEY"python
import os
import requests
response = requests.request(
"GET",
"https://api.virev.ai/v1/instagram/dm/conversations/21",
params={
"refresh": "true",
},
headers={"Authorization": f"Bearer {os.environ['VIREV_API_KEY']}"},
timeout=60,
)
response.raise_for_status()
print(response.json())Parameters
| Name | In | Type | Description |
|---|---|---|---|
conversation_id required | path | integer | The conversation id from the id field of the Send outreach answer. |
refresh | query | boolean | true first reads the Instagram inbox and saves the person’s new replies, so this answer shows them. It usually takes 1 to 10 seconds and costs $0.001. Leave it out to read the saved messages for $0.0005, with no Instagram call. |
Example response
The example response of the API reference.
json
{
"data": {
"id": 21,
"to": {
"handle": "rhino.29941499",
"user_id": "29826377850"
},
"state": "open",
"unanswered": 0,
"last_sent_at": "2026-10-29T20:56:30.276728+00:00",
"last_reply_at": "2026-10-29T20:58:35.973000+00:00",
"started_at": "2026-10-29T20:55:53.540810+00:00",
"updated_at": "2026-10-29T20:58:50.598868+00:00",
"messages": [
{
"id": 84,
"direction": "sent",
"text": "Hi! We're Glow Lab, a clean skincare brand. We love your morning routine videos and would like to send you our new Vitamin C serum, with no strings attached. Can we ship it to you?",
"status": "sent",
"client_token": "gifting-oct-01",
"sent_at": "2026-10-29T20:56:29.831581+00:00"
},
{
"id": 86,
"direction": "received",
"text": "Hi! Thank you, I'd love to try it. Do you ship to Seoul?",
"status": "received",
"client_token": null,
"sent_at": "2026-10-29T20:58:35.973000+00:00"
}
]
},
"meta": {
"cost": "$0.0005",
"balance": "$2.4438",
"request_id": "req_4fe88bd311b577410022869e159875a3"
}
}How it works
Returns one conversation with every message, oldest first, including the person’s replies.
Add refresh=true to read Instagram for new replies first. That call usually takes 1 to 10 seconds and costs $0.001, so call it when you want to look, not in a tight loop. Without it, you get the saved messages for $0.0005.
Errors
| Status | When |
|---|---|
400 | conversation_id is not a number, or refresh is not true or false. |
401 | Missing, malformed, or revoked API key. |
402 | Balance is too low for this request. |
404 | No conversation with this id belongs to your organization. Use the id from the Send outreach answer. You are not charged. |
409 | This conversation is closed, or your workspace has no paid credit. |
429 | Over the per-minute limit for your organization, or, with refresh=true, Instagram asked us to slow down. |
502 | Instagram blocked this call. You are not charged. Retry it. |
503 | The DM service cannot be reached or is updating, your workspace or our proxy provider is paused, or billing could not be confirmed. |