Get call flow draft
curl --request GET \
--url https://api.withallo.com/v2/api/numbers/{number}/call_flow/draft \
--header 'Authorization: <api-key>'import requests
url = "https://api.withallo.com/v2/api/numbers/{number}/call_flow/draft"
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/draft', 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/draft",
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/draft"
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/draft")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/numbers/{number}/call_flow/draft")
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
}
}Phone Numbers
Get call flow draft
Returns the working draft of a phone number’s call flow. Unlike GET /v2/api/numbers/{number}/call_flow?status=draft, this endpoint does NOT fall back to the published flow when no draft exists — it returns 404 CALL_FLOW_DRAFT_NOT_FOUND. Use it to read a draft’s lock_version without risk of accidentally holding the published version’s lock.
GET
/
v2
/
api
/
numbers
/
{number}
/
call_flow
/
draft
Get call flow draft
curl --request GET \
--url https://api.withallo.com/v2/api/numbers/{number}/call_flow/draft \
--header 'Authorization: <api-key>'import requests
url = "https://api.withallo.com/v2/api/numbers/{number}/call_flow/draft"
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/draft', 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/draft",
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/draft"
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/draft")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.withallo.com/v2/api/numbers/{number}/call_flow/draft")
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
}
}Required scope:
PHONE_NUMBERS_READBehavior
Returns the working draft of a phone number’s call flow. The{number} path parameter is the Allo phone number in E.164 format (e.g. +14155551234).
Unlike Get call flow with ?status=draft, this endpoint does not fall back to the published flow (or the legacy-IVR synthesis) when no draft exists — it returns 404 CALL_FLOW_DRAFT_NOT_FOUND.
The response includes a confirmation_url — the link where a signed-in user reviews and publishes this draft. To publish it directly instead, call Publish call flow with the lock_version from this response.
Prefer this endpoint at the start of an edit cycle.
GET …/call_flow?status=draft returns 200 with the published version when there is no draft, so a caller can end up holding the published lock_version — which then fails POST …/call_flow/publish with CALL_FLOW_STALE_LOCK. This endpoint makes “no draft” an explicit 404 instead.Errors
404 CALL_FLOW_DRAFT_NOT_FOUND— the number has no working draft. Create one withPUT /v2/api/numbers/{number}/call_flow/draft.404 PHONE_NUMBER_NOT_FOUND— the number is not one of your account’s numbers. List them withGET /v2/api/numbers.
Was this page helpful?