logo

General Authentication

Request URL

  • Format
https://ccps.s4.udesk.cn/api/v1/ads/external/{relative address}?{URL params}&Email={email}&AppId={appId}&Timestamp={timestamp}&Token={token}

The parts enclosed in brackets mean the following:

VariableDescription
relative address: Interface relative addressThe relative URL of the API
URL params: URL parametersParameters required for the interface request
email: User emailUser's email address
appId: Tenant appIdTenant appId; Acquisition method: System Management -> System Settings -> System Information
secret: Tenant secretTenant secret; Acquisition method: System Management -> System Settings -> System Information
timestamp: TimestampThe timestamp when the request is initiated, the number of seconds since '1970-01-01 00:00:00'. Unless otherwise specified, the default expiration time is five minutes
token: SignatureIdentity authentication signature, unless otherwise specified, this parameter is required for each API request. For the detailed generation algorithm, please refer to Authentication Method

Authentication Method

  • Example Calculate the signature:
appId:18a58d6d-2b4e-44de-5725-31b9e5dbb4b4
secret:secret-37a4123c-538f-4b91-69c1-3fd15500c9b2
timestamp:1496631984
HmacUtils hmacUtils = new HmacUtils(HmacAlgorithms.HMAC_SHA_1, "secret-37a4123c-538f-4b91-69c1-3fd15500c9b2");
hmacUtils.hmacHex("18a58d6d-2b4e-44de-5725-31b9e5dbb4b4"+"1496631984")
 -> 6d9faaab002f49b2a9b8c634279a7e29414ea1cb

Request URL:

https://ccps.s4.udesk.cn/api/v1/ads/external/callTasks?AppId=18a58d6d-2b4e-44de-5725-31b9e5dbb4b4&Timestamp=1496631984&Token=6d9faaab002f49b2a9b8c634279a7e29414ea1cb

Interface Description

Import Contact Instructions:

  1. If you use the contact list and the corresponding import numbers, then by editing the outbound call task, the numbers are associated with the task.
  2. If you use the default contact list and the corresponding import numbers, then directly import them into the corresponding task. Online Domain Name Instructions:
  3. The domain name in the document example is demo.udesk.cn. In actual docking, you need to use different domain names according to the region where the tenant is opened. For the specific domain name, you can contact the tenant opening personnel.

Create Outbound Call Task Interface

Request URL

  • POST /api/v1/ads/external/callTasks/ai

Request Parameters

ParameterTypeNullableDescription
EmailStringtrueEmail address
AppIdStringfalseTenant appId
TimestampLongfalseTimestamp (e.g., current seconds, 1533092860)
TokenStringfalseSignature: Authentication signature (see general authentication instructions)
nameStringfalseTask name
remarkStringtrueDescription
callTemplateIdintfalseOutbound call template ID
robotDefIdintfalseOutbound call robot definition ID
spnumberTypeintfalseCaller number type (1 trunk number 2 number pool)
spnumberValueintfalseCaller number value
startModeintfalseStart mode (1 manual 2 timed 3 periodic start)
startTimedatetrueStart time (timed, format: yyyy-MM-dd HH:mm:ss)
workTimeIdintfalseWork time ID
priorityintfalseTask priority
controlOptionListArraytrueTask options (enumerated integer array, 1 stop automatically if no contacts)
ivrModeinttrueIVR mode (0 off 1 on)
callTypeinttrueOutbound call mode (0: AI outbound 1: predictive mode 3: precise mode 6: precise IVR 7: pure IVR 8: AI predictive outbound)
concurrentLimitintfalseTask concurrency limit
dialParamObjecttrueDialing setting parameters
dialParam.optimizeParaminttrueOptimization parameters (1 seat utilization 2 abandonment rate 3 average seat waiting time)
dialParam.optimizeTargetinttrueOptimization target
redialSceneListArraytrueRedial options
redialSceneList[].typeintfalseCall result type (1 invalid call 2 call failure 3 label)
redialSceneList[].resultStringtrueCall result (power off, no answer, out of service, busy, user rejection, unable to connect, service suspended, user busy, incorrect dialing method, inbound restriction, call transfer failure, network busy, no answer, arrears, unable to answer, number change, line fault, call back later, other)
redialSceneList[].dealOptionintfalseHandling method (1 redial)
redialSceneList[].redialTimesinttrueRedial attempts
redialSceneList[].redialGuideinttrueTime interval (minutes)
redialSceneList[].guideIncrementinttrueInterval increment (minutes)
redialSceneList[].nextDealinttrueSubsequent processing (1 next contact phone)
taskContactBatchRelListArraytrueContact list
taskContactBatchRelList[].contactBatchIdinttrueContact list ID
taskContactBatchRelList[].callWeightinttrueCall weight

