segments_update
Updates segment name, description, priority, pinned status, filters, or exclude_filters. After saving, the server re-evaluates all include and exclude filters via add_leads_from_filters() — leads matching include filters are added, leads matching exclude filters are removed.
This is the way to trigger filter re-evaluation after editing a filter config. Editing a filter alone does NOT retroactively update segment membership — you must call this endpoint on each affected segment.
Note: re-evaluation only adds newly matching leads (and removes excluded ones). Leads that no longer match include filters are not removed. To rebuild from scratch, call segments_purge first, then segments_update.
Method: PATCH /api/v1/workspaces/{workspace_sqid}/segments/{sqid}/
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sqid": "<sqid>"
},
"name": "segments_update"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Short human label shown in the UI (e.g. 'Funded startups in NYC'). | |
| sqid | Yes | ||
| pinned | No | Show at the top of the segment list in the UI. Cosmetic only. | |
| filters | No | List of FilterConfig sqids. Leads matching any filter are auto-included. | |
| priority | No | Higher-priority segments send first when multiple campaigns compete for mailbox send slots. Range roughly -100..100; default 0. | |
| description | No | Free-form notes on the segment's intent — useful for AI agents deciding which segment to target. | |
| exclude_filters | No | List of FilterConfig sqids. Leads matching any are auto-excluded (higher priority than include). |