This endpoint allows you to retrieve a list of segments.
The query param parent_list_ids is treated as a filter. Any match will be returned. 0 matches will return a response code of 200 with an empty results array.
643 matches
60 actions
SendGrid
60 actions
Marketing/SendGrid
This endpoint allows you to retrieve a list of segments.
The query param parent_list_ids is treated as a filter. Any match will be returned. 0 matches will return a response code of 200 with an empty results array.
parent_list_ids | no_parent_list_id | result |
|---|---|---|
| empty | false | all segments |
| values | false | segments filtered by list_ids |
| values | true | segments filtered by list_ids and segments with no parent list_ids |
| empty | true | segments with no parent list_ids |
{
"type": "object",
"properties": {
"no_parent_list_id": {
"type": "boolean"
},
"parent_list_ids": {
"type": "string"
}
},
"additionalProperties": false
}{
"type": "object",
"required": [
"results"
],
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"contacts_count",
"created_at",
"sample_updated_at",
"updated_at"
],
"properties": {
"contacts_count": {
"type": "integer"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "ISO8601 of created timestamp\n"
},
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string"
},
"next_sample_update": {
"type": "string",
"description": "ISO8601 string that is equal to `sample_updated_at` plus an internally calculated offset that depends on how often contacts enter or exit segments as the scheduled pipeline updates the samples."
},
"parent_list_id": {
"type": "string",
"format": "uuid",
"description": "The id of the list if this segment is a child of a list. This implies the query `AND CONTAINS(list_ids, ${parent_list_id})`"
},
"sample_updated_at": {
"type": "string",
"format": "date-time",
"description": "ISO8601 timestamp the sample was last updated"
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "ISO8601 timestamp the object was last updated"
}
}
}
}
}
}