How to send your first SMS via API in 5 minutes – the complete guide
Most "SMS gateways" take days to set up: an application form, a contract, a sales call, a proprietary SDK to install. We go the other way – your first SMS through the API goes out in 5 minutes: create an account, generate a token, make one HTTP request. In this guide we walk the whole path: from the account, through working code in four languages, to webhooks and error handling – the things that decide whether an integration survives contact with production.
Step 1: account and Bearer Token
Create an account on the sign-up page – you get 100 free SMS, no credit card and no contract. Activation is instant, so you are not waiting on sales approval. In the client panel you generate and download a Bearer Token (the token can also be obtained through customer support). Treat it like a password – keep it in environment variables (e.g. ACTIO_TOKEN), never in a repository or front-end code. If it leaks, revoke it in the panel and generate a new one; the old one stops working immediately.
Step 2: the first request (curl)
The fastest test is a single call from the terminal. The endpoint accepts JSON and returns a message ID and status:
curl -X POST https://api.sendly.link/api/sms \
-H "Authorization: Bearer $ACTIO_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to": "48732129000",
"body": "Your login code: 482910"
}'Two fields do the work: to (recipient number, 9–11 digits) and body (message content). The full reference – including the optional from field – is in the documentation.
Step 3: integrate in your stack
The API is plain REST, so it works with any language that speaks HTTP – no closed libraries to install. In Node.js the built-in fetch is enough; in Python use requests.post(...), in PHP cURL, in Go the standard net/http. Ready snippets in five languages are in the documentation – copy, swap the token, done.
Step 4: webhooks instead of polling
Sending an SMS is only half the story – you want to know it arrived. Instead of polling the API in a loop (slow and costly), configure a webhook: you point to your URL and we send it a POST request. There are two types: MESSAGE (an inbound message – fields from, to, body) and NOTIFICATION (a status confirmation – the status field: DELIVERED or ERROR). Your system reacts in real time – for example retrying when the status is ERROR.
Error handling
In production, handle the API status codes up front. Success is 200 – the message is accepted for sending and the response contains a message_id. Errors: 403 (authorization problem), 422 (validation error – details in the errors.token / errors.to / errors.body fields) and 429 (rate limit exceeded). A good integration logs the message_id and status, and on 429 applies exponential backoff.
One API, three common use cases
The same API covers three very different scenarios without changing the integration: transactional notifications, 2FA / OTP codes and bulk campaigns to thousands of recipients. Billing is pay-as-you-go, with no subscription or entry threshold – check the rate for your volume in the pricing.
FAQ
Do I need a contract to test the API?+
No. You sign up with email, get 100 free SMS and test right away – no contract, no credit card.
Which languages have code samples?+
curl, Node.js, Python, PHP and Go – all in the documentation, ready to copy and swap the token.
How do I know an SMS was delivered?+
A webhook sends a NOTIFICATION request with a DELIVERED or ERROR status to your URL, in real time. You do not need to poll the API.
What error codes does the API return?+
Success is 200 (with a message_id field). Errors: 403 (authorization problem), 422 (validation error) and 429 (rate limit exceeded).