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

Skip to content
AvailableDirect HTTP API

Send your first message with cURL

Every SendiMessage capability is reachable with cURL, because the entire API is JSON over HTTPS. This is the canonical request the rest of the documentation builds on: authenticate with your API key pair, post a JSON body to /send-message, and receive the queued message back.

Use cURL to verify credentials, test a new line, or script quick checks from CI — anything a full application does, this one command can reproduce.

Request This SetupBook an Integration Review

What this integration enables

Transactional notifications
Order confirmations, payment receipts, and status changes triggered by your backend.
Appointment reminders
Scheduled jobs that message customers before a booking.
Operational alerts
Delivery windows, service updates, and internal notifications.
Two-way conversations
Incoming replies arrive on your webhook endpoint for routing to support or sales.

Architecture

How it fits together: Your application event, then cURL server code, then SendiMessage API, then Managed messaging line, then Webhook events.
  1. Your application eventAn order ships, a booking nears, a ticket updates
  2. cURL server codeBuilds the request with credentials from the environment
  3. SendiMessage APIPOST /send-message returns the queued message
  4. Managed messaging lineSMS, or iMessage on supported lines and destinations
  5. Webhook eventsDelivery status and incoming replies post back to your endpoint

Example request

cURL
curl -sS --fail-with-body https://api.sendimessage.com/v1/send-message \
-H "X-API-Key: $SENDIMESSAGE_KEY" \
-H "X-API-Secret: $SENDIMESSAGE_SECRET" \
-H "Content-Type: application/json" \
-d '{
"number": "+15555550123",
"content": "Hello from SendiMessage"
}'
# 201 → {"status":"QUEUED","message_handle":"4e828182-…","service":null}
# non-2xx → the error body prints and curl exits non-zero (--fail-with-body)

Delivery events and incoming replies

Delivery status and incoming replies arrive as signed webhook events. Verify the signature, then correlate events with your own records via the message_handle returned when you sent.

webhook event
// "outbound" event → your curl endpoint
// Verify the SendiMessage-Signature header (t={timestamp},v1=HMAC-SHA256 of
// "{timestamp}.{raw body}", keyed with your webhook secret), then use
// GET /v2/messages/{message_handle} for authoritative state and match it to
// your contact_id in curl.

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.

Security considerations

  • Load the API key pair from the environment — never commit it or embed it in client-side code.
  • Verify webhook signatures before processing events.
  • Log message handles, not message bodies, in shared logs.

Frequently asked questions

Is there an official cURL SDK for SendiMessage?
Not yet for cURL. The SendiMessage API is a plain JSON-over-HTTPS REST API, so the standard HTTP client of your ecosystem is all you need — the example on this page is complete. Official SDKs are published for JavaScript/TypeScript, Python, PHP, and Go.
What does the API return when I send a message?
The API accepts messages asynchronously and responds with status "QUEUED" plus a message_handle and the line_handle it will send from. Track final delivery via GET /status, the message history endpoints, or webhook events.
Can I send iMessage from cURL?
SendiMessage delivers over iMessage where the destination supports it on your managed line, and falls back to SMS when fallback is configured. iMessage is never guaranteed for every recipient.
Why is the response QUEUED instead of delivered?
Sending is asynchronous: the API validates and queues the message, then your managed line delivers it. Check the final result with GET /status?message_handle=…, the /v2/messages endpoints, or an outbound webhook event.

Ready to connect cURL?

Request a messaging line and a SendiMessage integration specialist will review your cURL workflow and guide the setup.