Response Parameters

ParameterTypeNullableDescription
succeedbooleanfalseProcessing flag (not in use)
codeStringfalseReturn code
bizCodeStringfalseBusiness code (not in use)
messageStringfalseReturn message
visiblebooleanfalseVisibility (not in use)
dataObjecttrueResults
data.idintfalseTask ID
data.nameStringfalseTask name
data.remarkStringtrueDescription
data.callTemplateIdintfalseCall template ID
data.robotDefIdintfalseCall robot definition ID
data.ivrIdinttrueIVR ID
data.queueIdinttrueQueue value
data.spnumberTypeintfalseCaller number type (1 relay number 2 number pool)
data.spnumberValueintfalseCaller number value
data.startModeintfalseStart mode (1 manual 2 timed 3 periodic start)
data.startTimedatetrueStart time (used for timing in format yyyy-MM-dd HH:mm:ss)
data.expireTimedatetrueTask expiration time
data.validDurationinttrueCall validity duration threshold
data.workTimeIdintfalseWork time
data.priorityintfalseTask priority
data.controlOptionStringfalseTask priority
data.controlOptionListArraytrueTask options (enumerated integer array, 1 stop automatically if no contact)
data.resetOptioninttrueReset option
data.statusinttrueTask status
data.totalCountinttrueNumber of customers
data.execCountinttrueNumber of customers executed
data.customerConnectCountinttrueCustomer answers
data.agentConnectCountinttrueAgent answers
data.retryCountinttrueNumber of attempts
data.numberFilterinttrueNumber filtering
data.numberFilterListArraytrueNot in use
data.ivrModeintfalseIVR mode (0 off 1 on)
data.callTypeintfalseCall mode (0: AI call 1: predictive mode 3: precise mode 6: precise IVR 7: pure IVR 8: AI predictive call)
data.concurrentLimitintfalseTask concurrency limit
data.createdUserIdStringtrueCreator ID
data.updatedUserIdStringtrueLast updater ID
data.createdAtStringtrueCreation time
data.contactBatchIdsStringtrueContact IDs
data.contactBatchIdListArraytrueNot in use
data.taskContactBatchRelListArraytrueContact information
data.taskContactBatchRelList[].callTaskIdinttrueCall task ID
data.taskContactBatchRelList[].contactBatchIdinttrueContact list ID
data.taskContactBatchRelList[].contactBatchNameStringtrueContact list name
data.taskContactBatchRelList[].callWeightinttrueWeight
data.taskContactBatchRelList[].statusinttrueStatus
data.taskContactBatchRelList[].importStatusinttrueImport status (1 waiting 2 importing 3 imported)
data.taskContactBatchRelList[].totalCountinttrueNumber of customers
data.taskContactBatchRelList[].execCountinttrueNumber of customers executed
data.taskContactBatchRelList[].customerConnectCountinttrueCustomer answers
data.taskContactBatchRelList[].agentConnectCountinttrueAgent answers
data.taskContactBatchRelList[].retryCountinttrueNumber of attempts
data.taskContactBatchRelList[].createdUserIdStringtrueCreator ID
data.taskContactBatchRelList[].updatedUserIdStringtrueLast updater ID
data.taskContactBatchRelList[].deleteFlaginttrueDeletion flag (0 not deleted 1 deleted)
data.redialSceneJsonStringtrueRedial options
data.callTemplateObjecttrueCall template
data.callTemplate.nameStringtrueName
data.callTemplate.remarkStringtrueRemark
data.callTemplate.numberFilterStringtrueNumber filtering
data.callTemplate.numberFilterListArraytrueNot in use
data.callTemplate.ivrModeinttrueIVR mode: 0 off 1 on
data.callTemplate.callTypeinttrueCall mode (0: AI call 1: predictive mode 3: precise mode 6: precise IVR 7: pure IVR 8: AI predictive call)
data.callTemplate.dialParamJsonStringtrueNot in use
data.callTemplate.dialParamObjecttrueNot in use
data.callTemplate.dialParam.optimizeParaminttrueNot in use
data.callTemplate.dialParam.optimizeTargetinttrueNot in use
data.callTemplate.dialParam.callInDurationAverageinttrueNot in use
data.callTemplate.dialParam.callOutDurationAverageinttrueNot in use
data.callTemplate.dialParam.callInPerHourinttrueNot in use
data.callTemplate.dialParam.callPerMinuteinttrueNot in use
data.callTemplate.dialParam.longDurationIgnoreinttrueNot in use
data.callTemplate.concurrentLimitinttrueTask concurrency limit
data.callTemplate.createdUserIdStringtrueLast updater ID
data.callTemplate.updatedUserIdStringtrueCreator ID
data.callTemplate.deleteFlaginttrueDeletion flag (0 not deleted 1 deleted)
data.callTemplate.redialSceneJsonStringtrueRedial options
data.callTemplate.categoryinttrueCategory (1 automatic call 2 AI)
data.callTemplate.ivrIdinttrueIVR ID
data.callTemplate.queueIdinttrueQueue ID
data.callTemplate.spnumberTypeinttrueCaller number type
data.callTemplate.spnumberValueinttrueCaller number value
data.callTemplate.startModeinttrueStart mode
data.callTemplate.startTimedatetrueStart time
data.callTemplate.expireTimedatetrueTask expiration time
data.callTemplate.workTimeIdinttrueWork time
data.callTemplate.validDurationinttrueCall validity duration threshold
data.callTemplate.maxRingSecondsinttrueMaximum ring duration threshold
data.callTemplate.robotDefIdinttrueNot in use
data.momentLimitinttrueNot in use
data.operatorCreateNameStringtrueOperator creator name
data.categoryinttrueCategory (1 automatic call 2 AI)
data.dialParamObjecttrueDialing setting parameters
data.dialParam.optimizeParaminttrueOptimization parameter (1 agent utilization 2 abandoned call rate 3 average agent waiting time)
data.dialParam.optimizeTargetinttrueOptimization target
data.redialSceneListArraytrueRedial options
data.redialSceneList[].typeinttrueCall result type (1 invalid call 2 call failure 3 label)
data.redialSceneList[].resultStringtrueCall result (powered off, empty number, suspended, busy, user rejection, unable to connect, service suspended, user busy, incorrect dialing method, inbound restriction, failed call transfer, network busy, unanswered, arrears, unable to answer, number change, line fault, call back later, other)
data.redialSceneList[].validinttrueWhether it is valid (invalid by default -2)
data.redialSceneList[].labelInfosArraytrueLabels
data.redialSceneList[].dealOptionintfalseHandling method (1 redial)
data.redialSceneList[].redialTimesinttrueRedial attempts
data.redialSceneList[].redialGuideinttrueTime interval (minutes)
data.redialSceneList[].guideIncrementinttrueInterval increment (minutes)
data.redialSceneList[].nextDealinttrueSubsequent processing (1 next contact phone)
data.taskContactBatchRelListArraytrueContact list
data.taskContactBatchRelList[].contactBatchIdinttrueContact list ID
data.taskContactBatchRelList[].callWeightinttrueCall weight

