Skip to content

Callbot API createTask

henryou edited this page Sep 26, 2024 · 4 revisions

callbot-api

v1.0.0

Base URLs:

aibot External API v3.0/Task Operation

Authentication Method

Please refer to the documentation at https://github.com/nxtele/http-api-document/wiki/Callbot-API-authorization

POST Create Task

POST /callcentre/api/v3/createTask

Create Task

Request Body

{
  "account": "",
  "productID": "",
  "userTaskID": "",
  "sceneID": "",
  "taskCreateSetting": {
    "strategyName": "",
    "startupType": 0,
    "startupAt": 0,
    "zoneSecond": 0,
    "dialAtWeekDay": "",
    "dialAtUpHour ": "",
    "dialAtDownHour": "",
    "maxRingTime": 0,
    "routeID": "",
    "manualCallSetting": {
      "agentGroup": "",
      "dispatchType": 0,
      "ratioCallRate": 0,
      "predictCallRate": 0
    }
  },
  "funcFlag": {
    "taskKeep": false,
    "roundRedial": true,
    "wholeTTS": false,
    "smsFuncFlag": [
      {
        "smsId": "",
        "intentId": [
          "",
          ""
        ],
        "intentName": [
          "",
          ""
        ]
      },
      {
        "smsId": "",
        "intentId": [
          "",
          "",
          "",
          "",
          ""
        ],
        "intentName": [
          "",
          "",
          ""
        ]
      },
      {
        "smsId": "",
        "intentId": [
          "",
          "",
          ""
        ],
        "intentName": [
          ""
        ]
      },
      {
        "smsId": "",
        "intentId": [
          "",
          "",
          ""
        ],
        "intentName": [
          "",
          "",
          "",
          "",
          ""
        ]
      }
    ],
    "smsEnable": false
  },
  "other": "",
  "taskCallbackUrl": "",
  "orderCallbackUrl": ""
}

Request Parameters

Name Location Type Required Description
requestID header string Yes Unique ID of the request
uuid header string Yes UUID provided by the callee
createTs header string Yes Request timestamp (in seconds)
sign header string Yes Signature
algorithm header string No Signature algorithm: MD5 or SHA256, default to MD5 if left blank
body body object No None
» productID body string Yes Fixed value: "callbot"
» userTaskID body string Yes Task ID generated by the requester (must be unique), recommended to use UUID
» sceneID body string Yes Script template ID. Go to the backend Script Management->Select the corresponding template name to view
» taskCreateSetting body object Yes Task parameter setting
»» strategyName body string Yes Strategy name; please log in to the Aibot platform->Script Management->Script (find the corresponding script, click the script name or click Edit)->Click Dialing Strategy (upper right corner) to view the strategy name; this field can be used by default (default strategy); if you need to set other dialing strategies, please set a new strategy name on the Aibot platform
»» startupType body integer Yes Startup Strategy
»» startupAt body integer Yes When startupType=2, the timestamp when the task starts
»» zoneSecond body integer Yes Task working time zone, an offset value in seconds relative to the zero time, for example, for GMT+8, its value is 8 * 3600 = 28800, for GMT-8, its value is -8 * 3600 = -28800
»» dialAtWeekDay body string Yes For the task working time range, multiple values separated by commas, range of values [1, 7], 1: Monday, ..., 6: Saturday, 7: Sunday
»» dialAtUpHour body string Yes Multiple values separated by commas, for the task working time range, range of values [0, 23], 0: [00:00 ~ 00:30] can dial, 1: [01:00 ~ 01:30] can dial, ..., 23: [23:00 ~ 23:30] can dial
»» dialAtDownHour body string Yes Multiple values separated by commas, for the task working time range, range of values [0, 23], 0: [00:30 ~ 01:00] can dial, 1: [01:30 ~ 02:00] can dial, ..., 23: [23:30 ~ 24:00] can dial
»» maxCall body integer Yes Maximum concurrent calls
»» taskName body string Yes Task Name
»» taskCallbackUrl body string Yes URL type, callback when the task status changes
»» maxRingTime body integer Yes Maximum ringing duration
»» routeID body string Yes route ID
»» manualCallSetting body object No Only used for AICC templates
»»» agentGroup body string Yes Agent group ID
»»» dispatchType body integer Yes Outbound type, 0: none, 1: ratio-based outbound, 3: pre-test outbound 2.0
»»» ratioCallRate body number Yes Agent call rate (fill in this value for ratio-based outbound)
»»» predictCallRate body number Yes Pre-test call rate (fill in this value for pre-test outbound)
» funcFlag body object Yes Task Function Identification
»» taskKeep body boolean Yes When enabled, the task will not automatically end even if there are no call orders in the task.
»» roundRedial body boolean Yes When enabled, unanswered calls within a round will be automatically redialed once.
»» wholeTTS body boolean Yes When enabled, sentences with variables will be treated as a whole for TTS synthesis. Must be enabled when there are variables.
»» smsEnable body boolean Yes true to enable. After the call orders in the task end, a message will be sent based on the configured intention (SMS service needs to be enabled and appKey needs to be set in advance).
»» smsFuncFlag body [object] Yes Used when smsEnable is true. Fill in the relevant fields as SMS sending conditions. Please do not repeat the intentID, as it will override based on the array order.
»»» smsID body string Yes Find the SMS template to be sent (contact customer service for SMS content testing and delivery rate testing before sending SMS templates).
»»» intentID body [string] Yes After the call order ends, a message will be sent based on the set intention ID.
»»» intentName body [string] Yes After the call order ends, a message will be sent based on the set intention name (same effect as setting intentID).
»» phoneEncrypt body boolean Yes When enabled, the displayed number in the backend will be shown as an encrypted number.

Enumerated Values

Attribute Value Description
»» startupType 1 Manual Start
»» startupType 2 Scheduled Start
»» startupType 3 Immediate Start

Response Example

200 Response

{
  "retCode": 0,
  "retMsg": "string",
  "responseID": "string",
  "taskID": "string"
}

Response Results

Status Code Status Code Definition Description Data Model
200 OK Success Inline

Response header

Name Type Required Description
requestID string Yes Consistent with the request header
uuid string Yes Consistent with the request header
createTs string Yes Second level timestamp at response time
sign string Yes The generation method is the same as the sign generation algorithm in the request header
algorithm string No Consistent with the request header, signature algorithm: MD5 or SHA256, default to MD5 if not filled in

Response Data Structure

Status Code 200

Name Type Required Constraints Description
» retCode integer true none Response Code, 0 for success, others for failure
» retMsg string true none Response Message
» responseID string true none Random unique ID used for request tracking. Should be provided when troubleshooting issues related to a specific request.
» taskID string true none Actual task ID returned by the callee.

Introduction

WhatsApp

Short message

Voice

Call Center(NXLink)

Call Center(Callbot)

Flash Call

Short links

邮件验证码

DID号码

通用

号码检测

Clone this wiki locally