Update segment definition
Replaces the complete tree of a segment definition.
Partial tree updates are not supported. Updating a built-in definition (0 or 1) for the first time materializes that 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. Values 0 and 1 materialize the built-in lead and qualified lead definitions on their first update.
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, unique within the organization. The built-in definitions use 0 (lead) and 1 (qualified lead). Custom definitions receive IDs starting at 2.
2
The server-assigned segment type. It cannot be set or changed through the API.
lead— the built-in definition with ID0.qualified_lead— the built-in definition with ID1.custom— a definition created throughcreate_segment_definition.
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. This value records request-handling time, not commit order, and is not a concurrency token. Returns null for a built-in definition before its first update.
The account ID of the agent who last created or updated the definition. Returns null for a built-in definition before its first update.
The client ID of the app that last created or updated the definition. Returns null for a built-in definition before its first update.
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 archived or deleted after the segment definition was saved.