AI agent workflow library
These are the messaging patterns AI teams build most often. In every one, your application holds the intelligence and SendiMessage is the transport: your agent decides what to send, the API sends it, and the customer's reply returns as a signed webhook.
Each pattern is one POST to send and one webhook to receive. The examples below are real — the same send call and the same signature-verified receive handler, recombined for each workflow.
What this integration enables
Architecture
- TriggerA lead, a call-ended event, a booking, or an inbound reply
- Your AI application decidesYour model + guardrails choose whether and what to send
- SendiMessage APIPOST /send-message queues the message on your line
- CustomeriMessage where supported, SMS fallback where configured; the customer can reply
- Signed receive webhookThe reply posts to your endpoint (verify X-SMSBridge-Signature)
- Loop or hand offThe agent continues, or a rule routes the thread to a human in the team inbox
Example request
// Your application (not SendiMessage) decides what to say.const res = await fetch("https://api.sendimessage.com/v1/send-message", {method: "POST",headers: {"X-API-Key": process.env.SENDIMESSAGE_API_KEY,"X-API-Secret": process.env.SENDIMESSAGE_API_SECRET,"Content-Type": "application/json",// Idempotency-Key derived from your own record id keeps a// retried automation from double-texting the customer."Idempotency-Key": callId,},body: JSON.stringify({ number: customer.phone, content: agentReply }),});const { message_handle } = await res.json(); // store this on your record
Store the message_handle on your record so later events correlate back.
Limitations and honest notes
- iMessage delivery is available on supported messaging lines and destinations. Recipients without iMessage receive SMS when fallback is configured — never assume universal iMessage availability.
- Messages are accepted asynchronously — the API returns status QUEUED and final status arrives via webhook or the message endpoints.
- No official SDK for this ecosystem yet — the example uses plain HTTP against the REST API. Official SDKs are published for JavaScript/TypeScript (npm: sendimessage), Python (PyPI: sendimessage), PHP (Composer: sendimessage/sdk), and Go (github.com/sendimessage/sendimessage-go). Every SDK is dependency-free and covers the full public API surface.
- SendiMessage does not run your model, choose your AI provider, or make agent decisions — it is the messaging channel only.
- There is no send-time external_id field; correlate by storing the returned message_handle on your record (or by phone number + line).
Security considerations
- Do not place SendiMessage API credentials directly in browser code. Send requests through your own server route or backend.
- Keep your API key server-side, in environment variables or a secrets manager — never in client code, CRM front-end scripts, or repositories.
- Verify the signature header on every incoming webhook before trusting the event.
- Scope keys per environment and rotate them if they are ever exposed.
Frequently asked questions
Which AI provider do I need?
How do I stop automation loops?
Can a human take over mid-conversation?
Related integrations
Ready to connect AI Agent Workflows?
Request a messaging line and a SendiMessage integration specialist will review your AI Agent Workflows workflow and guide the setup.