iMessage API for developers
Add two-way iMessage to your application
Comms by Osis is a hosted API for sending and receiving iMessage and SMS from your application, with eligible RCS. One POST sends a message, replies arrive as signed webhooks, and you do not run a Mac. Free starts on a shared line; a dedicated number is $200/month.
Start with a send and an inbound reply
Comms by Osis is a hosted API for sending and receiving iMessage and SMS (eligible RCS) from your own application. One POST to /api/v1/comms/messages sends a message; replies arrive as signed webhooks. You do not run a Mac.
Free starts on a shared line with 100 messages a day; a dedicated number is $200/month with $0 setup.
Create a scoped API key, pick a test recipient who has agreed to hear from you, and send. The API accepts a message before the recipient has necessarily received it, so save the returned message ID and subscribe to delivery and inbound events.
const response = await fetch("https://osis.co/api/v1/comms/messages", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.COMMS_API_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": "appointment-4242-confirm"
},
body: JSON.stringify({
to: process.env.COMMS_TEST_TO,
body: "Your appointment is confirmed.",
channel: "auto"
})
});
if (!response.ok) throw new Error(`Comms returned ${response.status}`);
const result = await response.json();
console.log(result.message.id); // acceptance is not deliveryWhat can the Comms iMessage API do?
Beyond sending text and media, the API covers the parts of iMessage that make a conversation feel like one. Each item below has its own endpoint in the API reference.
| Capability | What it does |
|---|---|
| Send a message | iMessage, SMS or RCS text and media from your line, with an idempotency key for safe retries. |
| Check capabilities | See whether a number can receive iMessage or RCS before you send anything. |
| Signed webhooks | Inbound replies and delivery events pushed to your server, signed with HMAC-SHA256. |
| Reactions | Add, change or remove a tapback on a message. |
| Typing indicator | Show or hide typing in a conversation. |
| Mark read | Send a read receipt for an iMessage or RCS conversation. |
| Polls | Send an iMessage poll (recipients need iOS 26 or later). |
| Group chats | Start an iMessage group chat and send the first message. |
| Contact cards | Send a contact card, or set the name and photo people see on a dedicated line. |
| Unsend | Unsend an iMessage you sent. |
| Chat backdrop | Set or clear the background of an iMessage conversation. |
| Shared location | Read a location a customer chose to share with your dedicated number. |
| Hosted MCP | The same operations as tools for Claude, Cursor and other MCP clients. |
Messaging channels have different capabilities
Auto routing selects an available channel for the sending line and recipient, moving to another channel only after a confirmed pre-send rejection. RCS fallback supports plain text. An uncertain result does not trigger another send. An explicit channel never falls back.
Acceptance is not delivery. Delivery and read events depend on the channel, line, recipient, and available receipts. SMS does not provide read receipts.
| Route | Requirements | Behavior |
|---|---|---|
| iMessage | Supported line and recipient | Rich messaging capabilities vary by line and recipient. Not Apple Messages for Business. |
| RCS | Supported dedicated line, carrier enablement, compatible recipient | Plain text to one E.164 number. Check line and recipient capabilities. |
| SMS | SMS-capable line and supported destination | Carrier messaging. No read receipts; regional registration requirements may apply. |
| Auto | Eligible routes for the selected line and content | Auto routing selects an available channel for the sending line and recipient, moving to another channel only after a confirmed pre-send rejection. RCS fallback supports plain text. An uncertain result does not trigger another send. An explicit channel never falls back. |
Phone-number iMessage is distinct from Apple Messages for Business
Comms provides hosted phone-number messaging infrastructure. Apple Messages for Business uses a verified business identity and a different onboarding and conversation model.
Do not assume a phone-number integration is an Apple-approved business channel, or that business-channel features are available through the same endpoint.
You do not operate a Mac server for this integration, but you do depend on Comms, its infrastructure and supported channels. Evaluate number control, delivery behavior and support before committing a production workflow.
Receive replies reliably
Verify X-Osis-Signature against the exact request bytes, persist the event ID and payload, acknowledge quickly, then process asynchronous work. Several events can share a recordId, so deduplicate the event id rather than the message ID.
The runnable example uses a durable SQLite inbox and explicit line-to-tenant mapping. It includes signed webhook tests, duplicate handling, human ownership and a local send simulator. A multi-instance production deployment needs a shared database or queue.
Dedicated numbers and production access
API line claiming requires workspace approval and available inventory. A denied claim returns line_claim_not_allowed; unavailable inventory returns no_available_line.
Porting requires approval and a supported number. Confirm port-in, port-out, geographic availability, fees, and timing before planning a migration. You can cancel replacement setup before submitting the transfer; a submitted transfer cannot be canceled from the setup panel.
Free and Plus use shared lines. Dedicated is $200/month with $0 setup; available area codes and numbers depend on inventory. Confirm geographic support, channel readiness, capacity and porting terms before promising an instant number to every SaaS customer.
What is available today
Payment requests use checkout links only when the global Payments product and workspace payments are enabled and merchant requirements are met. Native in-thread Apple Pay is coming soon; checkout links are not native Apple Pay in Messages.
For a current capability summary, use the product facts page and endpoint documentation. MCP is available as a hosted connection; it is not a future-only integration.