Update segment definition
Replaces the complete tree of a segment definition.
customers:rw
Authorizations
Use your account ID as the username and your personal access token (PAT) as the password, or pass a Base64-encoded value directly in the Authorization header. For more information, see the personal access tokens guide.
Body
The complete replacement for a segment definition. Partial tree updates are not supported. The request cannot include the server-assigned segment_type.
The definition ID to update. ID 0 identifies the lead definition, which every organization has unless it has been deleted. ID 1 identifies the qualified lead definition, which exists only after the organization creates it. The API returns 404 for a deleted definition or a qualified lead definition that has not been created. Use create_segment_definition to create the qualified lead definition or restore a deleted lead or qualified lead definition.
0
A node in a segment definition tree: one of two operators (and, or) or one of five conditions (name_set, email_set, phone_number_set, customer_property_set, last_active_days_ago). Every node type rejects unknown fields, including fields that are valid on a different node type.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
Response
The updated segment definition.
A segment definition.
The definition ID. ID 0 is reserved for the lead definition, which every organization has initially. ID 1 is reserved for the qualified lead definition, which exists only after the organization creates it. Custom definitions receive IDs starting at 2.
2
The segment type is fixed for the lifetime of the definition:
lead— The definition with ID0.qualified_lead— The definition with ID1.custom— A definition with an ID starting at2.
lead, qualified_lead, custom A node in a segment definition tree: one of two operators (and, or) or one of five conditions (name_set, email_set, phone_number_set, customer_property_set, last_active_days_ago). Every node type rejects unknown fields, including fields that are valid on a different node type.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
The date and time when the definition was most recently created or updated. If multiple updates are processed at the same time, their timestamps may not match the order in which the updates are saved. The value is null for the lead definition before its first update.
The account ID of the agent who last created or updated the definition. The value is null for the lead definition before its first update.
The client ID of the app that last created or updated the definition. The value is null for the lead definition before its first update.
The customer property definition IDs referenced in definition, deduplicated in definition order. Omitted when the tree has no customer_property_set node. The array includes IDs for properties that were archived or deleted after the segment definition was saved.