Segments
PUT
Update Segment
PUT /v1/segments/{segmentId}Update an existing segment's name, description, or filter conditions.
Use Cases:
- Refine segment targeting criteria
- Update segment names for clarity
- Add or modify filter conditions
- Adjust segment definitions as strategy evolves
- Fix incorrect segment logic
Behavior:
- Only provided fields are updated (partial updates supported)
- Changing conditions triggers member count recalculation
- Members are re-evaluated against new conditions automatically
- UpdatedAt timestamp is automatically refreshed
- Returns the complete updated segment object
- Condition changes may affect active campaigns using this segment
Required Scope: write:segments
Updatable Fields:
- name (display name)
- description (segment purpose)
- conditions (MongoDB query - full replacement, not merge)
Important:
- Updating conditions replaces ALL existing conditions
- Member count may change significantly with condition updates
- Active campaigns using this segment will use new conditions
- Test new conditions with /v1/contacts/search before updating
Note: Condition updates are applied immediately and affect all uses of this segment across your workspace.
Path parameters
segmentIdstringrequiredSegment ID
Bodyrequired
namestringSegment name (1-100 characters)
Min length: 1Max length: 100
descriptionstringnullOptional description (max 500 characters)
Max length: 500
conditionsFieldCondition | TopicCondition | LogicalOperatorConditionA filter condition for segments and contact search. Can be a field comparison, topic subscription check, or logical operator combining multiple conditions.
Response
200Segment updated successfully with refreshed member count and updatedAt timestamp
object"segment"requiredObject type identifier
idstringrequiredUnique segment identifier
namestringrequiredSegment name
descriptionstringnullSegment description
conditionsFieldCondition | TopicCondition | LogicalOperatorConditionrequiredA filter condition for segments and contact search. Can be a field comparison, topic subscription check, or logical operator combining multiple conditions.