Hesap

Bakiye ve maliyet tahminleri

GET/v1/balance

Mevcut bakiye (USD cinsinden).

curl https://bulksmsapi.cc/v1/balance \
  -H "Authorization: Bearer $BULKSMSAPI_KEY"
200 OKJSON
{
  "object": "balance",
  "balance": "184.32950",
  "currency": "USD"
}

Tahminler

POST/v1/estimates

POST /v1/batches ile aynı gövdeyi alır ve maliyetini döndürür. Hiçbir şey gönderilmez ve ücretlendirilmez.

curl https://bulksmsapi.cc/v1/estimates \
  -H "Authorization: Bearer $BULKSMSAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Doors open at 18:00 tonight.", "to": ["+14155550123", "+447400123456", "+447400123456", "12"]}'
200 OKJSON
{
  "object": "estimate",
  "recipients": 2,
  "set_aside": [
    { "to": "+447400123456", "reason": "duplicate" },
    { "to": "12", "reason": "invalid_number" }
  ],
  "encoding": "GSM-7",
  "segments": 2,
  "max_segments": 1,
  "cost": "0.01294",
  "currency": "USD",
  "by_country": [
    { "country": "US", "recipients": 1, "segments": 1, "cost": "0.00507" },
    { "country": "GB", "recipients": 1, "segments": 1, "cost": "0.00787" }
  ]
}

Azalıyor

Bakiyeden daha fazla maliyeti olan bir istek, mesajda her iki miktarı da içeren 402 top_up_required yanıtı verir ve hiçbir şey gönderilmez. Büyük bir toplu işlemden önce bakiyeyi kontrol edin veya önce tahmin yapın ve konsoldan bakiye yükleyin.

Bakiye ve maliyet tahminleri | BulkSMSAPI Docs