Spaces

Messenger API for AI agents

Let your AI agent answer the people who message you on Facebook Messenger: it reads every chat, replies with text, photos and files, and can schedule messages and run automations for you.

What your agent can do on Messenger

Three steps

  1. Start a trial and connect Messenger. You sign in to Facebook through a secure link and approve the connection.
  2. Add Spaces to your AI agent with one URL, https://api.spacesos.com/mcp/messenger, or use the REST API at https://api.spacesos.com/v1. Steps for each AI client.
  3. Your agent reads and answers. Spaces paces every message inside the limits that keep the account safe.

Or paste this into your agent and let it set things up with you:

Set up Spaces for me by following https://www.spacesos.com/agents

The core tools

What it doesMCP toolREST
Your conversations, newest first. Filter to unread.list_messaging_chatsGET …/chats
The messages in one conversation.list_messaging_messagesGET …/chats/{chat_id}/messages
An image, file, voice note or video from a message.get_messaging_attachmentGET …/chats/{chat_id}/messages/{message_id}/attachments/{attachment_id}
Reply in a conversation, with text or attachments.reply_in_chatPOST …/chats/{chat_id}/messages
Start a new conversation with someone who expects to hear from you.start_chatPOST …/chats
Send a message at a set local time, inside working hours you choose.schedule_messagePOST /v1/messaging/schedules

Every Messenger tool · Messenger MCP guide · Full reference

Limits that keep the account safe

Up to 40 messages a day per account, at least 20 seconds apart, with 8 new chats a day at most and a four-week warm-up for new accounts. Messenger limits in full · How accounts are kept safe.

FAQ

Can an AI agent reply to Facebook Messenger automatically?

Yes. Your agent reads new messages and replies in the same chat through Spaces, inside Messenger’s safe limits.

Can it message people who have not written to me?

Messenger only lets you reach someone who has not replied inside its messaging window, so Spaces works best for answering people who message you.

How do I connect Messenger?

You sign in to Facebook through a secure link and approve the connection. There is no app review to wait for.

How much does the Messenger API cost?

Plans from $19 a month for one connected account, with a trial. You pay per connected account, not per message or per contact.