Request Example

$ curl 'https://demo.udesk.cn/api/v1/ads/external/callTasks/ai?AppId=18a58d6d-2b4e-44de-5725-31b9e5dbb4b4&Timestamp=1496631984&Token=6d9faaab002f49b2a9b8c634279a7e29414ea1cb' -i -X POST -H 'Content-Type: application/json' -d '{
    "name":"test Dialing1",
    "remark":"test Dialing",
    "callTemplateId":5,
    "robotDefId":300001,
    "spnumberType":1,
    "spnumberValue":72,
    "startMode":1,
    "startTime":null,
    "workTimeId":31,
    "priority":1,
    "controlOptionList":[
        1
    ],
    "ivrMode":1,
    "callType":0,
    "concurrentLimit":1,
    "dialParam":{
        "optimizeParam":1,
        "optimizeTarget":1
    },
    "redialSceneList":[
        {
            "result":"User declined",
            "dealOption":1,
            "redialTimes":1,
            "redialGuide":1,
            "guideIncrement":1,
            "nextDeal":1
        }
    ],
    "taskContactBatchRelList":[
        {
            "callWeight":100,
            "contactBatchId":3
        }
    ]
  }'

Response Example

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
    "succeed":true,
    "code":200,
    "bizCode":"000000",
    "message":"OK",
    "visible":false,
    "data":{
        "id":80,
        "name":"test Dialing1",
        "remark":"test Dialing",
        "callTemplateId":5,
        "robotDefId":300001,
        "spnumberType":1,
        "spnumberValue":72,
        "startMode":1,
        "startTime":null,
        "workTimeId":31,
        "priority":1,
        "controlOption":"1",
        "controlOptionList":[
            1
        ],
        "status":1,
        "ivrMode":1,
        "callType":0,
        "dialParam":{
            "optimizeParam":1,
            "optimizeTarget":1
        },
        "concurrentLimit":1,
        "taskContactBatchRelList":[
            {
                "contactBatchId":3,
                "callWeight":100
            }
        ],
        "redialSceneList":[
            {
                "result":"User declined",
                "dealOption":1,
                "redialTimes":1,
                "redialGuide":1,
                "guideIncrement":1,
                "nextDeal":1
            }
        ]
    }
}

