We use optional, privacy-safe analytics to understand which pages help visitors. Nothing optional runs until you choose. Privacy policy

Skip to content
For AI agents

iMessage API for AI agents

Give your AI workflow a real customer messaging channel. SendiMessage is the transport layer: your agent decides what to say, the API sends it, and customer replies come back as signed webhooks your agent can act on.

Can AI agents send and receive iMessage?

Yes. An AI agent calls the SendiMessage API to send a message, and the customer's reply is delivered back to the agent's application as a signed webhook. SendiMessage handles the messaging transport; your application holds the agent logic.

SendiMessage is the transport, not the brain

SendiMessage does not run your model or decide what to say. It sends what your agent produces, receives what the customer replies, and gives you the conversation and contact state to keep context. The intelligence stays in your application.

The loop

AI applicationPOST /send-messageManaged messaging lineCustomerCustomer replyreceive webhookAI application continues

Send from your agent

POST /send-message
curl -X POST "https://api.sendimessage.com/v1/send-message" \
-H "Content-Type: application/json" \
-H "X-API-Key: $SENDIMESSAGE_API_KEY" \
-H "X-API-Secret: $SENDIMESSAGE_API_SECRET" \
-d '{ "number": "+14155550123", "content": "Your order shipped." }'

Store the message_handle and the conversation it belongs to so the agent can keep context across turns.

Handle the reply

receive webhook
{
"event": "receive",
"message_handle": "96699B14-AFDB-4B33-AA66-C4B093533DA3",
"from": "+14155550123",
"to": "+15555550100",
"content": "Can we move it to 3 PM?",
"media_url": null,
"service": "iMessage",
"is_outbound": false,
"status": "RECEIVED",
"date_sent": "2026-08-21T09:07:35Z",
"conversation_handle": "ee60f9b5-2ddb-4ea8-8ad7-bc70cf85727f"
}

Verify the X-SMSBridge-Signature header, read content and from, run your agent, then send the next turn. Respond 2xx fast and do agent work asynchronously — deliveries have a 10-second timeout and are not retried.

Common agent patterns

Lead follow-up
New leadAgent drafts messageSendiMessage sendsCustomer repliesWebhookAgent continues
Appointment handling
Appointment createdConfirmation sentCustomer repliesReschedule / confirm workflow
Post-call follow-up
AI phone call endsText confirmation or linkCustomer repliesWorkflow continues

FAQ

Does SendiMessage run the AI model?

No. It is the messaging transport. Your application decides what to send and how to react to replies.

How does the agent get replies?

The receive webhook delivers each inbound message to your endpoint. It carries the sender, text, channel, and the message handle.

Can I keep conversation context?

Yes. Replies are grouped into conversations, and you can pull thread history over the API to give the agent context.

Wire your agent to customers

See the AI-agent guide in the docs, or book a short technical walkthrough.

Related