C Connecfy / Docs
v1

Send Your First SMS

The Quickstart is the terse version of this. This page is the same journey with the reasoning behind each step, for when you'd rather understand it than just run it.

Before you send anything

You need exactly two things: an API key (create one) and a sender number your account can use. If you haven't connected a SIM yet, don't worry about that yet either — leaving from pointed at your dashboard's platform-pool number works immediately, precisely so this step doesn't block on hardware.

The request

bash
curl -X POST https://www.connecfy.com/api/v1/sms/send/ \
  -H "Authorization: Bearer $CONNECFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"to": "+212612345678", "from": "+212600000000", "message": "Hello from Connecfy"}'

Why the response is 202, not 200

202 Accepted is deliberate, not an odd choice: it means "written to the queue," not "delivered," because nothing has actually reached a phone yet at the point this response is returned. Treat the response as confirmation that Connecfy accepted responsibility for the message — the actual send happens on the next poll cycle, up to ~20 seconds later. See How Connecfy Works for why.

Watching it happen

Save the message_id from the response, wait about 20 seconds, then:

bash
curl https://www.connecfy.com/api/v1/sms/<message_id>/ -H "Authorization: Bearer $CONNECFY_API_KEY"

You should see status move to sent. It'll also show up immediately in the dashboard's Conversations view if you'd rather watch it visually.

If it stays queued

  • Using your own SIM? Confirm it shows online on its device page — see SIM Offline.
  • Using the platform pool? A brief delay under load is normal; if it's stuck past a minute or two, that's worth reporting.
  • Check the message hasn't actually failed already — see Handling Failures.

Next