Start Call
curl --request POST \
--url https://api.flowiq.live/v1/calls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sdp": "<string>",
"to": "27820000000",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"biz_opaque_callback_data": "<string>"
}
'import requests
url = "https://api.flowiq.live/v1/calls"
payload = {
"sdp": "<string>",
"to": "27820000000",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"biz_opaque_callback_data": "<string>"
}
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({
sdp: '<string>',
to: '27820000000',
contact_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
biz_opaque_callback_data: '<string>'
})
};
fetch('https://api.flowiq.live/v1/calls', 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",
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([
'sdp' => '<string>',
'to' => '27820000000',
'contact_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'biz_opaque_callback_data' => '<string>'
]),
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"
payload := strings.NewReader("{\n \"sdp\": \"<string>\",\n \"to\": \"27820000000\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"biz_opaque_callback_data\": \"<string>\"\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sdp\": \"<string>\",\n \"to\": \"27820000000\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"biz_opaque_callback_data\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flowiq.live/v1/calls")
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 \"sdp\": \"<string>\",\n \"to\": \"27820000000\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"biz_opaque_callback_data\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"call_id": "<string>",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "ringing"
}{
"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
}Calls
Start Call
Call a customer who has given you call permission. Send your SDP offer; WhatsApp rings the customer and their answer arrives on the call webhook (kind call, event connect, session.sdp_type answer). Scope: send.
POST
/
v1
/
calls
Start Call
curl --request POST \
--url https://api.flowiq.live/v1/calls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sdp": "<string>",
"to": "27820000000",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"biz_opaque_callback_data": "<string>"
}
'import requests
url = "https://api.flowiq.live/v1/calls"
payload = {
"sdp": "<string>",
"to": "27820000000",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"biz_opaque_callback_data": "<string>"
}
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({
sdp: '<string>',
to: '27820000000',
contact_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
biz_opaque_callback_data: '<string>'
})
};
fetch('https://api.flowiq.live/v1/calls', 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",
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([
'sdp' => '<string>',
'to' => '27820000000',
'contact_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'biz_opaque_callback_data' => '<string>'
]),
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"
payload := strings.NewReader("{\n \"sdp\": \"<string>\",\n \"to\": \"27820000000\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"biz_opaque_callback_data\": \"<string>\"\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")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sdp\": \"<string>\",\n \"to\": \"27820000000\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"biz_opaque_callback_data\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flowiq.live/v1/calls")
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 \"sdp\": \"<string>\",\n \"to\": \"27820000000\",\n \"contact_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"biz_opaque_callback_data\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"call_id": "<string>",
"contact_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "ringing"
}{
"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
}Call a customer from your number. WhatsApp only allows it when the customer has given you call permission: check with Get Call Permission, ask with Request Call Permission. Send your SDP offer; when the customer answers, your webhook receives
call.event: "connect" with their SDP answer in call.session, which you give to your media server.
Basic Usage
curl -X POST "https://api.flowiq.live/v1/calls" \
-H "Authorization: Bearer fiq_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"to": "27820000000", "sdp": "v=0\r\no=- 4611 2 IN IP4 127.0.0.1\r\n…"}'
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 |
sdp | string | Yes | Your SDP offer |
biz_opaque_callback_data | string | No | Your own reference (max 512 characters); WhatsApp sends it back on later events for this call |
Response
Success (200)
{
"organization_id": "a4234f32-…",
"call_id": "wacid.HBgLMjc4MjAwMDAwMDAVAgARGBI2RjQ3QkU1RjA5Q0UyMkEzQjQA",
"contact_id": "9b8a7c6d-…",
"status": "ringing"
}
Errors
| Status | When |
|---|---|
400 | sdp missing, or WhatsApp refused the call (the message says why, e.g. the per-customer call limit) |
403 | The customer has not given call permission, or it expired (Contact has not granted callback permission / Callback permission expired), or the key has no send scope |
404 | No contact with that number on your account (they must have messaged you) |
Authorizations
Your FlowIQ organisation API key (Settings → API Keys), sent as a bearer token. Format: Bearer fiq_YOUR_API_KEY
Body
application/json
Your SDP offer
The customer's WhatsApp number with country code (or send contact_id)
Example:
"27820000000"
The customer's FlowIQ contact id (or send to)
Your own reference; WhatsApp sends it back on later events for this call
Maximum string length:
512
