Get call flow
curl --request GET \
--url https://api.withallo.com/v2/api/numbers/{number}/call_flow \
--header 'Authorization: <api-key>'import requests
url = "https://api.withallo.com/v2/api/numbers/{number}/call_flow"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.withallo.com/v2/api/numbers/{number}/call_flow', 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.withallo.com/v2/api/numbers/{number}/call_flow",
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: <api-key>"
],
]);
$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.withallo.com/v2/api/numbers/{number}/call_flow"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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.withallo.com/v2/api/numbers/{number}/call_flow")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/numbers/{number}/call_flow")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "cflv-abc123",
"flow_id": "cflw-abc123",
"version": 3,
"status": "PUBLISHED",
"lock_version": 0,
"schema_version": 1,
"engine_subset": "FULL_FLOW",
"number": "+14155551234",
"confirmation_url": "https://app.withallo.com/call-flow-draft/cflv-abc123",
"entry_node_id": "node-22",
"definition": {}
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}Numéros de téléphone
Récupérer le flux d'appel
Returns the call flow for a phone number. By default returns the published flow (or an in-memory synthesis of the legacy IVR if none is published); pass ?status=draft to return the working draft instead.
GET
/
v2
/
api
/
numbers
/
{number}
/
call_flow
Get call flow
curl --request GET \
--url https://api.withallo.com/v2/api/numbers/{number}/call_flow \
--header 'Authorization: <api-key>'import requests
url = "https://api.withallo.com/v2/api/numbers/{number}/call_flow"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.withallo.com/v2/api/numbers/{number}/call_flow', 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.withallo.com/v2/api/numbers/{number}/call_flow",
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: <api-key>"
],
]);
$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.withallo.com/v2/api/numbers/{number}/call_flow"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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.withallo.com/v2/api/numbers/{number}/call_flow")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/numbers/{number}/call_flow")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "cflv-abc123",
"flow_id": "cflw-abc123",
"version": 3,
"status": "PUBLISHED",
"lock_version": 0,
"schema_version": 1,
"engine_subset": "FULL_FLOW",
"number": "+14155551234",
"confirmation_url": "https://app.withallo.com/call-flow-draft/cflv-abc123",
"entry_node_id": "node-22",
"definition": {}
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}{
"error": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"retry_after_seconds": 123
}
}Scope requis :
PHONE_NUMBERS_READComportement
Renvoie le flux d’appel d’un numéro de téléphone. Le paramètre de chemin{number} est le numéro Allo au format E.164 (ex. +14155551234).
Par défaut, cette route renvoie le flux publié. Si le numéro n’a aucun flux publié, Allo renvoie une synthèse en mémoire de la configuration IVR héritée avec status: "SYNTHESIZED" (rien n’est persisté). Passez ?status=draft pour récupérer le brouillon de travail.
?status=draft bascule sur le flux publié (ou la synthèse) lorsqu’aucun brouillon n’existe. Pour lire un brouillon sans cette bascule — en obtenant un 404 à la place — utilisez Récupérer le brouillon du flux d’appel.Champs
status—DRAFT,PUBLISHEDouSYNTHESIZED.lock_version— jeton de concurrence optimiste. Renvoyez-le lors de l’enregistrement d’un brouillon.number— E.164 de la ligne routée par ce flux (null pour un fluxSYNTHESIZED).confirmation_url— présent uniquement sur unDRAFT: le lien où un utilisateur connecté le vérifie et le publie. Voir Enregistrer le brouillon du flux d’appel.definition— le document opaque de l’arbre du flux d’appel (clés en camelCase), enraciné àentry_node_id.
Erreurs
404 PHONE_NUMBER_NOT_FOUND— le numéro ne fait pas partie des numéros de votre compte. Listez-les avecGET /v2/api/numbers.
Autorisations
Paramètres de chemin
Allo phone number in E.164 format
Exemple:
"+14155551234"
Paramètres de requête
Pass draft to fetch the working draft instead of the published flow.
Options disponibles:
draft, published Réponse
The call flow
A version of a phone number's call flow.
Show child attributes
Show child attributes
Cette page vous a-t-elle été utile ?