Home > API Center > API interface guide

Quick Start - Task-based Approach

IVR Group Call

It is used to send important information notifications to a large number of users, such as loan overdue payment reminders, credit card repayment reminders, wealth management product maturity notices, and promotional activities. For example, when it is necessary to remind a large number of customers of repayment reminders, the bank can use voice notifications to inform users in a timely manner so that users can understand the situation in a timely manner.

IVR Group Call task integration process

Pre-preparation

Obtain the values of API Key, API Secret, and appId.

You need to log on to the client to obtain the bitmap, as shown in the following figure.

Sign signature rule

Use Api Key + Api Secret + Timestamp to generate a MD5-32-bit string (case-insensitive) as the signature.

Example:

API Key: bDqJFiq9

API Secret: 7bz1lzh9

Current system Timestamp (seconds): 1630468800

MD5(bDqJFiq97bz1lzh91630468800): 05d7a50893e22a5c4bb3216ae3396c7c

API docking process

01Upload voice file

Convert The Voice file to base64 encoding and call the interface Upload voice file.

curl --location --request POST 'https://api.laaffic.com/voice/fileUpload' 
--header 'Content-Type: application/json;charset=UTF-8' 
--header 'Sign: 621862bfd0a7140dbb8fcbefe333fe9a' 
--header 'Timestamp: 1765944162' 
--header 'Api-Key: SQLHdsQFe0Gk8ckwJZqcwxfuYRm0Qu0o' 
--data-raw '{
    "fileName":"11-24.mp3",
    "file":"base64-encoded file content"
}'

02Create an IVR Group Call Task

According to requirements, you can refer to the feature function, call IVR Group Call Task Interface for passing related parameters.

Function Parameters Parameter Value Remarks
Transfer to agent (manual customer service answer) toSeat 1 Related seats need to be configured
Call success/failure/keypress feedback/ring success, triggering post-call SMS hangUpSms 1 SMS application needs to be configured by the business team
Text to speech, you can insert variables in the text (e.g., username/number) source 3 Use with other parameters
Timing call function sendTime Timed call time (null for immediate call)  
Task recall: Select failed-only recall or full recall recallFlow Whether to enable recall: Set this field when recall is needed; leave it empty to disable recall Recall related details need to be configured in the request
curl --location 'https://api.laaffic.com/voice/group/call/send' 
--header 'Content-Type: application/json;charset=UTF-8' 
--header 'Sign: 954169507790e95d2ffe2c19636a9f4b' 
--header 'Timestamp: 1761552496' 
--header 'Api-Key: Lh7vkyKSv0kTb5KvSPNdF7M67QZMvt2o' 
--data '{
    "appId":"cER2Ev2w",  // Voice Application ID
    "taskName":"20251024123", // Task Name
    "source":1,// File Source (1 = Uploaded File, 2 = Re-upload Voice File, 3 = Text-to-Speech)
    "voiceFileId":"12025073082f4b0d63ac5400a8320853c67341456.m4a",// Voice File ID
    "lan": "EN", // Language
    "loopCount":1,// Number of Loop Plays: 1
    "maxCalls":40, // Maximum Number of Calls: 40
    "hangUpSms":1,// Post-call SMS Push
    "smsAppId":"cF9u6UmT", // SMS Application ID
    "smsContent": "Attention! Your loan of $1,200 is overdue. Please settle the payment by Aug 15 via  ${text1}.", // SMS Content
    "feedbackPush":1, // Keypress Feedback Triggers Post-call SMS
    "feedbackValue":6, // Send SMS When User Presses Key 6
    "successPushTime":10, // Send SMS 10 Seconds After Call Success
    "failedPush":1, // Send SMS When Call Fails
    "numberInfoList":[{
        "calleeNumber":"9113000000001",// Callee Number
        "text1":"https://itniotech.cn/api/voice/callSend/"   // Callee Info (Inserted as ${text1} Variable in smsContent)
    }
    ,{
        "calleeNumber":"9113000000002",// Callee Number
        "text1":"https://itniotech.cn/api/voice/callSend/"   // Callee Info (Inserted as ${text1} Variable in smsContent)  
    }
    ]
}'

Note: All called numbers and called information are written in numberInfoList, calleeNumber represents called number and text1 represents called information, which can be inserted into smsContent as variables.

03Status Report Push

When the user configures an http push address on the account setting-voice application management page, the platform will actively push the voice and status report of the http-api to the user to configure the address.

You can log in to the client settings, the specific location is shown in the figure.

Reference Information

Quick Check of Common Error Codes

The following are several common error code causes and handling methods, which can be seen globally Global Status Code

Status Reason Description
-1 Authentication error Check the parameter values of API Key, API Secret, and appId.
-18 Port program unusual Check whether the request body is in json format.

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