Get one Segment by id

Search Documentation

Search across all developer documentation

segments

Get one Segment by id

GET /v1/segments/{id}
Auth required api.segments.view

Returns one Segment by id, or 404 not_found when the id is not a Segment in this org.

Path parameters

id string<uuid> required

Resource UUID. An unparseable id reads as a clean 404 not_found.

Responses

Errors follow the RFC 7807 problem format — see the error reference.

200 The Segment application/json
id string<uuid> required
name string required
key string required

Org-unique slug, stable across renames.

description string required
source string required

The SendQL predicate that defines membership.

profile_version integer required

SendQL profile version the source was compiled under.

eval_class string enum required

How membership is reconciled: incremental (re-evaluated on an attribute change), sweep (periodic full re-evaluation, for time-relative or event predicates), or both.

One of: incremental, sweep, both

status string enum required

invalid means the predicate no longer compiles (e.g. a referenced attribute was deleted); fix it via the dashboard to re-activate. archived is a git-backed segment whose source file was removed from the connected repo — deactivated but preserved.

One of: active, paused, invalid, archived

member_count integer<int64> required

Cached count of current members from the last reconcile.

eval_warning string optional

A standing "evaluation disrupted" warning, present when an attribute the predicate references was mutated disruptively (renamed or retyped via the management API). The segment keeps evaluating best-effort; the warning clears when the predicate is re-saved. Absent when the segment is healthy.

eval_warning_at string<date-time> optional

Time the standing eval_warning was raised; absent when none.

last_evaluated_at string<date-time> optional

Time of the last reconcile; absent until the first evaluation.

origin string enum optional

Where the segment is authored: managed (via the API/dashboard) or git (synced from a connected repo and read-only via the API).

One of: managed, git

source_path string optional

Repo-relative source file, for git-backed segments only.

last_synced_at string<date-time> optional

Time of the last git sync, for git-backed segments only.

created_at string<date-time> required
updated_at string<date-time> required
401 Missing, malformed, or unknown API key application/problem+json
403 Key lacks the required scope or plan limit violated application/problem+json
404 Resource not found application/problem+json
429 Per-org rate limit exceeded application/problem+json
500 Unexpected server-side failure. The code is internal_error. The request_id field can be quoted to SendOps support to investigate. application/problem+json