Instagram DM API: receive DMs and reply from your own product
The Instagram DM API brings Instagram messages into a SaaS, CRM, or support product. Each incoming DM reaches your webhook, and your backend can load the full thread and answer it through bundle.social.
Last updated: November 2026
Official APIsDirect engineer support
{ "type": "conversation.message.created", "data": { "id": "msg_123", "conversationId": "conv_123", "teamId": "team_123", "socialAccountId": "sa_instagram_1", "platform": "INSTAGRAM", "direction": "INBOUND", "status": "DELIVERED", "source": "DM", "externalMessageId": "ig_mid_example_1", "text": "Hi! Do you ship to Poland?", "attachments": [], "sentAt": "2026-09-26T09:30:00.000Z", "failedAt": null, "seenAt": null, "error": null, "platformData": { "isEcho": false, "replyTo": null, "storyReply": null }, "createdAt": "2026-09-26T09:30:01.000Z", "updatedAt": "2026-09-26T09:30:01.000Z" }}- customers
- 17,242+
- connected accounts
- 1.09m+
- uptime
- 99.881%
- Trustpilot
- 4.8 / 5
What your product can do with Instagram messages
Conversation history
Messages come grouped by conversation and tagged with the connected social account and its team, so your application always shows each thread in the right place.
Message webhooks
A webhook fires for every incoming message. Your inbox or CRM updates as messages arrive, with no polling of individual conversations.
Replies within Meta's rules
Replies sent through the API still follow the account's permissions and Meta's messaging rules for that conversation, including the 24-hour reply window.
How the Instagram DM API works
- 01
Connect the Instagram account
Connect a Business or Creator account and grant the messaging permissions Meta asks for. An account connected earlier without them has to reconnect. - 02
Enable messaging
Turn messaging on for the connected account. Authorizing the account does not do this for you; it is a separate step. - 03
Receive messages and reply
Your backend handles each message webhook and loads the conversation if it needs more context. It can reply while Meta's reply window is open.
Example
Build an Instagram inbox or CRM integration
Most teams send an incoming Instagram DM to one place first: a ticket in their helpdesk or a lead in their CRM. bundle.social delivers every message with the connected account and team attached, so your code knows which customer it belongs to before it decides where it goes.
Meta's messaging API only works with professional Instagram accounts, meaning Business and Creator accounts, so personal accounts cannot use it. You can connect an account with Instagram Login or through the Facebook Page it is linked to. Messaging works with either method.
bundle.social asks for Meta's messaging permissions only when the connect link sets withMessagingScope: instagram_business_manage_messages with Instagram Login, or pages_messaging and instagram_manage_messages for an account connected through its Page. Meta grants these permissions only on its own login screen, so an account connected without them has to reconnect. Connecting never starts DM processing by itself: after reconnecting, the customer enables messaging for each account. The Allow access to messages setting in the Instagram app also has to be on.
Meta sets the reply rules. A person has to message the account first, and bundle.social sends free-form replies only within 24 hours of that person's last message. If the conversation started with a private reply to a comment, it stays closed until the person writes back. Phone buttons do not work in Instagram DMs, and a heart is the one reaction the API can send.
| Step | What your backend does |
|---|---|
| 1. Receive the webhook | bundle.social sends conversation.message.created to your endpoint. Read data.id, data.conversationId, and data.text, then answer with a 2xx status within 15 seconds. |
| 2. Load the conversation | GET /api/v1/conversations/conv_123 returns the participant, the connected account, and platformData.lastInboundAt. If your logic needs earlier messages, GET /api/v1/conversations/conv_123/messages returns the thread. |
| 3. Send the reply | POST /api/v1/conversations/conv_123/messages with {"content": {"text": "Yes, we ship to Poland."}, "replyToMessageId": "msg_123"} |
| 4. Track delivery | The response holds the sent message and its status. Later status changes for that message arrive as conversation.message.updated. |
The IDs in this walkthrough match the webhook event at the top of the page, so you can follow one DM from arrival to reply. Before step 3, compare platformData.lastInboundAt with the current time: after 24 hours Meta no longer accepts a free-form reply. The reply body can also carry quick replies, buttons, attachments, or a carousel, as the sending messages guide explains.
Example: the webhook event for an incoming Instagram DM
Each new Instagram DM triggers a conversation.message.created event to your webhook endpoint. Its data object matches the message shape the conversations API returns.
Respond to each event with a 2xx status within 15 seconds and do the processing afterwards. bundle.social keeps messages for 30 days, so store any payload you need for longer. Status changes, edits, and unsends arrive as conversation.message.updated.
Webhook event: conversation.message.createdRead the DM webhooks guide
Getting started
Start with one connected account
Supported accounts and limits
- Messaging needs a Business or Creator account with Meta's messaging permissions granted, and every reply follows Meta's messaging rules.
- Unsolicited bulk DM campaigns are not possible, since a person has to message the account before it can reply.
- Quick replies, attachments, and other rich formats behave differently per platform. Phone buttons, for example, are rejected on Instagram.
- Under the bundle.social retention policy, Instagram messages are kept for 30 days. If you need a longer history, store webhook events in your own system.
- Data retention policy
FAQ
Questions developers ask before building
Is the Instagram DM API available now?
Is this also an Instagram Messaging API?
Do existing Instagram accounts need to reconnect?
Can a public comment start a private conversation?
How do I reply to an Instagram DM through the API?
conversation.message.created webhook and send POST /api/v1/conversations/:id/messages with the reply in content.text. Set replyToMessageId to the incoming message ID if you want the reply linked to it. The request succeeds only while the 24-hour window from the person's last message is open.Can I use it for an AI reply assistant?
Which plans include DMs and automations?
How long are messages and automation logs kept?
Add Instagram messaging to your product
Connect one account and send yourself a test DM.Message and automation allowances on paid plans are counted per connected account.