forked from nxtele/http-api-document
-
Notifications
You must be signed in to change notification settings - Fork 1
AI Agent Task Callback
曾日强 edited this page May 26, 2026
·
3 revisions
This callback is used to receive task status change notifications from NXLink AI Agent outbound tasks.
-
Callback URL: The callback is sent to the
taskCallbackUrlspecified when creating the task via API. If that field is not provided, the callback is sent to the AI Agent task status callback URL configured in the NXLink management console. If neither is configured, no callback is sent - Description: Receives task status callback notifications
-
Method:
POST -
Content-Type:
application/json - Authentication Required: Optional (decided by the customer)
| Parameter | Type | Required | Example Value | Description |
|---|---|---|---|---|
| accessKey | String | No | AK-6230339248928541113-2133 |
User identity key |
| ts | String | No | 1655710885431 |
Request timestamp in milliseconds |
| bizType | String | No | 100 |
Business type, fixed value: 100
|
| action | String | No | nxai |
Business action, fixed value: nxai
|
| sign | String | No | 6e9506557d1f289501d333ee2c365826 |
API request signature |
| Parameter | Type | Description |
|---|---|---|
| taskId | String | Task ID |
| userTaskId | String | User-defined task ID |
| other | String | Task passthrough field provided when the task is created |
| autoFlowId | Long | AI Agent ID |
| autoFlowName | String | AI Agent name |
| taskName | String | Task name |
| taskDesc | String | Task description |
| taskStatus | Integer | Task status. See the reference table below |
| pauseReason | Integer | Pause reason. It may be empty when the task is not paused |
| taskKeep | Integer | Keep-alive flag: 0 = disabled, 1 = enabled |
| startupType | Integer | Startup type: 1 = manual, 2 = scheduled, 3 = immediate |
| startupAt | Long | Scheduled start timestamp in seconds. Present when startupType = 2
|
| shutdownAt | Long | Scheduled stop timestamp in seconds. Present when startupType = 2
|
| routeId | String | Selected route ID |
| createTs | Long | Task creation timestamp in seconds |
| statInfo | Object | Snapshot of task statistics at the time the callback is triggered |
| Parameter | Type | Description |
|---|---|---|
| answerOrderCount | Integer | Answered order count, calculated when an order ends |
| finishOrderCount | Integer | Finished order count, calculated when an order ends |
| totalOrderCount | Integer | Total order count, calculated at import time |
| dialedOrderCount | Integer | Dialed order count, calculated after the first call attempt for an order |
| totalCallElapsed | Integer | Total call duration in seconds |
| answerCallCount | Integer | Answered call count, calculated when a call ends |
| totalCallCount | Integer | Total call count, calculated when a call ends |
| manualElapsed | Integer | Total manual-call duration in seconds |
| manualAnswerCount | Integer | Manually answered call count |
| manualFailCount | Integer | Manual transfer failed call count |
| createTs | Long | Statistics creation timestamp in seconds |
| answerRate | String | Answer rate |
| dialProgress | String | Dialing progress |
| finishRate | String | Completion rate |
| manualAnswerRate | String | Manual transfer success rate |
| avgCallDuration | Integer | Average call duration in seconds |
| avgManualDuration | Integer | Average manual call duration in seconds |
| Value | Description |
|---|---|
| 1 | Ready |
| 2 | In Progress |
| 3 | Completed |
| 4 | Failed |
| 5 | Paused |
| 6 | Paused (Insufficient Balance) |
- The
taskStatusvalues are aligned with the AI Agent task list API. -
statInfois the current task statistics snapshot at the moment the callback is sent. - If signature verification is enabled by the customer, the callback headers can be validated using the standard AI Agent OpenAPI header rules.
{
"taskId": "52145b00-abc9-4a87-94c2-ed1e1e42ec1c",
"userTaskId": "EXT-TASK-202603250001",
"other": "task-batch-20260325",
"autoFlowId": 197,
"autoFlowName": "Quick Notification",
"taskName": "Customer Follow-up Task 0325",
"taskDesc": "Customer satisfaction follow-up after purchase",
"taskStatus": 2,
"pauseReason": null,
"taskKeep": 0,
"startupType": 2,
"startupAt": 1746583929,
"shutdownAt": 1746670329,
"routeId": "y29ND1X4kkCG_nC576sALEkvg3HjEqde",
"createTs": 1746583800,
"statInfo": {
"answerOrderCount": 120,
"finishOrderCount": 150,
"totalOrderCount": 200,
"dialedOrderCount": 180,
"totalCallElapsed": 5320,
"answerCallCount": 130,
"totalCallCount": 210,
"manualElapsed": 300,
"manualAnswerCount": 5,
"manualFailCount": 1,
"createTs": 1746583800,
"answerRate": "61.90%",
"dialProgress": "90.00%",
"finishRate": "75.00%",
"manualAnswerRate": "83.33%",
"avgCallDuration": 40,
"avgManualDuration": 60
}
}| Parameter | Type | Required | Example Value | Description |
|---|---|---|---|---|
| code | Integer | Yes | 0 |
Business response code. 0 indicates success |
| data | Object | No | "" |
Business data payload |
{
"code": 0,
"data": ""
}| Code | Description |
|---|---|
| 1001 | Authentication failed (missing public parameters) |
| 1002 | Authentication failed (parameter error) |
| 1003 | Authentication failed (invalid signature) |
| 1004 | Authentication failed (timestamp expired) |
| 1005 | Authentication failed (insufficient authority) |
| 20000 | Business Error |
Introduction
- Send Message
- Mark Incoming Message as Read
- Upload Media File
- Get Media File
- Delete Media File
- Webhook
- Query Number Information
- Query Message Template
- Create Message Template
- Edit Message Template
- Delete Message Template
- Upload Template Example File
- Embedded Page Login
- Create Client Application
- List of Phone Numbers for Client Application
- Get Verification Code
- Verify Verification Code
- Create Local Client
Short message
Voice
Call Center(NXLink)
- Web Iframe
- Manual Dial Record
- Manual Dial Record Query By orderId
- List Agent Information
- List Agent Status
- List Queue
- List Agents In Queue
- List Agent Efficiency
- Update Queue Agents
- Create AutoDial Task
- Webhook - Manual Dial
AI Agent(NXLink)
- List AI Agents
- List Routes
- Create Outbound Task
- AI Agent Task List
- Query Call Records
- Append Contacts to an Existing Task
- Delete Contacts
- Task Status Callback
- Call Record Callback
Call Center(Callbot)
- Callbot API Summary
- Callbot API Authorization
- Callbot API Ping
- Create Auto Dial Task
- Add Contact List To Task
- Create Task And Add Contact
- Start Or Pause Task
- Update Task Parameters
- Get List Task
- List Call
- List Task Orders
- Stop Order
- Get Call Detail By Order
- Webhook - By Call
- Webhook - By Order
- Webhook - Task Status
Flash Call
Short links
邮件验证码
DID号码
通用
号码检测