uBill proqramçıları REST API · v1 İş mühiti

Tam API sənədləri

SMS və billinq API resursları bir yerdə: dəqiq endpoint-lər, tam Postman təsvirləri, başlıqlar, sorğu gövdələri, cavab nümunələri və hazır kod.

29 endpoint API açarı ilə giriş JSON / XML
POST /v1/sms/send
1curl --request POST \2  --url api.ubill.dev/v1/sms/send \3  --header 'key: ••••••••'
200 OK{ "statusID": 0, "message": "SMS Sent" }
BAŞLANĞIC

uBill API ilə iş

UBill API resurslarımıza proqram vasitəsilə çıxış verir. Xidməti sisteminizə inteqrasiya edib müştərilərlə rahat əlaqə qurun.

API nümunələri

Müxtəlif mənbələrdən fərqli proqramlaşdırma dillərində API tətbiqləri.

Əsas URL https://api.ubill.dev
Versiya v1
Protokol HTTPS
Kodlaşdırma UTF-8
01
TƏHLÜKƏSİZLİK

Autentifikasiya

Qorunan endpoint sorğularında şirkətinizin məxfi API açarı olmalıdır. Əksəriyyəti onu bu başlıqda qəbul edir: key başlığında; bəzi köhnə GET/XML endpoint-ləri istifadə edir: key sorğu parametrindən.

API açarınızı açıqlamayın

Açarı server mühit dəyişənində saxlayın. Frontend JavaScript, mobil tətbiq və ya açıq Git repozitoriyasına daxil etməyin.

Sorğu başlıqları
key: YOUR_API_KEY
Content-Type: application/json
02
QAYDALAR

Formatlar və statuslar

API əsasən JSON cavabları qaytarır. statusID sahəsi nəticəni bildirir; uğurlu sorğunun dəyəri 0 . XML endpoint XML cavabı qaytarır.

0 SMS göndərildi
1 Alındı
2 Çatdırılmadı
3 Status gözlənilir
4 Xəta
API ARAYIŞI

Bütün resurslar və endpoint-lər

Aşağıdakı məlumat açıq Postman kolleksiyasının son versiyası ilə sinxronlaşdırılıb.

API QRUPU

SMS API

14 endpoint

SMS API / Göndərən adı yarat

Göndərən adı yarat

API açarı · Başlıq
POST https://api.ubill.dev /v1/sms/brandNameCreate

Cavab statusu

statusID Təsvir
0 Göndərən adı yaradıldı
10 brandName sahəsi boşdur
20 brandName 2–11 simvoldan ibarət olmalıdır
30 brandName icazəsiz işarələr ehtiva edir
40 brandName artıq əlavə olunub
50 Son əlavə olunmuş brandName təsdiqini gözləyin
60The description field is required. Specify your website, Facebook/Instagram page or application and how you will use the brandName.
61The description must not exceed 500 characters
90 JSON xətası
99 Ümumi xəta

Sorğu başlıqları 2

Açar Dəyər Mənbə
keyYOUR_API_KEY Autentifikasiya
Content-Typeapplication/json Başlıq

Sorğu gövdəsi JSON

