List audiences
curl --request GET \
--url https://dev.tryunleashx.com/api/v1/global/audience/list \
--header 'token: <token>'import requests
url = "https://dev.tryunleashx.com/api/v1/global/audience/list"
headers = {"token": "<token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {token: '<token>'}};
fetch('https://dev.tryunleashx.com/api/v1/global/audience/list', 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://dev.tryunleashx.com/api/v1/global/audience/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"token: <token>"
],
]);
$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://dev.tryunleashx.com/api/v1/global/audience/list"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("token", "<token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://dev.tryunleashx.com/api/v1/global/audience/list")
.header("token", "<token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.tryunleashx.com/api/v1/global/audience/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["token"] = '<token>'
response = http.request(request)
puts response.read_body{
"datalist": [
{
"id": 123,
"audience_name": "<string>",
"description": "<string>",
"tags": [
"<string>"
],
"variables": [
{
"key": "<string>",
"type": "<string>"
}
],
"campaign": [
{
"id": 123,
"name": "<string>"
}
],
"contacts": 123,
"status": "<string>",
"show_edit": 123,
"show_delete": 123,
"delete_description": "<string>",
"created_by": "<string>",
"updated_by": "<string>",
"updated_on": "<string>"
}
],
"pagination": {
"totalRecords": 123,
"totalPages": 123,
"currentPage": 123,
"limit": 123
}
}Audience
List Audiences
Retrieve a paginated list of audiences in the workspace, including each audience’s variables, connected campaigns, and contact counts.
GET
/
audience
/
list
List audiences
curl --request GET \
--url https://dev.tryunleashx.com/api/v1/global/audience/list \
--header 'token: <token>'import requests
url = "https://dev.tryunleashx.com/api/v1/global/audience/list"
headers = {"token": "<token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {token: '<token>'}};
fetch('https://dev.tryunleashx.com/api/v1/global/audience/list', 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://dev.tryunleashx.com/api/v1/global/audience/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"token: <token>"
],
]);
$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://dev.tryunleashx.com/api/v1/global/audience/list"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("token", "<token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://dev.tryunleashx.com/api/v1/global/audience/list")
.header("token", "<token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.tryunleashx.com/api/v1/global/audience/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["token"] = '<token>'
response = http.request(request)
puts response.read_body{
"datalist": [
{
"id": 123,
"audience_name": "<string>",
"description": "<string>",
"tags": [
"<string>"
],
"variables": [
{
"key": "<string>",
"type": "<string>"
}
],
"campaign": [
{
"id": 123,
"name": "<string>"
}
],
"contacts": 123,
"status": "<string>",
"show_edit": 123,
"show_delete": 123,
"delete_description": "<string>",
"created_by": "<string>",
"updated_by": "<string>",
"updated_on": "<string>"
}
],
"pagination": {
"totalRecords": 123,
"totalPages": 123,
"currentPage": 123,
"limit": 123
}
}Use this endpoint to retrieve a paginated list of audiences in the workspace, with each audience’s variables, connected campaigns, and contact counts.
Deleted audiences (
Endpoint
GET/audience/list
Authentication: Required (workspace auth)
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | number | No | Page number (default: 1) |
limit | number | No | Records per page (default: 10) |
search | string | No | Partial match against audience_name |
status | number | No | Filter by status: 1 = Active, 0 = Inactive. See Audience Status Codes. |
Audience Status Codes
| Code | Status |
|---|---|
0 | Inactive |
1 | Active |
STATUS = 2) are always excluded from the list.
Response
{
"datalist": [
{
"id": 55,
"audience_name": "VIP Customers",
"description": "High value customers",
"tags": ["vip", "renewal"],
"variables": [
{ "key": "mobile_no", "type": "phone" },
{ "key": "name", "type": "name" }
],
"campaign": [
{ "id": 42, "name": "Renewal Reminder" }
],
"contacts": 320,
"status": "Active",
"show_edit": 1,
"show_delete": 0,
"delete_description": "The audience is linked to 1 active campaign. First remove it from the campaign to delete.",
"created_by": "Jane Admin",
"updated_by": "Jane Admin",
"updated_on": "10 Dec, 2025"
}
],
"pagination": {
"totalRecords": 1,
"totalPages": 1,
"currentPage": 1,
"limit": 10
}
}
| Field | Type | Description |
|---|---|---|
variables | array | Only the input variables saved on this audience, as { key, type } — type is resolved from the input-variable registry (defaults to string). |
campaign | array | Campaigns this audience is currently connected to, as { id, name }. |
show_edit / show_delete | number (0/1) | Whether the edit/delete action is allowed. Editing (rename) is always allowed; delete is 0 when the audience is connected to any active campaign. |
delete_description | string | Reason delete is locked (empty string when allowed). |
Behavior
- Results are ordered by
CREATED_DATEdescending. - An audience connected to one or more active (non-deleted) campaigns cannot be deleted — only renamed/edited.
Example cURL
curl -X GET "https://www.tryunleashx.com/api/v1/global/audience/list?page=1&limit=10&search=vip" \
-H "token: <api_key>"
Headers
API token for authentication
Query Parameters
Page number (default: 1)
Records per page (default: 10)
Partial match against audience_name
0=Inactive, 1=Active. Deleted audiences are always excluded.
Available options:
0, 1 Was this page helpful?
⌘I

