Skip to content

Callbot API callCallback

Jcateye edited this page Dec 16, 2024 · 4 revisions

callbot-api

v1.0.0

Base URLs:

aibot External API v3.0/Callback

Authentication Method

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

POST Call Callback(aibot->customer)

POST /api/v3/callCallback

Request Body

{
  "callbackType": 1,
  "orderID": "string",
  "userPhone": "string",
  "userName": "string",
  "sceneID": "string",
  "userTaskID": "string",
  "taskID": "string",
  "finish": true,
  "other": "string",
  "callInfoDetail": {
    "callID": "string",
    "callingNumber": "string",
    "lineAddress": "string",
    "callStatus": 1,
    "callStartTs": 0,
    "callAnswerTs": 0,
    "callEndTs": 0,
    "callDuration": 0,
    "callAudioUrl": "string",
    "hangupCause": "string",
    "termSipCode": "string",
    "intents": [
      {
        "intentID": "string",
        "intentTag": "string",
        "intentName": "string",
        "intentLevel": 0
      }
    ],
    "sms": [
      {
        "smsSendTs": 0,
        "sysMessageID": "string",
        "smsContent": "string"
      }
    ],
    "agent": {
      "agentName": "string",
      "agentGroup": "string",
      "agentCallStatus": 1,
      "agentCallElapsed": 0,
      "agentLabel": "string",
      "manualCallStart": 0,
      "manualCallAnswer": 0,
      "manualCallEnd": 0,
      "manualHangupBy": 0
    },
    "params": [
      {
        "name": "string",
        "value": "string"
      }
    ]
  }
}

Request Parameters

Name Position Type Required Description
requestID header string Yes Unique request ID
uuid header string Yes UUID provided by the callee
createTs header string Yes Request timestamp (in seconds)
sign header string Yes Signature(Signature algorithm can be found in the backend -> Developer section)
body body object No
» callbackType body integer Yes
» orderID body string Yes Order ID
» userPhone body string Yes Phone number
» userName body string Yes User name
» sceneID body string Yes Script template ID
» userTaskID body string Yes User task ID
» taskID body string Yes Task ID
» finish body boolean Yes Order completed
» other body string Yes Transmitted field
» callInfoDetail body object Yes Call details
»» callID body string Yes Call ID
»» callingNumber body string Calling number
»» lineAddress body string Line IP
»» callStatus body integer Yes Call status
»» callStartTs body integer Yes Call dialing timestamp
»» callAnswerTs body integer Yes The presence of a value does not indicate that the call was answered. Please refer to callStatus to determine the call status.
»» callEndTs body integer Yes Call hang-up timestamp
»» callDuration body integer Yes Call duration in seconds
»» callAudioUrl body string Yes Call recording URL (valid for 3 months), in the format of wav, e.g., https://xxxx.wav
»» hangupCause body string Yes hangup cause
»» termSipCode body string Yes sip code
»» intents body [object] Yes The intent tags can be obtained by querying the intent labels set for the script template to which this task belongs.
»»» intentID body string Yes Intent tag ID
»»» intentTag body string Yes The intent tags can be obtained by querying the intent labels set for the script template to which this task belongs.
»»» intentName body string Yes Intent tag name
»» sms body [object] No SMS
»»» smsSendTs body integer Yes SMS sending timestamp
»»» sysMessageID body string Yes SMS sending ID
»»» smsContent body string Yes SMS content
»» agent body object No Agent-related information
»»» agentName body string Yes Answering agent name
»»» agentGroup body string Yes Answering agent group
»»» agentCallStatus body integer Yes Agent answering status
»»» agentCallElapsed body integer Yes Agent answering duration
»»» agentLabel body string Yes Agent label
»»» manualCallStart body integer Yes Manual call start timestamp
»»» manualCallAnswer body integer Yes Manual call answer timestamp
»»» manualHangupBy body integer Yes Abandoning who hung up 0: none, 1: Agent hung up, 2: User hung up
»»» manualCallEnd body integer Yes Manual call end timestamp
»» params body [object] No Variables
»»» name body string Yes Variable name
»»» value body string Yes Variable value

Enumeration Values

属性
Attribute Value
» callbackType 1 Task callback
» callbackType 2 Order callback
» callbackType 3 Call callback
»» callStatus 1 Call preparation
»» callStatus 2 Call scheduling
»» callStatus 3 Call dialing
»» callStatus 4 Call ringing
»» callStatus 5 Call in progress
»» callStatus 6 Call ended - Completed call
»» callStatus 8 Call ended - Invalid number
»» callStatus 9 Call ended - Temporarily unavailable
»» callStatus 10 Call ended - User busy
»» callStatus 11 Call ended - User busy and rejected
»» callStatus 12 Call ended - User rejected
»» callStatus 13 Call ended - User rejected
»» callStatus 15 Call ended - TTS synthesis failed
»» callStatus 16 Call ended - Unknown reason
»» callStatus 17 Call ended - Blacklisted number
»» callStatus 18 Call ended - User stopped
»» callStatus 21 Call ended - Invalid number (Number detection illegal, does not meet local number range)
»» callStatus 22 Call ended - Ring missed
»» callStatus 23 Call ended - No response to call
»» callStatus 24 Call ended - Morning Media - Voice Mail
»» callStatus 25 Call ended - Ring too long
»»» smsSendTs 0 Not sent
»»» smsSendTs 1 Sent
»»» smsSendTs 2 Send successful
»»» smsSendTs 3 Send failed
»»» smsSendTs 4 Clicked successfully
»»» agentCallStatus 1 Call dialing
»»» agentCallStatus 2 Call ringing
»»» agentCallStatus 3 Call connected
»»» agentCallStatus 4 Call completed
»»» agentCallStatus 10 Call completed - Agent busy

Response Example

200 Response

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

Response Result

Status Code Meaning Description Data Model
200 OK Success Inline

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, needed to provide the responseID for troubleshooting

Introduction

WhatsApp

Short message

Voice

Call Center(NXLink)

Call Center(Callbot)

Flash Call

Short links

邮件验证码

DID号码

通用

号码检测

Clone this wiki locally