API documentation
Automate rentals instead of clicking through the dashboard: check your balance, list services, rent numbers and read codes back — all under the same rule as the website: charged when you rent, refunded in full when no code arrives.
Base URL: https://daisysms.in. Every response is JSON with an ok flag. Generate an API key on your Profile page — it is shown once, then stored only as a hash.
Authentication
Every account can issue its own API key. Send it with each request in whichever way suits your client:
- • Query parameter: ?api_key=YOUR_KEY
- • Header: X-API-Key: YOUR_KEY
- • Header: Authorization: Bearer YOUR_KEY
curl "https://daisysms.in/api/v1/balance" \ -H "X-API-Key: YOUR_KEY"
A missing or unknown key answers 401 {"ok":false,"error":"…"}.
Balance
GET /api/v1/balance
Your current wallet balance, in cents and as a formatted USD string.
{"ok":true,"balance_cents":856,"balance":"8.56","currency":"USD"}
Services
GET /api/v1/services
The full catalogue with final per-code prices (markup already included — the same prices as the pricing page). Use each entry's code when renting. unlimited services accept as many codes as arrive inside the rental window for that one price.
{"ok":true,"services":[
{"code":"wa","name":"WhatsApp","category":"Messaging",
"price_cents":144,"price":"1.44","unlimited":true},
…
]}
Rent a number
POST /api/v1/rent
Rent a USA number for one service. Send a JSON (or form) body naming the service code:
curl -X POST "https://daisysms.in/api/v1/rent" \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"service":"wa"}'
A successful rental answers 201:
{"ok":true,"rental_id":"r_1","service":"wa","phone":"+15551234567",
"price_cents":144,"status":"active","expires_at":"2026-10-21T12:20:00.000Z"}
The price is debited from your wallet the moment the number is reserved — rent only when your balance covers it. Low balance answers 402, a full active-rental limit 409, and a service with no numbers right now 503.
Rental status
GET /api/v1/rentals/:id/status
Poll one of your rentals every few seconds. While it is still active, asking also re-checks the provider, so the code shows up here as soon as it lands. Asking about somebody else's rental — or one that does not exist — answers 404.
{"ok":true,"rental_id":"r_1","service":"wa","phone":"+15551234567",
"status":"completed","code":"482916","charged":true,
"price_cents":144,"expires_at":"2026-10-21T12:20:00.000Z"}
status moves from active to completed when a code arrives, or to expired / cancelled when none does — the rent charge is then refunded, which the response reports as "refunded":true. A cancellation the provider has not accepted yet reads cancel_pending until it finalizes.
Webhooks
You do not need to configure anything to benefit from webhooks: incoming texts are pushed to our platform by the carrier webhook the moment they are received, which is why a code can appear in your rental — on the website and through the status endpoint above — within seconds of being sent. Polling the status endpoint remains the way your own code reads it; the push happens on our side, and each delivered message is applied exactly once, so a code can never be charged twice.
Errors & billing
Errors come back as {"ok":false,"error":"..."} with a matching HTTP status:
- • 401 — missing or invalid API key
- • 402 — balance too low for that service
- • 409 — your active-rental limit is full
- • 503 — no numbers, or the service is temporarily unavailable
Billing is exactly like the dashboard: your wallet is debited when the number is rented. Rentals that expire or are cancelled before any code arrives are refunded in full, and every charge and refund is written to your wallet history.