For AI-agent builders
Give your AI agent an iMessage channel.
Copy, paste, ship. Every snippet your agent needs to send and receive real iMessages — REST, webhooks, MCP, and LLM tool schemas. Blue-bubble delivery, ~98% open, no A2P 10DLC.
The map
Which API do I use?
Every action your agent needs and exactly what to call for it. Full reference at docs.tuco.ai.
| To… | Use | Call |
|---|---|---|
| Send a message (iMessage / SMS / email) | REST | POST /api/messages |
| Send with attachments | REST | POST /api/messages (attachmentUrls[]) |
| Get replies on demand | REST | GET /api/replies |
| Be notified of a reply (real time) | Webhook | message.reply → your endpoint |
| Be notified of sent / delivered / failed | Webhook | message.sent · message.failed |
| Be notified of SMS fallback | Webhook | message.fallback |
| Approve/act on an AI-drafted reply | Webhook | message.ai_draft → your endpoint |
| Check if a number is on iMessage | REST | GET /api/check-availability |
| Drive Tuco from an LLM client | MCP | npx tuco-mcp |
| Let a model call it as a tool | REST via tool | send_imessage → POST /api/messages |
| Pull a lead's reply history | REST | GET /api/replies?leadId= |
| Pull analytics / KPIs | REST | GET /api/analytics |
| Find / list leads | REST | GET /api/leads |
| Stop future messages to a lead | REST | POST /api/messages/cancel-for-lead |
| Get the lines (numbers) you own | REST | GET /api/lines/by-user |
| Order a new line (provision a number) | REST | POST /api/line-requests |
Building a CRM on Tuco?
One prompt. Paste it into your AI.
Drop this into Claude Code, Cursor, or any coding agent and it scaffolds a working Tuco integration end-to-end — API-key auth check, iMessage availability, send + SMS fallback, reply webhooks (with signature verification), and the CRM read/CRUD endpoints (replies, analytics, leads, cancel/opt-out). It also tells the AI to verify every call against the live docs, so it stays correct as the API evolves. For the full walkthrough, see the definitive guide to building an iMessage CRM.
Step 1
Get your API key
Create a workspace key in the API Keys tab. It looks like tuco_sk_… and authenticates both the REST API and the MCP server. Keep it server-side.
Step 2
Send a message
One POST to /api/messages. Address by recipientPhone (E.164), recipientEmail, or an existing leadId. Omit fromLineId and Tuco round-robins your active lines.
Step 3
Receive replies
Push (recommended): point a webhook at your endpoint and Tuco POSTs each event — message.reply, message.sent, message.failed, message.fallback, message.ai_draft. Pull: poll /api/replies.
Every delivery is signed. Verify the X-Tuco-Signature header (HMAC-SHA256 of the raw body, keyed with your webhook secret) before you trust the payload:
Step 4
Connect via MCP (Claude, Cursor, Windsurf…)
Prefer a model-side client to drive Tuco in natural language? Drop this into your MCP config. No glue code — the tuco-mcp server exposes send, reply, and analytics tools.
Step 5
Add the tool to your LLM
Building your own agent loop? Register send_imessage as a tool, then route the call to /api/messages with the handler below. Both tool-calling formats:
Step 6
Paste this into your system prompt
Teach the model how to behave on the channel. Human, opt-in, no links before a reply — the habits that keep your line healthy.
FAQ
Builder questions, answered.
How does an AI agent authenticate?
Every request uses a workspace API key as a bearer token: Authorization: Bearer tuco_sk_… Create one in the API Keys tab of the Tuco dashboard. The same key authenticates the REST API and the MCP server.
Do I need A2P 10DLC to send from my agent?
No. iMessage routes through Apple's network, not the US carrier SMS system, so A2P 10DLC registration and per-message carrier surcharges don't apply. If a recipient isn't on iMessage, you can fall back to SMS by setting messageType to "sms".
How does my agent receive replies?
Two ways. Push: register a webhook and Tuco POSTs an event (message.reply, message.sent, message.failed, message.fallback, message.ai_draft) to your endpoint in real time. Pull: GET /api/replies?recipientPhone=… or ?leadId=… on a schedule. Most agents use webhooks.
Should I use the REST API or the MCP server?
Use the MCP server when a model-side client (Claude Desktop, Cursor, Windsurf, or your own MCP-capable agent) should drive Tuco with natural language — it exposes ready tools with no glue code. Use the REST API when you're building your own backend or wiring a specific LLM tool/function call. They share the same authenticated API.
Does it work with OpenAI and Anthropic tool calling?
Yes. Drop the send_imessage schema into your tools/functions list (both formats are on this page), then route the tool call to POST /api/messages with the handler shown above. It works with any model that supports tool use.
Where are the full API docs?
The complete reference — every endpoint, webhook event, and the MCP tool list — lives at docs.tuco.ai. This page is the fast copy-paste starting point.
Ship your agent an iMessage channel.
Grab a key, paste the snippets, and your agent is texting on a live line — new lines activate in ~24-48 hours. See the AI agents use case or Agentic overview.