IVR Flows
Get an IVR flow and its lead fields
Returns one flow and the lead fields its published version expects in data when you push a call. Use fields to build your request. Unpublished flows are returned with published_version: null and an empty fields list.
GET
/
ivr-flows
/
{flowId}
Get an IVR flow and its lead fields
curl --request GET \
--url https://api.vocobase.com/api/v2/ivr-flows/{flowId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vocobase.com/api/v2/ivr-flows/{flowId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vocobase.com/api/v2/ivr-flows/{flowId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vocobase.com/api/v2/ivr-flows/{flowId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vocobase.com/api/v2/ivr-flows/{flowId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.vocobase.com/api/v2/ivr-flows/{flowId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vocobase.com/api/v2/ivr-flows/{flowId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "f1234567-abcd-1234-abcd-123456789012",
"name": "EMI reminder",
"language": "hi",
"voice_model": "standard",
"published_version": 3,
"fields": [
{
"name": "loan_id",
"type": "text",
"required": true
},
{
"name": "amount_due",
"type": "money",
"required": true
},
{
"name": "due_date",
"type": "date",
"required": false
}
]
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
}{
"success": false,
"error": {
"code": "IVR_FLOWS_DISABLED",
"message": "IVR Flows is not enabled on this account. Contact Vocobase to enable it."
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Flow not found"
}
}Authorizations
API key in format: rg_live_xxxx. Pass as a Bearer token in the Authorization header.
Path Parameters
IVR flow ID, from GET /ivr-flows or the flow page in the dashboard.
⌘I
Get an IVR flow and its lead fields
curl --request GET \
--url https://api.vocobase.com/api/v2/ivr-flows/{flowId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vocobase.com/api/v2/ivr-flows/{flowId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vocobase.com/api/v2/ivr-flows/{flowId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vocobase.com/api/v2/ivr-flows/{flowId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vocobase.com/api/v2/ivr-flows/{flowId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.vocobase.com/api/v2/ivr-flows/{flowId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vocobase.com/api/v2/ivr-flows/{flowId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "f1234567-abcd-1234-abcd-123456789012",
"name": "EMI reminder",
"language": "hi",
"voice_model": "standard",
"published_version": 3,
"fields": [
{
"name": "loan_id",
"type": "text",
"required": true
},
{
"name": "amount_due",
"type": "money",
"required": true
},
{
"name": "due_date",
"type": "date",
"required": false
}
]
}
}{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
}{
"success": false,
"error": {
"code": "IVR_FLOWS_DISABLED",
"message": "IVR Flows is not enabled on this account. Contact Vocobase to enable it."
}
}{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Flow not found"
}
}