Edit Outbound Call Task Interface

Request URL

  • PUT /api/v1/ads/external/callTasks/{id}

Request Parameters

ParameterTypeNullableDescription
EmailStringtrueEmail
AppIdStringfalseTenant AppId
TimestampLongfalseTimestamp (e.g., current seconds, 1533092860)
TokenStringfalseSignature: Authentication signature (see general authentication instructions)
idintfalseTask ID
nameStringtrueTask Name
remarkStringtrueDescription
spnumberTypeintfalseCaller Number Type (1 Relay Number 2 Number Pool)
spnumberValueinttrueCaller Number Value
callTypeintfalseOutbound Call Mode (0: AI Outbound Call 1: Predictive Mode 3: Precision Mode 6: Precision IVR 7: Pure IVR 8: AI Predictive Outbound Call)
workTimeIdinttrueWork Time
priorityinttrueTask Priority
controlOptionListArraytrueTask Options (enumerated integer array, 1 Stop Automatically if No Contacts)
concurrentLimitinttrueTask Concurrency Limit
taskContactBatchRelListArraytrueContact List
taskContactBatchRelList[].contactBatchIdinttrueContact List ID
taskContactBatchRelList[].callWeightinttrueCall Weight

Response Parameters

ParameterTypeNullableDescription
succeedbooleanfalseProcessing Indicator (not currently used)
codeStringfalseReturn Code
bizCodeStringfalseBusiness Code (not currently used)
messageStringfalseReturn Message
visiblebooleanfalseVisibility (not currently used)
dataObjecttrueResult
data.idintfalseTask ID
data.nameStringfalseTask Name
data.remarkStringtrueDescription
data.callTemplateIdintfalseOutbound Call Template
data.robotDefIdintfalseOutbound Robot Definition ID
data.ivrIdinttrueIVR ID
data.queueIdinttrueQueue Value
data.spnumberTypeintfalseCaller Number Type (1 Relay Number 2 Number Pool)
data.spnumberValueintfalseCaller Number Value
data.startModeintfalseStart Mode (1 Manual 2 Timed 3 Periodic Start)
data.startTimedatetrueStart Time (Timed use yyyy-MM-dd HH:mm:ss)
data.expireTimedatetrueTask Expiration Time
data.validDurationinttrueCall Validity Duration Threshold
data.workTimeIdintfalseWork Time
data.priorityintfalseTask Priority
data.controlOptionStringfalseTask Priority
data.controlOptionListArraytrueTask Options (enumerated integer array, 1 Stop Automatically if No Contacts)
data.resetOptioninttrueReset Option
data.statusinttrueTask Status
data.totalCountinttrueNumber of Customers
data.execCountinttrueExecuted Customers
data.customerConnectCountinttrueCustomer Answered
data.agentConnectCountinttrueAgent Answered
data.retryCountinttrueRetry Count
data.numberFilterinttrueNumber Filter
data.numberFilterListArraytrueNot currently used
data.ivrModeintfalseIVR Mode (0 Off 1 On)
data.callTypeintfalseOutbound Call Mode (0: AI Outbound Call 1: Predictive Mode 3: Precision Mode 6: Precision IVR 7: Pure IVR 8: AI Predictive Outbound Call)
data.concurrentLimitintfalseTask Concurrency Limit
data.createdUserIdStringtrueCreator ID
data.updatedUserIdStringtrueLast Update User ID
data.createdAtStringtrueCreation Time
data.contactBatchIdsStringtrueContact IDs
data.contactBatchIdListArraytrueNot currently used
data.taskContactBatchRelListArraytrueContact Information
data.taskContactBatchRelList[].callTaskIdinttrueOutbound Task ID
data.taskContactBatchRelList[].contactBatchIdinttrueContact List ID
data.taskContactBatchRelList[].contactBatchNameStringtrueContact List Name
data.taskContactBatchRelList[].callWeightinttrueWeight
data.taskContactBatchRelList[].statusinttrueStatus
data.taskContactBatchRelList[].importStatusinttrueImport Status (1 Waiting 2 Importing 3 Imported)
data.taskContactBatchRelList[].totalCountinttrueNumber of Customers
data.taskContactBatchRelList[].execCountinttrueExecuted Customers
data.taskContactBatchRelList[].customerConnectCountinttrueCustomer Answered
data.taskContactBatchRelList[].agentConnectCountinttrueAgent Answered
data.taskContactBatchRelList[].retryCountinttrueRetry Count
data.taskContactBatchRelList[].createdUserIdStringtrueCreator ID
data.taskContactBatchRelList[].updatedUserIdStringtrueLast Update User ID
data.taskContactBatchRelList[].deleteFlaginttrueDelete Flag (0 Not Deleted 1 Deleted)
data.redialSceneJsonStringtrueRedial Options
data.callTemplateObjcettrueOutbound Call Template
data.callTemplate.nameStringtrueName
data.callTemplate.remarkStringtrueRemark
data.callTemplate.numberFilterStringtrueNumber Filter
data.callTemplate.numberFilterListArraytrueNot currently used
data.callTemplate.ivrModeinttrueIVR Mode: 0 Off 1 On
data.callTemplate.callTypeinttrueOutbound Call Mode (0: AI Outbound Call 1: Predictive Mode 3: Precision Mode 6: Precision IVR 7: Pure IVR 8: AI Predictive Outbound Call)
data.callTemplate.dialParamJsonStringtrueNot currently used
data.callTemplate.dialParamObjecttrueNot currently used
data.callTemplate.dialParam.optimizeParaminttrueNot currently used
data.callTemplate.dialParam.optimizeTargetinttrueNot currently used
data.callTemplate.dialParam.callInDurationAverageinttrueNot currently used
data.callTemplate.dialParam.callOutDurationAverageinttrueNot currently used
data.callTemplate.dialParam.callInPerHourinttrueNot currently used
data.callTemplate.dialParam.callPerMinuteinttrueNot currently used
data.callTemplate.dialParam.longDurationIgnoreinttrueNot currently used
data.callTemplate.concurrentLimitinttrueTask Concurrency Limit
data.callTemplate.createdUserIdStringtrueLast Update User ID
data.callTemplate.updatedUserIdStringtrueCreator ID
data.callTemplate.deleteFlaginttrueDelete Flag (0 Not Deleted 1 Deleted)
data.callTemplate.redialSceneJsonStringtrueRedial Options
data.callTemplate.categoryinttrueCategory (1 Automatic Outbound Call 2 AI)
data.callTemplate.ivrIdinttrueIVR ID
data.callTemplate.queueIdinttrueQueue ID
data.callTemplate.spnumberTypeinttrueCaller Number Type
data.callTemplate.spnumberValueinttrueCaller Number Value
data.callTemplate.startModeinttrueStart Mode
data.callTemplate.startTimedatetrueStart Time
data.callTemplate.expireTimedatetrueTask Expiration Time
data.callTemplate.workTimeIdinttrueWork Time
data.callTemplate.validDurationinttrueCall Validity Duration Threshold
data.callTemplate.maxRingSecondsinttrueMaximum Ring Duration Threshold
data.callTemplate.robotDefIdinttrueNot currently used
data.momentLimitinttrueNot currently used
data.operatorCreateNameStringtrueOperator Creator
data.categoryinttrueCategory (1 Automatic Outbound Call 2 AI)
data.dialParamObjecttrueDialing Setting Parameters
data.dialParam.optimizeParaminttrueOptimization Parameter (1 Agent Utilization 2 Abandon Call Rate 3 Average Agent Wait Time)
data.dialParam.optimizeTargetinttrueOptimization Target
data.redialSceneListArraytrueRedial Options
data.redialSceneList[].typeinttrueCall Result Type (1 Invalid Call 2 Call Failure 3 Tag)
data.redialSceneList[].resultStringtrueCall Result (Power Off, Empty Number, Out of Service, Busy, User Rejection, Unable to Connect, Service Suspended, User Busy, Incorrect Dialing Method, Call-In Restriction, Call Transfer Failure, Network Busy, No Answer, Overdue Payment, Unable to Answer, Number Change, Line Fault, Call Back Later, Other)
data.redialSceneList[].dealOptionintfalseHandling Method (1 Red

Start Outbound Call Task Interface

Request Address

  • PUT /api/v1/ads/external/callTasks/status/{id}/executing

Request Parameters

ParameterTypeNullableDescription
EmailStringtrueEmail
AppIdStringfalseTenant App ID
TimestampLongfalseTimestamp (e.g., current seconds, 1533092860)
TokenStringfalseSignature: Identity authentication signature (see Common Authentication Instructions)
idintfalseTask ID

Response Parameters

ParameterTypeNullableDescription
succeedbooleanfalseProcessing identifier (not currently used)
codeStringfalseReturn code
bizCodeStringfalseBusiness code (not currently used)
messageStringfalseReturn message
visiblebooleanfalseVisibility indicator (not currently used)

Request Example

$ curl 'https://demo.udesk.cn/api/v1/ads/external/callTasks/status/1/executing?AppId=18a58d6d-2b4e-44de-5725-31b9e5dbb4b4&Timestamp=1496631984&Token=6d9faaab002f49b2a9b8c634279a7e29414ea1cb' -i -X PUT -H 'Content-Type: application/json'

Response Example

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522

{
    "succeed": true,
    "code": 200,
    "bizCode": "000000",
    "message": "OK",
    "visible": false
}

Stop Outbound Call Task API

Request URL

  • PUT /api/v1/ads/external/callTasks/status/{id}/stop

Request Parameters

ParameterTypeNullableDescription
EmailStringTrueEmail
AppIdStringFalseTenant AppId
TimestampLongFalseTimestamp (e.g., current seconds, 1533092860)
TokenStringFalseSignature: Authentication signature (see general authentication instructions)
idintFalseTask ID

Response Parameters

ParameterTypeNullableDescription
succeedbooleanFalseProcessing flag (temporarily not in use)
codeStringFalseReturn code
bizCodeStringFalseBusiness code (temporarily not in use)
messageStringFalseReturn message
visiblebooleanFalseVisibility (temporarily not in use)

Request Example

$ curl 'https://demo.udesk.cn/api/v1/ads/external/callTasks/status/1/stop?AppId=18a58d6d-2b4e-44de-5725-31b9e5dbb4b4&Timestamp=1496631984&Token=6d9faaab002f49b2a9b8c634279a7e29414ea1cb' -i -X PUT -H 'Content-Type: application/json'

Response Example

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
    "succeed":true,
    "code":200,
    "bizCode":"000000",
    "message":"OK",
    "visible":false
}

