Developers
Bulk SMS API para sa campaign at paalala
Magpadala ng SMS campaign, naka-schedule na paalala at abiso mula sa sarili mong software. Pareho sa web console ang presyo, opt-out at mga limit.
20,000Max na numero kada request
120Request kada minuto kada key
JSONRequest at response
Mabilis na simula
Ipadala ang unang request
- 01Pumunta sa pahina ng API sa iyong account at gumawa ng key. Nagsisimula ang mga key sa ss_.
- 02Idagdag ang header na Authorization: Bearer <key> sa bawat request.
- 03Kumuha ng presyo gamit ang POST /api/v1/quote, saka magpadala sa POST /api/v1/messages.
Base URL
https://smssaver.ink/api/v1
Endpoint
Mga API endpoint
| Method at path | Gamit |
|---|---|
GET /api/v1/balance | Ang kasalukuyan mong balance, sa USD |
GET /api/v1/countries | Mga sakop na bansa at presyo kada SMS (gumagana kahit walang key) |
POST /api/v1/quote | Presyo, bilang ng part at mga inalis na numero, nang hindi nagpapadala |
POST /api/v1/messages | Ipadala ngayon, o mamaya kapag may schedule_at |
GET /api/v1/messages | Listahan ng mga kamakailang padala (limit, offset) |
GET /api/v1/messages/{id} | Isang padala at ang resulta nito bawat bansa |
POST /api/v1/messages/{id}/cancel | Kinakansela ang naka-schedule na padalang hindi pa naipapadala at buong ire-refund |
Pagpapadala
Pagpapadala ng SMS
Ipasa ang to field bilang array ng mga numero, o bilang text na may isang numero kada linya. Para sa mga numerong walang +, itakda ang country field sa two-letter na country code, tulad ng ph o us.
| Field | Detalye |
|---|---|
to | Ang tatanggap. Array, o isang numero kada linya, hanggang 20,000 |
text | Laman ng mensahe, hindi lalampas sa 10 part |
country | Opsyonal. Two-letter na country code para sa mga numerong walang + |
schedule_at | Opsyonal. ISO timestamp na may time zone (tulad ng 2026-12-01T09:00:00Z) o Unix seconds, mula 5 minuto hanggang 30 araw mula ngayon |
client_ref | Opsyonal. Sarili mong reference, hanggang 64 character |
Response · 201201 Created
{
"ok": true,
"campaign": {
"id": "K7Q2M9XD4TPA",
"status": "sending",
"recipients": 2,
"parts": 1,
"encoding": "GSM-7",
"cost": "0.0099",
"countries": [
{ "country": "US", "recipients": 1, "cost": "0.0038" },
{ "country": "GB", "recipients": 1, "cost": "0.0061" }
]
},
"rejected": [],
"duplicates": 0,
"opted_out": 0,
"balance": "48.9901"
}POST /api/v1/messages
curl -X POST https://smssaver.ink/api/v1/messages \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": ["+14155550142", "+447400123456"],
"text": "[Lumi Cafe] Tuesday deal: free dessert after 6pm. Stop: lumi.cafe/stop"
}'POST /api/v1/quote
curl -X POST https://smssaver.ink/api/v1/quote \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "to": ["+14155550142", "+819012345678"], "text": "Hello" }'Response · 200200 OK
{
"ok": true,
"recipients": 2,
"parts": 1,
"encoding": "GSM-7",
"cost": "0.0122",
"balance": "49.00",
"countries": [
{ "country": "JP", "recipients": 1, "price": "0.0084", "cost": "0.0084" },
{ "country": "US", "recipients": 1, "price": "0.0038", "cost": "0.0038" }
],
"rejected": [],
"duplicates": 0,
"opted_out": 0
}Error
Mga error code
| Code | HTTP | Dahilan |
|---|---|---|
unauthorized | 401 | Walang key, o invalid ang key |
rate_limited | 429 | Masyadong maraming request ngayong minuto |
bad_request | 400 | Hindi mabasa ang request body |
empty_text | 400 | Walang text ang mensahe |
too_long | 400 | Lampas sa 10 part ang text |
no_numbers | 400 | Wala ni isang numerong mapapadalhan |
too_many | 400 | Higit sa 20,000 numero sa isang request |
bad_time | 400 | Nasa labas ng pinapayagang oras ang schedule_at |
low_balance | 402 | Kulang ang credit para sa padalang ito |
unavailable | 503 | Naka-pause ang pagpapadala sa ngayon, at walang credit na kinuha |
not_found | 404 | Walang ganoong send ID |
not_scheduled | 409 | Naipadala na o nakansela na ang padala |
Mga limit
- Hanggang 120 request kada minuto ang bawat key.
- Bumabalik ang mga halaga ng pera bilang USD string, halimbawa "0.0047".
- Ang send ID ay random na 12-character na code, hindi sunod-sunod na numero.
- Pareho sa web console ang pag-filter ng numero at ang opt-out list.