Skip to main content
Altcraft Docs LogoAltcraft Docs Logo
User guideDeveloper guideAdmin guide
Company siteHelp center
English
  • Русский
  • English
v74
  • v74
  • v73
  • v72
Login
  • User API documentation
  • API interaction
  • Matching
  • Profiles
  • Databases
  • Resources
  • Segments
    • Get statistics on resource
    • Update statistics on segment
    • Add or remove profile
    • Get profile data in a static segment
    • Create segment
    • Update segment
    • Get segment information
    • Get segments list
    • Delete segment
  • Suppression lists
  • Templates and fragments
  • Campaigns
  • Mailings
  • Automation scenarios
  • Loyalty Programs
  • Promo codes
  • Goals
  • Application push notifications
  • Market
  • Analytic reports
  • SendersDev
  • External datatables queries
  • Objects
  • Miscellaneous
  • Importing the API collection in Postman
  • List of API endpoints
  • SDK
  • Segments
  • Get segments list
Documentation for version v74

Get segments list

Description​

Retrieves all segments list.

Request URL​

Method: POST

https://example.com/api/v1.1/segments/list/

Request parameters​

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
formatstring"json"NoResponse data format.
By default – json
from_idint1NoThe first ID in the list
By default – 1
limitint1NoSegments list limit.
By default – 1000
ui_tags[string][ "tag1", "tag2" ]NoList of tags for search
groups[string][ "group1", "group2" ]NoList of access groups
groups_id[int][ 0, 1 ]NoList of access groups IDs

Request example​

  • JSON
  • XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"limit": 2
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<limit>1</limit>
</xml>

Response example​

  • JSON
  • XML
{
"data": [
{
"id": 1,
"name": "Segment A",
"ui_tags": ["tag1", "tag2"],
"Groups": [
{
"Id": 1,
"Name": "subaccount"
}
]
},
{
"id": 2,
"name": "Segment B",
"ui_tags": [],
"Groups": [
{
"Id": 0,
"Name": "main"
}
]
}
],
"error": 0,
"error_text": "Successful operation",
"next_from_id": 2,
"total_count": 2
}
<xml>
<data>
<groups>
<id>1</id>
<name>"subaccount"</name>
</groups>
<id>2</id>
<name>"Women age 35-60"</name>
<ui_tags/>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
<next_from_id>5</next_from_id>
<total_count>9</total_count>
</xml>

Response parameters​

ParameterTypeDescription
errorintError code
error_textstringError text
next_from_idintThe index must be passed in the next request to receive another piece of data, until the result output contains 0 history lines
total_countintTotal segments count
idintSegment ID
list_idintDatabase id
namestringSegment name
ui_tags[string]List of tags
typestringType of a segment
groups[string]List of groups
Last updated on May 31, 2024
Previous
Get segment information
Next
Delete segment
  • Description
  • Request URL
  • Request parameters
  • Request example
  • Response example
  • Response parameters
© 2015 - 2025 Altcraft, LLC. All rights reserved.