Create Default AI Contact List Interface

Request Address

  • POST /api/v1/ads/external/contactBatchs/defaultContact

Request Parameters

ParameterTypeNullableDescription
EmailStringtrueEmail
AppIdStringfalseTenant App ID
TimestampLongfalseTimestamp (e.g., current seconds, 1533092860)
TokenStringfalseSignature: Identity authentication signature (see Common Authentication Instructions)
callTaskIdintfalseOutbound call task ID
nameStringfalseContact list name
remarkStringtrueRemark
focusStringtrueFocus

Response Parameters

ParameterTypeNullableDescription
succeedbooleanfalseProcessing identifier (not currently used)
codeStringfalseReturn code
bizCodeStringfalseBusiness code (not currently used)
messageStringfalseReturn message
visiblebooleanfalseVisibility indicator (not currently used)
dataObjecttrueResult
data.idintfalseContact list ID
data.callTaskIdintfalseOutbound call task ID
data.nameStringfalseContact list name
data.remarkStringtrueRemark
data.focusStringtrueFocus
data.statusintfalseStatus (1 waiting, 2 importing, 3 completed)

Request Example

$ curl 'https://demo.udesk.cn/api/v1/ads/external/contactBatchs/defaultContact?AppId=18a58d6d-2b4e-44de-5725-31b9e5dbb4b4&Timestamp=1496631984&Token=6d9faaab002f49b2a9b8c634279a7e29414ea1cb' -i -X POST -H 'Content-Type: application/json' -d '{
    "callTaskId":1,
    "name":"test Dialing1",
    "remark":"test Dialing",
    "focus":"tag"
}'

