How to reply to Facebook Messenger from your SaaS
A SaaS can reply on Messenger for each customer's Facebook Page within 24 hours of the person's last message, and answer a Page comment with one private Messenger reply within 7 days. easyCoexistence's Partner API does it through its Meta-reviewed app, so there is no App Review on your side: automations reply with a fixed text, an AI reply or your backend's text, at one price per Page.
easyCoexistence is social media infrastructure for AI agents: its Partner API connects your customers' WhatsApp, Instagram, Facebook and TikTok accounts to your product, with no app review on your side.
Messenger's standard messaging window for most user actions, during which a Page can reply to the person.
How long after a comment or visitor post a Page can send its one private reply on Messenger.
How fast Meta's Messenger policy says an automated bot must respond to a person's input.
Error subcode a Meta app gets messaging people without a role on it before pages_messaging is reviewed and the app is live.
What GET /channels/{id} returns for a Facebook Page: the Graph API base and the Page ID, never the Page token.
What does replying on Messenger for your customers take?
On your own Meta app, a review first. Meta's Messenger overview asks for pages_messaging and related permissions, and messaging people without a role on your app needs Advanced Access, which requires App Review and Business Verification. The Page token has to come from someone who can perform the MESSAGING and MODERATE tasks, and until the review passes, sends to outsiders fail with code 200, subcode 2018028.
Through easyCoexistence none of that sits on your side, because it is a Meta Tech Provider whose app Meta has already reviewed. Your backend calls POST /connect-sessions with channel set to facebook, and the customer signs in with Facebook on the hosted page and picks the Facebook Pages they admin or have task access to. One sign-in can bring several Pages, each its own channel: the redirect names the first, and GET /channels?external_ref= lists them all. The Page token stays with easyCoexistence, because Meta's terms do not allow handing it to another app, and each Page is checked every 6 hours.
How do automations answer Messenger messages?
With a dm_received trigger on the Page's channel, created through POST /channels/{id}/automations. It can start on any message, or only on one with a keyword, a first message, one that arrives outside opening hours or one containing a phone number. When several match, only the most specific answers: phone number first, then keyword, first message, outside hours and any, with the oldest winning a tie. A common pair on a Page is a keyword automation that hands order questions to your system and a catch-all that answers the rest with ai_reply, written on your own Anthropic, OpenAI or OpenRouter key. The call_webhook step posts each message to your URL with the chat's last 10 messages, signed with X-EC-Signature, and sends the reply field of your answer on Messenger, as the Page:
curl -X POST https://easycoexistence.com/api/v1/channels/$PAGE_CHANNEL_ID/automations \
-H "Authorization: Bearer $EC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Order questions to our system",
"trigger": { "type": "dm_received", "match": "keyword",
"keywords": ["order", "tracking", "delivery"], "keyword_mode": "contains" },
"steps": [
{ "type": "call_webhook", "url": "https://api.example.com/ec/messenger/customer_4821" }
]
}'
Your endpoint answers within 20 seconds:
{ "reply": "Order 1042 left our warehouse today and arrives on Friday." }How do private replies to Page comments work?
Through a comment_received automation on the Page. Its DM steps write the one private reply Meta allows per comment, which reaches the person on Messenger with a link to their comment: reply_text sends a fixed message, ai_reply has your model write it, and call_webhook sends the reply your backend returns. A reply_comment step can add a public answer under the comment in the same flow, and a keyword filter turns it into comment-to-DM, on one post_id or on the whole Page.
Meta allows one message per comment or visitor post, within 7 days, so easyCoexistence sends the private reply as the comment arrives and refuses a flow with a second DM step before the person answers. When they answer, a fresh 24-hour window opens and the conversation continues as ordinary Messenger messages, where your dm_received automations take over.
How are the 24-hour window and Meta's bot rules kept?
In the runner, before anything is sent. A DM step more than 24 hours after the person's last message is skipped and the run ends with skip_reason window_closed. Automations reply with messaging_type RESPONSE and never use message tags, so nothing goes out once the window has closed.
Meta's Messenger policy asks automated bots to respond within 30 seconds, so on Facebook the model behind ai_reply gets 20 seconds with no retry, and a call_webhook endpoint has 20 seconds too. The policy also names the moments when an automated chat must say so, where the law requires it: the start of a conversation, after a long silence, and when a person hands the chat back to the bot. At those moments the first ai_reply message opens by saying it is the Page's automated assistant and that the person can ask for a human. A reply sent from easyCoexistence's Conversations screen keeps the automation quiet on that chat for takeover_hours, 4 by default. A reply typed in Facebook's own Page inbox does not reach easyCoexistence, so the automation keeps answering that chat.
How to set it up
- Connect the customer's PagesCreate a connect session with channel facebook and your customer's external_ref; they sign in with Facebook and choose the Pages to connect.
- List the Pages they pickedCall GET /channels?external_ref= with your customer's ID to get each connected Page with its own channel ID, status and name.
- Add the Messenger automationsOn each Page, POST /channels/{id}/automations with dm_received, for example a keyword automation for your system and a catch-all with ai_reply.
- Answer comments privatelyAdd a comment_received automation whose reply step sends the private reply on Messenger, with reply_comment for a public line if you want one.
- Test and watchRun POST /automations/{id}/test with sample messages, then read GET /automations/{id}/runs and handle automation.run_failed events.
Common mistakes
- Taking more than 20 seconds to answer the webhook. The step fails and nothing is sent, and Meta's policy wants automated answers within 30 seconds anyway; answer first, then do the slow work.
- Treating one sign-in as one Page. Facebook's sign-in can connect several Pages and the redirect names only the first, so list the customer's channels before creating automations.
- Leaving disclosure to chance with your own model. The automated-assistant opening comes with ai_reply only, so a call_webhook reply must say it is automated where Meta's policy or the law requires it.
- Sending a second private reply to the same comment. Meta takes one per comment or visitor post, so further messages wait until the person answers on Messenger.
easyCoexistence connects your customers' Facebook Pages through Facebook's own sign-in and answers their Messenger conversations from automations your backend creates, with a fixed text, an AI reply on your own key or your webhook's reply, plus private replies to Page comments. Pages are checked every 6 hours, with signed channel events when one needs reconnecting. US$ 9 to US$ 0.75 per connection per month, falling as you add connections, with the first 3 days free.
easyCoexistence is a multichannel API and MCP server that connects AI agents such as Claude and ChatGPT to WhatsApp, Instagram, TikTok, Facebook, Google Business Profile and more. On WhatsApp it uses Coexistence: the business keeps using its number in the WhatsApp Business app while the AI works through Meta's official API.
Frequently asked questions
Do I need Meta App Review to reply on my customers' Pages?
Not through easyCoexistence. It is a Meta Tech Provider whose app Meta has reviewed, so your customers' Pages connect through it with Facebook's sign-in and your own app needs no review.
Can my SaaS message someone who never wrote to the Page?
No. Messenger conversations start with the person. A comment or visitor post allows one private reply within 7 days, and automations send only inside the 24-hour window, with no message tags.
Which Facebook Pages can my customers connect?
Pages where the person signing in is an admin or has task access. Each Page is its own connection, with its own automations and status events.
How much does easyCoexistence cost per Facebook Page?
A Page is one connection, billed at US$ 9 to US$ 0.75 a month by the band of your total connections, and the first 3 days are free.
Keep reading
Connect your first channel in two minutes.
No platform reviews to wait for. Connect WhatsApp, Instagram, TikTok or another channel, then ask your AI to post, reply or report, and watch it work.
- 3 days free
- Cancel any time
- Official APIs only
- Monitored 24/7
Verified on