Update an audience segment
PUT /audiences/{audienceUuid}/list_segments/{uuid}
Deprecated
/audiences/{audienceUuid}/list_segments/{uuid}Deprecated: old segment that lives inside one audience; Customer App does not show it and no new work should use it. Changes the name, description, match mode or conditions of a segment. The conditions you send replace all the existing ones.
When to use: To rename a segment or change the rules it uses.
When not to use: To change a contact segment, use update_contact_segment. There is no conversion of an old segment into a contact segment: create the new one with the same conditions. To create a new segment, use create_audience_segment. Members cannot be edited here: they are whoever matches the conditions.
Side effects: The member count is recalculated in the background, so it can lag right after the change.
Permissions: Requires the manager role or higher, or the marketing.audiences.write capability.
Value for the X-Auth-Token header parameter.
In: header
Path Parameters
UUID of the audience the segment belongs to. Get it from list_audiences.
UUID of the segment. Get it from list_audience_segments.
The updated ListSegment resource
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X PUT "https://api.easymailing.com/audiences/0df14405-90ff-4287-b3e4-ef088901ee6f/list_segments/b2d1c9a4-6e7f-4a35-8d10-5c9e3f7a1b62" \ -H "X-Auth-Token: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "description": "string", "operator_match": "all", "custom": true, "conditions": [ { "field": "/entity/1", "operator": "string", "value": null } ] }'{ "id": 0, "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "name": "string", "description": "string", "operator_match": "all", "subscriber_count": 0, "custom": true, "conditions": [ { "field": "/entity/1", "operator": "string", "operator_to_string": "string", "value": null, "value_to_string": "string" } ], "audience": "/entity/1", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}