Response Example

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522

{
    "succeed": true,
    "code": 200,
    "bizCode": "000000",
    "message": "OK",
    "visible": false,
    "data": {
        "id": 80,
        "callTaskId": 1,
        "name": "test Dialing1",
        "remark": "test Dialing",
        "focus": "tag",
        "status": 3
    }
}

Import Contact Number Interface (Up to 50 at a Time)

Request Address

  • POST /api/v1/ads/external/contactBatchs/syncNumber

Request Parameters

ParameterTypeNullableDescription
EmailStringtrueEmail
AppIdStringfalseTenant App ID
TimestampLongfalseTimestamp (e.g., current seconds, 1533092860)
TokenStringfalseSignature: Identity authentication signature (see Common Authentication Instructions)
contactBatchIdintfalseContact list ID
dealTypeinttrueDuplicate handling type (1 no check 2 current task)
startTaskFlaginttrueWhether to start the outbound task after import completion 1: Start 0: Do not start
encryptionFlagintfalseWhether to encrypt (1-yes 0-no)
algorithmTypeinttrueEncryption type (1 aes 2 des)
secretKeyStringtrueEncryption key
encryptionRangeArraytrueEncrypted fields (["name","mobile"])
numberListArrayfalseNumber list
numberList[].nameStringtrueContact name
numberList[].mobileStringfalseMobile number, phone number (landline format: 02186391234, i.e., area code + landline number, no special characters separating the area code and landline number; mobile phone number format: 18812345678)
numberList[].companyNameStringtrueCompany
numberList[].remarkStringtrueRemark
numberList[].variatesArraytrueCustom variables (format: [{"key":"weather","type":"string","value":"Beijing"}])

