All tools

Create a segment

Creates a segment of the contacts that match an SQL-style query, optionally within one list, that updates as contacts change.

View on GitHub
Updated Sep 27, 2026Available asAPI

Description

Pass a unique `name` and the `query_dsl`; `parent_list_ids` limits the segment to one list. Segment counts refresh every 1 to 24 hours, and a segment built on engagement data takes about 30 minutes to start filling.

create-segment.md

Create a segment

Creates a segment of the contacts that match an SQL-style query, optionally within one list, that updates as contacts change.

Pass a unique name and the query_dsl; parent_list_ids limits the segment to one list. Segment counts refresh every 1 to 24 hours, and a segment built on engagement data takes about 30 minutes to start filling.

Set up

Use the first option your agent supports.

API (official)

Before doing anything else, make one read-only call to confirm access.

Rules

  • Ask the user before anything that sends messages, costs money, or changes data.
  • Never print API keys.

Built from these files in the repository

The layout and the rules come from lib/catalog/render-markdown.ts, the set-up wording from lib/catalog/render-access.ts.

Ways in

RouteSourceCallRequiredDocs
APIOfficialPOST /v3/marketing/segments/2.0API key in $SENDGRID_API_KEYDocs

Workflows using Create a segment

No workflows yet
No published workflow uses Create a segment yet.