Migrating from the old OTP/SMS service
Rassilo replaces the old OTP and SMS service. This guide maps the old calls to the new ones and lists the steps of a gradual switch, tried in Sandbox before going Live.
What changes
| Old service | Rassilo |
|---|---|
POST /api/sms/send | POST /v1/messages { "channel": "sms" } |
POST /api/otp/send | POST /v1/messages { "channel": "sms" } |
?api_key=… | Authorization: Bearer $RASSILO_API_KEY |
phone=00000000 | "to": "+22200000000" |
message=… | "body": "…" |
| No equivalent | X-Idempotency-Key: $(uuidgen) |
GET /api/sms/status | GET /v1/messages/{id} (coming soon) |
- The key moves to the
Authorizationheader, never in the URL again. - Numbers use the international E.164 format:
+222then 8 digits. - Every send carries an
X-Idempotency-Keyheader; without it, the call is refused (400).uuidgengenerates it (on Debian, packageuuid-runtime). - The sender name is no longer a parameter of the call: it is registered in Senders, country by country.
- Statuses will arrive by webhook instead of being polled: webhooks and reading a message are coming soon.
- An OTP code is a message like any other: you generate the code, Rassilo sends it by SMS.
The same send, before and after
cURL
curl "https://ancien-service.example/api/sms/send?api_key=$OLD_API_KEY" \
-d phone=00000000 \
-d sender=KARAMPAY \
-d message="Votre code est 482913"cURL
curl https://api.rassilo.ai/v1/messages \
-H "Authorization: Bearer $RASSILO_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Idempotency-Key: $(uuidgen)" \
-d '{"channel":"sms","to":"+22200000000","body":"Votre code est 482913"}'Switch-over steps
Create your Rassilo workspace
Rassilo’s prepaid wallet also serves the identity verification product: one balance for both.
Get your senders approved
Re-enter your current sender names in Senders, country by country.
Adapt the code in Sandbox
With an
sk_test_…key, replace the calls per the table above,X-Idempotency-Keyheader included.Plug in webhooks
Not needed today to go Live. As soon as they are available, subscribe to
message.deliveredandmessage.failed.Go Live
Phone check, then replace the test key with an
sk_live_…key.Retire the old integration
Once Rassilo’s logs show all your traffic, revoke the old key.