Statistik
Alamat Endpoint
| Pusat Data | URL |
|---|---|
| Singapura | https://email.api.engagelab.cc |
| Turki | https://emailapi-tr.engagelab.com |
Saat menggunakan REST API, pastikan pusat data yang dipilih sesuai dengan base URL yang benar.
POST /v1/stats_day
Statistik Data Pengiriman (per hari)
Data email dihitung per hari.
URL
https://email.api.engagelab.cc/v1/stats_day
Metode HTTP Request
GET
Header Permintaan
| Header | Tipe | Wajib | Deskripsi |
|---|---|---|---|
| Authorization | String | ya | Basic base64(apiUser:apiKey) |
Deskripsi Parameter Query
| Parameter | Tipe | Wajib | Deskripsi |
|---|---|---|---|
| time_zone | string | tidak | zona waktu, contoh: +8 |
| start_date | string | ya | tanggal mulai, format yyyy-MM-dd |
| end_date | string | ya | tanggal akhir, format yyyy-MM-dd |
| api_users | string | tidak | statistik untuk API_USER tertentu; beberapa API_USER dipisahkan titik koma, contoh: api_users=a;b;c |
| label_ids | string | tidak | statistik untuk label tertentu; beberapa label dipisahkan titik koma, contoh: label_ids=a;b;c |
| domain_names | string | tidak | statistik untuk domain tertentu; beberapa domain dipisahkan titik koma, contoh: domain_names=a;b;c |
| aggregate_by | int(1,0) | tidak | default 0; jika aggregate=1, data agregat akan dikembalikan |
Tips:
Rentang waktu tidak boleh lebih dari 3 bulan.
Contoh Permintaan:
curl "https://email.api.engagelab.cc/v1/day_stats?start_date=2015-02-01&end_date=2015-02-28&api_user_list=***;***" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>"
curl "https://email.api.engagelab.cc/v1/day_stats?start_date=2015-02-01&end_date=2015-02-28&api_user_list=***;***&aggregate_by=1" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>"
Deskripsi Nilai Balik
| Parameter | Deskripsi |
|---|---|
| send_date | tanggal pengiriman |
| api_user | API_USER |
| domain | domain |
| label_id | ID label |
| label_name | nama label |
| targets | total target, jumlah permintaan |
| sent | total terkirim |
| delivered | jumlah terkirim |
| invalid_email | jumlah email tidak valid |
| soft_bounce | jumlah soft bounce |
| report_spam | jumlah laporan spam |
| total_clicks | total klik |
| total_opens | total dibuka |
| opens | jumlah pembuka unik |
| clicks | jumlah klik unik |
| unsubscribe | jumlah berhenti berlangganan |
| delivered_percent | persentase pengiriman |
| invalid_email_percent | persentase email tidak valid |
| soft_bounce_percent | persentase soft bounce |
| report_spam_percent | persentase laporan spam |
| total_click_percent | persentase total klik |
| total_open_percent | persentase total dibuka |
| open_percent | persentase pembuka unik |
| click_percent | persentase klik unik |
| unsubscribe_percent | persentase berhenti berlangganan |
Contoh Nilai Balik:
Response-sukses
HTTP Status: 200
{
"result": [
{
"send_date": "2022-10-25",
"api_user": "test1212",
"domain": "qq.com",
"label_id": 0,
"label_name": "",
"targets": 1,
"delivered": 0,
"sent": 1,
"total_clicks": 0,
"total_opens": 0,
"soft_bounce": 0,
"report_spam": 0,
"unsubscribe": 0,
"opens": 0,
"clicks": 0,
"invalid_email": 1,
"delivered_percent": 0.0,
"total_click_percent": 0.0,
"total_open_percent": 0.0,
"soft_bounce_percent": 0.0,
"report_spam_percent": 0.0,
"unsubscribe_percent": 0.0,
"opens_percent": 0.0,
"click_percent": 0.0,
"invalid_email_percent": 100.0
}
]
}
aggregate_by = 1
{
"result": {
"targets": 146013,
"sent": 13322,
"delivered": 2,
"total_clicks": 0,
"total_opens": 0,
"soft_bounce": 0,
"report_spam": 0,
"unsubscribe": 0,
"opens": 0,
"clicks": 0,
"invalid_email": 146011,
"delivered_percent": 0.0,
"total_click_percent": 0.0,
"total_open_percent": 0.0,
"soft_bounce_percent": 0.0,
"report_spam_percent": 0.0,
"unsubscribe_percent": 0.0,
"open_percent": 0.0,
"click_percent": 0.0,
"invalid_email_percent": 100.0
}
}
Response-error
HTTP Status: 401
{
"code": 30000,
"message": "Autentikasi gagal."
}
Statistik Data Pengiriman (per jam)
Data email dihitung per jam.
URL
https://email.api.engagelab.cc/v1/stats_hour
Metode HTTP Request
GET
Header Permintaan
| Header | Tipe | Wajib | Deskripsi |
|---|---|---|---|
| Authorization | String | ya | Basic base64(apiUser:apiKey) |
Deskripsi Parameter Query
| Parameter | Tipe | Wajib | Deskripsi |
|---|---|---|---|
| time_zone | string | tidak | zona waktu, contoh: +8 |
| send_date | string | ya | tanggal pengiriman, format yyyy-MM-dd |
| api_users | string | tidak | statistik untuk API_USER tertentu; beberapa API_USER dipisahkan titik koma, contoh: api_users=a;b;c |
| label_ids | string | tidak | statistik untuk label tertentu; beberapa label dipisahkan titik koma, contoh: label_ids=a;b;c |
Contoh Permintaan:
curl "https://email.api.engagelab.cc/v1/stats_hour?send_date=2022-11-21" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>"
Deskripsi Nilai Balik
| Parameter | Deskripsi |
|---|---|
| send_date | tanggal pengiriman |
| send_hour | jam, dalam [0 – 23] |
| api_user | API_USER |
| label_id | ID label |
| targets | total target, jumlah permintaan |
| sent | total terkirim |
| delivered | jumlah terkirim |
| invalid_email | jumlah email tidak valid |
| soft_bounce | jumlah soft bounce |
| report_spam | jumlah laporan spam |
| total_clicks | total klik |
| total_opens | total dibuka |
| opens | jumlah pembuka unik |
| clicks | jumlah klik unik |
| unsubscribe | jumlah berhenti berlangganan |
| delivered_percent | persentase pengiriman |
| invalid_email_percent | persentase email tidak valid |
| soft_bounce_percent | persentase soft bounce |
| report_spam_percent | persentase laporan spam |
| total_click_percent | persentase total klik |
| total_open_percent | persentase total dibuka |
| open_percent | persentase pembuka unik |
| click_percent | persentase klik unik |
| unsubscribe_percent | persentase berhenti berlangganan |
Contoh Nilai Balik:
Response-sukses
HTTP Status: 200
{
"result": [
{
"send_date": "2022-08-25",
"api_user": "zymtest4",
"label_id": 598121,
"send_hour": 11,
"targets": 1,
"sent": 1,
"delivered": 1,
"total_clicks": 0,
"total_opens": 0,
"soft_bounce": 0,
"report_spam": 0,
"unsubscribe": 0,
"opens": 0,
"clicks": 0,
"invalid_email": 0,
"delivered_percent": 0.0,
"total_click_percent": 0.0,
"total_open_percent": 0.0,
"soft_bounce_percent": 0.0,
"report_spam_percent": 0.0,
"unsubscribe_percent": 0.0,
"open_percent": 0.0,
"click_percent": 0.0,
"invalid_email_percent": 0.0
},
{
"send_date": "2022-08-25",
"api_user": "gaolei",
"label_id": 598125,
"send_hour": 15,
"targets": 1,
"sent": 1,
"delivered": 0,
"total_clicks": 0,
"total_opens": 0,
"soft_bounce": 0,
"report_spam": 0,
"unsubscribe": 0,
"opens": 0,
"clicks": 0,
"invalid_email": 1,
"delivered_percent": 0.0,
"total_click_percent": 0.0,
"total_open_percent": 0.0,
"soft_bounce_percent": 0.0,
"report_spam_percent": 0.0,
"unsubscribe_percent": 0.0,
"open_percent": 0.0,
"click_percent": 0.0,
"invalid_email_percent": 0.0
}
]
}
Response-error
HTTP Status: 401
{
"code": 30000,
"message": "Autentikasi gagal."
}
Statistik Email Tidak Valid (per hari)
Query statistik email tidak valid terklasifikasi.
URL
https://email.api.engagelab.cc/v1/stat_invalids
Metode HTTP Request
GET
Header Permintaan
| Header | Tipe | Wajib | Deskripsi |
|---|---|---|---|
| Authorization | String | ya | Basic base64(apiUser:apiKey) |
Deskripsi Parameter Query
| Parameter | Tipe | Wajib | Deskripsi |
|---|---|---|---|
| time_zone | string | tidak | zona waktu, contoh: +8 |
| start_date | string | tidak | tanggal mulai, format yyyy-MM-dd |
| end_date | string | tidak | tanggal akhir, format yyyy-MM-dd |
| api_users | string | tidak | statistik untuk API_USER tertentu; beberapa API_USER dipisahkan titik koma, contoh: api_users=a;b;c |
| label_ids | string | tidak | statistik untuk label tertentu; beberapa label dipisahkan titik koma, contoh: label_ids=a;b;c |
| domain_names | string | tidak | statistik untuk domain tertentu; beberapa domain dipisahkan titik koma, contoh: domain_names=a;b;c |
| aggregate_by | int(1,0) | tidak | default 0; jika aggregate=1, data agregat akan dikembalikan |
Tips:
- Jika
aggregate=1, semua data akan digabungkan. - Jika label_id_list dan label_name_list diberikan bersamaan, label_id_list akan diprioritaskan untuk query yang lebih presisi; jika hanya label_name_list yang diberikan, maka pencarian dilakukan secara fuzzy pada semua label_names dalam daftar.
Contoh Permintaan:
curl "https://email.api.engagelab.cc/v1/stats_invalid" --header "Authorization: Basic <<YOUR_API_KEY_HERE>>"
Deskripsi Nilai Balik
| Parameter | Deskripsi |
|---|---|
| send_date | tanggal pengiriman, format yyyy-MM-dd |
| api_user | API_USER |
| domain | domain |
| label_id | ID label |
| label_name | nama label |
| blacklists | jumlah email dalam blacklist EngageLab |
| unsubscribes | jumlah email berhenti berlangganan |
| server_errors | server esp tidak tersedia |
| format_errors | alamat penerima tidak valid |
| ip_domain_rejecteds | IP atau domain ditolak |
| not_exists | penerima tidak ada |
| spams | jumlah email spam |
| sender_recipient_rejecteds | pengirim atau penerima ditolak |
| others | lainnya |
Contoh Nilai Balik:
Response-sukses
HTTP Status: 200
{
"result": [
{
"send_date": "2022-12-01",
"api_user": "1224_xjm",
"label_id": 0,
"label_name": null,
"domain": "qq.com",
"blacklists": 0,
"unsubscribes": 0,
"server_errors": 0,
"format_errors": 0,
"not_exists": 0,
"spams": 0,
"sender_recipient_rejecteds": 0,
"others": 1
}
]
}
aggregate_by = 1
{
"result": {
"blacklists": 0,
"unsubscribes": 0,
"server_errors": 88387,
"format_errors": 0,
"not_exists": 0,
"spams": 0,
"sender_recipient_rejecteds": 0,
"others": 57624
}
}
Response-error
HTTP Status: 401
{
"code": 30000,
"message": "Autentikasi gagal."
}