Response Parameters

ParameterTypeNullableDescription
succeedbooleanfalseProcessing identifier (not currently used)
codeStringfalseReturn code
bizCodeStringfalseBusiness code (not currently used)
messageStringfalseReturn message
visiblebooleanfalseVisibility indicator (not currently used)
dataObjecttrueResult
data.contactBatchIdintfalseContact list ID
data.successCountintfalseNumber of successfully imported numbers
data.failedCountintfalseNumber of failed imported numbers
data.dealTypeintfalseDuplicate handling type
data.failedNumberListArraytrueArray of failed imported numbers
data.encryptionFlagintfalseWhether to encrypt
data.algorithmTypeinttrueEncryption type
data.secretKeyStringtrueEncryption key
data.encryptionRangeArraytrueEncrypted fields
data.failedNumberList[].nameStringtrueName
data.failedNumberList[].mobileStringtrueNumber
data.failedNumberList[].companyNameStringtrueCompany
data.failedNumberList[].remarkStringtrueRemark
data.failedNumberList[].variatesArraytrueCustom variables (format: [{"key":"weather","type":"string","value":"Beijing"}])
data.failedNumberList[].failedReasonStringtrueFailure reason

Request Example

$ curl 'https://demo.udesk.cn/api/v1/ads/external/contactBatchs/syncNumber?AppId=18a58d6d-2b4e-44de-5725-31b9e5dbb4b4&Timestamp=1496631984&Token=6d9faaab002f49b2a9b8c634279a7e29414ea1cb' -i -X POST -H 'Content-Type: application/json' -d '{
    "contactBatchId": 1,
    "dealType": 1,
    "encryptionFlag": 1,
    "algorithmType": 1,
    "secretKey": "MTIzNDU2",
    "encryptionRange": ["name,mobile"],
    "numberList":[
        {
            "name":"test 1",
            "mobile":"13900000000",
            "companyName":"test company 1",
            "remark":"Note1",
            "variates":[{"key":"Weather","type":"string","value":"New York"}]
        },
        {
            "name":"test 2",
            "mobile":"1390000001",
            "companyName":"test company 2",
            "remark":"Note2",
            "variates":[{"key":"Weather","type":"string","value":"New York"}]
        }
    ]
}'

Response Example

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522

{
    "succeed": true,
    "code": 200,
    "bizCode": "000000",
    "message": "OK",
    "visible": false,
    "data": {
        "contactBatchId": 1,
        "successCount": 1,
        "failedCount": 1,
        "failedNumberList": [
           {
               "name": "test 2",
               "mobile": "1390000001",
               "companyName": "test company 2",
               "remark": "Note2",
               "variates": [{"key": "Weather", "type": "string", "value": "New York"}],
               "failedReason": "Invalid number"
           }
       ]
    }
}

Create Outbound Task Interface (Simplified)

Request URL

  • POST /v1/ads/callTasks/simply

Request Parameters

ParameterTypeNullableDescription
nameStringfalseTask name
callTemplateIdintfalseTask template ID
priorityintfalseTask priority
startModeintfalseStart mode
(1: Manual, 2: Scheduled, 3: Recurring)
startTimeStringtrueStart time (mandatory for scheduled start)
Format: "yyyy-MM-dd HH:mm:ss"
startDateStringtrueStart date (mandatory for recurring start)
Format: "yyyy-MM-dd HH:mm:ss"
endDateStringtrueEnd date (mandatory for recurring start)
Format: "yyyy-MM-dd"
startTimePointStringtrueStart time point (mandatory for recurring start)
Format: "HH:mm:ss"
expireTimeStringtrueTask end time
Format: "yyyy-MM-dd HH:mm:ss"
dealTypeStringtrueDuplicate handling type
(1: No duplicate check, 2: Current task)
remarkStringtrueRemarks

Response Parameters

ParameterTypeNullableDescription
succeedbooleanfalseProcessing flag (not currently in use)
codeStringfalseResponse code
bizCodeStringfalseBusiness code (not currently in use)
messageStringfalseResponse message
visiblebooleanfalseVisibility flag (not currently in use)
dataObjecttrueResult
data.taskIdLongfalseTask ID
data.contactBatchIdLongfalseContact list ID

Request Example

