Home > API Center > API interface guide

 

AI Agent Group Call Task Creation

POST

https://api.laaffic.com/voice/group/call/send/agent

Create AI Agent voice group call tasks.
 
Request Parameters
Parameter Description Required Type
appId Application ID Yes String
displayNum Display number, 0-20 digits, can be empty No String
taskName Task name, length 2-64, must be unique Yes String
numberInfoList Callee numbers, max 200k mobile numbers. Multiple numbers separated by commas. Each number format: Country code + mobile number (6-18 digits). Yes List<Object>
calleeNumber Callee number, 6-18 digits consisting of country code + mobile number Yes String
text1 Callee Info: Text1. Used to replace variable ${text1} in the text variable template. If the template contains ${text1}, this parameter cannot be null. Length max 30 characters, otherwise truncated. No String
text2 Callee Info: Text2. Used to replace variable ${text2} in the text variable template. If the template contains ${text2}, this parameter cannot be null. Length max 30 characters, otherwise truncated. No String
text3 Callee Info: text3. Used to replace variable ${text3} in the text variable template. If the template contains ${text3}, this parameter cannot be null. Length max 30 characters, otherwise truncated. No String
text4 Callee Info: Text4. Used to replace variable ${text4} in the text variable template. If the template contains ${text4}, this parameter cannot be null. Length max 30 characters, otherwise truncated. No String
text5 Callee Info: Text5. Used to replace variable ${text5} in the text variable template. If the template contains ${text5}, this parameter cannot be null. Length max 30 characters, otherwise truncated. No String
text6 Callee Info: Text6. Used to replace variable ${text6} in the text variable template. If the template contains ${text6}, this parameter cannot be null. Length max 30 characters, otherwise truncated. No String
text7 Callee Info: Text7. Used to replace variable ${text7} in the text variable template. If the template contains ${text7}, this parameter cannot be null. Length max 30 characters, otherwise truncated. No String
text8 Callee Info: Text8. Used to replace variable ${text8} in the text variable template. If the template contains ${text8}, this parameter cannot be null. Length max 30 characters, otherwise truncated. No String
text9 Callee Info: Text9. Used to replace variable ${text9} in the text variable template. If the template contains ${text9}, this parameter cannot be null. Length max 30 characters, otherwise truncated. No String
text10 Callee Info: Text10. Used to replace variable ${text10} in the text variable template. If the template contains ${text10}, this parameter cannot be null. Length max 30 characters, otherwise truncated. No String
sendTime Scheduled call time (pass null for immediate call) No LocalDateTime
maxCalls Max call duration. Forced hangup after n seconds of connection. Max 999 seconds, default 300s. Yes Integer
allowSendTime Allowed sending time slots, max 3 entries No List
strTime Start Time HH:MM No String
endTime End Time HH:MM No String
maxRingingTime Max ringing duration, default 60, input range 10-120 seconds No Integer
scriptId Agent ID Yes Integer
enableRecording Enable recording, 0-No, 1-Yes, default "Yes" if empty No Integer
recallFlow Recall Flow No Object
recallType Recall Type: 0 Resend all, 1 Resend failed, 3 Recall by intent No (Required if recallFlow is passed) Integer
recallInterval Recall Interval No (Required if recallFlow is passed) Integer
recallIntent Recall Intent codes, see Encoding Table for details No List<String>
recallNum Recall Count No (Required if recallFlow is passed) Integer
nodeList Flow Nodes Object List<String>
agentId Agent ID No (Required if nodeList is passed) Integer
 
Request Example
Request URL:
    https://api.laaffic.com/voice/group/call/send/agent
Request Method:
    POST
Request Headers:
    Content-Type: application/json;charset=UTF-8
    Sign: 05d7a50893e22a5c4bb3216ae3396c7c
    Timestamp: 1630468800
    Api-Key: bDqJFiq9
Request Body:
{
    "appId": "2Xql9RBI",
    "taskName": "I want to test Agent API-16",
    "displayNum": "1008122211",
    "maxCalls": 300,
    "maxRingingTime": 60,
    "agentId": 41,
    "enableRecording": 1,
    "calloutRate": 1,
    "allowSendTime": [
        {
            "strTime": "18:28",
            "endTime": "19:28"
        }
    ],
    "numberInfoList": [
        {
            "calleeNumber": "463200000007"
        }
    ],
    "recallFlow": {
        "recallType": 3,
        "recallInterval": 1,
        "recallNum": 5,
        "nodeList": [
            {"agentId": "41"},
            {"agentId": "41"},
            {"agentId": "41"},
            {"agentId": "41"},
            {"agentId": "41"}
        ],
        "recallIntent": [
            "99998","99999"
        ]
    }
}
 
Response Parameters
Parameter Description Type
status Status code, 0 for success, others see Response Status Codes String
reason Failure reason description String
data This method returns keyId Integer
 
Response Example
{
    "status":"0",
    "reason":"success",
    "data":123123
}
 
Response Status Codes
status Description
0 success
-1 Authentication error
-2 Restricted IP access
-16 Timestamp expires
-18 Port program unusual
-20 Data existing
-21 Data validation exception
-22 Parameter exception
-23 Data caps
-24 Data unexisting
-26 Getting fee faily
-34 There is no callable number when the task was ended last time. Please start the group call task again.
-37 The group call task you submitted exceeds the maximum concurrent task limit. Please complete the task before submitting again!
-38 Conversion text and language type are required
-39 Failed to obtain the text language type
-41 Task name already exists
-42 Recall is allowed only when the task is canceled or completed
-60 The AI speech template does not exist
-68 AI Agent industry intent does not match recall intent
 
Encoding Table
Global:
Code Intent Name Remarks
99998 Not called
99999 Called but not connected
IG Marketing (Code starts with 10):
Code Intent Name Remarks
101 Voicemail The user side speaking after connection is voicemail
102 No response from customer
104 Customer intent unknown
105 Customer clearly interested
106 Customer clearly not interested
Financial Collection (Code starts with 20):
Code Intent Name Remarks
201 Voicemail The user side speaking after connection is voicemail
202 No response from customer
204 Customer repayment intent unknown
205 Promise to pay: On time
206 Promise to pay: Deferred
207 Cannot pay: Subjective refusal
208 Cannot pay: Deny loan
209 Cannot pay: Need installment application
2010 Customer already paid
Financial Marketing (Code starts with 30):
Code Intent Name Remarks
301 Voicemail The user side speaking after connection is voicemail
302 No response from customer
304 Customer intent unknown
305 Customer clearly interested
306 Customer clearly not interested

Telegram
WhatsApp
Chat with us!
Need help?
Click here and start chatting with us!