Instagram DM API
Instagram DM API with an AI Agent
Your AI Connector is an Instagram DM API: send and receive Instagram direct messages from your app, let an AI agent answer them, and get each DM as a signed webhook. One key also covers WhatsApp, Messenger, SMS, Telegram, email, web chat, LINE, Viber, iMessage, Skool, LinkedIn, TikTok and Discord.
- Instagram DMs
- Messenger
- SendPOST /contacts/send
- Receivesigned webhooks
curl https://api.youraiconnector.com/v1/contacts/send \
-X POST \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"channel": "instagram",
"instagram_id": "17841400000000000",
"body": "Thanks for your message!"
}'{
"success": true,
"message_id": "aB3dE5fG7hI9jK1lM2nO",
"contact_id": "contact123",
"channel": "instagram"
}Answer Every Instagram DM with an Agent
Most DMs are the same handful of questions: price, availability, where you are, can I book. An agent created from your website answers them in the brand's voice, asks the qualifying questions and books the appointment, and a person can take over any chat from the inbox.
- Create the agent with
POST /agents. - Connect the Instagram account.
- Route Instagram to the agent.
- Subscribe to
new_messagewebhooks to sync DMs into your own system.
curl https://api.youraiconnector.com/v1/entry-points/channel-defaults \
-X PUT \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
-d '{ "channel": "instagram", "agent_id": "ag7HkQ2ZpLxR3mNb" }'{ "entry_point_id": "Xq81bTz0RkLm4Vw2" }/agentsCreate the agent/contacts/sendReply to a DM/webhooksSync every DMBuilt for Products and Platforms
Each DM becomes a contact you can tag, list, move through a pipeline as a deal, or hand a task to a person. Platforms run Instagram on an account per customer with sub_account_id and scoped keys. Read more on the multi-account API and the comparison with Unipile.
/contactsEvery DM is a contact/dealsMove it through a pipeline/tasksHand work to a person/subaccountsAn account per customerFAQ
Instagram DM API Questions
Is there an API for Instagram DMs?
Yes. Your AI Connector sends Instagram DMs with POST /contacts/send using channel: "instagram" and the instagram_id, and delivers incoming DMs to your server as signed webhooks.
Can an AI agent reply to Instagram DMs?
Yes. Route Instagram to an agent with PUT /entry-points/channel-defaults and it answers new conversations, qualifies leads and books appointments.
Which Instagram accounts can I connect?
Connect the business's Instagram account in the app or over the API; the connection is made on the account owner's consent screen.
Does it also handle Messenger?
Yes. Messenger is a separate channel on the same API and the same agent can answer both.
Can I manage Instagram DMs from Claude or ChatGPT?
Yes, through the MCP server at https://mcp.youraiconnector.com/mcp. Add it as a custom connector and sign in, or use your key from Claude Code.
Get Instagram DM API Access
Tell us what you are building and we reply by email with access.