$ curl 'https://demo.udesk.cn/api/v1/ads/callTasks/simply?AppId=18a58d6d-2b4e-44de-5725-31b9e5dbb4b4&Timestamp=1496631984&Token=6d9faaab002f49b2a9b8c634279a7e29414ea1cb' -i -X POST -H 'Content-Type: application/json' -d '{

    "callTemplateId": 148,
    "name": "Test Task",
    "startMode": 2,
    "startTime": "2022-07-20 00:00:00",
    "priority": 2,
    "expireTime": "2022-07-21 23:59:59",
    "remark": "Test Task"
  }'

Response Example

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522

{
    "succeed": true,
    "code": 200,
    "bizCode": "000000",
    "message": "OK",
    "visible": false,
    "data": {
        "taskId": 102321,
        "contactBatchId": 562
    }
}

Query Outbound Task List (Basic Version)

Request URL

  • POST /v1/ads/external/callTasks/basicSearch

Request Parameters

ParameterTypeNullableDescription
pageNuminttruePage number
pageSizeinttrueNumber of items per page, default is 20
nameStringtrueTask name
statusinttrueTask status (1: Suspended, 2: Running, 3: Stopped, 4: Pausing, 5: Resuming, 6: Expired)
categoryinttrueTask category (1: Regular Auto Dialing, 2: AI Auto Dialing)

Response Parameters

ParameterTypeNullableDescription
succeedbooleanfalseProcessing flag (not currently in use)
codeStringfalseResponse code
bizCodeStringfalseBusiness code (not currently in use)
messageStringfalseResponse message
visiblebooleanfalseVisibility flag (not currently in use)
pagingobjectfalsePagination information
paging.pageNumIntfalsePage number
paging.pageSizeIntfalseNumber of rows per page
paging.totalIntfalseTotal data count
dataArrayfalseResults, empty array when there's no query result
data.idLongfalseTask ID
data.nameStringfalseTask name
data.callTemplateIdLongfalseTemplate ID
data.callTemplateNameStringfalseTemplate name
data.categoryintfalseTask category (1: Regular Auto Dialing, 2: AI Auto Dialing)
data.callTypeintfalseOutbound mode (0: AI Dialing, 1: Predictive Mode, 3: Precise Mode, 6: Precise IVR, 7: Pure IVR, 8: AI Predictive Dialing)
data.ivrIdLongtrueOutbound IVR ID
data.queueIdLongtrueOutbound queue ID
data.robotDefIdLongtrueScript ID
data.statusintfalseTask status (1: Suspended, 2: Running, 3: Stopped, 4: Pausing, 5: Resuming, 6: Expired)

Request Example

$ curl 'https://demo.udesk.cn/api/v1/ads/external/callTasks/basicSearch?AppId=18a58d6d-2b4e-44de-5725-31b9e5dbb4b4&Timestamp=1496631984&Token=6d9faaab002f49b2a9b8c634279a7e29414ea1cb' -i -X POST -H 'Content-Type: application/json' -d '{
    "pageNum":1,
    "pageSize":1,
    "status": 1,
    "name": "Outbound Task",
    "category": 2
}'

Response Example

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522

{
    "succeed": true,
    "code": 200,
    "bizCode": "000000",
    "message": "OK",
    "visible": false,
    "paging": {
        "pageNum": 1,
        "pageSize": 1,
        "total": 1
    },
    "data": [
        {
            "id": 1158,
            "name": "Outbound Task Test",
            "callTemplateId": 204,
            "callTemplateName": "Outbound Template",
            "category": 2,
            "callType": 0,
            "ivrId": null,
            "queueId": null,
            "robotDefId": 10,
            "status": 1
        }
    ]
}

Outbound Task Status Query Interface

Request URL

  • GET /v1/ads/external/callTasks/{id}/status

Request Parameters

ParameterTypeNullableDescription
idLongfalseTask ID (path parameter)

Response Parameters

ParameterTypeNullableDescription
succeedbooleanfalseProcessing flag (not currently in use)
codeStringfalseResponse code
bizCodeStringfalseBusiness code (not currently in use)
messageStringfalseResponse message
visiblebooleanfalseVisibility flag (not currently in use)
dataObjecttrueResult, empty when there's no data
data.nameStringfalseTask name
data.statusintfalseTask status (1: Suspended, 2: Running, 3: Stopped, 4: Pausing, 5: Resuming, 6: Expired)

Request Example

$ curl 'https://demo.udesk.cn/api/v1/ads/external/callTasks/1/status?AppId=18a58d6d-2b4e-44de-5725-31b9e5dbb4b4&Timestamp=1496631984&Token=6d9faaab002f49b2a9b8c634279a7e29414ea1cb'

Response Example

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522

{
    "succeed": true,
    "code": 200,
    "bizCode": "000000",
    "message": "OK",
    "visible": false,
    "data": {
        "name": "Outbound Task Test",
        "status": 1
    }
}