Documentation menu
Messages

Send Instagram message

Send an Instagram DM or a private reply to a comment, with optional buttons.

POSThttps://app.tryadeli.com/api/v1/messages/instagram
AuthorizationBearer <API key>How keys work

Send an Instagram DM, or a private reply to the author of a comment, as text or with up to three buttons. This is how a comment-to-DM flow works: reply privately to a comment with a button, and when the person taps it, send them a follow-up.

Body

accountIduuidRequired
A connected Instagram account in your organization.
profileIduuid
Optional, because accountId names its profile. If you pass both, they must agree.
recipient{ id } | { commentId }Required
{ id } is a person's Instagram-scoped id, such as a comment's authorId from List comments. { commentId } sends a private reply to that comment's author.
textstringRequired
1–1,000 characters, or up to 640 with buttons.
buttonsButton[]
1–3 buttons. { type: "postback", title, payload } sends payload back to you when tapped; { type: "url", title, url } opens an https link. Titles are up to 20 characters, payloads up to 1,000.

Success returns 201 and a message object with type: "text" or type: "buttons". recipient is the person's Instagram-scoped id, even for a private reply, so you can message them again once they respond.

Private replies

Instagram allows one private reply per comment, within 7 days of the comment. A second attempt returns 409 private_reply_already_sent. An account connected before Unified Login through a Facebook Page (authMethod: "facebook_login") returns 400 unsupported_for_platform until it is reconnected. After a private reply you can message the person again only once they respond, for example by tapping a postback button; until then a DM returns 409 window_closed.

Errors — 401 unauthorized, 400 invalid_request, 400 unsupported_for_platform, 404 profile_not_found, 404 account_not_found, 409 window_closed, 409 private_reply_already_sent, 403 permission_required with missing permission and reconnect details, 422 connection_expired, 502 provider_error.