curl --request PATCH \
--url https://api.flowiq.live/v1/calling/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"calling": {
"call_icons": {
"restrict_to_user_countries": [
"<string>"
]
},
"call_hours": {
"timezone_id": "Africa/Johannesburg",
"weekly_operating_hours": [
{
"open_time": "0800",
"close_time": "1700"
}
],
"holiday_schedule": [
{}
]
},
"sip": {
"servers": [
{
"hostname": "<string>",
"port": 123,
"request_uri_user_params": {},
"sip_user_password": "<string>"
}
]
},
"audio": {
"additional_codecs": []
},
"voicemail": {}
}
}
'import requests
url = "https://api.flowiq.live/v1/calling/settings"
payload = { "calling": {
"call_icons": { "restrict_to_user_countries": ["<string>"] },
"call_hours": {
"timezone_id": "Africa/Johannesburg",
"weekly_operating_hours": [
{
"open_time": "0800",
"close_time": "1700"
}
],
"holiday_schedule": [{}]
},
"sip": { "servers": [
{
"hostname": "<string>",
"port": 123,
"request_uri_user_params": {},
"sip_user_password": "<string>"
}
] },
"audio": { "additional_codecs": [] },
"voicemail": {}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
calling: {
call_icons: {restrict_to_user_countries: ['<string>']},
call_hours: {
timezone_id: 'Africa/Johannesburg',
weekly_operating_hours: [{open_time: '0800', close_time: '1700'}],
holiday_schedule: [{}]
},
sip: {
servers: [
{
hostname: '<string>',
port: 123,
request_uri_user_params: {},
sip_user_password: '<string>'
}
]
},
audio: {additional_codecs: []},
voicemail: {}
}
})
};
fetch('https://api.flowiq.live/v1/calling/settings', 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.flowiq.live/v1/calling/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'calling' => [
'call_icons' => [
'restrict_to_user_countries' => [
'<string>'
]
],
'call_hours' => [
'timezone_id' => 'Africa/Johannesburg',
'weekly_operating_hours' => [
[
'open_time' => '0800',
'close_time' => '1700'
]
],
'holiday_schedule' => [
[
]
]
],
'sip' => [
'servers' => [
[
'hostname' => '<string>',
'port' => 123,
'request_uri_user_params' => [
],
'sip_user_password' => '<string>'
]
]
],
'audio' => [
'additional_codecs' => [
]
],
'voicemail' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flowiq.live/v1/calling/settings"
payload := strings.NewReader("{\n \"calling\": {\n \"call_icons\": {\n \"restrict_to_user_countries\": [\n \"<string>\"\n ]\n },\n \"call_hours\": {\n \"timezone_id\": \"Africa/Johannesburg\",\n \"weekly_operating_hours\": [\n {\n \"open_time\": \"0800\",\n \"close_time\": \"1700\"\n }\n ],\n \"holiday_schedule\": [\n {}\n ]\n },\n \"sip\": {\n \"servers\": [\n {\n \"hostname\": \"<string>\",\n \"port\": 123,\n \"request_uri_user_params\": {},\n \"sip_user_password\": \"<string>\"\n }\n ]\n },\n \"audio\": {\n \"additional_codecs\": []\n },\n \"voicemail\": {}\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.flowiq.live/v1/calling/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"calling\": {\n \"call_icons\": {\n \"restrict_to_user_countries\": [\n \"<string>\"\n ]\n },\n \"call_hours\": {\n \"timezone_id\": \"Africa/Johannesburg\",\n \"weekly_operating_hours\": [\n {\n \"open_time\": \"0800\",\n \"close_time\": \"1700\"\n }\n ],\n \"holiday_schedule\": [\n {}\n ]\n },\n \"sip\": {\n \"servers\": [\n {\n \"hostname\": \"<string>\",\n \"port\": 123,\n \"request_uri_user_params\": {},\n \"sip_user_password\": \"<string>\"\n }\n ]\n },\n \"audio\": {\n \"additional_codecs\": []\n },\n \"voicemail\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flowiq.live/v1/calling/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"calling\": {\n \"call_icons\": {\n \"restrict_to_user_countries\": [\n \"<string>\"\n ]\n },\n \"call_hours\": {\n \"timezone_id\": \"Africa/Johannesburg\",\n \"weekly_operating_hours\": [\n {\n \"open_time\": \"0800\",\n \"close_time\": \"1700\"\n }\n ],\n \"holiday_schedule\": [\n {}\n ]\n },\n \"sip\": {\n \"servers\": [\n {\n \"hostname\": \"<string>\",\n \"port\": 123,\n \"request_uri_user_params\": {},\n \"sip_user_password\": \"<string>\"\n }\n ]\n },\n \"audio\": {\n \"additional_codecs\": []\n },\n \"voicemail\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"success": true,
"calling": {
"status": "ENABLED",
"call_icon_visibility": "DEFAULT",
"call_icons": {
"restrict_to_user_countries": [
"<string>"
]
},
"callback_permission_status": "ENABLED",
"call_hours": {
"status": "ENABLED",
"timezone_id": "Africa/Johannesburg",
"weekly_operating_hours": [
{
"day_of_week": "MONDAY",
"open_time": "0800",
"close_time": "1700"
}
],
"holiday_schedule": [
{}
]
},
"sip": {
"status": "ENABLED",
"servers": [
{
"hostname": "<string>",
"port": 123,
"request_uri_user_params": {},
"sip_user_password": "<string>"
}
]
},
"audio": {
"additional_codecs": [
"PCMA"
]
},
"voicemail": {}
},
"answered_by": "api",
"flowiq_ai_answers": true,
"stream": {
"url": "<string>",
"format": "<string>",
"headers": {},
"custom_parameters": {}
}
}{
"error": "Request failed",
"message": "Parameter value is not valid"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"whatsapp_error_code": 123
}{
"error": "Request failed",
"message": "Contact has not granted callback permission"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"whatsapp_error_code": 123
}Update Calling Settings
Change WhatsApp’s calling settings for your number and/or who answers incoming calls. Fields you leave out of calling stay as they are. Scope: write.
curl --request PATCH \
--url https://api.flowiq.live/v1/calling/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"calling": {
"call_icons": {
"restrict_to_user_countries": [
"<string>"
]
},
"call_hours": {
"timezone_id": "Africa/Johannesburg",
"weekly_operating_hours": [
{
"open_time": "0800",
"close_time": "1700"
}
],
"holiday_schedule": [
{}
]
},
"sip": {
"servers": [
{
"hostname": "<string>",
"port": 123,
"request_uri_user_params": {},
"sip_user_password": "<string>"
}
]
},
"audio": {
"additional_codecs": []
},
"voicemail": {}
}
}
'import requests
url = "https://api.flowiq.live/v1/calling/settings"
payload = { "calling": {
"call_icons": { "restrict_to_user_countries": ["<string>"] },
"call_hours": {
"timezone_id": "Africa/Johannesburg",
"weekly_operating_hours": [
{
"open_time": "0800",
"close_time": "1700"
}
],
"holiday_schedule": [{}]
},
"sip": { "servers": [
{
"hostname": "<string>",
"port": 123,
"request_uri_user_params": {},
"sip_user_password": "<string>"
}
] },
"audio": { "additional_codecs": [] },
"voicemail": {}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
calling: {
call_icons: {restrict_to_user_countries: ['<string>']},
call_hours: {
timezone_id: 'Africa/Johannesburg',
weekly_operating_hours: [{open_time: '0800', close_time: '1700'}],
holiday_schedule: [{}]
},
sip: {
servers: [
{
hostname: '<string>',
port: 123,
request_uri_user_params: {},
sip_user_password: '<string>'
}
]
},
audio: {additional_codecs: []},
voicemail: {}
}
})
};
fetch('https://api.flowiq.live/v1/calling/settings', 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.flowiq.live/v1/calling/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'calling' => [
'call_icons' => [
'restrict_to_user_countries' => [
'<string>'
]
],
'call_hours' => [
'timezone_id' => 'Africa/Johannesburg',
'weekly_operating_hours' => [
[
'open_time' => '0800',
'close_time' => '1700'
]
],
'holiday_schedule' => [
[
]
]
],
'sip' => [
'servers' => [
[
'hostname' => '<string>',
'port' => 123,
'request_uri_user_params' => [
],
'sip_user_password' => '<string>'
]
]
],
'audio' => [
'additional_codecs' => [
]
],
'voicemail' => [
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.flowiq.live/v1/calling/settings"
payload := strings.NewReader("{\n \"calling\": {\n \"call_icons\": {\n \"restrict_to_user_countries\": [\n \"<string>\"\n ]\n },\n \"call_hours\": {\n \"timezone_id\": \"Africa/Johannesburg\",\n \"weekly_operating_hours\": [\n {\n \"open_time\": \"0800\",\n \"close_time\": \"1700\"\n }\n ],\n \"holiday_schedule\": [\n {}\n ]\n },\n \"sip\": {\n \"servers\": [\n {\n \"hostname\": \"<string>\",\n \"port\": 123,\n \"request_uri_user_params\": {},\n \"sip_user_password\": \"<string>\"\n }\n ]\n },\n \"audio\": {\n \"additional_codecs\": []\n },\n \"voicemail\": {}\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.flowiq.live/v1/calling/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"calling\": {\n \"call_icons\": {\n \"restrict_to_user_countries\": [\n \"<string>\"\n ]\n },\n \"call_hours\": {\n \"timezone_id\": \"Africa/Johannesburg\",\n \"weekly_operating_hours\": [\n {\n \"open_time\": \"0800\",\n \"close_time\": \"1700\"\n }\n ],\n \"holiday_schedule\": [\n {}\n ]\n },\n \"sip\": {\n \"servers\": [\n {\n \"hostname\": \"<string>\",\n \"port\": 123,\n \"request_uri_user_params\": {},\n \"sip_user_password\": \"<string>\"\n }\n ]\n },\n \"audio\": {\n \"additional_codecs\": []\n },\n \"voicemail\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flowiq.live/v1/calling/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"calling\": {\n \"call_icons\": {\n \"restrict_to_user_countries\": [\n \"<string>\"\n ]\n },\n \"call_hours\": {\n \"timezone_id\": \"Africa/Johannesburg\",\n \"weekly_operating_hours\": [\n {\n \"open_time\": \"0800\",\n \"close_time\": \"1700\"\n }\n ],\n \"holiday_schedule\": [\n {}\n ]\n },\n \"sip\": {\n \"servers\": [\n {\n \"hostname\": \"<string>\",\n \"port\": 123,\n \"request_uri_user_params\": {},\n \"sip_user_password\": \"<string>\"\n }\n ]\n },\n \"audio\": {\n \"additional_codecs\": []\n },\n \"voicemail\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"success": true,
"calling": {
"status": "ENABLED",
"call_icon_visibility": "DEFAULT",
"call_icons": {
"restrict_to_user_countries": [
"<string>"
]
},
"callback_permission_status": "ENABLED",
"call_hours": {
"status": "ENABLED",
"timezone_id": "Africa/Johannesburg",
"weekly_operating_hours": [
{
"day_of_week": "MONDAY",
"open_time": "0800",
"close_time": "1700"
}
],
"holiday_schedule": [
{}
]
},
"sip": {
"status": "ENABLED",
"servers": [
{
"hostname": "<string>",
"port": 123,
"request_uri_user_params": {},
"sip_user_password": "<string>"
}
]
},
"audio": {
"additional_codecs": [
"PCMA"
]
},
"voicemail": {}
},
"answered_by": "api",
"flowiq_ai_answers": true,
"stream": {
"url": "<string>",
"format": "<string>",
"headers": {},
"custom_parameters": {}
}
}{
"error": "Request failed",
"message": "Parameter value is not valid"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"whatsapp_error_code": 123
}{
"error": "Request failed",
"message": "Contact has not granted callback permission"
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"whatsapp_error_code": 123
}calling) and/or who answers incoming calls (answered_by). Send only what you change; the response shows the settings WhatsApp now holds.
Basic Usage
curl -X PATCH "https://api.flowiq.live/v1/calling/settings" \
-H "Authorization: Bearer fiq_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"calling": {"status": "ENABLED"}, "answered_by": "stream", "stream": {"url": "wss://agent.example.com/flowiq", "format": "pcm16_16k", "headers": {"Authorization": "Bearer my-secret"}}}'
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
answered_by | string | No | api: incoming calls are left for your server (the FlowIQ inbox does not ring, FlowIQ’s voice AI does not pick up); you answer each with Accept Call. stream: FlowIQ answers every incoming call and streams the audio to stream.url. flowiq: FlowIQ answers again |
stream | object | With stream | { url: "wss://…", format?, headers?, custom_parameters? }, the media stream target. Kept until you set answered_by to api |
calling.status | string | No | ENABLED or DISABLED: calling on your number |
calling.call_icon_visibility | string | No | DEFAULT shows the call button in WhatsApp; DISABLE_ALL hides it (you can still call people who gave permission) |
calling.call_icons.restrict_to_user_countries | array | No | Show the call button only to numbers from these countries, e.g. ["ZA"] |
calling.callback_permission_status | string | No | ENABLED: after calling you, people are asked whether you may call them back |
calling.call_hours | object | No | status, timezone_id, weekly_operating_hours (day_of_week, open_time / close_time as HHMM, max 2 per day) and optional holiday_schedule. Replaces the stored hours |
calling.sip | object | No | status and servers (hostname, port, request_uri_user_params): send calls to your SIP server |
calling.audio.additional_codecs | array | No | PCMA and/or PCMU besides Opus |
calling.voicemail | object | No | WhatsApp voicemail (status, triggers, audio) |
Response
Success (200)
{
"organization_id": "a4234f32-…",
"success": true,
"calling": { "status": "ENABLED", "call_icon_visibility": "DEFAULT", "callback_permission_status": "ENABLED" },
"answered_by": "stream",
"flowiq_ai_answers": false,
"stream": { "url": "wss://agent.example.com/flowiq", "format": "pcm16_16k", "headers": { "Authorization": "•••" }, "custom_parameters": {} }
}
calling.sip hands every call on the number to your SIP server: FlowIQ then gets no call events, the FlowIQ inbox and voice AI no longer see calls, and the other call endpoints stop working for the number until SIP is off again.400 with WhatsApp’s reason in message and changes nothing.Authorizations
Your FlowIQ organisation API key (Settings → API Keys), sent as a bearer token. Format: Bearer fiq_YOUR_API_KEY
Body
WhatsApp's calling settings for your number, as WhatsApp returns them
Show child attributes
Show child attributes
api: incoming calls are left for your server (the FlowIQ inbox does not ring, FlowIQ's AI does not pick up); you answer with POST /v1/calls/accept. stream: FlowIQ answers every incoming call and streams the audio to stream.url. flowiq: FlowIQ answers (the inbox rings, or the voice AI when it is on)
api, stream, flowiq Have FlowIQ answer the call and stream its audio to your WebSocket (media stream), instead of answering with sdp
Show child attributes
Show child attributes
Response
Success
WhatsApp's calling settings for your number, as WhatsApp returns them
Show child attributes
Show child attributes
api, stream, flowiq The media stream set for this number (header values hidden)
Show child attributes
Show child attributes

