Developer docs

IotaBot Instagram API

Every DM and comment on your webhook. Reply from your code.

Get an API key

Instagram API documentation

Automate Instagram DMs and comments across every account you connected.

  • Every DM and comment on your webhook
  • Reply to DMs with text, images, video and audio
  • Answer comments publicly — no time limit
  • Hand conversations to your team
  • Test mode that never sends
Instagram lets businesses reply only: the customer writes first, and DM replies go within 24 hours of their last message.
  1. Connect your Instagram professional account in IotaBot.
  2. Create an API key with messages:send and a webhook endpoint.
  3. Reply when a DM arrives:
POST/v1/messagesmessages:sendThe API key needs the messages:send permission. Without it the call is refused with 403 insufficient_scope.Sign in to try

Reply to a DM

Request
curl -X POST "https://api.iotabot.com/v1/messages" \
  -H "Authorization: Bearer $IOTABOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "conversation_id": "6a4b9e21c3f1a2b3c4d5e6f7",
  "text": "Yes, it comes in blue!"
}' \
  -H "Idempotency-Key: order-1042-shipped"
Response · 202
{
  "data": {
    "id": "6a4ba0f1c3f1a2b3c4d5e733",
    "object": "message",
    "status": "queued",
    "channel": "instagram",
    "conversation_id": "6a4b9e21c3f1a2b3c4d5e6f7",
    "created_at": "2026-10-01T09:16:10.004Z"
  }
}
Errors
window_closedconversation_closedintegration_pausedprivate_reply_expiredprivate_reply_usedrecipient_opted_outunsupported_attachmentfile_already_usedattachments_too_largeapi_quota_exceededidempotency_key_reusedidempotency_in_progress
Retries are safe with an Idempotency-Key header. Give each message its own key (e.g. order-1042-shipped) and reuse it when you retry — a request with a key already seen returns the first result instead of sending again. Kept 24 hours.