Query historical statistics from Historical Reports > Digital Agents (/data/conversation) in the legacy NXLink admin console. This API does not serve the Omni agent performance reports.
https://api-hk.nxlink.ai/saas/openapi/stat/queryhttps://api-idn.nxlink.ai/saas/openapi/stat/queryhttps://chl-api.nxlink.ai/saas/openapi/stat/queryGETapplication/jsonYesUTC+08:00 time zone. To reconcile results with the admin console, set the page to UTC+08:00 and use the same tenant, dates, dimension, and response time threshold. The appkey validates the tenant's configured WhatsApp application; it does not filter reporting data by application. Statistics are queried within the tenant's scope.start_date and end_date are inclusive reporting dates. Their difference must not exceed 183 days, and the start date must not be later than the end date. The 183-day limit applies to each request, not to data retention.type=0 returns daily statistics; type=1 returns hourly statistics. The storage granularity does not change these two output granularities.user_id may therefore appear in multiple rows. Do not deduplicate by date and agent ID alone. To obtain the number of conversations received by an agent, sum conversation_count across the relevant rows.country_iso2 filters the country dimension, but does not add a country field to the response. Channel identifiers are also unavailable for distinguishing these rows.total counts matching result rows, not conversations received. Retrieve every page for a complete result set. Calculate the page count by rounding total / page_size up to the next integer.| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| accessKey | String | Yes | YOUR_ACCESS_KEY | API identity key; the example is a placeholder |
| ts | String | Yes | CURRENT_TIMESTAMP | Current request timestamp in milliseconds; maximum allowed clock difference is 60 seconds |
| bizType | String | Yes | 2 | Fixed value 2 |
| action | String | Yes | mt | Fixed value mt |
| sign | String | Yes | SIGNATURE | Signature calculated using the common authentication rules; the example is a placeholder |
This GET request has no body. With the default MD5 algorithm, hash the following string and encode the result as lowercase hexadecimal:
accessKey=YOUR_ACCESS_KEY&action=mt&bizType=2&ts=CURRENT_TIMESTAMP&accessSecret=YOUR_ACCESS_SECRET
Do not append &body=. The URL, Host, and query parameters are not included in this signature. Replace the placeholders before calculating the signature. Use accessSecret only for local signature calculation; do not send it in the URL or headers.
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| tenant_id | Long | Yes | 10001 | Positive integer tenant ID; the example is fictional |
| appkey | String | Yes | YOUR_APPKEY | Application appkey; the example is a placeholder |
| page_number | integer | No | 1 | Page number, starting at 1; defaults to 1, and nonpositive values are treated as 1 |
| page_size | integer | No | 10 | Rows per page; defaults to 10, and nonpositive values are treated as 10 |
| start_date | String | Yes | 2026-11-01 | First reporting date, in yyyy-MM-dd format |
| end_date | String | Yes | 2026-11-07 | Last reporting date, in yyyy-MM-dd format; the difference from the start date must not exceed 183 days |
| dimension | integer | Yes | 0 | Reporting dimension: 0 agent, 1 agent group, 2 bot, 3 country |
| type | integer | No | 0 | Time granularity: 0 day, 1 hour; defaults to 0 when omitted |
| user_name | String | No | Agent A | Filter by agent display name (nickname), not agent ID; this differs from the page's agent ID filter |
| user_group_name | String | No | Group A | Filter by agent group name, not group ID |
| response_type | integer | No | 2 | Response time threshold: 1 5 minutes, 2 1 hour, 3 12 hours, 4 24 hours, 5 10 minutes, 6 30 minutes; omission or 0 is treated as 2 |
| country_iso2 | String | No | CN | Country or region ISO2 code; applies only when dimension=3 |
Omitting response_type or sending 0 now consistently selects the documented 1-hour default. After upgrading, callers that previously omitted this parameter or sent 0 may receive different response-related metrics. Send an explicit value from 1 to 6 to select another threshold.
Missing required parameters, a nonpositive tenant_id, an empty appkey, invalid date formats, dimension outside 0 to 3, type outside 0 to 1, or response_type outside 0 to 6 result in a parameter error.
| Field | Type | Description |
|---|---|---|
| code | integer | Business result code; 0 means success |
| message | String | Result description |
| list | array | Statistics rows on the current page |
| total | integer | Total matching result rows, not the sum of conversation_count |
| page_number | integer | Current page number |
| page_size | integer | Rows per page |
| Field | Type | Description |
|---|---|---|
| id | Long | Statistics record ID |
| user_id | Long | Agent ID |
| user_name | String | Agent display name (nickname) |
| user_email | String | Agent email |
| user_group_id | Long | Agent group ID |
| user_group_name | String | Agent group name |
| created_at | String | Reporting date or hourly interval in UTC+08:00; daily example: 2026-11-01; hourly example: 2026-11-01 09:00-10:00; this is not a template creation timestamp |
| conversation_count | Long | Conversations received, matching the page's conversation admission metric; not messages, customers, or result rows |
| conversation_end_count | Long | Ended conversations |
| message_count | Long | Total messages |
| message_user_count | Long | Agent messages |
| message_customer_count | Long | Customer messages |
| single_conversation_max_count | Long | Maximum messages per conversation |
| single_conversation_avg_count | Number | Average messages per conversation |
| conversation_max_duration | Number | Maximum conversation duration |
| conversation_avg_duration | Number | Average conversation duration |
| conversation_first_response_avg_duration | Number | Average first response time per conversation |
| intera_count | Long | Conversations handled |
| first_response_count | integer | First response count |
| first_response_duration | Number | First response duration |
| first_response_rate | Number | First response rate |
| response_count | integer | Response count |
| response_duration | Number | Response duration |
| response_rate | Number | Response rate |
This anonymized example illustrates the response structure; it is not a production query result. With total=2 and page_size=1, there are two pages. The first page is shown below.
{
"code": 0,
"message": null,
"traceId": "EXAMPLE_TRACE_ID",
"total": 2,
"page_number": 1,
"page_size": 1,
"list": [
{
"id": 100001,
"user_id": 200001,
"user_name": "Agent A",
"user_email": "agent@example.com",
"user_group_id": 300001,
"user_group_name": "Group A",
"created_at": "2026-11-01",
"conversation_count": 0,
"conversation_end_count": 1,
"message_count": 0,
"message_user_count": 0,
"message_customer_count": 0,
"single_conversation_max_count": 1,
"single_conversation_avg_count": 1,
"conversation_max_duration": 120,
"conversation_avg_duration": 120,
"conversation_first_response_avg_duration": 0,
"intera_count": 0,
"first_response_count": 0,
"first_response_duration": 0,
"first_response_rate": 0,
"response_count": 0,
"response_duration": 0,
"response_rate": 0
}
],
"ext": null,
"empty": false,
"notEmpty": true,
"totalPages": 2
}
Check the business code and message in the response. Do not determine query success from the HTTP status alone.
| code | Description | Action |
|---|---|---|
| 0 | Success | Read the current page |
| -1 | Request failed | Contact support to investigate |
| 400 | Parameter binding or validation failed, such as an invalid date format or an out-of-range enum value | Correct the parameters; this is the business code in the response body |
| 1000 to 100X | Authentication error | Check the common authentication parameters and signature |
| 21058 | tenant_id is required |
Provide a valid tenant ID |
| 21059 | appkey is required |
Provide the application appkey |
| 22016 | WhatsApp application is not configured | Check the application configuration for the tenant and appkey |
| 22072 | Parameter error, such as a start date later than the end date | Correct the parameters and retry |
| 22215 | Date range exceeds the limit | Reduce the difference between the dates to at most 183 days; the server may retain its earlier “6 months” wording |
| iso2 | Country/Region (CN) | Country/Region (EN) |
|---|---|---|
| AD | 安道尔 | ANDORRA |
| AE | 阿拉伯联合酋长国 | UNITED ARAB EMIRATES |
| AF | 阿富汗 | AFGHANISTAN |
| AG | 安提瓜和巴布达岛 | ANTIGUA & BARBUDA |
| AI | 安圭拉 | ANGUILLA |
| AL | 阿尔巴尼亚 | ALBANIA |
| AM | 亚美尼亚 | ARMENIA |
| AN | 荷属安的列斯群岛 | NETHERLANDS ANTILLES |
| AO | 安哥拉 | ANGOLA |
| AR | 阿根廷 | ARGENTINA |
| AS | 美国萨摩亚 | AMERICAN SAMOA |
| AT | 奥地利 | AUSTRIA |
| AU | 澳大利亚 | AUSTRALIA |
| AW | 阿鲁巴 | ARUBA |
| AZ | 阿塞拜疆 | AZERBAIJAN |
| BB | 巴巴多斯 | BARBADOS |
| BD | 孟加拉国 | BANGLADESH |
| BE | 比利时 | BELGIUM |
| BF | 布基纳法索 | BURKINA FASO |
| BG | 保加利亚 | BULGARIA |
| BH | 巴林 | BAHRAIN |
| BI | 布隆迪 | BURUNDI |
| BJ | 贝宁 | BENIN |
| BM | 百慕大群岛 | BERMUDA |
| BO | 玻利维亚 | BOLIVIA |
| BR | 巴西 | BRAZIL |
| BS | 巴哈马 | BAHAMAS |
| BT | 不丹 | BHUTAN |
| BW | 博茨瓦纳 | BOTSWANA |
| BY | 白俄罗斯 | BELARUS |
| BZ | 伯利兹 | BELIZE |
| CA | 加拿大 | CANADA |
| CF | 中非共和国 | CENTRAL AFRICAN REPUBLIC |
| CG | 刚果 | CONGO |
| CH | 瑞士 | SWITZERLAND |
| CI | 科特迪瓦 | COTE DIVOIRE |
| CK | 库克群岛 | COOK ISLANDS |
| CL | 智利 | CHILE |
| CM | 喀麦隆 | CAMEROON |
| CN | 中国 | CHINA |
| CO | 哥伦比亚 | COLOMBIA |
| CR | 哥斯达黎加 | COSTA RICA |
| CU | 古巴 | CUBA |
| CV | 佛得角 | CAPE VERDE |
| CW | 库拉索 | Curaçao |
| CY | 塞浦路斯 | CYPRUS |
| CZ | 捷克共和国 | CZECH REPUBLIC |
| DE | 德国 | GERMANY |
| DG | 迭戈加西亚 | DIEGO GARCIA |
| DJ | 吉布提 | DJIBOUTI |
| DK | 丹麦 | DENMARK |
| DM | 多米尼克 | DOMINICA |
| DO | 多明尼加共和国 | DOMINICAN REPUBLIC |
| DZ | 阿尔及利亚 | ALGERIA |
| EC | 厄瓜多尔 | ECUADOR |
| EE | 爱沙尼亚 | ESTONIA |
| EG | 埃及 | EGYPT |
| ER | 厄立特里亚 | ERITREA |
| ES | 西班牙 | SPAIN |
| ET | 埃塞俄比亚 | Ethiopia |
| FI | 芬兰 | FINLAND |
| FJ | 斐济 | FIJI |
| FK | 福克兰群岛 | FALKLAND ISLANDS |
| FM | 密克罗尼西亚联邦 | Micronesia |
| FO | 法罗群岛 | FAROE ISLANDS |
| FR | 法国 | FRANCE |
| GA | 加蓬 | GABON |
| GB | 英国 | UNITED KINGDOM |
| GD | 格林纳达 | GRENADA |
| GE | 格鲁吉亚 | GEORGIA |
| GF | 法属圭亚那 | FRENCH GUIANA |
| GH | 加纳 | GHANA |
| GI | 直布罗陀 | GIBRALTAR |
| GL | 格陵兰岛 | GREENLAND |
| GM | 冈比亚 | GAMBIA |
| GN | 几内亚 | GUINEA |
| GP | 瓜德罗普岛 | GUADELOUPE |
| GQ | 赤道几内亚 | EQUATORIAL GUINEA |
| GR | 希腊 | GREECE |
| GT | 危地马拉 | GUATEMALA |
| GU | 关岛 | GUAM |
| GW | 几内亚比绍 | GUINEA-BISSAU |
| GY | 圭亚那 | GUYANA |
| HK | 中国香港 | HONG KONG |
| HN | 洪都拉斯 | HONDURAS |
| HR | 克罗地亚 | CROATIA |
| HT | 海地 | HAITI |
| HU | 匈牙利 | HUNGARY |
| ID | 印度尼西亚 | INDONESIA |
| IE | 爱尔兰 | IRELAND |
| IL | 以色列 | ISRAEL |
| IN | 印度 | INDIA |
| IQ | 伊拉克 | IRAQ |
| IR | 伊朗 | IRAN |
| IS | 冰岛 | ICELAND |
| IT | 意大利 | ITALY |
| JM | 牙买加 | JAMAICA |
| JO | 约旦 | JORDAN |
| JP | 日本 | JAPAN |
| KE | 肯尼亚 | KENYA |
| KG | 吉尔吉斯斯坦 | KYRGYZSTAN |
| KH | 柬埔寨 | CAMBODIA |
| KI | 基里巴斯 | Kiribati |
| KM | 科摩罗 | COMOROS |
| KP | 朝鲜 | North Korea |
| KR | 韩国 | SOUTH KOREA |
| KW | 科威特 | KUWAIT |
| KY | 开曼群岛 | CAYMAN ISLANDS |
| KZ | 哈萨克斯坦 | Kazakhstan |
| LA | 老挝 | LAOS |
| LB | 黎巴嫩 | LEBANON |
| LI | 列支敦士登 | LIECHTENSTEIN |
| LK | 斯里兰卡 | SRI LANKA |
| LR | 利比里亚 | LIBERIA |
| LS | 莱索托 | LESOTHO |
| LT | 立陶宛 | LITHUANIA |
| LU | 卢森堡 | LUXEMBOURG |
| LV | 拉脱维亚 | LATVIA |
| LY | 利比亚 | LIBYA |
| MA | 摩洛哥 | MOROCCO |
| MC | 摩纳哥 | MONACO |
| MD | 摩尔多瓦 | MOLDOVA |
| ME | 黑山 | MONTENEGRO |
| MG | 马达加斯加 | MADAGASCAR |
| MH | 马绍尔群岛共和国 | Marshall Islands |
| MK | 北马其顿 | North Macedonia |
| ML | 马里 | MALI |
| MM | 缅甸 | MYANMAR |
| MN | 蒙古 | MONGOLIA |
| MO | 中国澳门 | MACAU |
| MP | 北马里亚纳群岛 | NORTHERN MARIANA ISLANDS |
| MQ | 马提尼克 | MARTINIQUE |
| MR | 毛里塔尼亚 | MAURITANIA |
| MS | 蒙特塞拉特岛 | MONTSERRAT |
| MT | 马耳他 | MALTA |
| MU | 毛里求斯 | MAURITIUS |
| MV | 马尔代夫 | MALDIVES |
| MW | 马拉维 | MALAWI |
| MX | 墨西哥 | MEXICO |
| MY | 马来西亚 | MALAYSIA |
| MZ | 莫桑比克 | MOZAMBIQUE |
| NA | 纳米比亚 | NAMIBIA |
| NC | 新喀里多尼亚 | NEW CALEDONIA |
| NE | 尼日尔 | NIGER |
| NF | 诺福克岛 | NORFOLK ISLAND |
| NG | 尼日利亚 | NIGERIA |
| NI | 尼加拉瓜 | NICARAGUA |
| NL | 荷兰 | NETHERLANDS |
| NO | 挪威 | NORWAY |
| NP | 尼泊尔 | NEPAL |
| NR | 瑙鲁 | NAURU |
| NU | 纽埃 | Niue |
| NZ | 新西兰 | NEW ZEALAND |
| OM | 阿曼 | OMAN |
| PA | 巴拿马 | PANAMA |
| PE | 秘鲁 | PERU |
| PF | 法属波利尼西亚 | FRENCH POLYNESIA |
| PG | 巴布亚新几内亚 | PAPUA NEW GUINEA |
| PH | 菲律宾 | PHILIPPINES |
| PK | 巴基斯坦 | PAKISTAN |
| PL | 波兰 | POLAND |
| PR | 波多黎各 | Puerto Rico |
| PT | 葡萄牙 | PORTUGAL |
| PW | 帕劳 | PALAU |
| PY | 巴拉圭 | PARAGUAY |
| QA | 卡塔尔 | QATAR |
| RE | 留尼汪 | REUNION |
| RO | 罗马尼亚 | ROMANIA |
| RS | 塞尔维亚 | SERBIA |
| RU | 俄罗斯 | RUSSIA |
| RW | 卢旺达 | RWANDA |
| SA | 沙特阿拉伯 | SAUDI ARABIA |
| SB | 所罗门群岛 | Solomon Islands |
| SC | 塞舌尔 | SEYCHELLES |
| SD | 苏丹 | SUDAN |
| SE | 瑞典 | SWEDEN |
| SG | 新加坡 | SINGAPORE |
| SH | 圣赫勒拿岛 | St. Helena |
| SI | 斯洛文尼亚 | SLOVENIA |
| SK | 斯洛伐克 | SLOVAKIA |
| SL | 塞拉利昂 | SIERRA LEONE |
| SM | 圣马力诺 | SAN MARINO |
| SN | 塞内加尔 | SENEGAL |
| SO | 索马里 | SOMALIA |
| SR | 苏里南 | SURINAME |
| SS | 南苏丹 | SOUTH SUDAN |
| ST | 圣多美和普林西比 | SAO TOME & PRINCIPE |
| SV | 萨尔瓦多 | EL SALVADOR |
| SY | 叙利亚 | SYRIA |
| SZ | 斯威士兰 | Swaziland |
| TC | 特克斯和凯科斯群岛 | TURKS & CAICOS ISLANDS |
| TD | 乍得 | CHAD |
| TG | 多哥 | TOGO |
| TH | 泰国 | THAILAND |
| TJ | 塔吉克斯坦 | TAJIKISTAN |
| TL | 东帝汶 | TIMOR-LESTE |
| TM | 土库曼斯坦 | TURKMENISTAN |
| TN | 突尼斯 | TUNISIA |
| TO | 汤加 | TONGA |
| TR | 土耳其 | TURKEY |
| TT | 特立尼达和多巴哥 | TRINIDAD & TOBAGO |
| TV | 图瓦卢 | Tuvalu |
| TW | 中国台湾 | TAIWAN |
| TZ | 坦桑尼亚 | TANZANIA |
| UA | 乌克兰 | UKRAINE |
| UG | 乌干达 | UGANDA |
| US | 美国 | UNITED STATES |
| UY | 乌拉圭 | URUGUAY |
| UZ | 乌兹别克斯坦 | UZBEKISTAN |
| VA | 梵蒂冈城 | Vatican City |
| VE | 委内瑞拉 | VENEZUELA |
| VN | 越南 | VIETNAM |
| VU | 瓦努阿图 | VANUATU |
| WS | 萨摩亚 | SAMOA |
| YE | 也门 | YEMEN |
| YT | 马约特岛 | Mayotte |
| ZA | 南非 | SOUTH AFRICA |
| ZM | 赞比亚 | ZAMBIA |
| ZW | 津巴布韦 | ZIMBABWE |