segments
Preview a Segment predicate
POST /v1/segments/preview
Auth required
api.segments.view
Evaluates a candidate SendQL predicate across the org's contacts under
run-time query governors and returns the match count plus a small
sample, without persisting anything. Use it to validate and size a
predicate before saving a Segment. An invalid predicate returns
422 validation_failed with the compile error. This is an evaluation
endpoint, not a send endpoint.
Request body
Content type: application/json
{
"source": "string"
} Responses
200 Preview match count + sample application/json
401 Missing, malformed, or unknown API key application/problem+json
403 Key lacks the required scope or plan limit violated application/problem+json
422 Query parameter or path value failed validation 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