Get WhatsApp Accounts
curl --request GET \
--url https://api-ai.zixflow.com/api/data/whatsapp/v1/accounts \
--header 'x-api-key: <x-api-key>' \
--header 'x-workspace-id: <x-workspace-id>'import requests
url = "https://api-ai.zixflow.com/api/data/whatsapp/v1/accounts"
headers = {
"x-api-key": "<x-api-key>",
"x-workspace-id": "<x-workspace-id>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-workspace-id': '<x-workspace-id>'}
};
fetch('https://api-ai.zixflow.com/api/data/whatsapp/v1/accounts', 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-ai.zixflow.com/api/data/whatsapp/v1/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>",
"x-workspace-id: <x-workspace-id>"
],
]);
$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-ai.zixflow.com/api/data/whatsapp/v1/accounts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
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-ai.zixflow.com/api/data/whatsapp/v1/accounts")
.header("x-api-key", "<x-api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-ai.zixflow.com/api/data/whatsapp/v1/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
request["x-workspace-id"] = '<x-workspace-id>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Successfully fetched WhatsApp accounts",
"data": [
{
"phone_id": "123456789",
"waba_id": "987654321",
"display_phone_number": "+1 234 567 8900",
"verified_name": "My Business",
"quality_rating": "GREEN",
"daily_limit": 1000
},
{
"phone_id": "987654321",
"waba_id": "987654321",
"display_phone_number": "+1 234 567 8901",
"verified_name": "Another Business",
"quality_rating": "GREEN",
"daily_limit": 500
}
]
}
{
"success": false,
"message": "Unauthorized. Please check your API key and workspace ID."
}
{
"success": false,
"message": "Internal server error. Please try again later."
}
WhatsApp
Get WhatsApp Accounts
Retrieves a list of all WhatsApp accounts for the authenticated workspace
GET
/
api
/
data
/
whatsapp
/
v1
/
accounts
Get WhatsApp Accounts
curl --request GET \
--url https://api-ai.zixflow.com/api/data/whatsapp/v1/accounts \
--header 'x-api-key: <x-api-key>' \
--header 'x-workspace-id: <x-workspace-id>'import requests
url = "https://api-ai.zixflow.com/api/data/whatsapp/v1/accounts"
headers = {
"x-api-key": "<x-api-key>",
"x-workspace-id": "<x-workspace-id>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<x-api-key>', 'x-workspace-id': '<x-workspace-id>'}
};
fetch('https://api-ai.zixflow.com/api/data/whatsapp/v1/accounts', 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-ai.zixflow.com/api/data/whatsapp/v1/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>",
"x-workspace-id: <x-workspace-id>"
],
]);
$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-ai.zixflow.com/api/data/whatsapp/v1/accounts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
req.Header.Add("x-workspace-id", "<x-workspace-id>")
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-ai.zixflow.com/api/data/whatsapp/v1/accounts")
.header("x-api-key", "<x-api-key>")
.header("x-workspace-id", "<x-workspace-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-ai.zixflow.com/api/data/whatsapp/v1/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
request["x-workspace-id"] = '<x-workspace-id>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Successfully fetched WhatsApp accounts",
"data": [
{
"phone_id": "123456789",
"waba_id": "987654321",
"display_phone_number": "+1 234 567 8900",
"verified_name": "My Business",
"quality_rating": "GREEN",
"daily_limit": 1000
},
{
"phone_id": "987654321",
"waba_id": "987654321",
"display_phone_number": "+1 234 567 8901",
"verified_name": "Another Business",
"quality_rating": "GREEN",
"daily_limit": 500
}
]
}
{
"success": false,
"message": "Unauthorized. Please check your API key and workspace ID."
}
{
"success": false,
"message": "Internal server error. Please try again later."
}
Description
This endpoint allows you to retrieve a list of all WhatsApp Business accounts associated with your workspace. Each account includes details such as phone ID, display phone number, verified name, quality rating, and daily limits.Headers
Response
The unique Phone ID associated with the WhatsApp Business account. Use this ID when sending messages.
{
"success": true,
"message": "Successfully fetched WhatsApp accounts",
"data": [
{
"phone_id": "123456789",
"waba_id": "987654321",
"display_phone_number": "+1 234 567 8900",
"verified_name": "My Business",
"quality_rating": "GREEN",
"daily_limit": 1000
},
{
"phone_id": "987654321",
"waba_id": "987654321",
"display_phone_number": "+1 234 567 8901",
"verified_name": "Another Business",
"quality_rating": "GREEN",
"daily_limit": 500
}
]
}
{
"success": false,
"message": "Unauthorized. Please check your API key and workspace ID."
}
{
"success": false,
"message": "Internal server error. Please try again later."
}