Create a contact group
curl --request POST \
--url https://api.inbox.adraa.ai/api/v1/contact-groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "VIP customers",
"description": "High-value accounts",
"memberIds": [
"cmbxgy7kq0002ph01u2v3w4x5"
]
}
'import requests
url = "https://api.inbox.adraa.ai/api/v1/contact-groups"
payload = {
"name": "VIP customers",
"description": "High-value accounts",
"memberIds": ["cmbxgy7kq0002ph01u2v3w4x5"]
}
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({
name: 'VIP customers',
description: 'High-value accounts',
memberIds: ['cmbxgy7kq0002ph01u2v3w4x5']
})
};
fetch('https://api.inbox.adraa.ai/api/v1/contact-groups', 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.inbox.adraa.ai/api/v1/contact-groups",
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([
'name' => 'VIP customers',
'description' => 'High-value accounts',
'memberIds' => [
'cmbxgy7kq0002ph01u2v3w4x5'
]
]),
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.inbox.adraa.ai/api/v1/contact-groups"
payload := strings.NewReader("{\n \"name\": \"VIP customers\",\n \"description\": \"High-value accounts\",\n \"memberIds\": [\n \"cmbxgy7kq0002ph01u2v3w4x5\"\n ]\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.inbox.adraa.ai/api/v1/contact-groups")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"VIP customers\",\n \"description\": \"High-value accounts\",\n \"memberIds\": [\n \"cmbxgy7kq0002ph01u2v3w4x5\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.inbox.adraa.ai/api/v1/contact-groups")
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 \"name\": \"VIP customers\",\n \"description\": \"High-value accounts\",\n \"memberIds\": [\n \"cmbxgy7kq0002ph01u2v3w4x5\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"group": {
"id": "cmbxh1a2b0004ph01q8r9s0t1",
"name": "VIP customers",
"description": "High-value accounts",
"memberCount": 42,
"whatsappCount": 37,
"members": [
{
"id": "cmbxgy7kq0002ph01u2v3w4x5",
"name": "Sara",
"email": null,
"phone": "+966500000000",
"hasWhatsapp": true,
"channels": [
"whatsapp"
]
}
],
"createdAt": "2026-06-14T09:00:00.000Z",
"updatedAt": "2026-06-14T09:00:00.000Z"
}
}{
"error": {
"code": "INVALID_GROUP_MEMBERS",
"message": "One or more selected contacts do not belong to this workspace"
}
}{
"error": {
"code": "INVALID_API_TOKEN",
"message": "Invalid or revoked API token"
}
}Broadcast
Create a contact group
Creates a broadcast contact group. Members are contacts of this workspace — list them with GET /api/v1/contacts to find their IDs. Only members who have a WhatsApp conversation can receive a broadcast.
Rate limit: 30 requests per minute.
POST
/
api
/
v1
/
contact-groups
Create a contact group
curl --request POST \
--url https://api.inbox.adraa.ai/api/v1/contact-groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "VIP customers",
"description": "High-value accounts",
"memberIds": [
"cmbxgy7kq0002ph01u2v3w4x5"
]
}
'import requests
url = "https://api.inbox.adraa.ai/api/v1/contact-groups"
payload = {
"name": "VIP customers",
"description": "High-value accounts",
"memberIds": ["cmbxgy7kq0002ph01u2v3w4x5"]
}
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({
name: 'VIP customers',
description: 'High-value accounts',
memberIds: ['cmbxgy7kq0002ph01u2v3w4x5']
})
};
fetch('https://api.inbox.adraa.ai/api/v1/contact-groups', 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.inbox.adraa.ai/api/v1/contact-groups",
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([
'name' => 'VIP customers',
'description' => 'High-value accounts',
'memberIds' => [
'cmbxgy7kq0002ph01u2v3w4x5'
]
]),
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.inbox.adraa.ai/api/v1/contact-groups"
payload := strings.NewReader("{\n \"name\": \"VIP customers\",\n \"description\": \"High-value accounts\",\n \"memberIds\": [\n \"cmbxgy7kq0002ph01u2v3w4x5\"\n ]\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.inbox.adraa.ai/api/v1/contact-groups")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"VIP customers\",\n \"description\": \"High-value accounts\",\n \"memberIds\": [\n \"cmbxgy7kq0002ph01u2v3w4x5\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.inbox.adraa.ai/api/v1/contact-groups")
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 \"name\": \"VIP customers\",\n \"description\": \"High-value accounts\",\n \"memberIds\": [\n \"cmbxgy7kq0002ph01u2v3w4x5\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"group": {
"id": "cmbxh1a2b0004ph01q8r9s0t1",
"name": "VIP customers",
"description": "High-value accounts",
"memberCount": 42,
"whatsappCount": 37,
"members": [
{
"id": "cmbxgy7kq0002ph01u2v3w4x5",
"name": "Sara",
"email": null,
"phone": "+966500000000",
"hasWhatsapp": true,
"channels": [
"whatsapp"
]
}
],
"createdAt": "2026-06-14T09:00:00.000Z",
"updatedAt": "2026-06-14T09:00:00.000Z"
}
}{
"error": {
"code": "INVALID_GROUP_MEMBERS",
"message": "One or more selected contacts do not belong to this workspace"
}
}{
"error": {
"code": "INVALID_API_TOKEN",
"message": "Invalid or revoked API token"
}
}Authorizations
Workspace API token created in Settings → API. Tokens start with adraa_.
Body
application/json
Group name. Must be unique within the workspace.
Maximum string length:
80Example:
"VIP customers"
Optional description of the audience.
Maximum string length:
240Example:
"High-value accounts"
Contact IDs to add to the group. Each must belong to this workspace.
Example:
["cmbxgy7kq0002ph01u2v3w4x5"]
Response
The created group
Show child attributes
Show child attributes
⌘I