Sorğu gövdəsi
{
    "brandName" : "test"
}

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request POST \
  --url 'https://api.ubill.dev/v1/sms/brandNameCreate' \
  --header 'key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "brandName" : "test"
}'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/sms/brandNameCreate',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => <<<'BODY'
{
    "brandName" : "test"
}
BODY,
    CURLOPT_HTTPHEADER => [
        'key: YOUR_API_KEY',
        'Content-Type: application/json'
    ]
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/sms/brandNameCreate',
  {
  method: 'POST',
  headers: {
    'key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: "{\n    \"brandName\" : \"test\"\n}"
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

1 nümunə
Göndərən adı yarat Nümunə
Cavab · JSON
{
    "statusID": 0,
    "brandID": 1,
    "message": "BrandName Created"
}
SMS API / Göndərən adını sil

Göndərən adını sil

API açarı · Başlıq
POST https://api.ubill.dev /v1/sms/brandNameDelete

Cavab statusu

statusID Təsvir
0 Göndərən adı silindi
10 Göndərən adı tapılmadı
90 JSON xətası
99 Ümumi xəta

Sorğu başlıqları 2

Açar Dəyər Mənbə
keyYOUR_API_KEY Autentifikasiya
Content-Typeapplication/json Başlıq

Sorğu gövdəsi JSON

Sorğu gövdəsi
{
    "brandID": 2
}

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request POST \
  --url 'https://api.ubill.dev/v1/sms/brandNameDelete' \
  --header 'key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "brandID": 2
}'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/sms/brandNameDelete',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => <<<'BODY'
{
    "brandID": 2
}
BODY,
    CURLOPT_HTTPHEADER => [
        'key: YOUR_API_KEY',
        'Content-Type: application/json'
    ]
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/sms/brandNameDelete',
  {
  method: 'POST',
  headers: {
    'key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: "{\n    \"brandID\": 2\n}"
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

1 nümunə
Göndərən adını sil Nümunə
Cavab · JSON
{
    "statusID": 0,
    "brandID": "2",
    "message": "BrandName Deleted"
}
SMS API / Bütün göndərən adlarını al

Bütün göndərən adlarını al

API açarı · Başlıq
GET https://api.ubill.dev /v1/sms/brandNames

Sorğu başlıqları 2

Açar Dəyər Mənbə
keyYOUR_API_KEY Autentifikasiya
Content-Typeapplication/json Başlıq

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request GET \
  --url 'https://api.ubill.dev/v1/sms/brandNames' \
  --header 'key: YOUR_API_KEY' \
  --header 'Content-Type: application/json'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/sms/brandNames',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        'key: YOUR_API_KEY',
        'Content-Type: application/json'
    ]
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/sms/brandNames',
  {
  method: 'GET',
  headers: {
    'key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

1 nümunə
Bütün göndərən adlarını al Nümunə
Cavab · JSON
{
    "statusID": 0,
    "data": [
        {
            "id": "1",
            "name": "test",
            "authorized": "1",
            "createdAt": "2020-11-14 20:42:44"
        },
        {
            "id": "2",
            "name": "test2",
            "authorized": "2",
            "createdAt": "2021-03-27 00:22:38"
        }
    ]
}
SMS API / SMS göndər

SMS göndər

API açarı · Sorğu
GET https://api.ubill.dev /v1/sms/send?key=YOUR_API_KEY&brandID=1&numbers=9955XXXXXXXX,9955XXXXXXXX&text=message&stopList=false

Məcburi parametrlər

Parametr Təsvir
key Sorğuların təsdiqi üçün məxfi API açarı. Şirkət parametrlərində baxın və idarə edin.
brandID Sistemdə unikal brend identifikatoru.
numbers Vergüllə ayrılmış mobil nömrələr. Beynəlxalq format tələb olunur olmadan 00 və ya +.
text SMS mətni. Bütün Unicode simvolları dəstəklənir.

İxtiyari parametrlər

Parametr Təsvir
stopList stopList=false — stop-siyahı yoxlamasını söndürür. Nömrə siyahıda olsa belə mesaj göndərilir.
otp otp=true — mesajı OTP (birdəfəlik şifrə / təsdiq kodu) kimi işarələyir.
OTP mesajları ən yüksək prioritetlə emal olunur.
⚠️ İstifadə olunmalıdır yalnız giriş təsdiqi kodları üçün.
sendTime Planlı SMS çatdırılma vaxtı.
Format: Y-m-d H:i (məsələn: 2026-02-01 23:30).
Göstərilən vaxt gələcəkdə olmalıdır.
Göstərilməzsə dərhal göndərilir.
callbackUrl Bu SMS sorğusu üçün fərdi callback URL-i. Yalnız API tətbiqində qlobal standart callback URL-i təyin olunubsa işləyir.

Qeydlər

  • OTP yalnız giriş, təsdiq və şifrə sıfırlama kimi autentifikasiya prosesləri üçündür.

  • Yanlış istifadə olunan otp parametri çatdırılma və ya hesab məhdudiyyətlərinə səbəb ola bilər.


Cavab statusu

statusID Təsvir
0 SMS göndərildi
10 brandID tapılmadı
20 Nömrələr tapılmadı
30 Mesaj mətni boşdur
40 SMS balansı kifayət deyil
50 Etibarlı nömrələr tapılmadı
60 sendTime formatı yanlışdır. Y-m-d H:i istifadə edin
90 JSON xətası
99 Ümumi xəta

⚠️ GET metodunun məhdudiyyətləri

  • API sərt limit qoymur alıcı nömrələrinin sayına.

  • Faktiki məhdudiyyətləri yaradır: URL və HTTP başlıq ölçü hədləri (Cloudflare, proksilər, brauzerlər).

Praktik hədlər

  • ✅ Sorğuda təxminən 1500 nömrəyədək etibarlı işləyir.

  • ⚠️ Təxminən 2000-dən çox nömrə yarada bilər: Header overflow xətaları.

  • Bu xətalar yaranır sorğu API-yə çatmazdan əvvəl , HTTP / proksi səviyyəsində.

Tövsiyə

  • İstifadə edin: GET yalnız kiçik və orta sorğular üçün.

  • Böyük alıcı siyahılarında həmişə istifadə edin: POST.

OTP recipient limits and partial batches

In automatic protection mode, OTP cooldown and per-number limits reject only the affected recipient rows. Other recipients continue; the application is not paused by these two rules. Overall volume and unique OTP recipient limits remain application-wide. The owner can disable additional OTP protection per application.

A mixed batch returns statusID=0, a valid smsID, message=SMS partially sent, acceptedCount, rejectedCount və rejectedNumbers. Each rejection contains the original zero-based request index, normalized number, statusID=47, reason (otpCooldown və ya otpNumberLimit) and retryAfter seconds. If both rules apply, the later-release reason is returned. Only accepted rows are queued, charged and counted against limits. Retry only rejected indexes; resending the full batch can duplicate accepted SMS.

If all recipients are rejected, statusID=47, smsID=null və acceptedCount=0. The HTTP Retry-After header gives the earliest recipient retry time. Rejected retries do not extend it. A separate whole-request failure queues nothing. XML uses <rejectedNumbers><recipient>...</recipient></rejectedNumbers> with the same fields. Responses without filtering keep their existing shape.

URL parametrləri 5

keyqueryYOUR_API_KEY
brandIDquery1
numbersquery9955XXXXXXXX,9955XXXXXXXX
textquerymessage
stopListqueryfalse

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request GET \
  --url 'https://api.ubill.dev/v1/sms/send?key=YOUR_API_KEY&brandID=1&numbers=9955XXXXXXXX,9955XXXXXXXX&text=message&stopList=false'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/sms/send?key=YOUR_API_KEY&brandID=1&numbers=9955XXXXXXXX,9955XXXXXXXX&text=message&stopList=false',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET'
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/sms/send?key=YOUR_API_KEY&brandID=1&numbers=9955XXXXXXXX,9955XXXXXXXX&text=message&stopList=false',
  {
  method: 'GET'
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

3 nümunə
SMS göndər Nümunə
Cavab · JSON
{
    "statusID": 0,
    "smsID": "117345",
    "message": "SMS Sent"
}
OTP partial success 200
Cavab · JSON
{
  "statusID": 0,
  "smsID": 123,
  "message": "SMS partially sent",
  "acceptedCount": 1,
  "rejectedCount": 1,
  "rejectedNumbers": [
    {
      "index": 0,
      "number": "5XXXXXXXX",
      "statusID": 47,
      "reason": "otpCooldown",
      "retryAfter": 30
    }
  ]
}
OTP all recipients restricted 200
Cavab · JSON
{
  "statusID": 47,
  "smsID": null,
  "message": "OTP recipient protection limit exceeded",
  "acceptedCount": 0,
  "rejectedCount": 1,
  "rejectedNumbers": [
    {
      "index": 0,
      "number": "5XXXXXXXX",
      "statusID": 47,
      "reason": "otpCooldown",
      "retryAfter": 30
    }
  ]
}
SMS API / SMS göndər

SMS göndər

API açarı · Başlıq
POST https://api.ubill.dev /v1/sms/send

Başlıqlar

Açar Dəyər
key Məxfi API açarınız
Content-Type application/json

Məcburi parametrlər (JSON gövdəsi)

Parametr Təsvir
brandID Sistemdə unikal brend identifikatoru.
numbers Mobil nömrələr massivi. Beynəlxalq format tələb olunur olmadan 00 və ya + . Nümunə: ["9955XXXXXXXX","9955XXXXXXXX"]
text SMS mətni. Bütün Unicode simvolları dəstəklənir.

İxtiyari parametrlər (JSON gövdəsi)

Parametr Təsvir
stopList false — stop-siyahı yoxlamasını söndürür. Nömrə siyahıda olsa belə mesaj göndərilir.
otp true — mesajı OTP (birdəfəlik şifrə / təsdiq kodu) kimi işarələyir.
OTP mesajları ən yüksək prioritetlə emal olunur.
⚠️ İstifadə olunmalıdır yalnız giriş təsdiqi kodları üçün.
sendTime Planlı SMS çatdırılma vaxtı. Format: Y-m-d H:i (məsələn: "2026-02-01 23:30" ). Gələcəkdə olmalıdır. Verilməzsə dərhal göndərilir.
callbackUrl Bu SMS sorğusu üçün fərdi callback URL-i. Yalnız API tətbiqində qlobal standart callback URL-i təyin olunubsa işləyir.

Qeydlər

  • OTP yalnız giriş, təsdiq və şifrə sıfırlama kimi autentifikasiya prosesləri üçündür.

  • Yanlış istifadə olunan otp parametri çatdırılma və ya hesab məhdudiyyətlərinə səbəb ola bilər.

Cavab statusu

statusID Təsvir
0 SMS göndərildi
10 brandID tapılmadı
20 Nömrələr tapılmadı
30 Mesaj mətni boşdur
40 SMS balansı kifayət deyil
50 Etibarlı nömrələr tapılmadı
60 sendTime formatı yanlışdır. Y-m-d H:i istifadə edin
90 JSON xətası
99 Ümumi xəta

⚠️ Hədlər və qeydlər

  • Maksimum sorğu gövdəsi: 100 MB → Daha böyük sorğular rədd edilir.

  • Cloudflare proksi gözləmə həddi: 100 saniyə → Daha uzun sorğular 524 Timeout qaytarır.

  • Gözləmə və yaddaş problemlərini önləmək üçün böyük SMS sorğularını kiçik hissələrə bölün.

  • İstifadə edin: stopList bloklanmış nömrələrə göndərişin qarşısını almaq üçün.

Sınaqdan praktik müşahidə:

Sınaqlarımızda uğurla göndərilib: bir sorğuda 500 000 nömrəyə qədər . Daha çoxu yaddaş, gözləmə və sorğu ölçüsü problemləri yarada bilər. Faktiki hədlər mətn uzunluğu, kodlaşdırma və server yükündən asılıdır.

Tövsiyə:

Təhlükəsiz və etibarlı iş üçün sorğuları məhdudlaşdırın: hər paketdə təxminən 100 000 nömrə .

OTP recipient limits and partial batches

In automatic protection mode, OTP cooldown and per-number limits reject only the affected recipient rows. Other recipients continue; the application is not paused by these two rules. Overall volume and unique OTP recipient limits remain application-wide. The owner can disable additional OTP protection per application.

A mixed batch returns statusID=0, a valid smsID, message=SMS partially sent, acceptedCount, rejectedCount və rejectedNumbers. Each rejection contains the original zero-based request index, normalized number, statusID=47, reason (otpCooldown və ya otpNumberLimit) and retryAfter seconds. If both rules apply, the later-release reason is returned. Only accepted rows are queued, charged and counted against limits. Retry only rejected indexes; resending the full batch can duplicate accepted SMS.

If all recipients are rejected, statusID=47, smsID=null və acceptedCount=0. The HTTP Retry-After header gives the earliest recipient retry time. Rejected retries do not extend it. A separate whole-request failure queues nothing. XML uses <rejectedNumbers><recipient>...</recipient></rejectedNumbers> with the same fields. Responses without filtering keep their existing shape.

Sorğu başlıqları 2

Açar Dəyər Mənbə
keyYOUR_API_KEY Autentifikasiya
Content-Typeapplication/json Başlıq

Sorğu gövdəsi JSON

Sorğu gövdəsi
{
    "brandID": 1,
    "numbers": [
        9955XXXXXXXX,
        9955XXXXXXXX
    ],
    "text": "Message",
    "stopList": false, // Enable/disable checking numbers in the stop list
    "sendTime": "2026-02-01 23:01" // sendTime (optional)
}

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request POST \
  --url 'https://api.ubill.dev/v1/sms/send' \
  --header 'key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "brandID": 1,
    "numbers": [
        9955XXXXXXXX,
        9955XXXXXXXX
    ],
    "text": "Message",
    "stopList": false, // Enable/disable checking numbers in the stop list
    "sendTime": "2026-02-01 23:01" // sendTime (optional)
}'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/sms/send',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => <<<'BODY'
{
    "brandID": 1,
    "numbers": [
        9955XXXXXXXX,
        9955XXXXXXXX
    ],
    "text": "Message",
    "stopList": false, // Enable/disable checking numbers in the stop list
    "sendTime": "2026-02-01 23:01" // sendTime (optional)
}
BODY,
    CURLOPT_HTTPHEADER => [
        'key: YOUR_API_KEY',
        'Content-Type: application/json'
    ]
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/sms/send',
  {
  method: 'POST',
  headers: {
    'key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: "{\n    \"brandID\": 1,\n    \"numbers\": [\n        9955XXXXXXXX,\n        9955XXXXXXXX\n    ],\n    \"text\": \"Message\",\n    \"stopList\": false, // Enable/disable checking numbers in the stop list\n    \"sendTime\": \"2026-02-01 23:01\" // sendTime (optional)\n}"
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

3 nümunə
SMS göndər Nümunə
Cavab · JSON
{
    "statusID": 0,
    "smsID": 111,
    "message": "SMS Sended"
}
OTP partial success 200
Cavab · JSON
{
  "statusID": 0,
  "smsID": 123,
  "message": "SMS partially sent",
  "acceptedCount": 1,
  "rejectedCount": 1,
  "rejectedNumbers": [
    {
      "index": 0,
      "number": "5XXXXXXXX",
      "statusID": 47,
      "reason": "otpCooldown",
      "retryAfter": 30
    }
  ]
}
OTP all recipients restricted 200
Cavab · JSON
{
  "statusID": 47,
  "smsID": null,
  "message": "OTP recipient protection limit exceeded",
  "acceptedCount": 0,
  "rejectedCount": 1,
  "rejectedNumbers": [
    {
      "index": 0,
      "number": "5XXXXXXXX",
      "statusID": 47,
      "reason": "otpCooldown",
      "retryAfter": 30
    }
  ]
}
SMS API / SMS göndər — fərqli mətnlər

SMS göndər — fərqli mətnlər

API açarı · Başlıq
POST https://api.ubill.dev /v1/sms/send

Başlıqlar

Açar Dəyər
key Məxfi API açarınız
Content-Type application/json

Məcburi parametrlər (JSON gövdəsi)

Parametr Təsvir
brandID Sistemdə unikal brend identifikatoru.
numbers Mobil nömrələr massivi. Beynəlxalq format tələb olunur olmadan 00 və ya + . Nümunə: ["9955XXXXXXXX","9955XXXXXXXX"]
text SMS mətni. Bütün Unicode simvolları dəstəklənir.

İxtiyari parametrlər (JSON gövdəsi)

Parametr Təsvir
stopList false — stop-siyahı yoxlamasını söndürür. Nömrə siyahıda olsa belə mesaj göndərilir.
otp true — mesajı OTP (birdəfəlik şifrə / təsdiq kodu) kimi işarələyir.
OTP mesajları ən yüksək prioritetlə emal olunur.
⚠️ İstifadə olunmalıdır yalnız giriş təsdiqi kodları üçün.
sendTime Planlı SMS çatdırılma vaxtı. Format: Y-m-d H:i (məsələn: "2026-02-01 23:30" ). Gələcəkdə olmalıdır. Verilməzsə dərhal göndərilir.
callbackUrl Bu SMS sorğusu üçün fərdi callback URL-i. Yalnız API tətbiqində qlobal standart callback URL-i təyin olunubsa işləyir.

Qeydlər

  • OTP yalnız giriş, təsdiq və şifrə sıfırlama kimi autentifikasiya prosesləri üçündür.

  • Yanlış istifadə olunan otp parametri çatdırılma və ya hesab məhdudiyyətlərinə səbəb ola bilər.


Cavab statusu

statusID Təsvir
0 SMS göndərildi
10 brandID tapılmadı
20 Nömrələr tapılmadı
30 Mesaj mətni boşdur
40 SMS balansı kifayət deyil
50 Etibarlı nömrələr tapılmadı
60 sendTime formatı yanlışdır. Y-m-d H:i istifadə edin
90 JSON xətası
99 Ümumi xəta

⚠️ Hədlər və qeydlər

  • Maksimum sorğu gövdəsi: 100 MB → Daha böyük sorğular rədd edilir.

  • Cloudflare proksi gözləmə həddi: 100 saniyə → Daha uzun sorğular 524 Timeout qaytarır.

  • Gözləmə və yaddaş problemlərini önləmək üçün böyük SMS sorğularını kiçik hissələrə bölün.

  • İstifadə edin: stopList bloklanmış nömrələrə göndərişin qarşısını almaq üçün.

Sınaqdan praktik müşahidə:

Alıcıya düşən SMS Sorğuda maksimum nömrə sayı
1 400,000
2 200,000
3 150,000
4 120,000
5 100,000
6 50,000

Faktiki hədlər mətn uzunluğu, kodlaşdırma və server yükündən asılıdır.

Tövsiyə:

Etibarlı iş üçün birləşdirilmiş SMS sayına uyğun yuxarıda göstərilən nömrə hədlərinə riayət edin.

OTP recipient limits and partial batches

In automatic protection mode, OTP cooldown and per-number limits reject only the affected recipient rows. Other recipients continue; the application is not paused by these two rules. Overall volume and unique OTP recipient limits remain application-wide. The owner can disable additional OTP protection per application.

A mixed batch returns statusID=0, a valid smsID, message=SMS partially sent, acceptedCount, rejectedCount və rejectedNumbers. Each rejection contains the original zero-based request index, normalized number, statusID=47, reason (otpCooldown və ya otpNumberLimit) and retryAfter seconds. If both rules apply, the later-release reason is returned. Only accepted rows are queued, charged and counted against limits. Retry only rejected indexes; resending the full batch can duplicate accepted SMS.

If all recipients are rejected, statusID=47, smsID=null və acceptedCount=0. The HTTP Retry-After header gives the earliest recipient retry time. Rejected retries do not extend it. A separate whole-request failure queues nothing. XML uses <rejectedNumbers><recipient>...</recipient></rejectedNumbers> with the same fields. Responses without filtering keep their existing shape.

Sorğu başlıqları 2

Açar Dəyər Mənbə
keyYOUR_API_KEY Autentifikasiya
Content-Typeapplication/json Başlıq

Sorğu gövdəsi JSON

Sorğu gövdəsi
{
    "brandID": 1,
    "numbers": [
        {
            "number": 9955XXXXXXXX,
            "text": "Hello, Nicholas"
        },
        {
            "number": 9955XXXXXXXX,
            "text": "Hello, George"
        }
    ],
    "stopList": false, // Enable/disable checking numbers in the stop list
    "sendTime": "2026-02-01 23:01" // sendTime (optional)
}

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request POST \
  --url 'https://api.ubill.dev/v1/sms/send' \
  --header 'key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "brandID": 1,
    "numbers": [
        {
            "number": 9955XXXXXXXX,
            "text": "Hello, Nicholas"
        },
        {
            "number": 9955XXXXXXXX,
            "text": "Hello, George"
        }
    ],
    "stopList": false, // Enable/disable checking numbers in the stop list
    "sendTime": "2026-02-01 23:01" // sendTime (optional)
}'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/sms/send',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => <<<'BODY'
{
    "brandID": 1,
    "numbers": [
        {
            "number": 9955XXXXXXXX,
            "text": "Hello, Nicholas"
        },
        {
            "number": 9955XXXXXXXX,
            "text": "Hello, George"
        }
    ],
    "stopList": false, // Enable/disable checking numbers in the stop list
    "sendTime": "2026-02-01 23:01" // sendTime (optional)
}
BODY,
    CURLOPT_HTTPHEADER => [
        'key: YOUR_API_KEY',
        'Content-Type: application/json'
    ]
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/sms/send',
  {
  method: 'POST',
  headers: {
    'key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: "{\n    \"brandID\": 1,\n    \"numbers\": [\n        {\n            \"number\": 9955XXXXXXXX,\n            \"text\": \"Hello, Nicholas\"\n        },\n        {\n            \"number\": 9955XXXXXXXX,\n            \"text\": \"Hello, George\"\n        }\n    ],\n    \"stopList\": false, // Enable/disable checking numbers in the stop list\n    \"sendTime\": \"2026-02-01 23:01\" // sendTime (optional)\n}"
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

3 nümunə
SMS göndər — fərqli mətnlər Nümunə
Cavab · JSON
{
    "statusID": 0,
    "smsID": 111,
    "message": "SMS Sended"
}
OTP partial success 200
Cavab · JSON
{
  "statusID": 0,
  "smsID": 123,
  "message": "SMS partially sent",
  "acceptedCount": 1,
  "rejectedCount": 1,
  "rejectedNumbers": [
    {
      "index": 0,
      "number": "5XXXXXXXX",
      "statusID": 47,
      "reason": "otpCooldown",
      "retryAfter": 30
    }
  ]
}
OTP all recipients restricted 200
Cavab · JSON
{
  "statusID": 47,
  "smsID": null,
  "message": "OTP recipient protection limit exceeded",
  "acceptedCount": 0,
  "rejectedCount": 1,
  "rejectedNumbers": [
    {
      "index": 0,
      "number": "5XXXXXXXX",
      "statusID": 47,
      "reason": "otpCooldown",
      "retryAfter": 30
    }
  ]
}
SMS API / XML ilə SMS göndər

XML ilə SMS göndər

API açarı · Sorğu
POST https://api.ubill.dev /v1/sms/sendXml?key=YOUR_API_KEY

Cavab statusu

statusID Təsvir
0 SMS göndərildi
10 brandID tapılmadı
20 Nömrələr tapılmadı
30 Mesaj mətni boşdur
40 SMS balansı kifayət deyil
50 Etibarlı nömrələr tapılmadı
90 JSON xətası
99 Ümumi xəta

⚠️ Hədlər və qeydlər

  • Maksimum sorğu gövdəsi: 100 MB → Daha böyük sorğular rədd edilir.

  • Cloudflare proksi gözləmə həddi: 100 saniyə → Daha uzun sorğular qaytarır: 524 Timeout.

  • Böyük SMS sorğularını kiçik hissələrə bölərək gözləmə və yaddaş problemlərini önləyin.

  • İstifadə edin: stopList bloklanmış nömrələrə göndərişin qarşısını almaq üçün.

OTP recipient limits and partial batches

In automatic protection mode, OTP cooldown and per-number limits reject only the affected recipient rows. Other recipients continue; the application is not paused by these two rules. Overall volume and unique OTP recipient limits remain application-wide. The owner can disable additional OTP protection per application.

A mixed batch returns statusID=0, a valid smsID, message=SMS partially sent, acceptedCount, rejectedCount və rejectedNumbers. Each rejection contains the original zero-based request index, normalized number, statusID=47, reason (otpCooldown və ya otpNumberLimit) and retryAfter seconds. If both rules apply, the later-release reason is returned. Only accepted rows are queued, charged and counted against limits. Retry only rejected indexes; resending the full batch can duplicate accepted SMS.

If all recipients are rejected, statusID=47, smsID=null və acceptedCount=0. The HTTP Retry-After header gives the earliest recipient retry time. Rejected retries do not extend it. A separate whole-request failure queues nothing. XML uses <rejectedNumbers><recipient>...</recipient></rejectedNumbers> with the same fields. Responses without filtering keep their existing shape.

URL parametrləri 1

keyqueryYOUR_API_KEY

Sorğu gövdəsi XML

Sorğu gövdəsi
<?xml version="1.0" encoding="UTF-8"?>
<request>
    <brandID>1</brandID>
    <numbers>9955XXXXXXXX</numbers>
    <text>test</text>
    <stopList>false</stopList> <!-- Enable/disable checking numbers in the stop list -->
</request>

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request POST \
  --url 'https://api.ubill.dev/v1/sms/sendXml?key=YOUR_API_KEY' \
  --data '<?xml version="1.0" encoding="UTF-8"?>
<request>
    <brandID>1</brandID>
    <numbers>9955XXXXXXXX</numbers>
    <text>test</text>
    <stopList>false</stopList> <!-- Enable/disable checking numbers in the stop list -->
</request>'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/sms/sendXml?key=YOUR_API_KEY',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => <<<'BODY'
<?xml version="1.0" encoding="UTF-8"?>
<request>
    <brandID>1</brandID>
    <numbers>9955XXXXXXXX</numbers>
    <text>test</text>
    <stopList>false</stopList> <!-- Enable/disable checking numbers in the stop list -->
</request>
BODY
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/sms/sendXml?key=YOUR_API_KEY',
  {
  method: 'POST',
  body: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<request>\n    <brandID>1</brandID>\n    <numbers>9955XXXXXXXX</numbers>\n    <text>test</text>\n    <stopList>false</stopList> <!-- Enable/disable checking numbers in the stop list -->\n</request>"
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

3 nümunə
XML ilə SMS göndər Nümunə
Cavab · XML
<?xml version="1.0" encoding="UTF-8"?>
<response>
    <statusID>0</statusID>
    <smsID>11574</smsID>
    <message>SMS Sent</message>
</response>
OTP partial success 200
Cavab · XML
<?xml version="1.0" encoding="UTF-8"?>
<response>
    <statusID>0</statusID>
    <smsID>123</smsID>
    <message>SMS partially sent</message>
    <acceptedCount>1</acceptedCount>
    <rejectedCount>1</rejectedCount>
    <rejectedNumbers>
        <recipient>
            <index>0</index>
            <number>599000001</number>
            <statusID>47</statusID>
            <reason>otpCooldown</reason>
            <retryAfter>30</retryAfter>
        </recipient>
    </rejectedNumbers>
</response>
OTP all recipients restricted 200
Cavab · XML
<?xml version="1.0" encoding="UTF-8"?>
<response>
    <statusID>47</statusID>
    <smsID>null</smsID>
    <message>OTP recipient protection limit exceeded</message>
    <acceptedCount>0</acceptedCount>
    <rejectedCount>1</rejectedCount>
    <rejectedNumbers>
        <recipient>
            <index>0</index>
            <number>599000001</number>
            <statusID>47</statusID>
            <reason>otpCooldown</reason>
            <retryAfter>30</retryAfter>
        </recipient>
    </rejectedNumbers>
</response>
SMS API / Çatdırılma hesabatı

Çatdırılma hesabatı

API açarı · Başlıq
GET https://api.ubill.dev /v1/sms/report/{smsID}

Statuslar

statusID Təsvir
0 Göndərildi
1 Alındı
2 Çatdırılmadı
3 Status gözlənilir
4 Xəta

URL parametrləri 1

smsIDpath{smsID}

Sorğu başlıqları 2

Açar Dəyər Mənbə
keyYOUR_API_KEY Autentifikasiya
Content-Typeapplication/json Başlıq

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request GET \
  --url 'https://api.ubill.dev/v1/sms/report/{smsID}' \
  --header 'key: YOUR_API_KEY' \
  --header 'Content-Type: application/json'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/sms/report/{smsID}',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        'key: YOUR_API_KEY',
        'Content-Type: application/json'
    ]
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/sms/report/{smsID}',
  {
  method: 'GET',
  headers: {
    'key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

1 nümunə
Çatdırılma hesabatı Nümunə
Cavab · JSON
{
    "statusID": 0,
    "result": [
        {
            "number": "9955XXXXXXXX",
            "statusID": "0"
        },
        {
            "number": "9955XXXXXXXX",
            "statusID": "0"
        }
    ]
}
SMS API / SMS balansını al

SMS balansını al

API açarı · Sorğu
GET https://api.ubill.dev /v1/sms/balance?key=YOUR_API_KEY

URL parametrləri 1

keyqueryYOUR_API_KEY

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request GET \
  --url 'https://api.ubill.dev/v1/sms/balance?key=YOUR_API_KEY'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/sms/balance?key=YOUR_API_KEY',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET'
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/sms/balance?key=YOUR_API_KEY',
  {
  method: 'GET'
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

1 nümunə
SMS balansını al Nümunə
Cavab · JSON
{
    "statusID": 0,
    "sms": 5000
}
RESURS

Incoming SMS

3 endpoint

SMS API / Incoming SMS / Get Incoming SMS

Get Incoming SMS

API açarı · Başlıq
GET https://api.ubill.dev /v1/sms/inbound

Incoming SMS — receive messages through the API

Required application permission: sms.inbound. Enable Incoming SMS access in the company's API application settings and pass that application's API key in the key header. Only messages assigned to the key's company are returned. A client-supplied company ID cannot change this scope. IP restrictions and API rate limits still apply.

Without date parameters, returns the last 24 hours by provider send time. Results are in receipt order, oldest first, rather than sorted by UUID or sender timestamp. Dates in sendAt and response metadata are UTC; date-only filters use the Asia/Tbilisi calendar.

Query parameters

Parametr Növ Məcburi Təsvir
dateString Xeyr One whole Tbilisi calendar day, for example 2026-11-02. Cannot be combined with from və ya to.
fromString Xeyr Inclusive start. Accepts YYYY-MM-DD or an RFC 3339 timestamp with timezone and up to 6 fractional digits. Defaults to 24 hours before the end.
toString Xeyr Defaults to now. A date includes its entire Tbilisi calendar day; a timestamp is an exclusive end.
limitInteger Xeyr Batch size: 1–100; default 50.
cursorString (UUIDv4) Xeyr Use the previous response's meta.nextCursor to retrieve later records. Unknown or other-company cursors return HTTP 404.

Date examples

GET /v1/sms/inbound
GET /v1/sms/inbound?date=2026-11-02
GET /v1/sms/inbound?from=2026-11-01&to=2026-11-02
GET /v1/sms/inbound?from=2026-11-02T00%3A00%3A00%2B04%3A00&to=2026-11-03T00%3A00%3A00%2B04%3A00

URL-encode timezone offsets, especially + as %2B. Invalid, conflicting or reversed date filters return HTTP 400.

Message fields

Sahə Növ Təsvir
eventIDString (UUIDv4)Stable UBill-generated public message ID. It is independent of the SMS provider's message ID and is also used in callbacks. Use it to deduplicate messages.
fromStringSubscriber number in local nine-digit format, for example 5XXXXXXXX.
toStringReceiving short number.
textStringIncoming message text. Unicode and line breaks are preserved.
noSmsBooleanEffective NO SMS policy configured for the short number by the administrator; not the provider's flag.
sendAtString / nullProvider send time in UTC, with microsecond precision. May be null for older imported messages.

Provider IDs and internal numeric row IDs are not exposed. Other applications of the same company with sms.inbound access see the same public message ID.

Pagination and polling

meta.count is the number of messages in this batch; meta.hasMore indicates another batch. For the next page, reuse meta.from, meta.to və meta.nextCursor so the date window remains fixed. On an empty batch, nextCursor retains the supplied cursor, or is null if no cursor was supplied.

For polling, omit dates and send the last cursor to fetch newer records within the latest 24-hour window. Persist public eventID values to handle duplicates. Use explicit dates when retrieving older history.

Errors

HTTP 400: invalid dates, limit or cursor format. HTTP 401: invalid API key or missing sms.inbound permission. HTTP 403: IP not allowed. HTTP 404: unknown or other-company cursor. HTTP 429: rate limit exceeded.

Sorğu başlıqları 2

Açar Dəyər Mənbə
keyYOUR_API_KEY Autentifikasiya
Acceptapplication/json Başlıq

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request GET \
  --url 'https://api.ubill.dev/v1/sms/inbound' \
  --header 'key: YOUR_API_KEY' \
  --header 'Accept: application/json'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/sms/inbound',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        'key: YOUR_API_KEY',
        'Accept: application/json'
    ]
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/sms/inbound',
  {
  method: 'GET',
  headers: {
    'key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

5 nümunə
Last 24 hours 200
Cavab · JSON
{
  "statusID": 0,
  "meta": {
    "from": "2026-11-01T09:00:00.000000Z",
    "to": "2026-11-02T09:00:00.000000Z",
    "limit": 50,
    "count": 1,
    "hasMore": false,
    "nextCursor": "29a24670-e631-4bf3-b593-ea35df838115"
  },
  "result": [
    {
      "eventID": "29a24670-e631-4bf3-b593-ea35df838115",
      "from": "5XXXXXXXX",
      "to": "90566",
      "text": "Example incoming SMS",
      "noSms": false,
      "sendAt": "2026-11-02T08:30:00.396288Z"
    }
  ]
}
No messages 200
Cavab · JSON
{
  "statusID": 0,
  "meta": {
    "from": "2026-11-01T09:00:00.000000Z",
    "to": "2026-11-02T09:00:00.000000Z",
    "limit": 50,
    "count": 0,
    "hasMore": false,
    "nextCursor": null
  },
  "result": []
}
Invalid date 400
Cavab · JSON
{
  "statusID": 400,
  "message": "Invalid date",
  "result": []
}
Permission denied 401
Cavab · JSON
{
  "statusID": 401,
  "message": "Invalid API key or permission denied",
  "result": []
}
Cursor not found 404
Cavab · JSON
{
  "statusID": 404,
  "message": "Cursor not found",
  "result": []
}
SMS API / Incoming SMS / Get Incoming SMS by eventID

Get Incoming SMS by eventID

API açarı · Başlıq
GET https://api.ubill.dev /v1/sms/inbound/{eventID}

Get one incoming SMS

Requires the application's sms.inbound permission and key header. Replace {eventID} with the public UUID returned by the incoming-message list or callback.

The lookup is restricted to the API key's company and has no date restriction. An invalid UUID returns HTTP 400; an unknown, provider-owned or other-company UUID returns HTTP 404. The response contains statusID and a result array with one message object.

URL parametrləri 1

eventIDpath{eventID}

Sorğu başlıqları 2

Açar Dəyər Mənbə
keyYOUR_API_KEY Autentifikasiya
Acceptapplication/json Başlıq

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request GET \
  --url 'https://api.ubill.dev/v1/sms/inbound/{eventID}' \
  --header 'key: YOUR_API_KEY' \
  --header 'Accept: application/json'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/sms/inbound/{eventID}',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        'key: YOUR_API_KEY',
        'Accept: application/json'
    ]
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/sms/inbound/{eventID}',
  {
  method: 'GET',
  headers: {
    'key': 'YOUR_API_KEY',
    'Accept': 'application/json'
  }
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

3 nümunə
Incoming message 200
Cavab · JSON
{
  "statusID": 0,
  "result": [
    {
      "eventID": "29a24670-e631-4bf3-b593-ea35df838115",
      "from": "5XXXXXXXX",
      "to": "90566",
      "text": "Example incoming SMS",
      "noSms": false,
      "sendAt": "2026-11-02T08:30:00.396288Z"
    }
  ]
}
Invalid message ID 400
Cavab · JSON
{
  "statusID": 400,
  "message": "Invalid ID",
  "result": []
}
Message not found 404
Cavab · JSON
{
  "statusID": 404,
  "message": "Message not found",
  "result": []
}
SMS API / Incoming SMS / Incoming SMS Callback

Incoming SMS Callback

API event callback
POST https://example.com/callback

Incoming SMS callback

Set an HTTPS callback URL-i for your API application and enable sms.inbound. When an incoming SMS is assigned to that company, uBill queues one delivery for each active, permitted application with a configured callback URL.

This event uses POST with a JSON body to the same callback URL used by delivery-status notifications. The event type is sms.inbound.received. Delivery-status and brand-activation events continue to use GET; a shared receiver should route by HTTP method and event type.

Authentication and fields

The application's callback key is sent both in the X-Webhook-Token header and the JSON key field. Validate it against your configured callback key. For legacy applications without a callback key, the existing API-key fallback is used.

Sahə Növ Təsvir
eventStringsms.inbound.received
keyStringCallback authentication key.
eventIDString (UUIDv4)The same stable public message ID returned by the Incoming SMS API. It is not the provider's message ID.
fromStringSubscriber's local nine-digit number.
toStringReceiving short number.
textStringIncoming message, including Unicode and line breaks.
noSmsBooleanAdministrator-configured short-number NO SMS policy.
sendAtStringProvider send time in UTC with microsecond precision.

Acknowledgement and retries

After safely accepting the message, return any 2xx HTTP response. Delivery is at least once: store eventID with a unique constraint and return success for a message already accepted. A timed-out request may already have reached your server.

Network failures and non-2xx responses are retried, up to 5 HTTP attempts. Retry delays are 1 minute, 5 minutes, 30 minutes, then 2 hours; actual timing depends on worker scheduling. The message ID stays unchanged. The request timeout is 10 seconds. Redirects are not followed with the token or SMS content.

Before sending, uBill rechecks application activity, permission, company and callback URL. Removing access or disabling the app cancels pending delivery. Old messages are not automatically pushed when callbacks are first enabled; use the Incoming SMS API to retrieve history.

Sorğu başlıqları 2

Açar Dəyər Mənbə
Content-Typeapplication/json Başlıq
X-Webhook-TokenYOUR_CALLBACK_KEY Başlıq

Sorğu gövdəsi JSON

Sorğu gövdəsi
{
  "eventID": "29a24670-e631-4bf3-b593-ea35df838115",
  "from": "5XXXXXXXX",
  "to": "90566",
  "text": "Example incoming SMS",
  "noSms": false,
  "sendAt": "2026-11-02T08:30:00.396288Z",
  "event": "sms.inbound.received",
  "key": "YOUR_CALLBACK_KEY"
}

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request POST \
  --url 'https://example.com/callback' \
  --header 'Content-Type: application/json' \
  --header 'X-Webhook-Token: YOUR_CALLBACK_KEY' \
  --data '{
  "eventID": "29a24670-e631-4bf3-b593-ea35df838115",
  "from": "5XXXXXXXX",
  "to": "90566",
  "text": "Example incoming SMS",
  "noSms": false,
  "sendAt": "2026-11-02T08:30:00.396288Z",
  "event": "sms.inbound.received",
  "key": "YOUR_CALLBACK_KEY"
}'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://example.com/callback',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => <<<'BODY'
{
  "eventID": "29a24670-e631-4bf3-b593-ea35df838115",
  "from": "5XXXXXXXX",
  "to": "90566",
  "text": "Example incoming SMS",
  "noSms": false,
  "sendAt": "2026-11-02T08:30:00.396288Z",
  "event": "sms.inbound.received",
  "key": "YOUR_CALLBACK_KEY"
}
BODY,
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
        'X-Webhook-Token: YOUR_CALLBACK_KEY'
    ]
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://example.com/callback',
  {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-Webhook-Token': 'YOUR_CALLBACK_KEY'
  },
  body: "{\n  \"eventID\": \"29a24670-e631-4bf3-b593-ea35df838115\",\n  \"from\": \"5XXXXXXXX\",\n  \"to\": \"90566\",\n  \"text\": \"Example incoming SMS\",\n  \"noSms\": false,\n  \"sendAt\": \"2026-11-02T08:30:00.396288Z\",\n  \"event\": \"sms.inbound.received\",\n  \"key\": \"YOUR_CALLBACK_KEY\"\n}"
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

1 nümunə
Accepted by your endpoint (example) 200
Cavab · JSON
{
  "success": true
}
SMS API / API hadisələrinin geri çağırışları

API hadisələrinin geri çağırışları

API açarı · Sorğu
GET https://example.com/callback?key=YourCallbackKey&event=sms.brand.activated&brandID=12&brandName=MyBrand&authorized=1&date=2026-08-10 15:30:00

API hadisələrinin geri çağırışları

API tətbiqinin parametrlərində bir ortaq ünvan var: HTTPS callback URL-i . The event type determines the HTTP method and payload format; not every callback is a GET request.

İstifadə edin: event to route notifications. Return any 2xx HTTP status after safely accepting an event.

Dəstəklənən hadisələr

Hadisə Metod Fields
sms.delivery.updatedGET querykey, event, smsID, number, statusID, date
sms.brand.activatedGET querykey, event, brandID, brandName, authorized=1, date
sms.inbound.receivedPOST JSONkey, event, eventID, from, to, text, noSms, sendAt

GET callbacks authenticate with the application's callback key query parameter. Incoming SMS callbacks send that key in JSON and the X-Webhook-Token header and require sms.inbound access. GET date fields use Y-m-d H:i:s; incoming SMS sendAt uses UTC RFC 3339.

SMS brend aktivləşməsi nümunəsi

https://example.com/callback?key=YourCallbackKey&event=sms.brand.activated&brandID=12&brandName=MyBrand&authorized=1&date=2026-08-10%2015:30:00

See Incoming SMS → Incoming SMS Callback for the JSON body, authentication, retries and deduplication rules.

URL parametrləri 6

keyqueryYourCallbackKey
eventquerysms.brand.activated
brandIDquery12
brandNamequeryMyBrand
authorizedquery1
datequery2026-08-10 15:30:00

Kod nümunələri

cURL · PHP · JavaScript

Cavab nümunələri

0 nümunə
Bu endpoint üçün cavab nümunəsi yoxdur.
SMS API / SMS çatdırılma geri çağırışı

SMS çatdırılma geri çağırışı

API açarı · Sorğu
GET https://example.com/callback?key=YourCallbackKey&event=sms.delivery.updated&smsID=12345678&number=9955XXXXXXXX&statusID=1&date=2026-02-01 12:02:02

Avtomatik mesaj statusu (Callback)

SMS API göndərilmiş mesajların statusunu serverinizdə avtomatik almağa imkan verir: Geri çağırış mexanizmi.

Mesajın statusu dəyişdikdə (göndərildi, alındı, çatdırılmadı və s.) sistem göndərir: GET sorğusu təyin etdiyiniz ünvana HTTPS ünvanı .

Callback URL tələbləri:

  • Bununla başlamalıdır: https://

  • Metod: GET

  • Şirkətin API parametrlərində təyin olunur

Parametrlər

Parametr Təsvir
key Serverinizin callback yoxlama açarı
smsID Mesajın unikal identifikatoru
number Alıcının mobil nömrəsi (beynəlxalq format)
statusID Mesajın cari status kodu
date Statusun yenilənmə vaxtı ( Y-m-d H:i:s)

Status kodları

statusID Təsvir
0 Göndərildi
1 Alındı
2 Çatdırılmadı
3 Status gözlənilir
4 Xəta

Callback emalı nümunəsi (PHP)

$key    = $_GET['key'] ?? null;
$smsID    = $_GET['smsID'] ?? null;
$number   = $_GET['number'] ?? null;
$statusID = $_GET['statusID'] ?? null;
$date     = $_GET['date'] ?? null;

// Validation: ensure the key matches your callback key
if ($key !== 'YourCallbackKey') {
    http_response_code(403);
    echo 'Forbidden';
    exit;
}

// Process the received status in your system
http_response_code(200);
echo 'OK';
?>

URL parametrləri 6

keyqueryYourCallbackKey
eventquerysms.delivery.updated
smsIDquery12345678
numberquery9955XXXXXXXX
statusIDquery1
datequery2026-02-01 12:02:02

Kod nümunələri

cURL · PHP · JavaScript

Cavab nümunələri

0 nümunə
Bu endpoint üçün cavab nümunəsi yoxdur.
API QRUPU

Billinq API

15 endpoint

RESURS

Müştərilər

6 endpoint

Billinq API / Müştərilər / Bütün müştəriləri al

Bütün müştəriləri al

API açarı · Başlıq
GET https://api.ubill.dev /v1/customers

Sorğu başlıqları 2

Açar Dəyər Mənbə
keyYOUR_API_KEY Autentifikasiya
Content-Typeapplication/json Başlıq

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request GET \
  --url 'https://api.ubill.dev/v1/customers' \
  --header 'key: YOUR_API_KEY' \
  --header 'Content-Type: application/json'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/customers',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        'key: YOUR_API_KEY',
        'Content-Type: application/json'
    ]
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/customers',
  {
  method: 'GET',
  headers: {
    'key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

0 nümunə
Bu endpoint üçün cavab nümunəsi yoxdur.
Billinq API / Müştərilər / Müştəri yarat

Müştəri yarat

API açarı · Başlıq
POST https://api.ubill.dev /v1/customers/create

Telefon nömrələri ilə birlikdə yeni müştəri yaradır. Müştəri nömrəsi ( id in the response) is generated automatically and is unique inside the company.

Tələb olunan icazə: customers.create . Sorğu gövdəsi JSON olmalıdır və Content-Type: application/json başlığı məcburidir.

Sorğu gövdəsi

Sahə Növ Məcburi Təsvir
typeID tam ədəd bəli Müştərinin hüquqi növü uBill növ siyahısında olmalıdır ( 1 = fiziki şəxs).
name sətir, maksimum 50 xeyr Müştəri adı.
personalNo sətir, maksimum 11 xeyr Şəxsi nömrə və ya şirkət kodu, yalnız hərf və rəqəmlər.
email sətir xeyr Verildikdə etibarlı e-poçt ünvanı olmalıdır.
birthDate sətir xeyr Tarix bu formatda: YYYY-MM-DD formatında.
lang sətir xeyr Bunlardan biri: ka, en, ru . Standart olaraq şirkətdə təyin olunan müştəri dili götürülür.
address sətir, maksimum 50 xeyr Müştəri ünvanı.
column1, column2 sətir, maksimum 50 xeyr Sərbəst əlavə sahələr.
numbers massiv bəli Müştərinin telefonları, ən azı biri məcburidir.

numbers[] obyekti

Sahə Növ Təsvir
number sətir Ölkə kodu olmadan yerli nömrə, 6–15 rəqəm.
mobile sətir Tam beynəlxalq nömrə. Bu açar işlədildikdə ölkə kodu nömrənin əvvəlindən çıxarılır.
countryCode sətir Ölkə kodu, standart: +995.
isPrimary 0 və ya 1 Əsas nömrəni işarələyir. Seçilməzsə, siyahının birinci nömrəsi əsas olur.
smsEnabled 0 və ya 1 Nömrənin SMS bildirişləri alması, standart: 1.
note sətir, maksimum 100 Nömrə üçün sərbəst qeyd.

Bir nömrə qısa formada da göndərilə bilər: {"mobile": "9955XXXXXXXX", "countryCode": "+995"} bunun əvəzinə: numbers massivi. Təkrarlar xəbərdarlıq olmadan silinir; eyni şirkətdə başqa müştəriyə aid nömrə rədd olunur.

Cavablar

HTTPstatusID Təsvir
2010 Müştəri yaradıldı, data yeni müştərini ehtiva edir.
400400 Yoxlama uğursuzdur, errors obyekti hər yanlış sahəni göstərir.
50099 Müştəri saxlanmadı, heç nə yazılmadı.

Sorğu başlıqları 2

Açar Dəyər Mənbə
keyYOUR_API_KEY Autentifikasiya
Content-Typeapplication/json Başlıq

Sorğu gövdəsi JSON

Sorğu gövdəsi
{
    "typeID": 1,
    "name": "გიორგი მაისურაძე",
    "personalNo": "XXXXXXXXXXX",
    "email": "[email protected]",
    "birthDate": "1990-05-17",
    "lang": "ka",
    "address": "ვაჟა-ფშაველას 1",
    "column1": "",
    "column2": "",
    "numbers": [
        {
            "number": "5XXXXXXXX",
            "countryCode": "+995",
            "isPrimary": 1,
            "smsEnabled": 1,
            "note": "პირადი"
        },
        {
            "mobile": "9955XXXXXXXX",
            "smsEnabled": 0,
            "note": "ბიოს"
        }
    ]
}

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request POST \
  --url 'https://api.ubill.dev/v1/customers/create' \
  --header 'key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "typeID": 1,
    "name": "გიორგი მაისურაძე",
    "personalNo": "XXXXXXXXXXX",
    "email": "[email protected]",
    "birthDate": "1990-05-17",
    "lang": "ka",
    "address": "ვაჟა-ფშაველას 1",
    "column1": "",
    "column2": "",
    "numbers": [
        {
            "number": "5XXXXXXXX",
            "countryCode": "+995",
            "isPrimary": 1,
            "smsEnabled": 1,
            "note": "პირადი"
        },
        {
            "mobile": "9955XXXXXXXX",
            "smsEnabled": 0,
            "note": "ბიოს"
        }
    ]
}'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/customers/create',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => <<<'BODY'
{
    "typeID": 1,
    "name": "გიორგი მაისურაძე",
    "personalNo": "XXXXXXXXXXX",
    "email": "[email protected]",
    "birthDate": "1990-05-17",
    "lang": "ka",
    "address": "ვაჟა-ფშაველას 1",
    "column1": "",
    "column2": "",
    "numbers": [
        {
            "number": "5XXXXXXXX",
            "countryCode": "+995",
            "isPrimary": 1,
            "smsEnabled": 1,
            "note": "პირადი"
        },
        {
            "mobile": "9955XXXXXXXX",
            "smsEnabled": 0,
            "note": "ბიოს"
        }
    ]
}
BODY,
    CURLOPT_HTTPHEADER => [
        'key: YOUR_API_KEY',
        'Content-Type: application/json'
    ]
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/customers/create',
  {
  method: 'POST',
  headers: {
    'key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: "{\n    \"typeID\": 1,\n    \"name\": \"გიორგი მაისურაძე\",\n    \"personalNo\": \"XXXXXXXXXXX\",\n    \"email\": \"[email protected]\",\n    \"birthDate\": \"1990-05-17\",\n    \"lang\": \"ka\",\n    \"address\": \"ვაჟა-ფშაველას 1\",\n    \"column1\": \"\",\n    \"column2\": \"\",\n    \"numbers\": [\n        {\n            \"number\": \"5XXXXXXXX\",\n            \"countryCode\": \"+995\",\n            \"isPrimary\": 1,\n            \"smsEnabled\": 1,\n            \"note\": \"პირადი\"\n        },\n        {\n            \"mobile\": \"9955XXXXXXXX\",\n            \"smsEnabled\": 0,\n            \"note\": \"ბიოს\"\n        }\n    ]\n}"
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

3 nümunə
Müştəri yaradıldı 201
Cavab · JSON
{
    "statusID": 0,
    "message": "Customer created",
    "data": {
        "id": 100001,
        "typeID": 1,
        "name": "გიორგი მაისურაძე",
        "mobile": "9955XXXXXXXX",
        "numbers": [
            {
                "mobile": "9955XXXXXXXX",
                "countryCode": "+995",
                "number": "5XXXXXXXX",
                "isPrimary": 1,
                "smsEnabled": 1,
                "note": "პირადი"
            },
            {
                "mobile": "9955XXXXXXXX",
                "countryCode": "+995",
                "number": "5XXXXXXXX",
                "isPrimary": 0,
                "smsEnabled": 0,
                "note": "ბიოს"
            }
        ],
        "personalNo": "XXXXXXXXXXX",
        "email": "[email protected]",
        "birthDate": "1990-05-17",
        "address": "ვაჟა-ფშაველას 1",
        "lang": "ka",
        "column1": "",
        "column2": "",
        "createdAt": "2026-08-26 13:19:02"
    }
}
Yoxlama uğursuzdur 400
Cavab · JSON
{
    "statusID": 400,
    "message": "Validation failed",
    "data": null,
    "errors": {
        "typeID": "typeID does not exist",
        "birthDate": "birthDate must be a valid date in YYYY-MM-DD format",
        "email": "Email is invalid",
        "numbers": "Phone number is invalid"
    }
}
Nömrə artıq istifadə olunur 400
Cavab · JSON
{
    "statusID": 400,
    "message": "Validation failed",
    "data": null,
    "errors": {
        "numbers": "+9955XXXXXXXX is already assigned to another customer"
    }
}
Billing API / Customers / Edit Customer

Edit Customer

API açarı · Başlıq
POST https://api.ubill.dev /v1/customers/edit/100001

Updates an existing customer in the company associated with your API key. Use the customer id returned by the create, search or get endpoints in the URL.

Tələb olunan icazə: customers.edit. Enable this permission in the API application settings. A Business package is required. Send key: YOUR_API_KEY və Content-Type: application/json headers.

Partial update

Send a non-empty JSON object containing only fields to change. Omitted fields keep their current values. The customer ID, balance and status cannot be changed with this endpoint. Unknown fields and fields of disabled modules are rejected.

Sorğu gövdəsi

Sahə Növ Təsvir
namestring/null, max 50Name; null or empty string clears it.
birthDatestring/nullYYYY-MM-DD date; null or empty string clears it.
addressstring/null, max 50Address; null or empty string clears it.
column1, column2string/null, max 50Additional fields; null or empty string clears them.
numbers massiv Replacement phone number list; omission preserves existing numbers.
typeID tam ədəd Existing legal type ID. Cannot be null.
personalNostring/null, max 11Alphanumeric personal or company code. Null or empty string clears it.
emailstring/null, max 254Valid email address. Null or empty string clears it.
lang sətir ka, en or ru. Cannot be cleared.

Phone numbers

Omit numbers və mobile to keep existing numbers. Sending either replaces the entire phone number list; include every number you want to keep. Customers require at least one number; an empty list is rejected. Sending numbers: null is invalid. Numbers already assigned to another customer in the same company are rejected; keeping a number already on this customer is allowed.

Use the same numbers[] objects as for creation: number (local digits) or mobile (full international number), countryCode (default +995), isPrimary, smsEnabled (default true), and note (maximum 100 characters). Boolean flags accept JSON booleans or 0/1. One primary number is selected; without an explicit primary flag the first number is primary. Duplicate numbers in the submitted list are collapsed. A number must have 6 to 15 digits, and country code plus number must not exceed 15 digits.

For a single number use {"mobile":"9955XXXXXXXX","countryCode":"+995","smsEnabled":true,"numberNote":"Main"}. Send either numbers və ya mobile, never both. The top-level countryCode, smsEnabled, and numberNote shortcuts require mobile.

Update behavior

If the update fails, the previous data remains unchanged.

Cavablar

HTTPstatusID Təsvir
2000Updated successfully. data contains the updated record and current phone numbers; all related IDs in the response are public IDs.
400400Invalid request or invalid field values. errors identifies the affected fields; data is null.
401401Invalid API key or missing edit permission.
403403The caller IP address is not allowed.
404404The record is missing, deleted, or belongs to another company.
415415The request Content-Type is not application/json.
429429API rate limit exceeded.
50099The update could not be saved. The previous data remains unchanged.

Sorğu başlıqları 2

Açar Dəyər Mənbə
keyYOUR_API_KEY Autentifikasiya
Content-Typeapplication/json Başlıq

Sorğu gövdəsi JSON

Sorğu gövdəsi
{
    "name": "Updated Customer",
    "numbers": [
        {
            "number": "5XXXXXXXX",
            "countryCode": "+995",
            "isPrimary": true,
            "smsEnabled": true,
            "note": "Main number"
        },
        {
            "number": "5XXXXXXXX",
            "countryCode": "+995",
            "smsEnabled": false,
            "note": "Additional number"
        }
    ],
    "email": "[email protected]"
}

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request POST \
  --url 'https://api.ubill.dev/v1/customers/edit/100001' \
  --header 'key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Updated Customer",
    "numbers": [
        {
            "number": "5XXXXXXXX",
            "countryCode": "+995",
            "isPrimary": true,
            "smsEnabled": true,
            "note": "Main number"
        },
        {
            "number": "5XXXXXXXX",
            "countryCode": "+995",
            "smsEnabled": false,
            "note": "Additional number"
        }
    ],
    "email": "[email protected]"
}'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/customers/edit/100001',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => <<<'BODY'
{
    "name": "Updated Customer",
    "numbers": [
        {
            "number": "5XXXXXXXX",
            "countryCode": "+995",
            "isPrimary": true,
            "smsEnabled": true,
            "note": "Main number"
        },
        {
            "number": "5XXXXXXXX",
            "countryCode": "+995",
            "smsEnabled": false,
            "note": "Additional number"
        }
    ],
    "email": "[email protected]"
}
BODY,
    CURLOPT_HTTPHEADER => [
        'key: YOUR_API_KEY',
        'Content-Type: application/json'
    ]
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/customers/edit/100001',
  {
  method: 'POST',
  headers: {
    'key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: "{\n    \"name\": \"Updated Customer\",\n    \"numbers\": [\n        {\n            \"number\": \"5XXXXXXXX\",\n            \"countryCode\": \"+995\",\n            \"isPrimary\": true,\n            \"smsEnabled\": true,\n            \"note\": \"Main number\"\n        },\n        {\n            \"number\": \"5XXXXXXXX\",\n            \"countryCode\": \"+995\",\n            \"smsEnabled\": false,\n            \"note\": \"Additional number\"\n        }\n    ],\n    \"email\": \"[email protected]\"\n}"
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

4 nümunə
Updated 200
Cavab · JSON
{
    "statusID": 0,
    "message": "Customer updated",
    "data": {
        "id": 100001,
        "name": "Updated Customer",
        "birthDate": null,
        "address": "Tbilisi",
        "column1": null,
        "column2": null,
        "createdAt": "2026-10-01 10:00:00",
        "updatedAt": "2026-10-27 12:00:00",
        "mobile": "9955XXXXXXXX",
        "numbers": [
            {
                "number": "5XXXXXXXX",
                "countryCode": "+995",
                "isPrimary": 1,
                "smsEnabled": 1,
                "note": "Main number",
                "mobile": "9955XXXXXXXX"
            },
            {
                "number": "5XXXXXXXX",
                "countryCode": "+995",
                "smsEnabled": 0,
                "note": "Additional number",
                "mobile": "9955XXXXXXXX",
                "isPrimary": 0
            }
        ],
        "typeID": 1,
        "personalNo": "XXXXXXXXXXX",
        "email": "[email protected]",
        "lang": "ka"
    }
}
Yoxlama uğursuzdur 400
Cavab · JSON
{
    "statusID": 400,
    "message": "Validation failed",
    "data": null,
    "errors": {
        "numbers": "Phone number is invalid"
    }
}
Not found 404
Cavab · JSON
{
    "statusID": 404,
    "message": "Customer not found",
    "data": null
}
Storage failure 500
Cavab · JSON
{
    "statusID": 99,
    "message": "Customer update failed",
    "data": null
}
Billinq API / Müştərilər / Müştərini al

Müştərini al

API açarı · Başlıq
GET https://api.ubill.dev /v1/customers/100001

Sorğu başlıqları 2

Açar Dəyər Mənbə
keyYOUR_API_KEY Autentifikasiya
Content-Typeapplication/json Başlıq

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request GET \
  --url 'https://api.ubill.dev/v1/customers/100001' \
  --header 'key: YOUR_API_KEY' \
  --header 'Content-Type: application/json'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/customers/100001',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        'key: YOUR_API_KEY',
        'Content-Type: application/json'
    ]
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/customers/100001',
  {
  method: 'GET',
  headers: {
    'key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

0 nümunə
Bu endpoint üçün cavab nümunəsi yoxdur.
Billinq API / Müştərilər / Müştəri axtarışı

Müştəri axtarışı

API açarı · Başlıq
GET https://api.ubill.dev /v1/customers/search?type=mobile&value=9955XXXXXXXX

URL parametrləri 2

typequerymobile
valuequery9955XXXXXXXX

Sorğu başlıqları 2

Açar Dəyər Mənbə
keyYOUR_API_KEY Autentifikasiya
Content-Typeapplication/json Başlıq

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request GET \
  --url 'https://api.ubill.dev/v1/customers/search?type=mobile&value=9955XXXXXXXX' \
  --header 'key: YOUR_API_KEY' \
  --header 'Content-Type: application/json'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/customers/search?type=mobile&value=9955XXXXXXXX',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        'key: YOUR_API_KEY',
        'Content-Type: application/json'
    ]
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/customers/search?type=mobile&value=9955XXXXXXXX',
  {
  method: 'GET',
  headers: {
    'key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

0 nümunə
Bu endpoint üçün cavab nümunəsi yoxdur.
Billinq API / Müştərilər / Müştəri hesabları

Müştəri hesabları

API açarı · Başlıq
GET https://api.ubill.dev /v1/customers/accounts/100001

Sorğu başlıqları 2

Açar Dəyər Mənbə
keyYOUR_API_KEY Autentifikasiya
Content-Typeapplication/json Başlıq

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request GET \
  --url 'https://api.ubill.dev/v1/customers/accounts/100001' \
  --header 'key: YOUR_API_KEY' \
  --header 'Content-Type: application/json'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/customers/accounts/100001',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        'key: YOUR_API_KEY',
        'Content-Type: application/json'
    ]
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/customers/accounts/100001',
  {
  method: 'GET',
  headers: {
    'key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

1 nümunə
Müştəri hesabları Nümunə
Cavab · JSON
{
    "statusID": 0,
    "message": "Success",
    "draw": 0,
    "recordsTotal": 3,
    "recordsFiltered": 3,
    "data": [
        {
            "id": "170115",
            "name": "Example Customer",
            "mobile": "5XXXXXXXX",
            "personalNo": "XXXXXXXXXXX",
            "birthDate": "1991-12-08",
            "areaID": "1",
            "area": "ბათუმი - ბათუმი",
            "address": "",
            "column1": "",
            "column2": "",
            "tariffID": null,
            "tariffName": null,
            "tariffPrice": null,
            "balance": "0.00",
            "statusID": "1",
            "statusName": "აქტიური",
            "shutdownDate": null,
            "creditDate": null,
            "mac": null,
            "ip": null,
            "createdAt": "2023-12-02 11:41:37"
        },
        {
            "id": "170114",
            "name": "Example Customer",
            "mobile": "5XXXXXXXX",
            "personalNo": "XXXXXXXXXXX",
            "birthDate": "1991-12-08",
            "areaID": "1",
            "area": "ბათუმი - ბათუმი",
            "address": "",
            "column1": "",
            "column2": "",
            "tariffID": "1",
            "tariffName": "test2",
            "tariffPrice": "30.00",
            "balance": "-2.00",
            "statusID": "2",
            "statusName": "პასიური",
            "shutdownDate": null,
            "creditDate": null,
            "mac": null,
            "ip": null,
            "createdAt": "2023-11-20 23:56:52"
        },
        {
            "id": "100001",
            "name": "Example Customer",
            "mobile": "5XXXXXXXX",
            "personalNo": "XXXXXXXXXXX",
            "birthDate": "1991-12-08",
            "areaID": "2",
            "area": "თბილისი - თბილისი",
            "address": "Example Address",
            "column1": "",
            "column2": "",
            "tariffID": "1",
            "tariffName": "test2",
            "tariffPrice": "30.00",
            "balance": "-9.71",
            "statusID": "2",
            "statusName": "პასიური",
            "shutdownDate": "2022-07-13",
            "creditDate": null,
            "mac": "Cc:2d:21:0e:c9:41",
            "ip": "192.168.5.2",
            "createdAt": "2020-07-01 21:32:31"
        }
    ]
}
RESURS

Hesablar

6 endpoint

Billinq API / Hesablar / Bütün hesabları al

Bütün hesabları al

API açarı · Başlıq
GET https://api.ubill.dev /v1/accounts

Sorğu başlıqları 2

Açar Dəyər Mənbə
keyYOUR_API_KEY Autentifikasiya
Content-Typeapplication/json Başlıq

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request GET \
  --url 'https://api.ubill.dev/v1/accounts' \
  --header 'key: YOUR_API_KEY' \
  --header 'Content-Type: application/json'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/accounts',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        'key: YOUR_API_KEY',
        'Content-Type: application/json'
    ]
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/accounts',
  {
  method: 'GET',
  headers: {
    'key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

1 nümunə
Bütün hesabları al Nümunə
Cavab · JSON
{
    "statusID": 0,
    "message": "Success",
    "draw": 0,
    "recordsTotal": 70114,
    "recordsFiltered": 70114,
    "data": [
        {
            "id": "170115",
            "name": "Example Customer",
            "mobile": "5XXXXXXXX",
            "personalNo": "XXXXXXXXXXX",
            "birthDate": "1991-12-08",
            "areaID": "1",
            "area": "თბილისი - თბილისი",
            "address": "",
            "column1": "",
            "column2": "",
            "tariffID": null,
            "tariffName": null,
            "tariffPrice": null,
            "balance": "0.00",
            "statusID": "1",
            "statusName": "აქტიური",
            "shutdownDate": null,
            "creditDate": null,
            "mac": null,
            "ip": null,
            "createdAt": "2023-12-02 11:41:37"
        },
        {
            "id": "170114",
            "name": "Example Customer",
            "mobile": "5XXXXXXXX",
            "personalNo": "XXXXXXXXXXX",
            "birthDate": "1991-12-08",
            "areaID": "1",
            "area": "ბათუმი - ბათუმი",
            "address": "",
            "column1": "",
            "column2": "",
            "tariffID": "1",
            "tariffName": "test2",
            "tariffPrice": "30.00",
            "balance": "-2.00",
            "statusID": "2",
            "statusName": "პასიური",
            "shutdownDate": null,
            "creditDate": null,
            "mac": null,
            "ip": null,
            "createdAt": "2023-11-20 23:56:52"
        }
    ]
}
Billinq API / Hesablar / Hesab yarat

Hesab yarat

API açarı · Başlıq
POST https://api.ubill.dev /v1/accounts/create

Mövcud müştəri üçün yeni hesab (xidmət) yaradır. Hesab nömrəsi ( id in the response) is generated automatically according to the account numbering settings, just like an account created from the uBill web interface.

Tələb olunan icazə: accounts.create . Sorğu gövdəsi JSON olmalıdır və Content-Type: application/json başlığı məcburidir.

Sorğu gövdəsi

Sahə Növ Məcburi Təsvir
customerID tam ədəd bəli Hesabın aid olduğu müştəri nömrəsi, eyni id müştəri endpoint-lərinin qaytardığı dəyər.
name sətir, maksimum 50 xeyr Hesab adı.
birthDate sətir xeyr Tarix bu formatda: YYYY-MM-DD formatında.
areaID tam ədəd xeyr uBill rayon siyahısındakı yaşayış məntəqəsi ID-si.
address sətir, maksimum 50 xeyr Xidmət ünvanı.
geoLocation sətir, maksimum 100 xeyr Koordinatlar bu formatda: 41.732438,44.7688134 formatında.
column1, column2 sətir, maksimum 50 xeyr Sərbəst əlavə sahələr.
tariffID tam ədəd xeyr Şirkətin tarif nömrəsi.
groupID tam ədəd xeyr Şirkətin qrup və ya filial nömrəsi.
tagsID tam ədədlər massivi xeyr Hesaba əlavə olunan şirkət etiketlərinin nömrələri.
numbers massiv xeyr Hesab telefonları müştəri kimi təsvir olunur. Müştəridən fərqli olaraq hesab nömrəsiz yaradıla bilər.

Moduldan asılı sahələr

Bu sahələr yalnız şirkətdə uyğun modul aktivdirsə oxunur.

Sahə Modul Məcburi Təsvir
mac Şəbəkə bəli Cihazın MAC ünvanı, şirkət daxilində unikal.
onuMac Şəbəkə xeyr ONU MAC ünvanı, şirkət daxilində unikal.
ipRangeID Şəbəkə bəli NAS IP diapazonunun nömrəsi. İlk boş ünvan avtomatik hesaba verilir və belə qaytarılır: ip.
stbMacIPTV xeyr STB MAC ünvanı, şirkət daxilində unikal.
gpsProviderIDGPS track bəli Şirkətin GPS provayder nömrəsi.
gpsTrackIdentifierGPS track xeyr Cihaz identifikatoru, şirkət daxilində unikal.

SMS bildirişi

Şirkətdə hesab əlavə etmə SMS-i aktivdirsə, yeni hesabın SMS aktiv bütün nömrələrinə mesaj göndərilir və şirkətin SMS balansından tutulur. Balans çatmasa da hesab yaradılır, cavaba əlavə olunur: warning sahəsi.

Cavablar

HTTPstatusID Təsvir
2010 Hesab yaradıldı, data yeni hesabı ehtiva edir.
400400 Yoxlama uğursuzdur, errors obyekti hər səhv sahəni göstərir. Təkrar MAC və nömrələr eyni qaydada bildirilir.
50099 Hesab saxlanmadı, heç nə yazılmadı.

Sorğu başlıqları 2

Açar Dəyər Mənbə
keyYOUR_API_KEY Autentifikasiya
Content-Typeapplication/json Başlıq

Sorğu gövdəsi JSON

Sorğu gövdəsi
{
    "customerID": 100001,
    "name": "ბინა - ვაჟა-ფშაველას 1",
    "birthDate": "1990-05-17",
    "areaID": 1,
    "address": "ვაჟა-ფშაველას 1",
    "geoLocation": "41.732438,44.7688134",
    "column1": "",
    "column2": "",
    "tariffID": 2,
    "groupID": 1,
    "tagsID": [1, 3],
    "mac": "00:11:22:33:44:55",
    "onuMac": "AA:BB:CC:DD:EE:FF",
    "ipRangeID": 1,
    "numbers": [
        {
            "number": "5XXXXXXXX",
            "countryCode": "+995",
            "isPrimary": 1,
            "smsEnabled": 1
        }
    ]
}

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request POST \
  --url 'https://api.ubill.dev/v1/accounts/create' \
  --header 'key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "customerID": 100001,
    "name": "ბინა - ვაჟა-ფშაველას 1",
    "birthDate": "1990-05-17",
    "areaID": 1,
    "address": "ვაჟა-ფშაველას 1",
    "geoLocation": "41.732438,44.7688134",
    "column1": "",
    "column2": "",
    "tariffID": 2,
    "groupID": 1,
    "tagsID": [1, 3],
    "mac": "00:11:22:33:44:55",
    "onuMac": "AA:BB:CC:DD:EE:FF",
    "ipRangeID": 1,
    "numbers": [
        {
            "number": "5XXXXXXXX",
            "countryCode": "+995",
            "isPrimary": 1,
            "smsEnabled": 1
        }
    ]
}'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/accounts/create',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => <<<'BODY'
{
    "customerID": 100001,
    "name": "ბინა - ვაჟა-ფშაველას 1",
    "birthDate": "1990-05-17",
    "areaID": 1,
    "address": "ვაჟა-ფშაველას 1",
    "geoLocation": "41.732438,44.7688134",
    "column1": "",
    "column2": "",
    "tariffID": 2,
    "groupID": 1,
    "tagsID": [1, 3],
    "mac": "00:11:22:33:44:55",
    "onuMac": "AA:BB:CC:DD:EE:FF",
    "ipRangeID": 1,
    "numbers": [
        {
            "number": "5XXXXXXXX",
            "countryCode": "+995",
            "isPrimary": 1,
            "smsEnabled": 1
        }
    ]
}
BODY,
    CURLOPT_HTTPHEADER => [
        'key: YOUR_API_KEY',
        'Content-Type: application/json'
    ]
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/accounts/create',
  {
  method: 'POST',
  headers: {
    'key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: "{\n    \"customerID\": 100001,\n    \"name\": \"ბინა - ვაჟა-ფშაველას 1\",\n    \"birthDate\": \"1990-05-17\",\n    \"areaID\": 1,\n    \"address\": \"ვაჟა-ფშაველას 1\",\n    \"geoLocation\": \"41.732438,44.7688134\",\n    \"column1\": \"\",\n    \"column2\": \"\",\n    \"tariffID\": 2,\n    \"groupID\": 1,\n    \"tagsID\": [1, 3],\n    \"mac\": \"00:11:22:33:44:55\",\n    \"onuMac\": \"AA:BB:CC:DD:EE:FF\",\n    \"ipRangeID\": 1,\n    \"numbers\": [\n        {\n            \"number\": \"5XXXXXXXX\",\n            \"countryCode\": \"+995\",\n            \"isPrimary\": 1,\n            \"smsEnabled\": 1\n        }\n    ]\n}"
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

4 nümunə
Hesab yaradıldı 201
Cavab · JSON
{
    "statusID": 0,
    "message": "Account created",
    "data": {
        "id": 100001,
        "customerID": 100001,
        "name": "ბინა - ვაჟა-ფშაველას 1",
        "mobile": "9955XXXXXXXX",
        "numbers": [
            {
                "mobile": "9955XXXXXXXX",
                "countryCode": "+995",
                "number": "5XXXXXXXX",
                "isPrimary": 1,
                "smsEnabled": 1,
                "note": null
            }
        ],
        "personalNo": "XXXXXXXXXXX",
        "birthDate": "1990-05-17",
        "areaID": 1,
        "area": "თბილისი",
        "address": "ვაჟა-ფშაველას 1",
        "geoLocation": "41.732438,44.7688134",
        "column1": "",
        "column2": "",
        "groupID": 1,
        "tagsID": [1, 3],
        "tariffID": 2,
        "balance": "0.00",
        "statusID": 1,
        "createdAt": "2026-08-26 13:19:39",
        "mac": "00:11:22:33:44:55",
        "onuMac": "AA:BB:CC:DD:EE:FF",
        "ipRangeID": 1,
        "ip": "192.168.5.21"
    }
}
SMS balansı olmadan yaradıldı 201
Cavab · JSON
{
    "statusID": 0,
    "message": "Account created",
    "data": {
        "id": 100002,
        "customerID": 100001,
        "name": "მეორე ბინა",
        "mobile": "9955XXXXXXXX",
        "numbers": [
            {
                "mobile": "9955XXXXXXXX",
                "countryCode": "+995",
                "number": "5XXXXXXXX",
                "isPrimary": 1,
                "smsEnabled": 1,
                "note": null
            }
        ],
        "personalNo": "XXXXXXXXXXX",
        "birthDate": null,
        "areaID": null,
        "area": "არ არის მითითებული",
        "address": "",
        "geoLocation": null,
        "column1": "",
        "column2": "",
        "groupID": null,
        "tagsID": [],
        "tariffID": null,
        "balance": "0.00",
        "statusID": 1,
        "createdAt": "2026-08-26 13:20:11"
    },
    "warning": "account was created, but the notification sms was not sent - not enough messages on the balance"
}
Yoxlama uğursuzdur 400
Cavab · JSON
{
    "statusID": 400,
    "message": "Validation failed",
    "data": null,
    "errors": {
        "customerID": "Customer not found",
        "geoLocation": "geoLocation must look like 41.732438,44.7688134",
        "tariffID": "tariffID does not exist",
        "mac": "mac is required",
        "ipRangeID": "ipRangeID is required"
    }
}
MAC artıq istifadə olunur 400
Cavab · JSON
{
    "statusID": 400,
    "message": "Account creation failed",
    "data": null,
    "errors": {
        "account": [
            "ეს MAC მისამართი უკვე მითითებულია სხვა ანგარიშზე"
        ]
    }
}
Billing API / Accounts / Edit Account

Edit Account

API açarı · Başlıq
POST https://api.ubill.dev /v1/accounts/edit/100001

Updates an existing account in the company associated with your API key. Use the account id returned by the create, search or get endpoints in the URL.

Tələb olunan icazə: accounts.edit. Enable this permission in the API application settings. A Business package is required. Send key: YOUR_API_KEY və Content-Type: application/json headers.

Partial update

Send a non-empty JSON object containing only fields to change. Omitted fields keep their current values. The account ID and balance cannot be changed with this endpoint. Unknown fields and fields of disabled modules are rejected.

Sorğu gövdəsi

Sahə Növ Təsvir
namestring/null, max 50Name; null or empty string clears it.
birthDatestring/nullYYYY-MM-DD date; null or empty string clears it.
addressstring/null, max 50Address; null or empty string clears it.
column1, column2string/null, max 50Additional fields; null or empty string clears them.
numbers massiv Replacement phone number list; omission preserves existing numbers.
customerID tam ədəd Customer id returned by the customer endpoints for your company. Cannot be null.
areaIDinteger/nullSettlement ID; null removes the settlement.
geoLocationstring/nullLatitude,longitude with latitude between -90 and 90 and longitude between -180 and 180; null or empty string clears it.
tariffID, groupIDinteger/nullPublic tariff/group IDs in the same company. Null removes the link.
tagsID tam ədədlər massivi Full replacement list of public tag IDs. [] removes all tags; omission preserves them.
mac, onuMacstring/null, max 45Available only with the Network module. Values must be unique within the company; null or empty string clears them.
ipRangeIDinteger/nullNetwork module only. Public NAS range ID. A changed range assigns the first free IP; if exhausted, the request fails. Null removes both the range and IP. An unchanged range preserves the IP.
stbMacstring/null, max 45IPTV module only. Must be unique within the company.
gpsProviderIDinteger/nullGPS module only. Public GPS provider ID; null clears it.
gpsTrackIdentifierstring/null, max 255GPS module only. Unique device identifier; null or empty string clears it.
statusID tam ədəd Account status: 1 = Active (აქტიური), 2 = Passive (პასიური), 3 = Suspended (შეჩერებული), 4 = Cancelled (გაუქმებული). Omission keeps the current status; null, strings and unknown IDs are rejected.

Account statuses / ანგარიშის სტატუსები

statusIDMeaningქართული მნიშვნელობა
1Activeაქტიური
2Passiveპასიური
3Suspendedშეჩერებული
4Cancelledგაუქმებული

Göndər {"statusID":2} to make an account passive. The updated account status is returned in data.statusID, with its catalog label in data.statusName. The top-level statusID: 0 describes API success, not the account status.

Status 4 clears the assigned IP. The account, its ID and phone numbers are preserved. Balance, credit, tariff and billing dates remain unchanged by a status change.

Phone numbers

Omit numbers və mobile to keep existing numbers. Sending either replaces the entire phone number list; include every number you want to keep. Accounts may have no numbers; send numbers: [] to clear the list. Sending numbers: null is invalid. Numbers already assigned to another account in the same company are rejected; keeping a number already on this account is allowed.

Use the same numbers[] objects as for creation: number (local digits) or mobile (full international number), countryCode (default +995), isPrimary, smsEnabled (default true), and note (maximum 100 characters). Boolean flags accept JSON booleans or 0/1. One primary number is selected; without an explicit primary flag the first number is primary. Duplicate numbers in the submitted list are collapsed. A number must have 6 to 15 digits, and country code plus number must not exceed 15 digits.

For a single number use {"mobile":"9955XXXXXXXX","countryCode":"+995","smsEnabled":true,"numberNote":"Main"}. Send either numbers və ya mobile, never both. The top-level countryCode, smsEnabled, and numberNote shortcuts require mobile.

Update behavior

If the update fails, the previous data remains unchanged. Editing an account does not send the account creation SMS notification.

Cavablar

HTTPstatusID Təsvir
2000Updated successfully. data contains the updated record and current phone numbers; all related IDs in the response are public IDs.
400400Invalid request or invalid field values. errors identifies the affected fields; data is null.
401401Invalid API key or missing edit permission.
403403The caller IP address is not allowed.
404404The record is missing, deleted, or belongs to another company.
415415The request Content-Type is not application/json.
429429API rate limit exceeded.
50099The update could not be saved. The previous data remains unchanged.

Sorğu başlıqları 2

Açar Dəyər Mənbə
keyYOUR_API_KEY Autentifikasiya
Content-Typeapplication/json Başlıq

Sorğu gövdəsi JSON

Sorğu gövdəsi
{
    "name": "Updated Account",
    "numbers": [
        {
            "number": "5XXXXXXXX",
            "countryCode": "+995",
            "isPrimary": true,
            "smsEnabled": true,
            "note": "Main number"
        },
        {
            "number": "5XXXXXXXX",
            "countryCode": "+995",
            "smsEnabled": false,
            "note": "Additional number"
        }
    ],
    "address": "Updated service address",
    "statusID": 2
}

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request POST \
  --url 'https://api.ubill.dev/v1/accounts/edit/100001' \
  --header 'key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Updated Account",
    "numbers": [
        {
            "number": "5XXXXXXXX",
            "countryCode": "+995",
            "isPrimary": true,
            "smsEnabled": true,
            "note": "Main number"
        },
        {
            "number": "5XXXXXXXX",
            "countryCode": "+995",
            "smsEnabled": false,
            "note": "Additional number"
        }
    ],
    "address": "Updated service address",
    "statusID": 2
}'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/accounts/edit/100001',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => <<<'BODY'
{
    "name": "Updated Account",
    "numbers": [
        {
            "number": "5XXXXXXXX",
            "countryCode": "+995",
            "isPrimary": true,
            "smsEnabled": true,
            "note": "Main number"
        },
        {
            "number": "5XXXXXXXX",
            "countryCode": "+995",
            "smsEnabled": false,
            "note": "Additional number"
        }
    ],
    "address": "Updated service address",
    "statusID": 2
}
BODY,
    CURLOPT_HTTPHEADER => [
        'key: YOUR_API_KEY',
        'Content-Type: application/json'
    ]
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/accounts/edit/100001',
  {
  method: 'POST',
  headers: {
    'key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: "{\n    \"name\": \"Updated Account\",\n    \"numbers\": [\n        {\n            \"number\": \"5XXXXXXXX\",\n            \"countryCode\": \"+995\",\n            \"isPrimary\": true,\n            \"smsEnabled\": true,\n            \"note\": \"Main number\"\n        },\n        {\n            \"number\": \"5XXXXXXXX\",\n            \"countryCode\": \"+995\",\n            \"smsEnabled\": false,\n            \"note\": \"Additional number\"\n        }\n    ],\n    \"address\": \"Updated service address\",\n    \"statusID\": 2\n}"
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

5 nümunə
Updated 200
Cavab · JSON
{
    "statusID": 0,
    "message": "Account updated",
    "data": {
        "id": 100001,
        "name": "Updated Account",
        "birthDate": null,
        "address": "Updated service address",
        "column1": null,
        "column2": null,
        "createdAt": "2026-10-01 10:00:00",
        "updatedAt": "2026-10-27 12:00:00",
        "mobile": "9955XXXXXXXX",
        "numbers": [
            {
                "number": "5XXXXXXXX",
                "countryCode": "+995",
                "isPrimary": 1,
                "smsEnabled": 1,
                "note": "Main number",
                "mobile": "9955XXXXXXXX"
            },
            {
                "number": "5XXXXXXXX",
                "countryCode": "+995",
                "smsEnabled": 0,
                "note": "Additional number",
                "mobile": "9955XXXXXXXX",
                "isPrimary": 0
            }
        ],
        "customerID": 100001,
        "areaID": null,
        "geoLocation": null,
        "balance": "12.34",
        "statusID": 2,
        "tariffID": null,
        "groupID": null,
        "ipRangeID": null,
        "gpsProviderID": null,
        "tagsID": [],
        "mac": null,
        "onuMac": null,
        "stbMac": null,
        "ip": null,
        "gpsTrackIdentifier": null,
        "statusName": "პასიური"
    }
}
Yoxlama uğursuzdur 400
Cavab · JSON
{
    "statusID": 400,
    "message": "Validation failed",
    "data": null,
    "errors": {
        "numbers": "Phone number is invalid"
    }
}
Not found 404
Cavab · JSON
{
    "statusID": 404,
    "message": "Account not found",
    "data": null
}
Storage failure 500
Cavab · JSON
{
    "statusID": 99,
    "message": "Account update failed",
    "data": null
}
Invalid account status 400
Cavab · JSON
{
    "statusID": 400,
    "message": "Validation failed",
    "data": null,
    "errors": {
        "statusID": "statusID does not exist"
    }
}
Billinq API / Hesablar / Hesabı al

Hesabı al

API açarı · Başlıq
GET https://api.ubill.dev /v1/accounts/100001

Sorğu başlıqları 2

Açar Dəyər Mənbə
keyYOUR_API_KEY Autentifikasiya
Content-Typeapplication/json Başlıq

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request GET \
  --url 'https://api.ubill.dev/v1/accounts/100001' \
  --header 'key: YOUR_API_KEY' \
  --header 'Content-Type: application/json'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/accounts/100001',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        'key: YOUR_API_KEY',
        'Content-Type: application/json'
    ]
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/accounts/100001',
  {
  method: 'GET',
  headers: {
    'key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

1 nümunə
Hesabı al Nümunə
Cavab · JSON
{
    "statusID": 0,
    "message": "Success",
    "data": [
        {
            "id": "100001",
            "name": "Example Customer",
            "mobile": "5XXXXXXXX",
            "personalNo": "XXXXXXXXXXX",
            "birthDate": "1991-12-08",
            "areaID": "2",
            "area": "თბილისი",
            "address": "Example Address",
            "column1": "",
            "column2": "",
            "tariffID": "1",
            "tariffName": "test2",
            "tariffPrice": "30.00",
            "balance": "-9.00",
            "statusID": "2",
            "statusName": "პასიური",
            "shutdownDate": null,
            "creditDate": null,
            "mac": "Cc:2d:21:0e:c9:41",
            "ip": "192.168.5.2",
            "createdAt": "2020-07-01 21:32:31"
        }
    ]
}
Billinq API / Hesablar / Hesab axtarışı

Hesab axtarışı

API açarı · Başlıq
GET https://api.ubill.dev /v1/accounts/search?type=mobile&value=9955XXXXXXXX

URL parametrləri 2

typequerymobile
valuequery9955XXXXXXXX

Sorğu başlıqları 2

Açar Dəyər Mənbə
keyYOUR_API_KEY Autentifikasiya
Content-Typeapplication/json Başlıq

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request GET \
  --url 'https://api.ubill.dev/v1/accounts/search?type=mobile&value=9955XXXXXXXX' \
  --header 'key: YOUR_API_KEY' \
  --header 'Content-Type: application/json'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/accounts/search?type=mobile&value=9955XXXXXXXX',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        'key: YOUR_API_KEY',
        'Content-Type: application/json'
    ]
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/accounts/search?type=mobile&value=9955XXXXXXXX',
  {
  method: 'GET',
  headers: {
    'key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

0 nümunə
Bu endpoint üçün cavab nümunəsi yoxdur.
Billinq API / Hesablar / Kredit təyin et

Kredit təyin et

API açarı · Başlıq
POST https://api.ubill.dev /v1/accounts/setCredit

Sorğu başlıqları 2

Açar Dəyər Mənbə
keyYOUR_API_KEY Autentifikasiya
Content-Typeapplication/json Başlıq

Sorğu gövdəsi JSON

Sorğu gövdəsi
{
    "accountID": 170114,
    "date": "2023-12-10"
}

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request POST \
  --url 'https://api.ubill.dev/v1/accounts/setCredit' \
  --header 'key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "accountID": 170114,
    "date": "2023-12-10"
}'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/accounts/setCredit',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => <<<'BODY'
{
    "accountID": 170114,
    "date": "2023-12-10"
}
BODY,
    CURLOPT_HTTPHEADER => [
        'key: YOUR_API_KEY',
        'Content-Type: application/json'
    ]
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/accounts/setCredit',
  {
  method: 'POST',
  headers: {
    'key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: "{\n    \"accountID\": 170114,\n    \"date\": \"2023-12-10\"\n}"
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

1 nümunə
Kredit təyin et Nümunə
Cavab · JSON
{
    "statusID": 0,
    "message": "Success"
}
RESURS

Ödənişlər

3 endpoint

Billinq API / Ödənişlər / Ödənişləri al

Ödənişləri al

API açarı · Başlıq
GET https://api.ubill.dev /v1/payments

Sorğu başlıqları 2

Açar Dəyər Mənbə
keyYOUR_API_KEY Autentifikasiya
Content-Typeapplication/json Başlıq

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request GET \
  --url 'https://api.ubill.dev/v1/payments' \
  --header 'key: YOUR_API_KEY' \
  --header 'Content-Type: application/json'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/payments',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        'key: YOUR_API_KEY',
        'Content-Type: application/json'
    ]
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/payments',
  {
  method: 'GET',
  headers: {
    'key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

1 nümunə
Ödənişləri al Nümunə
Cavab · JSON
{
    "status": true,
    "draw": 0,
    "recordsTotal": 9,
    "recordsFiltered": 9,
    "data": [
        {
            "id": "9",
            "accountID": "100001",
            "balance": "0.29",
            "sum": "-10.00",
            "comment": "",
            "transactionID": null,
            "paySystem": null,
            "apiStatus": "0",
            "typeID": "2",
            "typeName": "კორექტირება",
            "admin": "Example Customer",
            "date": "2022-06-11 10:07:13"
        },
        {
            "id": "8",
            "accountID": "100001",
            "balance": "-0.71",
            "sum": "1.00",
            "comment": "",
            "transactionID": null,
            "paySystem": null,
            "apiStatus": "0",
            "typeID": "1",
            "typeName": "დამატება",
            "admin": "Example Customer",
            "date": "2022-06-10 22:24:14"
        },
        {
            "id": "7",
            "accountID": "170099",
            "balance": "-1.00",
            "sum": "20.00",
            "comment": "",
            "transactionID": null,
            "paySystem": null,
            "apiStatus": "0",
            "typeID": "2",
            "typeName": "კორექტირება",
            "admin": "Example Customer",
            "date": "2022-01-29 16:39:50"
        },
        {
            "id": "6",
            "accountID": "170099",
            "balance": "0.00",
            "sum": "-1.00",
            "comment": "",
            "transactionID": null,
            "paySystem": null,
            "apiStatus": "0",
            "typeID": "2",
            "typeName": "კორექტირება",
            "admin": "Example Customer",
            "date": "2022-01-29 16:39:39"
        },
        {
            "id": "5",
            "accountID": "100001",
            "balance": "39.06",
            "sum": "10.00",
            "comment": "",
            "transactionID": null,
            "paySystem": null,
            "apiStatus": "0",
            "typeID": "1",
            "typeName": "დამატება",
            "admin": "Example Customer",
            "date": "2021-12-22 17:16:43"
        },
        {
            "id": "4",
            "accountID": "100001",
            "balance": "-0.94",
            "sum": "20.00",
            "comment": "",
            "transactionID": null,
            "paySystem": null,
            "apiStatus": "0",
            "typeID": "1",
            "typeName": "დამატება",
            "admin": "Example Customer",
            "date": "2021-12-22 17:14:57"
        },
        {
            "id": "3",
            "accountID": "100001",
            "balance": "0.06",
            "sum": "1.00",
            "comment": null,
            "transactionID": "t1",
            "paySystem": "TBCPAY",
            "apiStatus": "0",
            "typeID": "5",
            "typeName": "ჩარიცხვა",
            "admin": null,
            "date": "2021-11-13 15:26:53"
        },
        {
            "id": "2",
            "accountID": "100001",
            "balance": "-0.94",
            "sum": "1.00",
            "comment": "",
            "transactionID": null,
            "paySystem": null,
            "apiStatus": "0",
            "typeID": "1",
            "typeName": "დამატება",
            "admin": "Example Customer",
            "date": "2021-01-18 10:31:32"
        },
        {
            "id": "1",
            "accountID": "100001",
            "balance": "-1.94",
            "sum": "1.00",
            "comment": "",
            "transactionID": null,
            "paySystem": null,
            "apiStatus": "0",
            "typeID": "1",
            "typeName": "დამატება",
            "admin": "Example Customer",
            "date": "2021-01-18 10:31:14"
        }
    ]
}
Billinq API / Ödənişlər / Hesaba görə ödənişləri al

Hesaba görə ödənişləri al

API açarı · Başlıq
GET https://api.ubill.dev /v1/payments/account/100001

Sorğu başlıqları 2

Açar Dəyər Mənbə
keyYOUR_API_KEY Autentifikasiya
Content-Typeapplication/json Başlıq

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request GET \
  --url 'https://api.ubill.dev/v1/payments/account/100001' \
  --header 'key: YOUR_API_KEY' \
  --header 'Content-Type: application/json'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/payments/account/100001',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => [
        'key: YOUR_API_KEY',
        'Content-Type: application/json'
    ]
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/payments/account/100001',
  {
  method: 'GET',
  headers: {
    'key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  }
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

1 nümunə
Hesaba görə ödənişləri al Nümunə
Cavab · JSON
{
    "statusID": 0,
    "message": "Success",
    "data": [
        {
            "id": "89",
            "accountID": null,
            "balance": "-1.94",
            "sum": "1",
            "comment": "",
            "transactionID": null,
            "paySystem": null,
            "apiStatus": "0",
            "typeID": "1",
            "typeName": "დამატება",
            "admin": "Example Customer",
            "date": "2021-01-18 10:31:14"
        },
        {
            "id": "90",
            "accountID": null,
            "balance": "-0.94",
            "sum": "1",
            "comment": "",
            "transactionID": null,
            "paySystem": null,
            "apiStatus": "0",
            "typeID": "1",
            "typeName": "დამატება",
            "admin": "Example Customer",
            "date": "2021-01-18 10:31:32"
        },
        {
            "id": "537",
            "accountID": null,
            "balance": "0.06",
            "sum": "1",
            "comment": null,
            "transactionID": "t1",
            "paySystem": "TBCPAY",
            "apiStatus": "0",
            "typeID": "5",
            "typeName": "ჩარიცხვა",
            "admin": null,
            "date": "2021-11-13 15:26:53"
        },
        {
            "id": "641",
            "accountID": null,
            "balance": "-0.94",
            "sum": "20",
            "comment": "",
            "transactionID": null,
            "paySystem": null,
            "apiStatus": "0",
            "typeID": "1",
            "typeName": "დამატება",
            "admin": "Example Customer",
            "date": "2021-12-22 17:14:57"
        },
        {
            "id": "642",
            "accountID": null,
            "balance": "39.06",
            "sum": "10",
            "comment": "",
            "transactionID": null,
            "paySystem": null,
            "apiStatus": "0",
            "typeID": "1",
            "typeName": "დამატება",
            "admin": "Example Customer",
            "date": "2021-12-22 17:16:43"
        },
        {
            "id": "1720",
            "accountID": null,
            "balance": "-0.7057142857142757",
            "sum": "1",
            "comment": "",
            "transactionID": null,
            "paySystem": null,
            "apiStatus": "0",
            "typeID": "1",
            "typeName": "დამატება",
            "admin": "Example Customer",
            "date": "2022-06-10 22:24:14"
        },
        {
            "id": "1729",
            "accountID": null,
            "balance": "0.29428571428572",
            "sum": "-10",
            "comment": "",
            "transactionID": null,
            "paySystem": null,
            "apiStatus": "0",
            "typeID": "2",
            "typeName": "კორექტირება",
            "admin": "Example Customer",
            "date": "2022-06-11 10:07:13"
        }
    ]
}
Billinq API / Ödənişlər / Ödəniş əlavə et

Ödəniş əlavə et

API açarı · Başlıq
POST https://api.ubill.dev /v1/payments/add

Sorğu başlıqları 2

Açar Dəyər Mənbə
keyYOUR_API_KEY Autentifikasiya
Content-Typeapplication/json Başlıq

Sorğu gövdəsi JSON

Sorğu gövdəsi
{
    "accountID" : 170114,
    "sum" : 1,
    "comment": "text",
    "paySystem": "WEB"
}

Kod nümunələri

cURL · PHP · JavaScript
cURL
curl --request POST \
  --url 'https://api.ubill.dev/v1/payments/add' \
  --header 'key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "accountID" : 170114,
    "sum" : 1,
    "comment": "text",
    "paySystem": "WEB"
}'
PHP
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => 'https://api.ubill.dev/v1/payments/add',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => <<<'BODY'
{
    "accountID" : 170114,
    "sum" : 1,
    "comment": "text",
    "paySystem": "WEB"
}
BODY,
    CURLOPT_HTTPHEADER => [
        'key: YOUR_API_KEY',
        'Content-Type: application/json'
    ]
]);

$response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
curl_close($curl);

echo $response;
JavaScript
const response = await fetch(
  'https://api.ubill.dev/v1/payments/add',
  {
  method: 'POST',
  headers: {
    'key': 'YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: "{\n    \"accountID\" : 170114,\n    \"sum\" : 1,\n    \"comment\": \"text\",\n    \"paySystem\": \"WEB\"\n}"
  }
);

const data = await response.json();
console.log(data);

Cavab nümunələri

1 nümunə
Ödənişlər əlavə et Nümunə
Cavab · JSON
{
    "statusID": 0,
    "message": "Success",
    "data": {
        "id": "11521"
    }
}
KÖMƏK LAZIMDIR?

İnteqrasiya dəstəyi

uBill komandası API inteqrasiyası suallarında kömək edər.

Bizimlə əlaqə
İnfrastruktur və texnologiyalar

Qabaqcıl və etibarlı texnologiyalardan istifadə edirik

uBill sabitlik, təhlükəsizlik və rahat miqyaslanma təmin edən müasir alətlər üzərində qurulub

Yuxarı qayıt