v1
latestOpenAPI 3.0.12026-07-2471135326.0 KBSegments
Update Segment
This endpoint allows you to update an existing segment from a list using a CSV file or using a JSON. It replaces the previous segment's conditions with a new one and adds a condition to match source column (from file) with target column (from main list).
put/v3/lists/{listId}/segments/{segmentId}
Path parameters
listIdinteger required
Provide the unique ID of the list
segmentIdstring required
Provide the unique ID of the segment
Query parameters
namestring
The name of the segment
sourceColumnstring required
Column to segment from CSV file
targetColumnstring required
Column to apply segment from main list
Request body
Example request
{
"name": "people who likes movies",
"queryRule": "movies[eq]=horror&age[gt]=21"
}Response
Successfully updated the segment
Example response
{
"meta": {
"timestamp": 1597166699457,
"transactionId": "70169d77-c165-4795-9932-35b8a3af96fb",
"explain": "a descriptive text"
},
"data": {
"id": "507f1f77bcf86cd799439011",
"name": "people who likes movies",
"userName": "homer",
"listId": 203,
"queryRule": "movies[eq]=horror&age[gt]=21",
"total": 7
}
}