Request Call Permission
curl --request POST \
--url https://api.flowiq.live/v1/calls/permission-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"to": "27820000000",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"body": "We'd like to call you about your order."
}
EOFimport requests
url = "https://api.flowiq.live/v1/calls/permission-requests"
payload = {
"to": "27820000000",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"body": "We'd like to call you about your order."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
to: '27820000000',
contact_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
body: JSON.stringify('We\'d like to call you about your order.')
})
};
fetch('https://api.flowiq.live/v1/calls/permission-requests', 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/calls/permission-requests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'to' => '27820000000',
'contact_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'body' => 'We\'d like to call you about your order.'
]),
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/calls/permission-requests"
payload := strings.NewReader("{\n \"to\": \"27820000000\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"body\": \"We'd like to call you about your order.\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.flowiq.live/v1/calls/permission-requests")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"to\": \"27820000000\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"body\": \"We'd like to call you about your order.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flowiq.live/v1/calls/permission-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"to\": \"27820000000\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"body\": \"We'd like to call you about your order.\"\n}"
response = http.request(request)
puts response.read_body{
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"success": true,
"message_id": "<string>",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"whatsapp_id": "<string>"
}{
"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
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"whatsapp_error_code": 123
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"whatsapp_error_code": 123
}Permission
Request Call Permission
Ask a customer for permission to call them. Works inside the 24-hour window after they last wrote to you; outside it, send an approved template that has a call permission request (Send Template). Scope: send.
POST
/
v1
/
calls
/
permission-requests
Request Call Permission
curl --request POST \
--url https://api.flowiq.live/v1/calls/permission-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"to": "27820000000",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"body": "We'd like to call you about your order."
}
EOFimport requests
url = "https://api.flowiq.live/v1/calls/permission-requests"
payload = {
"to": "27820000000",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"body": "We'd like to call you about your order."
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
to: '27820000000',
contact_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
body: JSON.stringify('We\'d like to call you about your order.')
})
};
fetch('https://api.flowiq.live/v1/calls/permission-requests', 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/calls/permission-requests",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'to' => '27820000000',
'contact_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'body' => 'We\'d like to call you about your order.'
]),
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/calls/permission-requests"
payload := strings.NewReader("{\n \"to\": \"27820000000\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"body\": \"We'd like to call you about your order.\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.flowiq.live/v1/calls/permission-requests")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"to\": \"27820000000\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"body\": \"We'd like to call you about your order.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flowiq.live/v1/calls/permission-requests")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"to\": \"27820000000\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"body\": \"We'd like to call you about your order.\"\n}"
response = http.request(request)
puts response.read_body{
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"success": true,
"message_id": "<string>",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"whatsapp_id": "<string>"
}{
"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
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"whatsapp_error_code": 123
}{
"error": "<string>",
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"whatsapp_error_code": 123
}Send a customer WhatsApp’s Allow calls button. Their answer reaches your webhook as a
call event with kind: "call_permission", and the request shows in their chat in FlowIQ. This message is allowed only within 24 hours of the customer last writing to you; outside that window, send an approved template that has a call permission request with Send Template.
Basic Usage
curl -X POST "https://api.flowiq.live/v1/calls/permission-requests" \
-H "Authorization: Bearer fiq_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"to": "27820000000", "body": "We would like to call you about your order. Is that OK?"}'
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
to | string | One of to / contact_id | The customer’s WhatsApp number with country code, digits only |
contact_id | string | One of to / contact_id | The customer’s FlowIQ contact id |
body | string | No | Text above the button (max 1024 characters), e.g. why you want to call |
Response
Success (200)
{
"organization_id": "a4234f32-…",
"success": true,
"message_id": "wamid.HBgLMjc4MjAwMDAwMDAVAgARGBI…",
"contact_id": "9b8a7c6d-…",
"whatsapp_id": "27820000000"
}
Errors
| Status | When |
|---|---|
409 | More than 24 hours since the customer last wrote (code: "outside_service_window"); use a template |
400 | WhatsApp refused it, e.g. the request limit (1 a day, 2 a week per person) |
404 | No contact with that number on your account |
Authorizations
Your FlowIQ organisation API key (Settings → API Keys), sent as a bearer token. Format: Bearer fiq_YOUR_API_KEY
Body
application/json

