List segments
GET
/api/v1/segments
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Get, RequestUri = new Uri("https://dashboard.azimea.com/api/v1/segments"), Headers = { { "Authorization", "Bearer <token>" }, },};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}const url = 'https://dashboard.azimea.com/api/v1/segments';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://dashboard.azimea.com/api/v1/segments \ --header 'Authorization: Bearer <token>'The company’s saved segments with their live counts: count is everyone the segment’s rule picks now, sendableCount those Azimea may email. Pass a segment’s id to GET /contacts?segment= to read its people. Needs contacts:read.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Every segment, with its rule and counts
Media typeapplication/json
object
isSuccess
boolean
value
Array<object>
object
id
string format: guid
name
string
description
string
definition
object
join
string
rules
Array<object>
object
fieldKey
string
operator
string
value
builtInKey
string
count
integer format: int32
sendableCount
integer format: int32
status
integer format: int32
errors
Array<object>
object
code
string
message
string
params
object
key
additional properties
fieldErrors
object
key
additional properties
Array<object>
object
code
string
message
string
params
object
key
additional properties
Example
{ "isSuccess": true, "value": [ { "id": "01a10a3c-6b7d-7c52-8e1f-2a3b4c5d6e7f", "name": "Pro plan", "description": "Everyone on the pro plan.", "definition": { "join": "All", "rules": [ { "fieldKey": "plan", "operator": "Equals", "value": "pro" } ] }, "builtInKey": null, "count": 412, "sendableCount": 377 } ], "status": 0, "errors": [], "fieldErrors": null}Missing or invalid API key
The key lacks the contacts:read permission