Search...
Menu

Append Contacts to an Existing Task

Append Contacts to an Existing Task

Append additional contact phone numbers to an existing outbound task.


API Information

  • URL: https://api-hk.nxlink.ai/openapi/aiagent/call/append
  • Method: POST
  • Content-Type: application/json
  • Authentication Required: Yes

🌐 Service Endpoints

NXLink is deployed across multiple global regions. Please select the appropriate endpoint based on your business location.

Code Region NXLink Website API Gateway
APAC Hong Kong https://app.nxlink.ai https://api-hk.nxlink.ai
AMER Americas https://chl-nxlink.nxcloud.com https://chl-api.nxlink.ai
APAC (IDN) Indonesia https://idn.nxlink.ai https://api-idn.nxlink.ai

Request Parameters

Header Parameters

Parameter Type Required Example Description
accessKey String Yes AK-6230339248928541113-2133 User access key
ts String Yes 1655710885431 Request timestamp in milliseconds. Maximum allowed time drift is 60 seconds
bizType String Yes 100 Business type, fixed value
action String Yes nxai Business action, fixed value
sign String Yes 6e9506557d1f289501d333ee2c365826 API request signature (see common authentication rules) , Signature Algorithm

Body Parameters

Parameter Type Required Example Description
taskId String No "52145b00-abc9-4a87-94c2-ed1e1e42ec1c" Task ID, which is the internal system task ID. At least one of taskId or userTaskId is required. If both are provided, userTaskId takes priority
userTaskId String No "EXT-TASK-202603250001" Caller-defined task ID. Recommended as the preferred identifier. At least one of taskId or userTaskId is required
countryCode String No "86" Country calling code
callCallbackUrl String No "https://example.com/webhook/call" Callback URL when a call ends
list Array Yes List of contacts to append

Contact Object (list Element)

Parameter Type Required Example Description
contactId String Yes "52145b00-abc9-4a87-94c2-ed1e1e42x4rfvmh" Contact ID, unique within the task.
other String No "contact-ext-001" Contact passthrough field. The same value is returned in the call record callback
name String Yes "Jones" Contact name
phoneNumber String Yes "86130XXXX" Phone number
params Array No Custom variables

Variable Object (params Element)

Parameter Type Required Example Description
name String Yes "key1" Variable name (must match an existing variable in the workflow)
value String No "value1" Variable value, sent as a string.

Notes

  1. callCallbackUrl uses the value provided in the current API request first. If omitted, the system uses the value configured on the page. If neither is configured, no callback will be sent.
  2. taskId is the internal system task ID, and userTaskId is the caller-defined task ID. If both are provided, userTaskId is used first to locate the task.
  3. At least one of taskId or userTaskId must be provided.
  4. Contacts can be appended when the task is Ready (1), In Progress (2), or Paused (5). The request fails if a contact ID is repeated in the request or already exists in the task.
  5. If individual numbers fail to import, read data.successCount and data.errList to reconcile the import results.
  6. If the workflow reads the human-transfer group from a contact variable, every importable contact must resolve to a valid skill group ID (Omni) or agent group number (legacy CC). A missing, malformed, inaccessible, or unverifiable group causes the entire import to fail.

Request Example

json Copy
{
  "userTaskId": "EXT-TASK-202603250001",
  "countryCode": "86",
  "callCallbackUrl": "https://example.com/webhook/call",
  "list": [
    {
      "contactId": "52145b00-abc9-4a87-94c2-ed1e1e42xki093",
      "other": "contact-ext-001",
      "name": "name1",
      "phoneNumber": "86130XXXXX",
      "params": [
        {
          "name": "key1",
          "value": "value1"
        }
      ]
    }
  ]
}

Response Parameters

Parameter Type Description
code Integer Result code
message String Result message
traceId String Trace ID for request tracking
data Object Response payload

Data Object

Parameter Type Description
errList Array Error list containing records that failed to be imported
successCount Integer Number of records successfully imported
totalCount Integer Total number of processed records

Error List Item (errList Element)

Parameter Type Description
contactId String Contact ID of the failed record. This is the primary identifier for the error item
name String Contact name
phoneNumber String Phone number that failed to be imported
errMsg String Failure reason

Response Examples

Success Example

json Copy
{
  "code": 0,
  "message": null,
  "traceId": null,
  "data": {
    "errList": [
      {
        "contactId": "52145b00-abc9-4a87-94c2-ed1e1e42xki093",
        "name": "lucy",
        "phoneNumber": "1312895-xxx",
        "errMsg": "Illegal phone number format:1312895-xxx"
      }
    ],
    "successCount": 1,
    "totalCount": 2
  }
}

Failure Example

json Copy
{
  "code": 20000,
  "message": "Duplicate contactIds are not allowed: 52145b00-abc9-4a87-94c2-ed1e1e42xki0931",
  "traceId": "dbdd93a9-cb7c-4c0d-8f98-01755b1883b6"
}

Error Codes

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
Last modified: 2026-12-03