
There is no official Apple iMessage API. Apple's documented third-party iCloud authorization covers Mail, Calendar, and Contacts — not iMessage. Every iMessage integration, self-hosted or managed, routes through a Mac running the native Messages app. The question is who owns that Mac, and everything attached to it.
Self-hosted means you buy or rent the hardware, keep macOS current, configure the network, install and maintain the bridge software, and personally handle reconnection every time Apple's session expires or the hardware fails.
Managed means a provider handles that entire infrastructure layer. You wire up an API after a user-consent flow and own the application logic — nothing below it.
The two most widely used open-source bridges are BlueBubbles and AirMessage.
BlueBubbles requires macOS Sierra or newer with iMessage already activated on the host device. The server is primarily written in TypeScript and continuously polls chat.db for new messages. Deeper iMessage integration depends on an optional Private API Bundle built in Objective-C. The Mac can run on physical hardware or inside a Docker-hosted macOS VM, though VM setups carry their own complexity.
AirMessage requires macOS 10.13 or newer. The Mac must stay powered and online around the clock with sleep disabled. Remote access requires port 1359 to be forwarded on your router, or a relay substituted for it. macOS Mojave and later add an explicit Automation permission before AirMessage can read Messages.
Both bridges share the same underlying constraint: the Mac is a single point of failure. When it restarts, loses connectivity, or Apple refreshes the iMessage session, your integration goes offline until someone fixes it. Add to that: keeping bridge versions current, rotating credentials when an Apple Account changes, and monitoring uptime across the bridge, the forwarded port, and any relay service.
In a managed model the provider runs the Mac infrastructure. What you configure is the application-level integration.
Figment's approach: a user approves access through Figment's hosted consent screen, producing a scoped grant for your application. Your app receives a Figment access token — the developer application never sees the user's Apple password. iMessage history and search both use messages:read; sending requires a separate messages:send scope and is limited to conversations the user explicitly authorizes.
Pricing is $29 per month per active live connection. Sandbox access is free and uses synthetic data that cannot reach real recipients. Access starts after setup; provisioning is not immediate.
Connections move through a defined lifecycle — connecting, needs_approval, syncing, ready, offline, reconnect_required, revoked. Read and send operations are rejected on any non-ready connection; a syncing status is not a partial-success state. Even after reaching ready, native history may still be incomplete — check historyComplete and hasMore in responses rather than assuming full coverage.
For the full OAuth flow mechanics, see OAuth for iCloud: Connect Apple Data to Your App.
The table below shows who owns each infrastructure and product layer.
| Responsibility | Self-Hosted | Managed (Figment) |
|---|---|---|
| Mac hardware procurement | Developer | Provider |
| macOS version & security updates | Developer | Provider |
| iMessage account activation | Developer | Account owner (via setup flow) |
| Network relay / port forwarding | Developer | Provider |
| Bridge software installation & updates | Developer | Provider |
| Infrastructure reconnection monitoring | Developer | Provider |
| Apple account re-authentication† | Developer | Account owner |
| API authentication & token lifecycle | Developer | Provider |
| Per-user consent & scoped grants | Developer (custom build) | Built-in |
| Idempotency & delivery receipts | Developer (custom build) | Built-in |
| Uptime monitoring | Developer | Provider |
| Application logic | Developer | Developer |
† When a connection enters reconnect_required or needs_approval, the account owner must complete Apple sign-in or trusted-device approval again. The provider monitors connection state and surfaces these statuses; it cannot perform Apple authentication on behalf of the account owner.
Application logic is the only row that never moves. Everything above it either transfers to the provider or shifts to the account owner in the managed model.
Self-hosting makes sense in a specific set of scenarios:
The managed model tends to win whenever a product grows beyond a single developer or a single account.
For detailed feature comparisons, see Figment vs BlueBubbles for iMessage Integration and Figment vs AirMessage for App Integrations.
If you run a bridge today and are evaluating a move to managed, work through these steps before you cut over. This is a planning checklist grounded in the supplied API specification; complete sandbox validation before switching any production traffic.
client_id.GET /v1/connections/{connection_id}/chats and POST /v1/connections/{connection_id}/messages/send before touching any live connection.messages:send is included in the user grant for every conversation you need to write to. A conversation visible in read results is not automatically authorized for sends.historyComplete and hasMore before assuming complete coverage.submitted, delivered, read, failed, or unknown — before you retire the old bridge send path. Do not resend an unknown action under a new idempotency key.Ready to try without committing to a live connection? Connect Apple Account and start in the free sandbox today.
Also see Figment vs Claw Messenger for iMessage Apps for another managed-service comparison.