Skip to main content

Send Callflow

POST 

/api/v1/subaccounts/:subAccountId/callflows

Note: For all API requests that include a source parameter, CLID whitelisting is mandatory. Please contact your account manager or email cpaas-support@8x8.com if you have a voice account with 8x8 CPaaS.

Use Cases

The Callflows API enables you to build sophisticated voice solutions:

Interactive Voice Response (IVR)

Create interactive menu systems with DTMF capture, conditional routing, and voice prompts.

Voice Messaging

Deliver automated voice messages using text-to-speech (TTS) or pre-recorded audio files.

Custom Call Scenarios

Build tailored call flows by combining multiple actions (makeCall, say, playFile, sayAndCapture, hangup) to meet your specific business requirements.


API Examples

Example 1: IVR with DTMF Capture

{
"callflow": [
{
"action": "makeCall",
"params": {
"source": "+6588000000",
"destination": "+6590000000"
}
},
{
"action": "sayAndCapture",
"params": {
"promptMessage": "Press 1 for Sales, Press 2 for Support",
"voiceProfile": "en-US-Neural2-C",
"minDigits": 1,
"maxDigits": 1,
"digitTimeout": 5000,
"completeOnHash": false
}
}
]
}

Example 2: Voice Message (Text-to-Speech)

{
"callflow": [
{
"action": "makeCall",
"params": {
"source": "+6588000000",
"destination": "+6590000000"
}
},
{
"action": "say",
"params": {
"text": "Hello, this is a reminder about your appointment tomorrow at 2 PM.",
"voiceProfile": "en-GB-Emma",
"repetition": 1,
"speed": 1
}
},
{
"action": "hangup"
}
]
}

Example 3: Voice Message (Audio File)

{
"callflow": [
{
"action": "makeCall",
"params": {
"source": "+6588000000",
"destination": "+6590000000"
}
},
{
"action": "playFile",
"params": {
"fileUrl": "https://example.com/audio/notification.mp3",
"repetition": 1
}
},
{
"action": "hangup"
}
]
}

Request

Responses

Should the request authenticate successfully and pass all validation, the response will contain an updated Voice Message Object. The following is an example response: