Messages

Send message

Send a text reply on Instagram or Facebook, or a WhatsApp template.

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

Body

platform"instagram" | "facebook"Required
accountIduuidRequired
A connected Instagram account or Facebook Page in your organization.
profileIduuid
Optional, because accountId names its profile. If you pass both, they must agree.
recipientstringRequired
The provider-scoped participant id, 1–200 characters. Take it from the sender field of an inbound message, not from a username.
textstringRequired
1–1,000 characters.

A Facebook reply has the same shape. accountId is the connected Page, and recipient is the person's PSID, from the sender field of their inbound message:

json
{
  "platform": "facebook",
  "accountId": "00000000-0000-0000-0000-000000000002",
  "recipient": "6200000000000001",
  "text": "Yes, we deliver on Saturdays."
}

WhatsApp sends an approved template instead of text; see WhatsApp for its body.

Success returns 201 and a bare message object with direction: "outbound", type: "text", and status: "sent".

Meta's messaging rules still apply

A business can message a person only inside the window Meta's policy opens, which begins when that person messages the business. When Meta refuses a send because that window has closed, the response is 409 window_closed. Wait for the person to message again before retrying.

Errors — 401 unauthorized, 400 invalid_request, 404 profile_not_found, 404 account_not_found, 409 window_closed, 409 page_not_selected (Facebook), 403 missing_permission (Facebook), 422 connection_expired, 422 provider_not_configured, 422 provider_not_supported, 502 provider_error.