Is There an iMessage API? What Developers Can Use in 2026
Apple has no public server API for iMessage bots. Here is what the Messages framework, Messages for Business and hosted lines each let you build.

Short answer: No, Apple doesn't offer a public server-side iMessage API for bots: the Messages framework only builds app extensions that run on a person's device, and Apple Messages for Business is a separate channel for brands that go through an Apple-approved provider. To run an agent on an ordinary iMessage number, you need a hosted line from a provider such as Keiki, or a Mac you run yourself.
You've built an agent that answers questions about your product. It works in your web chat, and Slack and Telegram each took an afternoon: register a bot, get a token, point a webhook at your server. Then someone asks for iMessage, because that's where your customers actually text. You open Apple's developer site looking for the bot token and the webhook docs, and you don't find them.
That's not a gap in your search. This guide explains what Apple does and doesn't offer developers for iMessage today, what each official option is really for, what the unofficial routes cost you, and how to put an agent on a real iMessage number anyway. You'll learn:
- Whether Apple has an iMessage API for bots and servers
- What the Messages framework and Apple Messages for Business each let you build
- Why unofficial iMessage routes break, with the Beeper Mini story as the example
- How to run an agent on iMessage without building any of this yourself
This is one of the guides in Building iMessage agents, our complete guide to building iMessage agents.
Is there an iMessage API?
Not in the sense most developers mean. Apple doesn't publish a server-side API that lets your backend send and receive iMessages from a phone number, and there's no bot registration like Telegram's or Slack's.
What Apple does publish are two developer surfaces with "Messages" in the name. Both are real, both are documented, and neither is a bot API for an ordinary number:
| What it is | Where it runs | What it's for | | --- | --- | --- | | Messages framework | On the person's iPhone, iPad or Mac, inside the Messages app | Stickers, iMessage apps and interactive messages people send each other | | Apple Messages for Business | Apple's service plus an approved messaging service provider | A verified brand chatting with customers, started from the brand's entry points |
If you want a number your customers can text that reaches your agent, neither one gets you there directly. The rest of this guide explains why, and what does.
The Messages framework is client-side
Apple's Messages framework documentation describes it plainly: you use it "to create sticker packs and iMessage apps," either standalone or as an extension of an iOS app. The classes it lists tell you where the code runs. MSMessagesAppViewController presents your interface inside Messages, MSConversation inserts text, stickers or media into the input field, and MSMessage and MSSession carry and update interactive messages, for games or collaborative apps.
All of that runs on the sender's device, after they open your app in the Messages app drawer. Your code can't read someone's conversations, can't send a message on its own, and has no server endpoint to call. Apple's iMessage Apps and Stickers page frames it the same way: apps people use "without ever leaving their conversations," distributed through the App Store.
So an iMessage app is a great way to put a booking form or a game inside a thread. It is not a way for your server to take part in that thread. (If you want the card part without shipping your own iOS app, Keiki's iMessage Apps add-on lets an agent's tools open an HTTPS page as a card in the conversation.)
Apple Messages for Business is the official business channel
The closest thing Apple has to a business messaging API is Apple Messages for Business. It lets a brand chat with customers inside Messages, with features like list pickers, time pickers and Apple Pay in the conversation. It is also built around a specific setup:
- You go through an approved provider. Apple's getting-started guide says that to qualify, "your company needs to select an Apple-approved Messaging Service Provider (MSP)." The MSP supplies the messaging platform, the bot tooling and the integration with your back-end systems.
- The API belongs to the MSP. The Messages for Business REST API is described as "server-to-server REST API solutions" that an MSP implements on its own platform.
- Apple reviews the experience before launch. You build in a test account, record the full customer journey, and the MSP submits that recording to Apple for Experience Review before your account goes commercial.
- Customers come in through your entry points. Apple's use cases start with the customer tapping a link, a "Message Us" button, a QR code or a listing in Apple Maps. Conversations show up as your verified brand, not as a phone number.
Becoming an MSP is a much bigger commitment. Apple's MSP onboarding guide lists a contact-center messaging platform, a live agent console, bot flows that hand off to people with history, a customer success team and conversation designers.
If you're a large brand with a contact center, this is the sanctioned route and worth the process. If you want an agent behind a phone number that a customer can text the way they'd text a friend, it's a different product.
What about unofficial iMessage APIs?
Because Apple doesn't offer a bot API, people have built their own. They fall into two groups.
Mac relays
A Mac signed in to an Apple ID runs a script or bridge app that watches the Messages database and sends replies with AppleScript. It works, and it's how many hobby iMessage bots are built. It also inherits every weakness of one machine: it sleeps, restarts for updates, gets signed out, and depends on macOS internals that can change with any release. We covered this in detail in how to run an iMessage agent without a Mac.
Reverse-engineered clients
The bolder approach skips the Mac and talks to Apple's servers directly. Beeper Mini, an Android app launched in December 2023, did exactly that. Beeper's launch post said it "does not use a Mac relay server in a data center" and instead "connects directly to Apple servers to send and receive end-to-end encrypted messages."
It lasted a few days. On December 9, 2023, The Verge reported Apple's statement that it had blocked "techniques that exploit fake credentials in order to gain access to iMessage," citing risks of "metadata exposure and enabling unwanted messages, spam, and phishing attacks." MacRumors confirmed that Apple had shut down the app's iMessage functionality.
Beeper shipped fixes, and by December 21 its working version needed users to have "access to an old iPhone, Mac computer, or find a friend with a Mac." The same day, in Beeper – Moving Forward, the company wrote that it "can't win a cat-and-mouse game with the largest company on earth" and open-sourced its iMessage code.
The lesson for developers is not about Beeper. It's that any route into iMessage depends on Apple tolerating it. Apple can and does change how its servers authenticate clients, and it treats spam and impersonation as a security problem. Whatever you build on, assume Apple's protections apply to it.
A note on "Mobilo iMessage API"
You may see this phrase come up. Mobilo makes digital business cards: tap a card, share your profile, and capture the other person's details into your CRM. Its developer page describes integrations through Zapier and an automation API that fires when a lead comes in. We found nothing in its public material describing an API for sending and receiving iMessages. If you want to follow up with leads over iMessage, Mobilo can capture the lead, and a separate messaging service has to send the text.
How to put an agent on iMessage anyway
If the goal is "customers text a number and my agent answers," the practical path is a hosted iMessage line: an iMessage account that a provider keeps signed in, online and delivering, with an API in front of it. That's what Keiki provides, along with the agent runtime behind it.
One thing to be clear about: a hosted line is not Apple Messages for Business, and Apple doesn't certify it. It's an ordinary iMessage account, so Apple's spam protections apply to it like any other. Apple also publishes no sending rules for these accounts. That's why Keiki publishes its own iMessage best practices (let the user text first, keep conversations two-way, never burst) and enforces daily sending ceilings on every line.
Step 1: Describe the agent
Write the agent in the dashboard, or in TypeScript with the Keiki SDK:
// src/agent.ts
import { create } from '@onkeiki/agents'
const kit = create({
apiKey: process.env.KEIKI_API_KEY!,
name: 'Acme Support',
agent: {
model: 'google/gemini-3.5-flash',
maxSteps: 10,
historyLimit: 40,
systemPrompt: ({ now }) => [
'You are the support agent for Acme, texting customers over iMessage.',
'Keep replies short, like a text from a helpful person.',
'Hand off to a human when a customer asks for one.',
`Current time: ${now.toISOString()}`,
].join('\n'),
tools: [],
},
})
await kit.sync()
Run it with bun run src/agent.ts from any machine. kit.sync() pushes the config to Keiki, and Keiki runs the agent loop from there.
Step 2: Connect your API as tools
Add your endpoints with defineTool, or connect an MCP server from the dashboard. Put anything that changes money or data behind policy: { approval: 'ask' } so a person decides first. How to turn your API into a WhatsApp and iMessage agent walks through this step by step.
Step 3: Add an iMessage line
Open the agent's Channels and buy a dedicated iMessage line in Keiki, or import one you already have. Tapbacks, threaded replies and effects work on every iMessage line. App cards need the iMessage Apps add-on and a dedicated line bought in Keiki.
Already have an agent in your own app?
You don't have to rebuild it. With agents as models, any Keiki agent answers on an OpenAI- or Anthropic-compatible endpoint, so the same agent your customers text can also answer your web app. And the external harness lets your own model loop handle each turn while Keiki receives the iMessages and delivers the replies.
Which option fits
- You want people to use your app inside Messages. Build an iMessage app with the Messages framework.
- You're a large brand with a contact center and want a verified business presence. Apply for Apple Messages for Business through an approved MSP.
- You want an agent behind a number customers can text. Use a hosted iMessage line, and follow the line rules so it stays in good standing.
- You want to text yourself reminders. A Mac relay is fine.
FAQ
Is there an official iMessage API? Not for bots on an ordinary number. Apple's public developer options are the Messages framework, which builds apps that run inside Messages on a person's device, and Apple Messages for Business, which a brand reaches through an Apple-approved messaging service provider.
Can the Messages framework or an iMessage app extension work as a server-side bot? No. Messages framework code runs on the sender's device after they open your app in Messages. It can insert and update messages in that conversation, but it can't read the thread or send on its own, and there is no server endpoint.
Does Mobilo have an iMessage API? We found no public documentation of one. Mobilo sells digital business cards with lead capture and CRM integrations. To text those leads over iMessage, pair it with a separate messaging service.
Are unofficial iMessage APIs safe to use? They carry real risk. Apple shut down Beeper Mini's direct connection in December 2023, saying it blocked "techniques that exploit fake credentials." Any route that isn't Apple's own depends on Apple continuing to allow it, so pick a provider that keeps lines healthy and follow sensible sending rules.
Can I build an iMessage agent without a Mac? Yes. On Keiki, you write the agent in the dashboard or in TypeScript from any machine, add a hosted iMessage line, and Keiki runs delivery, memory and approvals.
Sources
- Messages framework documentation, Apple Developer
- iMessage Apps and Stickers, Apple Developer
- Apple Messages for Business: getting started, Apple, version 3.1, updated July 21, 2026
- Apple Messages for Business REST API, Apple, version 4.2.9, updated June 3, 2026
- Apple Messages for Business MSP onboarding, Apple, version 3.0.3, updated February 1, 2024
- Apple responds to Beeper's iMessage for Android: "We took steps to protect our users", The Verge, December 9, 2023
- Apple confirms it shut down iMessage for Android app Beeper Mini, MacRumors, December 10, 2023
- Introducing Beeper Mini: get blue bubbles on Android, Beeper Blog, December 5, 2023
- iMessage and phone registration are back, kinda, Beeper Blog, December 21, 2023
- Beeper – Moving Forward, Beeper Blog, December 21, 2023
- Mobilo digital business cards and Mobilo for developers, Mobilo