Ovozli xabarlar (Message Voice)
Ovozli xabarlar — bu Voicemail moduli orqali mijozlar qoldirgan audio xabarlar. Ushbu endpointlar orqali xabarlarni ko'rish, o'qilgan deb belgilash va o'qilmagan xabarlar sonini olish mumkin.
Ogohlantirish
Barcha endpointlar Bearer token talab qiladi. Batafsil: Auth
Ro'yxat olish
Endpoint
GET /message-voice
Ovozli xabarlar ro'yxatini filter, sort va pagination bilan qaytaradi.
Request
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
per_page | integer | No | 20 | Sahifadagi yozuvlar soni (1–300) |
sort | string | No | id | Saralash. Teskari uchun - prefix (masalan: -id) |
filter.src | string | No | Qo'ng'iroq qilgan raqam | |
filter.dst | string | No | Qo'ng'iroq qabul qilgan raqam | |
filter.external_number | string | No | Tashqi raqam | |
filter.duration | integer | No | Xabar davomiyligi (soniya) | |
filter.status | integer | No | Holat (1=O'qilmagan, 2=O'qilgan) | |
filter.from | datetime | No | Boshlanish vaqti (Y-m-d H:i:s) | |
filter.to | datetime | No | Tugash vaqti (Y-m-d H:i:s) |
Example
text
/message-voice?sort=-id&filter[status]=11
Response
| Field | Type | Description |
|---|---|---|
data | array of MessageVoiceResource | Xabarlar ro'yxati |
links | object | Pagination havolalar |
meta | object | Pagination meta |
Example
json
{
"data": [
{
"id": 12,
"date_time": "2026-01-13 17:30:00",
"src": "998901234567",
"dst": "5800",
"external_number": "998901234567",
"duration": 35,
"status": {
"number": 1,
"name": "Unread"
},
"recorded_file_url": "https://api.cc999.utel.uz/storage/monitor/2026/01/13/voicemail_123.wav"
}
],
"links": { "first": "...", "last": "...", "prev": null, "next": null },
"meta": { "current_page": 1, "total": 5, "per_page": 20 }
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
O'qilmagan xabarlar soni
Endpoint
GET /message-voice/unread-count
O'qilmagan ovozli xabarlar sonini qaytaradi. Notification badge uchun ishlatiladi.
Response
| Field | Type | Description |
|---|---|---|
result.unread_count | int | O'qilmagan xabarlar soni |
Example
json
{
"status": "success",
"code": 200,
"result": {
"unread_count": 3
},
"message": "Ok"
}1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
O'qilgan deb belgilash
Endpoint
POST /message-voice/{id}/mark-as-a-read
Bitta xabarni o'qilgan (read) deb belgilaydi.
Response
| Field | Type | Description |
|---|---|---|
status | string | success yoki error |
code | int | HTTP status kodi |
result | array | Bo'sh array |
Barchasini o'qilgan deb belgilash
Endpoint
POST /message-voice/mark-all-as-read
Barcha o'qilmagan xabarlarni o'qilgan deb belgilaydi.
Response
| Field | Type | Description |
|---|---|---|
status | string | success yoki error |
code | int | HTTP status kodi |
result | array | Bo'sh array |