Validates and evaluates an audience expression against the project’s current users WITHOUT persisting or launching anything. Returns the normalized canonical expression, its stable hash, a derived readable summary, structured diagnostics (stable codes, JSON Pointer paths, bounded typo suggestions), a single evaluatedAt instant, the exact matching-user count, and a bounded sample of matching users. Use it to verify an audience behaves as intended before creating a campaign with it. Invalid expressions return 400 with error diagnostics.
Your project's secret key (pk_…, without the pub segment). Server-side only — never ship it to a browser. Get it from Settings → Projects in the dashboard.
Body
application/json
Option 1
Option 2
Provide exactly one of expression (inline) or segment (+ optional version) — both run through the identical validator and evaluator.
sha256 of the canonical serialization — equal hashes mean identical semantics.
summary
string
required
Deterministically derived readable summary. Display text, not a parseable format.
Example:
"trait plan is \"free\" and not (performed used_csv_export)"
diagnostics
object[]
required
Warnings that don't block: unobserved traits/events (with typo suggestions), zero matches, and similar.
Show child attributes
evaluatedAt
integer
required
The single instant (epoch ms) every relative rule in this evaluation used.
countType
enum<string>
required
Available options:
exact
matchedCount
integer
required
Exact number of users currently matching.
totalUsers
integer
required
Total identified users in the project.
samples
object[]
required
Bounded, context-efficient sample of matching users: lifecycle fields plus only the referenced traits and event aggregates.
Show child attributes
segment
object
Present when the evaluated audience came from a saved segment.
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Galinum","colors":{"primary":"#1A3A2A","light":"#2D7A4A","dark":"#1A3A2A"},"logo":{"light":"https://mintcdn.com/galinum/P8EaxFHlVOCBbMgl/logo/light.svg?fit=max\u0026auto=format\u0026n=P8EaxFHlVOCBbMgl\u0026q=85\u0026s=e13a9c002bb43cdf4e88cff30817d370","dark":"https://mintcdn.com/galinum/P8EaxFHlVOCBbMgl/logo/dark.svg?fit=max\u0026auto=format\u0026n=P8EaxFHlVOCBbMgl\u0026q=85\u0026s=176d58c21ac1069bdf64ce3a6940f210"},"favicon":"https://mintcdn.com/galinum/P8EaxFHlVOCBbMgl/logo/favicon.png?fit=max\u0026auto=format\u0026n=P8EaxFHlVOCBbMgl\u0026q=85\u0026s=436d30283307adf9500bbeb1ccf5b40a","navbar":{"primary":{"type":"button","label":"Get Early Access","href":"https://galinum.com"}},"footer":{"socials":{"github":"https://github.com/Galinum"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Website","icon":"globe","href":"https://galinum.com"},{"anchor":"GitHub","icon":"github","href":"https://github.com/Galinum"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"galinum","hasAudioNarration":false,"actualSubdomain":"galinum","customDomains":["docs.galinum.com"],"gitSource":{"type":"github","owner":"galinum","repo":"galinum","deployBranch":"main","contentDirectory":"apps/docs","isPrivate":true,"mountPath":"","label":""},"feedback":{"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6aa33dbae98199fe45f13e28","clientVersion":"0.0.4344","searchFilterCounts":[{"language":"default","tag":"API Reference","count":65},{"language":"default","tag":"Documentation","count":19},{"language":"default","tag":"Audiences","count":10},{"language":"default","tag":"Push","count":9},{"language":"default","tag":"Hosted agent","count":9},{"language":"default","tag":"Campaigns","count":8},{"language":"default","tag":"Installations","count":7},{"language":"default","tag":"Get started","count":4},{"language":"default","tag":"React SDK","count":4},{"language":"default","tag":"Goals","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".nav-logo,nav-logo{height:40px!important;width:auto!important}"}]}
{"page":{"pagePath":"api-reference/audiences/check-an-audience-expression","slug":"/api-reference/audiences/check-an-audience-expression","pageMetadata":{"title":"Check an audience expression","description":"Validates and evaluates an audience expression against the project's current users WITHOUT persisting or launching anything. Returns the normalized canonical expression, its stable hash, a derived readable summary, structured diagnostics (stable codes, JSON Pointer paths, bounded typo suggestions), a single `evaluatedAt` instant, the exact matching-user count, and a bounded sample of matching users. Use it to verify an audience behaves as intended before creating a campaign with it. Invalid expressions return 400 with error diagnostics.","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/audiences/check","href":"/api-reference/audiences/check-an-audience-expression","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Validates and evaluates an audience expression against the project’s current users WITHOUT persisting or launching anything. Returns the normalized canonical expression, its stable hash, a derived readable summary, structured diagnostics (stable codes, JSON Pointer paths, bounded typo suggestions), a single \", _jsx(_components.code, {\n children: \"evaluatedAt\"\n }), \" instant, the exact matching-user count, and a bounded sample of matching users. Use it to verify an audience behaves as intended before creating a campaign with it. Invalid expressions return 400 with error diagnostics.\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Check an audience expression","description":"Validates and evaluates an audience expression against the project's current users WITHOUT persisting or launching anything. Returns the normalized canonical expression, its stable hash, a derived readable summary, structured diagnostics (stable codes, JSON Pointer paths, bounded typo suggestions), a single `evaluatedAt` instant, the exact matching-user count, and a bounded sample of matching users. Use it to verify an audience behaves as intended before creating a campaign with it. Invalid expressions return 400 with error diagnostics.","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/audiences/check","href":"/api-reference/audiences/check-an-audience-expression","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Audiences"],"security":["880d8577-0241-4ba1-9237-516b033f5ffe","10fda799-7333-474e-9ec2-2898a45d108f"],"summary":"Check an audience expression","description":"Validates and evaluates an audience expression against the project's current users WITHOUT persisting or launching anything. Returns the normalized canonical expression, its stable hash, a derived readable summary, structured diagnostics (stable codes, JSON Pointer paths, bounded typo suggestions), a single `evaluatedAt` instant, the exact matching-user count, and a bounded sample of matching users. Use it to verify an audience behaves as intended before creating a campaign with it. Invalid expressions return 400 with error diagnostics.","requestBody":"6ce68cb5-ac39-430e-a846-cf0020a9ccac","responses":{"200":"aa006b9f-f0fd-4769-951a-7e13cddc26ae","400":"852c5a79-febf-4dae-b4cd-02dc92a47597","401":"6d5b28f5-2b49-4027-9aa8-a37decf651a4","404":"5d9e4d77-0109-4382-8a17-287e6c5e8aff","429":"243e09ea-3658-462a-9683-3a8dc3fa150b","500":"90ae9be0-6ff1-4823-af4c-ce2454db9b9e","503":"faf5831d-e7c9-471a-9e9f-ab6c73ae58b6"},"operationId":"checkAudience","x-mcp":{"exposed":true,"tool":"check_audience","mode":"readonly","annotations":{"readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":true}},"method":"post","type":"path","servers":["d78851ce-f6b3-4284-acc2-dcf1797c4d16"],"path":"/api/v1/audiences/check","baseUrlOptions":["https://galinum.com"],"title":"Check an audience expression","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","description":"Provide exactly one of `expression` (inline) or `segment` (+ optional `version`) — both run through the identical validator and evaluator.","required":["expression"],"properties":{"expression":{"type":"object","required":["version","root"],"properties":{"version":{"type":"integer","enum":[1],"description":"Audience expression schema version.","isRequired":true,"uniqueKey":"oneOf.0.expression.version","typeLabel":"enum\u003cinteger>"},"root":{"oneOf":[{"type":"object","description":"One audience expression node, discriminated by `kind`. Overall limits: nesting depth ≤ 8, total nodes ≤ 64. Unknown kinds, unknown operators, unknown keys, and empty groups are rejected with structured diagnostics.","required":["kind","children"],"properties":{"kind":{"const":"all","isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.0.kind","typeLabel":"any"},"children":{"type":"array","minItems":1,"maxItems":16,"items":{"$circularRef":"f763706b-093a-4677-826f-149d1491dd01"},"isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.0.children","typeLabel":"array"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.0","typeLabel":"object"},{"type":"object","description":"One audience expression node, discriminated by `kind`. Overall limits: nesting depth ≤ 8, total nodes ≤ 64. Unknown kinds, unknown operators, unknown keys, and empty groups are rejected with structured diagnostics.","required":["kind","children"],"properties":{"kind":{"const":"any","isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.1.kind","typeLabel":"any"},"children":{"type":"array","minItems":1,"maxItems":16,"items":{"$circularRef":"f763706b-093a-4677-826f-149d1491dd01"},"isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.1.children","typeLabel":"array"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.1","typeLabel":"object"},{"type":"object","description":"One audience expression node, discriminated by `kind`. Overall limits: nesting depth ≤ 8, total nodes ≤ 64. Unknown kinds, unknown operators, unknown keys, and empty groups are rejected with structured diagnostics.","required":["kind","child"],"properties":{"kind":{"const":"not","isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.2.kind","typeLabel":"any"},"child":{"oneOf":[{"$circularRef":"f763706b-093a-4677-826f-149d1491dd01","isRequired":true}],"isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.2.child","typeLabel":"any"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.2","typeLabel":"object"},{"type":"object","description":"One audience expression node, discriminated by `kind`. Overall limits: nesting depth ≤ 8, total nodes ≤ 64. Unknown kinds, unknown operators, unknown keys, and empty groups are rejected with structured diagnostics.","required":["kind","field","op"],"properties":{"kind":{"const":"field","isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.3.kind","typeLabel":"any"},"field":{"oneOf":[{"type":"object","description":"Structured, unambiguous field reference.","required":["kind","key"],"properties":{"kind":{"const":"trait","isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.3.field.oneOf.0.kind","typeLabel":"any"},"key":{"type":"string","maxLength":128,"description":"Literal top-level trait key.","isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.3.field.oneOf.0.key","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.3.field.oneOf.0","typeLabel":"object"},{"type":"object","description":"Structured, unambiguous field reference.","required":["kind","field"],"properties":{"kind":{"const":"user","isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.3.field.oneOf.1.kind","typeLabel":"any"},"field":{"type":"string","enum":["firstSeenAt","lastSeenAt"],"description":"Lifecycle field (datetime).","isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.3.field.oneOf.1.field","typeLabel":"enum\u003cstring>"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.3.field.oneOf.1","typeLabel":"object"},{"type":"object","description":"Structured, unambiguous field reference.","required":["kind","key"],"properties":{"kind":{"const":"event_property","isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.3.field.oneOf.2.kind","typeLabel":"any"},"key":{"type":"string","maxLength":128,"description":"Literal top-level event property key. Only valid inside an event node's where conditions.","isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.3.field.oneOf.2.key","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.3.field.oneOf.2","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.3.field","typeLabel":"object"},"op":{"type":"string","enum":["eq","neq","in","not_in","contains","starts_with","ends_with","gt","gte","lt","lte","exists","not_exists","before","after","within_last","not_within_last"],"isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.3.op","typeLabel":"enum\u003cstring>"},"value":{"description":"Required for every operator except exists/not_exists (which reject it). Typed per operator: eq/neq take a string/number/boolean; in/not_in a non-empty array (≤ 50) of all strings or all numbers; contains/starts_with/ends_with a string; gt/gte/lt/lte a number; before/after an ISO-8601 date-time with explicit offset; within_last/not_within_last an AudienceWindow.","uniqueKey":"oneOf.0.expression.root.oneOf.3.value","typeLabel":"any"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.3","typeLabel":"object"},{"type":"object","description":"One audience expression node, discriminated by `kind`. Overall limits: nesting depth ≤ 8, total nodes ≤ 64. Unknown kinds, unknown operators, unknown keys, and empty groups are rejected with structured diagnostics.","required":["kind","event"],"properties":{"kind":{"const":"event","isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.4.kind","typeLabel":"any"},"event":{"type":"string","maxLength":80,"isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.4.event","typeLabel":"string"},"count":{"type":"object","required":["op","value"],"additionalProperties":false,"properties":{"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"],"isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.4.count.op","typeLabel":"enum\u003cstring>"},"value":{"type":"integer","minimum":0,"maximum":10000,"isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.4.count.value","typeLabel":"integer"}},"description":"Occurrence-count comparison; defaults to at-least-once ({ op: gte, value: 1 }).","uniqueKey":"oneOf.0.expression.root.oneOf.4.count","typeLabel":"object"},"window":{"type":"object","required":["amount","unit"],"properties":{"amount":{"type":"integer","minimum":1,"isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.4.window.amount","typeLabel":"integer"},"unit":{"type":"string","enum":["minutes","hours","days"],"isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.4.window.unit","typeLabel":"enum\u003cstring>"}},"additionalProperties":false,"description":"Relative time window measured back from the evaluation instant (evaluatedAt).","uniqueKey":"oneOf.0.expression.root.oneOf.4.window","typeLabel":"object"},"where":{"type":"array","minItems":1,"maxItems":8,"items":{"$circularRef":"f763706b-093a-4677-826f-149d1491dd01"},"description":"field nodes on event_property references, ANDed per occurrence.","uniqueKey":"oneOf.0.expression.root.oneOf.4.where","typeLabel":"array"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"oneOf.0.expression.root.oneOf.4","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.0.expression.root","typeLabel":"object"}},"additionalProperties":false,"description":"Versioned, strictly validated audience rule. Example: `{ \"version\": 1, \"root\": { \"kind\": \"all\", \"children\": [ { \"kind\": \"field\", \"field\": { \"kind\": \"trait\", \"key\": \"plan\" }, \"op\": \"eq\", \"value\": \"free\" }, { \"kind\": \"not\", \"child\": { \"kind\": \"event\", \"event\": \"used_csv_export\" } } ] } }`","example":{"version":1,"root":{"kind":"all","children":[{"kind":"field","field":{"kind":"trait","key":"plan"},"op":"eq","value":"free"},{"kind":"not","child":{"kind":"event","event":"used_csv_export"}}]}},"isRequired":true,"uniqueKey":"oneOf.0.expression","typeLabel":"object"},"sampleLimit":{"type":"integer","minimum":0,"maximum":25,"default":10,"description":"Matching-user samples to return (0 to skip samples).","uniqueKey":"oneOf.0.sampleLimit","typeLabel":"integer"},"segment":{"type":"string","description":"Saved segment to evaluate, by id (seg_…) or machine key. Provide exactly one of `expression` or `segment`.","uniqueKey":"oneOf.0.segment","typeLabel":"string"},"version":{"type":"integer","minimum":1,"description":"Segment version to evaluate; omitted = current.","uniqueKey":"oneOf.0.version","typeLabel":"integer"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","description":"Provide exactly one of `expression` (inline) or `segment` (+ optional `version`) — both run through the identical validator and evaluator.","required":["segment"],"properties":{"segment":{"type":"string","description":"Saved segment to evaluate, by id (seg_…) or machine key. Provide exactly one of `expression` or `segment`.","isRequired":true,"uniqueKey":"oneOf.1.segment","typeLabel":"string"},"expression":{"type":"object","required":["version","root"],"properties":{"version":{"type":"integer","enum":[1],"description":"Audience expression schema version.","isRequired":true,"uniqueKey":"oneOf.1.expression.version","typeLabel":"enum\u003cinteger>"},"root":{"oneOf":[{"type":"object","description":"One audience expression node, discriminated by `kind`. Overall limits: nesting depth ≤ 8, total nodes ≤ 64. Unknown kinds, unknown operators, unknown keys, and empty groups are rejected with structured diagnostics.","required":["kind","children"],"properties":{"kind":{"const":"all","isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.0.kind","typeLabel":"any"},"children":{"type":"array","minItems":1,"maxItems":16,"items":{"$circularRef":"f763706b-093a-4677-826f-149d1491dd01"},"isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.0.children","typeLabel":"array"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.0","typeLabel":"object"},{"type":"object","description":"One audience expression node, discriminated by `kind`. Overall limits: nesting depth ≤ 8, total nodes ≤ 64. Unknown kinds, unknown operators, unknown keys, and empty groups are rejected with structured diagnostics.","required":["kind","children"],"properties":{"kind":{"const":"any","isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.1.kind","typeLabel":"any"},"children":{"type":"array","minItems":1,"maxItems":16,"items":{"$circularRef":"f763706b-093a-4677-826f-149d1491dd01"},"isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.1.children","typeLabel":"array"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.1","typeLabel":"object"},{"type":"object","description":"One audience expression node, discriminated by `kind`. Overall limits: nesting depth ≤ 8, total nodes ≤ 64. Unknown kinds, unknown operators, unknown keys, and empty groups are rejected with structured diagnostics.","required":["kind","child"],"properties":{"kind":{"const":"not","isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.2.kind","typeLabel":"any"},"child":{"oneOf":[{"$circularRef":"f763706b-093a-4677-826f-149d1491dd01","isRequired":true}],"isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.2.child","typeLabel":"any"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.2","typeLabel":"object"},{"type":"object","description":"One audience expression node, discriminated by `kind`. Overall limits: nesting depth ≤ 8, total nodes ≤ 64. Unknown kinds, unknown operators, unknown keys, and empty groups are rejected with structured diagnostics.","required":["kind","field","op"],"properties":{"kind":{"const":"field","isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.3.kind","typeLabel":"any"},"field":{"oneOf":[{"type":"object","description":"Structured, unambiguous field reference.","required":["kind","key"],"properties":{"kind":{"const":"trait","isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.3.field.oneOf.0.kind","typeLabel":"any"},"key":{"type":"string","maxLength":128,"description":"Literal top-level trait key.","isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.3.field.oneOf.0.key","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.3.field.oneOf.0","typeLabel":"object"},{"type":"object","description":"Structured, unambiguous field reference.","required":["kind","field"],"properties":{"kind":{"const":"user","isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.3.field.oneOf.1.kind","typeLabel":"any"},"field":{"type":"string","enum":["firstSeenAt","lastSeenAt"],"description":"Lifecycle field (datetime).","isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.3.field.oneOf.1.field","typeLabel":"enum\u003cstring>"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.3.field.oneOf.1","typeLabel":"object"},{"type":"object","description":"Structured, unambiguous field reference.","required":["kind","key"],"properties":{"kind":{"const":"event_property","isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.3.field.oneOf.2.kind","typeLabel":"any"},"key":{"type":"string","maxLength":128,"description":"Literal top-level event property key. Only valid inside an event node's where conditions.","isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.3.field.oneOf.2.key","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.3.field.oneOf.2","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.3.field","typeLabel":"object"},"op":{"type":"string","enum":["eq","neq","in","not_in","contains","starts_with","ends_with","gt","gte","lt","lte","exists","not_exists","before","after","within_last","not_within_last"],"isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.3.op","typeLabel":"enum\u003cstring>"},"value":{"description":"Required for every operator except exists/not_exists (which reject it). Typed per operator: eq/neq take a string/number/boolean; in/not_in a non-empty array (≤ 50) of all strings or all numbers; contains/starts_with/ends_with a string; gt/gte/lt/lte a number; before/after an ISO-8601 date-time with explicit offset; within_last/not_within_last an AudienceWindow.","uniqueKey":"oneOf.1.expression.root.oneOf.3.value","typeLabel":"any"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.3","typeLabel":"object"},{"type":"object","description":"One audience expression node, discriminated by `kind`. Overall limits: nesting depth ≤ 8, total nodes ≤ 64. Unknown kinds, unknown operators, unknown keys, and empty groups are rejected with structured diagnostics.","required":["kind","event"],"properties":{"kind":{"const":"event","isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.4.kind","typeLabel":"any"},"event":{"type":"string","maxLength":80,"isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.4.event","typeLabel":"string"},"count":{"type":"object","required":["op","value"],"additionalProperties":false,"properties":{"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"],"isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.4.count.op","typeLabel":"enum\u003cstring>"},"value":{"type":"integer","minimum":0,"maximum":10000,"isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.4.count.value","typeLabel":"integer"}},"description":"Occurrence-count comparison; defaults to at-least-once ({ op: gte, value: 1 }).","uniqueKey":"oneOf.1.expression.root.oneOf.4.count","typeLabel":"object"},"window":{"type":"object","required":["amount","unit"],"properties":{"amount":{"type":"integer","minimum":1,"isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.4.window.amount","typeLabel":"integer"},"unit":{"type":"string","enum":["minutes","hours","days"],"isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.4.window.unit","typeLabel":"enum\u003cstring>"}},"additionalProperties":false,"description":"Relative time window measured back from the evaluation instant (evaluatedAt).","uniqueKey":"oneOf.1.expression.root.oneOf.4.window","typeLabel":"object"},"where":{"type":"array","minItems":1,"maxItems":8,"items":{"$circularRef":"f763706b-093a-4677-826f-149d1491dd01"},"description":"field nodes on event_property references, ANDed per occurrence.","uniqueKey":"oneOf.1.expression.root.oneOf.4.where","typeLabel":"array"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"oneOf.1.expression.root.oneOf.4","typeLabel":"object"}],"isRequired":true,"uniqueKey":"oneOf.1.expression.root","typeLabel":"object"}},"additionalProperties":false,"description":"Versioned, strictly validated audience rule. Example: `{ \"version\": 1, \"root\": { \"kind\": \"all\", \"children\": [ { \"kind\": \"field\", \"field\": { \"kind\": \"trait\", \"key\": \"plan\" }, \"op\": \"eq\", \"value\": \"free\" }, { \"kind\": \"not\", \"child\": { \"kind\": \"event\", \"event\": \"used_csv_export\" } } ] } }`","example":{"version":1,"root":{"kind":"all","children":[{"kind":"field","field":{"kind":"trait","key":"plan"},"op":"eq","value":"free"},{"kind":"not","child":{"kind":"event","event":"used_csv_export"}}]}},"uniqueKey":"oneOf.1.expression","typeLabel":"object"},"sampleLimit":{"type":"integer","minimum":0,"maximum":25,"default":10,"description":"Matching-user samples to return (0 to skip samples).","uniqueKey":"oneOf.1.sampleLimit","typeLabel":"integer"},"version":{"type":"integer","minimum":1,"description":"Segment version to evaluate; omitted = current.","uniqueKey":"oneOf.1.version","typeLabel":"integer"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"expression":{"version":1,"root":{"kind":"all","children":[{"kind":"field","field":{"kind":"trait","key":"plan"},"op":"eq","value":"free"},{"kind":"not","child":{"kind":"event","event":"used_csv_export"}}]}},"sampleLimit":10,"segment":"\u003cstring>","version":2}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"aa006b9f-f0fd-4769-951a-7e13cddc26ae":{"description":"Check result.","content":{"application/json":{"schema":{"type":"object","required":["expression","expressionHash","summary","diagnostics","evaluatedAt","countType","matchedCount","totalUsers","samples"],"properties":{"expression":{"type":"object","required":["version","root"],"properties":{"version":{"type":"integer","enum":[1],"description":"Audience expression schema version.","isRequired":true,"uniqueKey":"expression.version","typeLabel":"enum\u003cinteger>"},"root":{"oneOf":[{"type":"object","description":"One audience expression node, discriminated by `kind`. Overall limits: nesting depth ≤ 8, total nodes ≤ 64. Unknown kinds, unknown operators, unknown keys, and empty groups are rejected with structured diagnostics.","required":["kind","children"],"properties":{"kind":{"const":"all","isRequired":true,"uniqueKey":"expression.root.oneOf.0.kind","typeLabel":"any"},"children":{"type":"array","minItems":1,"maxItems":16,"items":{"$circularRef":"f763706b-093a-4677-826f-149d1491dd01"},"isRequired":true,"uniqueKey":"expression.root.oneOf.0.children","typeLabel":"array"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"expression.root.oneOf.0","typeLabel":"object"},{"type":"object","description":"One audience expression node, discriminated by `kind`. Overall limits: nesting depth ≤ 8, total nodes ≤ 64. Unknown kinds, unknown operators, unknown keys, and empty groups are rejected with structured diagnostics.","required":["kind","children"],"properties":{"kind":{"const":"any","isRequired":true,"uniqueKey":"expression.root.oneOf.1.kind","typeLabel":"any"},"children":{"type":"array","minItems":1,"maxItems":16,"items":{"$circularRef":"f763706b-093a-4677-826f-149d1491dd01"},"isRequired":true,"uniqueKey":"expression.root.oneOf.1.children","typeLabel":"array"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"expression.root.oneOf.1","typeLabel":"object"},{"type":"object","description":"One audience expression node, discriminated by `kind`. Overall limits: nesting depth ≤ 8, total nodes ≤ 64. Unknown kinds, unknown operators, unknown keys, and empty groups are rejected with structured diagnostics.","required":["kind","child"],"properties":{"kind":{"const":"not","isRequired":true,"uniqueKey":"expression.root.oneOf.2.kind","typeLabel":"any"},"child":{"oneOf":[{"$circularRef":"f763706b-093a-4677-826f-149d1491dd01","isRequired":true}],"isRequired":true,"uniqueKey":"expression.root.oneOf.2.child","typeLabel":"any"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"expression.root.oneOf.2","typeLabel":"object"},{"type":"object","description":"One audience expression node, discriminated by `kind`. Overall limits: nesting depth ≤ 8, total nodes ≤ 64. Unknown kinds, unknown operators, unknown keys, and empty groups are rejected with structured diagnostics.","required":["kind","field","op"],"properties":{"kind":{"const":"field","isRequired":true,"uniqueKey":"expression.root.oneOf.3.kind","typeLabel":"any"},"field":{"oneOf":[{"type":"object","description":"Structured, unambiguous field reference.","required":["kind","key"],"properties":{"kind":{"const":"trait","isRequired":true,"uniqueKey":"expression.root.oneOf.3.field.oneOf.0.kind","typeLabel":"any"},"key":{"type":"string","maxLength":128,"description":"Literal top-level trait key.","isRequired":true,"uniqueKey":"expression.root.oneOf.3.field.oneOf.0.key","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"expression.root.oneOf.3.field.oneOf.0","typeLabel":"object"},{"type":"object","description":"Structured, unambiguous field reference.","required":["kind","field"],"properties":{"kind":{"const":"user","isRequired":true,"uniqueKey":"expression.root.oneOf.3.field.oneOf.1.kind","typeLabel":"any"},"field":{"type":"string","enum":["firstSeenAt","lastSeenAt"],"description":"Lifecycle field (datetime).","isRequired":true,"uniqueKey":"expression.root.oneOf.3.field.oneOf.1.field","typeLabel":"enum\u003cstring>"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"expression.root.oneOf.3.field.oneOf.1","typeLabel":"object"},{"type":"object","description":"Structured, unambiguous field reference.","required":["kind","key"],"properties":{"kind":{"const":"event_property","isRequired":true,"uniqueKey":"expression.root.oneOf.3.field.oneOf.2.kind","typeLabel":"any"},"key":{"type":"string","maxLength":128,"description":"Literal top-level event property key. Only valid inside an event node's where conditions.","isRequired":true,"uniqueKey":"expression.root.oneOf.3.field.oneOf.2.key","typeLabel":"string"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"expression.root.oneOf.3.field.oneOf.2","typeLabel":"object"}],"isRequired":true,"uniqueKey":"expression.root.oneOf.3.field","typeLabel":"object"},"op":{"type":"string","enum":["eq","neq","in","not_in","contains","starts_with","ends_with","gt","gte","lt","lte","exists","not_exists","before","after","within_last","not_within_last"],"isRequired":true,"uniqueKey":"expression.root.oneOf.3.op","typeLabel":"enum\u003cstring>"},"value":{"description":"Required for every operator except exists/not_exists (which reject it). Typed per operator: eq/neq take a string/number/boolean; in/not_in a non-empty array (≤ 50) of all strings or all numbers; contains/starts_with/ends_with a string; gt/gte/lt/lte a number; before/after an ISO-8601 date-time with explicit offset; within_last/not_within_last an AudienceWindow.","uniqueKey":"expression.root.oneOf.3.value","typeLabel":"any"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"expression.root.oneOf.3","typeLabel":"object"},{"type":"object","description":"One audience expression node, discriminated by `kind`. Overall limits: nesting depth ≤ 8, total nodes ≤ 64. Unknown kinds, unknown operators, unknown keys, and empty groups are rejected with structured diagnostics.","required":["kind","event"],"properties":{"kind":{"const":"event","isRequired":true,"uniqueKey":"expression.root.oneOf.4.kind","typeLabel":"any"},"event":{"type":"string","maxLength":80,"isRequired":true,"uniqueKey":"expression.root.oneOf.4.event","typeLabel":"string"},"count":{"type":"object","required":["op","value"],"additionalProperties":false,"properties":{"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"],"isRequired":true,"uniqueKey":"expression.root.oneOf.4.count.op","typeLabel":"enum\u003cstring>"},"value":{"type":"integer","minimum":0,"maximum":10000,"isRequired":true,"uniqueKey":"expression.root.oneOf.4.count.value","typeLabel":"integer"}},"description":"Occurrence-count comparison; defaults to at-least-once ({ op: gte, value: 1 }).","uniqueKey":"expression.root.oneOf.4.count","typeLabel":"object"},"window":{"type":"object","required":["amount","unit"],"properties":{"amount":{"type":"integer","minimum":1,"isRequired":true,"uniqueKey":"expression.root.oneOf.4.window.amount","typeLabel":"integer"},"unit":{"type":"string","enum":["minutes","hours","days"],"isRequired":true,"uniqueKey":"expression.root.oneOf.4.window.unit","typeLabel":"enum\u003cstring>"}},"additionalProperties":false,"description":"Relative time window measured back from the evaluation instant (evaluatedAt).","uniqueKey":"expression.root.oneOf.4.window","typeLabel":"object"},"where":{"type":"array","minItems":1,"maxItems":8,"items":{"$circularRef":"f763706b-093a-4677-826f-149d1491dd01"},"description":"field nodes on event_property references, ANDed per occurrence.","uniqueKey":"expression.root.oneOf.4.where","typeLabel":"array"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"expression.root.oneOf.4","typeLabel":"object"}],"isRequired":true,"uniqueKey":"expression.root","typeLabel":"object"}},"additionalProperties":false,"description":"The normalized canonical expression (stable key order, event counts defaulted, membership lists sorted/deduped).","example":{"version":1,"root":{"kind":"all","children":[{"kind":"field","field":{"kind":"trait","key":"plan"},"op":"eq","value":"free"},{"kind":"not","child":{"kind":"event","event":"used_csv_export"}}]}},"isRequired":true,"uniqueKey":"expression","typeLabel":"object"},"expressionHash":{"type":"string","description":"sha256 of the canonical serialization — equal hashes mean identical semantics.","isRequired":true,"uniqueKey":"expressionHash","typeLabel":"string"},"summary":{"type":"string","description":"Deterministically derived readable summary. Display text, not a parseable format.","example":"trait plan is \"free\" and not (performed used_csv_export)","isRequired":true,"uniqueKey":"summary","typeLabel":"string"},"diagnostics":{"type":"array","items":{"type":"object","required":["severity","code","path","message"],"properties":{"severity":{"type":"string","enum":["error","warning","info"],"isRequired":true,"uniqueKey":"diagnostics.items.[INDEX].severity","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"Stable machine-actionable code, e.g. `unknown_operator`, `empty_group`, `unobserved_trait`, `unobserved_event`, `zero_matches`.","example":"unobserved_event","isRequired":true,"uniqueKey":"diagnostics.items.[INDEX].code","typeLabel":"string"},"path":{"type":"string","description":"JSON Pointer into the expression document.","example":"/root/children/1","isRequired":true,"uniqueKey":"diagnostics.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"diagnostics.items.[INDEX].message","typeLabel":"string"},"suggestions":{"type":"array","items":{"type":"string","uniqueKey":"diagnostics.items.[INDEX].suggestions.items.[INDEX]","typeLabel":"string"},"description":"Bounded similar observed names for likely typos.","uniqueKey":"diagnostics.items.[INDEX].suggestions","typeLabel":"string[]"}},"uniqueKey":"diagnostics.items.[INDEX]","typeLabel":"object"},"description":"Warnings that don't block: unobserved traits/events (with typo suggestions), zero matches, and similar.","isRequired":true,"uniqueKey":"diagnostics","typeLabel":"object[]"},"evaluatedAt":{"type":"integer","description":"The single instant (epoch ms) every relative rule in this evaluation used.","isRequired":true,"uniqueKey":"evaluatedAt","typeLabel":"integer"},"countType":{"type":"string","enum":["exact"],"isRequired":true,"uniqueKey":"countType","typeLabel":"enum\u003cstring>"},"matchedCount":{"type":"integer","description":"Exact number of users currently matching.","isRequired":true,"uniqueKey":"matchedCount","typeLabel":"integer"},"totalUsers":{"type":"integer","description":"Total identified users in the project.","isRequired":true,"uniqueKey":"totalUsers","typeLabel":"integer"},"samples":{"type":"array","items":{"type":"object","properties":{"externalUserId":{"type":"string","uniqueKey":"samples.items.[INDEX].externalUserId","typeLabel":"string"},"firstSeenAt":{"type":"integer","uniqueKey":"samples.items.[INDEX].firstSeenAt","typeLabel":"integer"},"lastSeenAt":{"type":"integer","uniqueKey":"samples.items.[INDEX].lastSeenAt","typeLabel":"integer"},"traits":{"type":"object","description":"Only the traits the expression references.","uniqueKey":"samples.items.[INDEX].traits","typeLabel":"object"},"events":{"type":"object","description":"Referenced event name → the user's occurrence count as evaluated, bounded by the published maxEvaluatedEventOccurrences limit (a value at the bound means ‘at least this many’).","uniqueKey":"samples.items.[INDEX].events","typeLabel":"object"}},"uniqueKey":"samples.items.[INDEX]","typeLabel":"object"},"description":"Bounded, context-efficient sample of matching users: lifecycle fields plus only the referenced traits and event aggregates.","isRequired":true,"uniqueKey":"samples","typeLabel":"object[]"},"segment":{"type":"object","properties":{"id":{"type":"string","uniqueKey":"segment.id","typeLabel":"string"},"key":{"type":"string","uniqueKey":"segment.key","typeLabel":"string"},"version":{"type":"integer","uniqueKey":"segment.version","typeLabel":"integer"}},"description":"Present when the evaluated audience came from a saved segment.","uniqueKey":"segment","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"expression":{"version":1,"root":{"kind":"all","children":[{"kind":"field","field":{"kind":"trait","key":"plan"},"op":"eq","value":"free"},{"kind":"not","child":{"kind":"event","event":"used_csv_export"}}]}},"expressionHash":"\u003cstring>","summary":"trait plan is \"free\" and not (performed used_csv_export)","diagnostics":[{"severity":"error","code":"unobserved_event","path":"/root/children/1","message":"\u003cstring>","suggestions":["\u003cstring>"]}],"evaluatedAt":123,"countType":"exact","matchedCount":123,"totalUsers":123,"samples":[{"externalUserId":"\u003cstring>","firstSeenAt":123,"lastSeenAt":123,"traits":{},"events":{}}],"segment":{"id":"\u003cstring>","key":"\u003cstring>","version":123}}}},"exampleType":"generated"}},"exampleType":"generated"},"852c5a79-febf-4dae-b4cd-02dc92a47597":{"description":"Invalid request or invalid expression — the body includes `diagnostics` with stable codes and JSON Pointer paths.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","uniqueKey":"error","typeLabel":"string"},"diagnostics":{"type":"array","items":{"type":"object","required":["severity","code","path","message"],"properties":{"severity":{"type":"string","enum":["error","warning","info"],"isRequired":true,"uniqueKey":"diagnostics.items.[INDEX].severity","typeLabel":"enum\u003cstring>"},"code":{"type":"string","description":"Stable machine-actionable code, e.g. `unknown_operator`, `empty_group`, `unobserved_trait`, `unobserved_event`, `zero_matches`.","example":"unobserved_event","isRequired":true,"uniqueKey":"diagnostics.items.[INDEX].code","typeLabel":"string"},"path":{"type":"string","description":"JSON Pointer into the expression document.","example":"/root/children/1","isRequired":true,"uniqueKey":"diagnostics.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"diagnostics.items.[INDEX].message","typeLabel":"string"},"suggestions":{"type":"array","items":{"type":"string","uniqueKey":"diagnostics.items.[INDEX].suggestions.items.[INDEX]","typeLabel":"string"},"description":"Bounded similar observed names for likely typos.","uniqueKey":"diagnostics.items.[INDEX].suggestions","typeLabel":"string[]"}},"uniqueKey":"diagnostics.items.[INDEX]","typeLabel":"object"},"uniqueKey":"diagnostics","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","diagnostics":[{"severity":"error","code":"unobserved_event","path":"/root/children/1","message":"\u003cstring>","suggestions":["\u003cstring>"]}]}}},"exampleType":"generated"}},"exampleType":"generated"},"6d5b28f5-2b49-4027-9aa8-a37decf651a4":{"description":"Missing or invalid secret key.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Human-readable description of what went wrong.","isRequired":true,"uniqueKey":"error","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"5d9e4d77-0109-4382-8a17-287e6c5e8aff":{"description":"No such segment or segment version in this project.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Human-readable description of what went wrong.","isRequired":true,"uniqueKey":"error","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"243e09ea-3658-462a-9683-3a8dc3fa150b":{"description":"Rate limited — respect Retry-After.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Human-readable description of what went wrong.","isRequired":true,"uniqueKey":"error","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"90ae9be0-6ff1-4823-af4c-ce2454db9b9e":{"description":"Could not check audience.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Human-readable description of what went wrong.","isRequired":true,"uniqueKey":"error","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"faf5831d-e7c9-471a-9e9f-ab6c73ae58b6":{"description":"One user's bounded audience facts exceed local exact-evaluation capacity.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Human-readable description of what went wrong.","isRequired":true,"uniqueKey":"error","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"880d8577-0241-4ba1-9237-516b033f5ffe":{"secretKey":{"type":"http","scheme":"bearer","description":"Your project's secret key (`pk_…`, without the `pub` segment). Server-side only — never ship it to a browser. Get it from Settings → Projects in the dashboard.","scopes":[]}},"10fda799-7333-474e-9ec2-2898a45d108f":{"hostedAgentKey":{"type":"http","scheme":"bearer","description":"Galinum's scoped hosted-agent key (pk_agent_...). It can read required project state, including launch policy and campaign activation, and use fenced evaluation or GitHub source operations. Ordinary campaign, status, goal, segment, media, launch-policy, and campaign-activation writes return 403. Reads grant no approval or deployment configuration authority.","scopes":[]}}},"servers":{"d78851ce-f6b3-4284-acc2-dcf1797c4d16":{"url":"https://galinum.com","description":"Production"}},"schemas":{"f763706b-093a-4677-826f-149d1491dd01":{"oneOf":[{"type":"object","description":"One audience expression node, discriminated by `kind`. Overall limits: nesting depth ≤ 8, total nodes ≤ 64. Unknown kinds, unknown operators, unknown keys, and empty groups are rejected with structured diagnostics.","required":["kind","children"],"properties":{"kind":{"const":"all","isRequired":true},"children":{"type":"array","minItems":1,"maxItems":16,"items":{"$circularRef":"f763706b-093a-4677-826f-149d1491dd01"},"isRequired":true}},"additionalProperties":false},{"type":"object","description":"One audience expression node, discriminated by `kind`. Overall limits: nesting depth ≤ 8, total nodes ≤ 64. Unknown kinds, unknown operators, unknown keys, and empty groups are rejected with structured diagnostics.","required":["kind","children"],"properties":{"kind":{"const":"any","isRequired":true},"children":{"type":"array","minItems":1,"maxItems":16,"items":{"$circularRef":"f763706b-093a-4677-826f-149d1491dd01"},"isRequired":true}},"additionalProperties":false},{"type":"object","description":"One audience expression node, discriminated by `kind`. Overall limits: nesting depth ≤ 8, total nodes ≤ 64. Unknown kinds, unknown operators, unknown keys, and empty groups are rejected with structured diagnostics.","required":["kind","child"],"properties":{"kind":{"const":"not","isRequired":true},"child":{"oneOf":[{"isRequired":true}],"isRequired":true}},"additionalProperties":false},{"type":"object","description":"One audience expression node, discriminated by `kind`. Overall limits: nesting depth ≤ 8, total nodes ≤ 64. Unknown kinds, unknown operators, unknown keys, and empty groups are rejected with structured diagnostics.","required":["kind","field","op"],"properties":{"kind":{"const":"field","isRequired":true},"field":{"oneOf":[{"type":"object","description":"Structured, unambiguous field reference.","required":["kind","key"],"properties":{"kind":{"const":"trait","isRequired":true},"key":{"type":"string","maxLength":128,"description":"Literal top-level trait key.","isRequired":true}},"additionalProperties":false,"isRequired":true},{"type":"object","description":"Structured, unambiguous field reference.","required":["kind","field"],"properties":{"kind":{"const":"user","isRequired":true},"field":{"type":"string","enum":["firstSeenAt","lastSeenAt"],"description":"Lifecycle field (datetime).","isRequired":true}},"additionalProperties":false,"isRequired":true},{"type":"object","description":"Structured, unambiguous field reference.","required":["kind","key"],"properties":{"kind":{"const":"event_property","isRequired":true},"key":{"type":"string","maxLength":128,"description":"Literal top-level event property key. Only valid inside an event node's where conditions.","isRequired":true}},"additionalProperties":false,"isRequired":true}],"isRequired":true},"op":{"type":"string","enum":["eq","neq","in","not_in","contains","starts_with","ends_with","gt","gte","lt","lte","exists","not_exists","before","after","within_last","not_within_last"],"isRequired":true},"value":{"description":"Required for every operator except exists/not_exists (which reject it). Typed per operator: eq/neq take a string/number/boolean; in/not_in a non-empty array (≤ 50) of all strings or all numbers; contains/starts_with/ends_with a string; gt/gte/lt/lte a number; before/after an ISO-8601 date-time with explicit offset; within_last/not_within_last an AudienceWindow."}},"additionalProperties":false},{"type":"object","description":"One audience expression node, discriminated by `kind`. Overall limits: nesting depth ≤ 8, total nodes ≤ 64. Unknown kinds, unknown operators, unknown keys, and empty groups are rejected with structured diagnostics.","required":["kind","event"],"properties":{"kind":{"const":"event","isRequired":true},"event":{"type":"string","maxLength":80,"isRequired":true},"count":{"type":"object","required":["op","value"],"additionalProperties":false,"properties":{"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte"],"isRequired":true},"value":{"type":"integer","minimum":0,"maximum":10000,"isRequired":true}},"description":"Occurrence-count comparison; defaults to at-least-once ({ op: gte, value: 1 })."},"window":{"type":"object","required":["amount","unit"],"properties":{"amount":{"type":"integer","minimum":1,"isRequired":true},"unit":{"type":"string","enum":["minutes","hours","days"],"isRequired":true}},"additionalProperties":false,"description":"Relative time window measured back from the evaluation instant (evaluatedAt)."},"where":{"type":"array","minItems":1,"maxItems":8,"items":{"$circularRef":"f763706b-093a-4677-826f-149d1491dd01"},"description":"field nodes on event_property references, ANDed per occurrence."}},"additionalProperties":false}]}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"Your project's secret key (`pk_…`, without the `pub` segment). Server-side only — never ship it to a browser. Get it from Settings → Projects in the dashboard.","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Your project's secret key (`pk_…`, without the `pub` segment). Server-side only — never ship it to a browser. Get it from Settings → Projects in the dashboard.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"secretKey","name":"Authorization"}],"title":"secretKey"},{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"Galinum's scoped hosted-agent key (pk_agent_...). It can read required project state, including launch policy and campaign activation, and use fenced evaluation or GitHub source operations. Ordinary campaign, status, goal, segment, media, launch-policy, and campaign-activation writes return 403. Reads grant no approval or deployment configuration authority.","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Galinum's scoped hosted-agent key (pk_agent_...). It can read required project state, including launch policy and campaign activation, and use fenced evaluation or GitHub source operations. Ordinary campaign, status, goal, segment, media, launch-policy, and campaign-activation writes return 403. Reads grant no approval or deployment configuration authority.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"hostedAgentKey","name":"Authorization"}],"title":"hostedAgentKey"}]},"originalFileLocation":"openapi.json"},"subdomain":"galinum","siteName":"Galinum","title":"Check an audience expression - Galinum","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-10T23:31:20.200Z","originalFileLocation":"api-reference/audiences/check-an-audience-expression.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Validates and evaluates an audience expression against the project\u0026#x27;s current users WITHOUT persisting or launching anything. Returns the normalized canonical expression, its stable hash, a derived readable summary, structured diagnostics (stable codes, JSON Pointer paths, bounded typo suggestions), a single evaluatedAt instant, the exact matching-user count, and a bounded sample of matching users. Use it to verify an audience behaves as intended before creating a campaign with it. Invalid expressions return 400 with error diagnostics.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Galinum\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/galinum/zUwsiXhqryBIytwX/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/galinum/zUwsiXhqryBIytwX/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/galinum/zUwsiXhqryBIytwX/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/galinum/zUwsiXhqryBIytwX/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/galinum/zUwsiXhqryBIytwX/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/galinum/zUwsiXhqryBIytwX/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/galinum/zUwsiXhqryBIytwX/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/galinum/zUwsiXhqryBIytwX/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/galinum/zUwsiXhqryBIytwX/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Check an audience expression - Galinum\">\u003cmeta data-mint-head property=\"og:description\" content=\"Validates and evaluates an audience expression against the project\u0026#x27;s current users WITHOUT persisting or launching anything. Returns the normalized canonical expression, its stable hash, a derived readable summary, structured diagnostics (stable codes, JSON Pointer paths, bounded typo suggestions), a single evaluatedAt instant, the exact matching-user count, and a bounded sample of matching users. Use it to verify an audience behaves as intended before creating a campaign with it. Invalid expressions return 400 with error diagnostics.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Galinum\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.galinum.com/api-reference/audiences/check-an-audience-expression\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://galinum.mintlify.site/_mintlify/api/og/v2?division=Audiences\u0026amp;title=Check+an+audience+expression\u0026amp;description=Validates+and+evaluates+an+audience+expression+against+the+project%27s+current+users+WITHOUT+persisting+or+launching+anything.+Returns+the+normalized+canonical+ex\u0026amp;theme=a024d7b84beb9cc4902c7b19\u0026amp;signature=63fa4793c5a55767abb3240af7a9408f757e7d03e4b04ba6e852af81e794b8bb\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Check an audience expression - Galinum\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Validates and evaluates an audience expression against the project\u0026#x27;s current users WITHOUT persisting or launching anything. Returns the normalized canonical expression, its stable hash, a derived readable summary, structured diagnostics (stable codes, JSON Pointer paths, bounded typo suggestions), a single evaluatedAt instant, the exact matching-user count, and a bounded sample of matching users. Use it to verify an audience behaves as intended before creating a campaign with it. Invalid expressions return 400 with error diagnostics.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://galinum.mintlify.site/_mintlify/api/og/v2?division=Audiences\u0026amp;title=Check+an+audience+expression\u0026amp;description=Validates+and+evaluates+an+audience+expression+against+the+project%27s+current+users+WITHOUT+persisting+or+launching+anything.+Returns+the+normalized+canonical+ex\u0026amp;theme=a024d7b84beb9cc4902c7b19\u0026amp;signature=63fa4793c5a55767abb3240af7a9408f757e7d03e4b04ba6e852af81e794b8bb\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/galinum/zUwsiXhqryBIytwX/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Galinum\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1A3A2A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.galinum.com/api-reference/audiences/check-an-audience-expression\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/audiences/check-an-audience-expression.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.galinum.com/#organization\",\"name\":\"Galinum\",\"url\":\"https://docs.galinum.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/galinum/P8EaxFHlVOCBbMgl/logo/light.svg?fit=max\u0026auto=format\u0026n=P8EaxFHlVOCBbMgl\u0026q=85\u0026s=e13a9c002bb43cdf4e88cff30817d370\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.galinum.com#website\",\"name\":\"Galinum\",\"url\":\"https://docs.galinum.com\",\"publisher\":{\"@id\":\"https://docs.galinum.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.galinum.com/api-reference/audiences/check-an-audience-expression#webpage\",\"url\":\"https://docs.galinum.com/api-reference/audiences/check-an-audience-expression\",\"name\":\"Check an audience expression\",\"description\":\"Validates and evaluates an audience expression against the project's current users WITHOUT persisting or launching anything. Returns the normalized canonical expression, its stable hash, a derived readable summary, structured diagnostics (stable codes, JSON Pointer paths, bounded typo suggestions), a single evaluatedAt instant, the exact matching-user count, and a bounded sample of matching users. Use it to verify an audience behaves as intended before creating a campaign with it. Invalid expressions return 400 with error diagnostics.\",\"dateModified\":\"2026-09-10T23:31:20.200Z\",\"isPartOf\":{\"@id\":\"https://docs.galinum.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.galinum.com/api-reference/audiences/check-an-audience-expression#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.galinum.com/api-reference/audiences/check-an-audience-expression#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Audiences\",\"item\":\"https://docs.galinum.com/api-reference/audiences/discover-audience-capabilities\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Check an audience expression\",\"item\":\"https://docs.galinum.com/api-reference/audiences/check-an-audience-expression\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.galinum.com/api-reference/audiences/check-an-audience-expression#apireference\",\"headline\":\"Check an audience expression\",\"name\":\"Check an audience expression\",\"description\":\"Validates and evaluates an audience expression against the project's current users WITHOUT persisting or launching anything. Returns the normalized canonical expression, its stable hash, a derived readable summary, structured diagnostics (stable codes, JSON Pointer paths, bounded typo suggestions), a single evaluatedAt instant, the exact matching-user count, and a bounded sample of matching users. Use it to verify an audience behaves as intended before creating a campaign with it. Invalid expressions return 400 with error diagnostics.\",\"url\":\"https://docs.galinum.com/api-reference/audiences/check-an-audience-expression\",\"mainEntityOfPage\":{\"@id\":\"https://docs.galinum.com/api-reference/audiences/check-an-audience-expression#webpage\"},\"dateModified\":\"2026-09-10T23:31:20.200Z\",\"publisher\":{\"@id\":\"https://docs.galinum.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.galinum.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Galinum\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Galinum\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/audiences/check-an-audience-expression.md","siteName":"Galinum","nav":{"global":{"anchors":[{"anchor":"Website","icon":"globe","href":"https://galinum.com"},{"anchor":"GitHub","icon":"github","href":"https://github.com/Galinum"}]},"tabs":[{"tab":"Documentation","icon":"book-open","pages":[{"title":"Documentation","href":""}]},{"tab":"API Reference","icon":"code","groups":[{"group":"API Reference","pages":[{"title":"Introduction","icon":"book-open","href":"/api/overview"},{"title":"Authentication","icon":"key","href":"/api/authentication"},{"title":"Errors","icon":"triangle-alert","href":"/api/errors"}]},{"group":"SDK endpoints","pages":[{"title":"Identify a user","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/identify","href":"/api-reference/users/identify-a-user"},{"title":"Track an event","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/track","href":"/api-reference/users/track-an-event"},{"title":"Get eligible in-app messages","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/messages","href":"/api-reference/messages/get-eligible-in-app-messages"},{"title":"Report delivery feedback","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/deliveries/{id}/event","href":"/api-reference/messages/report-delivery-feedback"}]},{"group":"Audiences","pages":[{"title":"Discover audience capabilities","description":"Returns the project's audience-authoring vocabulary in one bounded, context-efficient response: the supported expression versions, node kinds, operators per type, window units, and validation limits, plus what has actually been observed in this project — trait keys with per-type user counts, event names with user counts and recency, and top-level event property keys with observed types. Use this before authoring an expression instead of paginating raw users/events. Output is exact distinct vocabulary (not sampled); when a list is truncated by its bound the response says so via `traitsTruncated` / `eventsTruncated` / `propertiesTruncated` — absence from a truncated list is NOT evidence the field doesn't exist. Low-cardinality string traits also include bounded representative values.","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/audiences/capabilities","href":"/api-reference/audiences/discover-audience-capabilities"},{"title":"Check an audience expression","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/audiences/check","href":"/api-reference/audiences/check-an-audience-expression"},{"title":"Explain an audience for one user","description":"Evaluates an audience expression for ONE project user and returns a condition-level evidence trace mirroring the expression tree — the debugging surface for \"why did this user match?\" and \"why did this user not match?\". Each trace node reports its JSON Pointer path, matched state, and the compact evidence behind the decision: observed value and type for field conditions, occurrence counts and window boundaries for event conditions, and per-child outcomes for groups. Uses the same evaluator as check and message eligibility, so the three always agree for the same user, expression, and evaluatedAt.","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/audiences/explain","href":"/api-reference/audiences/explain-an-audience-for-one-user"},{"title":"Create a segment","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/segments","href":"/api-reference/segments/create-a-segment"},{"title":"List segments","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/segments","href":"/api-reference/segments/list-segments"},{"title":"Read a segment","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/segments/{id}","href":"/api-reference/segments/read-a-segment"},{"title":"Update a segment","deprecated":null,"version":null,"openapi":"/openapi.json patch /api/v1/segments/{id}","href":"/api-reference/segments/update-a-segment"},{"title":"Archive a segment","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/segments/{id}/archive","href":"/api-reference/segments/archive-a-segment"},{"title":"List segment versions","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/segments/{id}/versions","href":"/api-reference/segments/list-segment-versions"},{"title":"Read a segment version","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/segments/{id}/versions/{version}","href":"/api-reference/segments/read-a-segment-version"}]},{"group":"Campaigns","pages":[{"title":"Upload campaign media","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/campaign-media","href":"/api-reference/campaigns/upload-campaign-media"},{"title":"Create a campaign","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/campaigns","href":"/api-reference/campaigns/create-a-campaign"},{"title":"List campaigns","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/campaigns","href":"/api-reference/campaigns/list-campaigns"},{"title":"Get a campaign","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/campaigns/{id}","href":"/api-reference/campaigns/get-a-campaign"},{"title":"Update a campaign","deprecated":null,"version":null,"openapi":"/openapi.json patch /api/v1/campaigns/{id}","href":"/api-reference/campaigns/update-a-campaign"},{"title":"Launch, pause, or end a campaign","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/campaigns/{id}/status","href":"/api-reference/campaigns/launch-pause-or-end-a-campaign"},{"title":"List a campaign's deliveries","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/campaigns/{id}/deliveries","href":"/api-reference/campaigns/list-a-campaigns-deliveries"},{"title":"Get exact event conversions by variant","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/campaigns/{id}/conversions","href":"/api-reference/campaigns/get-exact-event-conversions-by-variant"}]},{"group":"Users \u0026 events","pages":[{"title":"List users","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/users","href":"/api-reference/users/list-users"},{"title":"Get a user","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/users/{id}","href":"/api-reference/users/get-a-user"},{"title":"List events","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/events","href":"/api-reference/users/list-events"}]},{"group":"Goals","pages":[{"title":"Create a goal","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/goals","href":"/api-reference/goals/create-a-goal"},{"title":"List goals","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/goals","href":"/api-reference/goals/list-goals"},{"title":"Get a goal","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/goals/{id}","href":"/api-reference/goals/get-a-goal"},{"title":"Update a goal","deprecated":null,"version":null,"openapi":"/openapi.json patch /api/v1/goals/{id}","href":"/api-reference/goals/update-a-goal"}]},{"group":"Agent runs","pages":[{"title":"Log an agent run","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/agent-runs","href":"/api-reference/agent-runs/log-an-agent-run"},{"title":"List agent runs","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/agent-runs","href":"/api-reference/agent-runs/list-agent-runs"}]},{"group":"Hosted agent","pages":[{"title":"Read hosted-loop safety controls","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/agent/settings","href":"/api-reference/hosted-agent/read-hosted-loop-safety-controls"},{"title":"Record hosted-agent usage","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/agent/usage-reports","href":"/api-reference/hosted-agent/record-hosted-agent-usage"},{"title":"List due campaign evaluations","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/evaluations/due","href":"/api-reference/hosted-agent/list-due-campaign-evaluations"},{"title":"Schedule a campaign evaluation","deprecated":null,"version":null,"openapi":"/openapi.json put /api/v1/evaluations/{campaignId}","href":"/api-reference/hosted-agent/schedule-a-campaign-evaluation"},{"title":"Claim a due campaign evaluation","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/evaluations/{campaignId}/claim","href":"/api-reference/hosted-agent/claim-a-due-campaign-evaluation"},{"title":"Apply a lease-fenced campaign mutation","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/evaluations/{campaignId}/mutate","href":"/api-reference/hosted-agent/apply-a-lease-fenced-campaign-mutation"},{"title":"Release, reschedule, or conclude an evaluation","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/evaluations/{campaignId}/complete","href":"/api-reference/hosted-agent/release-reschedule-or-conclude-an-evaluation"},{"title":"Propose one exact campaign mutation","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/agent/proposals","href":"/api-reference/hosted-agent/propose-one-exact-campaign-mutation"},{"title":"List campaign mutation proposals","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/agent/proposals","href":"/api-reference/hosted-agent/list-campaign-mutation-proposals"}]},{"group":"Usage","pages":[{"title":"Get current usage and serving state","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/usage","href":"/api-reference/usage/get-current-usage-and-serving-state"}]},{"group":"GitHub sources","pages":[{"title":"List pending GitHub source work","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/github/refs/due","href":"/api-reference/github-sources/list-pending-github-source-work"},{"title":"Claim GitHub source work","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/github/refs/{refId}/claim","href":"/api-reference/github-sources/claim-github-source-work"},{"title":"Reconcile claimed GitHub changes","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/github/refs/{refId}/reconcile","href":"/api-reference/github-sources/reconcile-claimed-github-changes"}]},{"group":"Installations","pages":[{"title":"Register an installation","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/sdk/installations","href":"/api-reference/installations/register-an-installation"},{"title":"Read installation state","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/sdk/installations/{installationId}","href":"/api-reference/installations/read-installation-state"},{"title":"Bind or unbind an installation","deprecated":null,"version":null,"openapi":"/openapi.json put /api/v1/sdk/installations/{installationId}/binding","href":"/api-reference/installations/bind-or-unbind-an-installation"},{"title":"Update installation facts","deprecated":null,"version":null,"openapi":"/openapi.json put /api/v1/sdk/installations/{installationId}/facts","href":"/api-reference/installations/update-installation-facts"},{"title":"Update an installation token","deprecated":null,"version":null,"openapi":"/openapi.json put /api/v1/sdk/installations/{installationId}/token","href":"/api-reference/installations/update-an-installation-token"},{"title":"Record installation app activity","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/sdk/installations/{installationId}/activity","href":"/api-reference/installations/record-installation-app-activity"},{"title":"Inspect installations","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/installations","href":"/api-reference/installations/inspect-installations"}]},{"group":"Push","pages":[{"title":"configurePushCredential","deprecated":null,"version":null,"openapi":"/openapi.json put /api/v1/push/credentials","href":"/api-reference/push/configurepushcredential"},{"title":"listPushCredentials","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/push/credentials","href":"/api-reference/push/listpushcredentials"},{"title":"validatePushCredential","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/push/credentials/validate","href":"/api-reference/push/validatepushcredential"},{"title":"dispatchPushCampaign","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/campaigns/{id}/push/dispatch","href":"/api-reference/push/dispatchpushcampaign"},{"title":"testPushCampaign","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/campaigns/{id}/push/test","href":"/api-reference/push/testpushcampaign"},{"title":"Read a correlated push test","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/campaigns/{id}/push/tests/{requestId}","href":"/api-reference/push/read-a-correlated-push-test"},{"title":"inspectPushCampaign","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/campaigns/{id}/push","href":"/api-reference/push/inspectpushcampaign"},{"title":"observeInstallationPush","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/sdk/installations/{installationId}/observations","href":"/api-reference/push/observeinstallationpush"}]}]}]},"basePath":"","title":"Check an audience expression - Galinum","deploymentId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","buildId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-B8kPdtB2.js","snippetPresets-C-p1aFQ1.js","utils-B9NnUZSZ.js","style-to-object-BY3JEAdk.js","utils-DFxl7cW2.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-bSr9h7OB.js","conditional-requirements-CFM0id0Q.js","cloneDeep-Bw4Gcy_r.js","_Uint8Array-C68x8Gny.js","isObject-FP1Yky1u.js","ApiExamples-BXsp8PHs.js","usePlaygroundInputsStore-BlAOLmIF.js","shallow-C2F02mqa.js","isEqual-C8iG4q2G.js","CodeSnippets-45lHR04X.js","CodeSnippet-6Cemznl-.js","use-playground-group-access-Cyy8SXp5.js","Page-CeZ_ZB5X.js","api-description-markdown-DiOdv5rp.js","DynamicMarkdown-B_9ywLDq.js","SectionHeading-Cc2r-uqU.js","MethodPill-Df3Tcu4c.js","getPastedJson-B3vrV0wE.js","Check2Icon-YQhSFafd.js","axios-CsQoIw0U.js","Markdown-0RkHcMOI.js","AssistantPageLink-DeJZCj9t.js","dist-DVqS175j.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}