Create Ksql Ask
POSThttps://a.klaviyo.com/api/ksql-ask
Ask K-SQL a natural-language question and get back an answer.
No public deadline_sec -- this layer owns the run budget (see KsqlPublicApiSettings.ask_deadline_sec) rather than letting a caller hold a run open past this service's own ceiling.
- Revision header
revision: 2026-07-15.prerequired- Scopes
campaigns:readcatalogs:readevents:readlists:readmetrics:readprofiles:readsegments:read- Rate limits
- Burst:
1/sSteady:15/m
Steady: 15/m
Optional Scopes:
campaigns:read
catalogs:read
events:read
lists:read
metrics:read
profiles:read
segments:read
Query parameters
For more information please visit API overview
Headers
API endpoint revision (format: YYYY-MM-DD[.suffix])
2026-07-15.pre
Request body
Content type: application/vnd.api+jsonrequired
Responses
201Success
Content type: application/vnd.api+json
Show 4 fields
Identifier for this ask, for joining logs across services.
Show 4 fields
Whether this ask was answered or needs more input.
Plain-language answer when
statusissuccess, or the clarifying question back to the caller whenstatusisclarification.The executed queries' typed result sets supporting
answer. Always empty whenstatusisclarification; may also be empty onsuccesswhen the answer required no query execution.Show 8 fields
Whether the QUERY's result was complete -- it says nothing about this payload.
samplemeans the query's row count equalled its ownLIMIT, so the underlying result may be larger;truncatedmeans it hit K-SQL's own result cap. Comparerows_returnedtorow_countfor payload elision, which is separate:completewithrows_returnedbelowrow_countis a full query result only partially included here.The K-SQL query that produced this result set, so you can see how the numbers were derived. Read-only and for explanation only: K-SQL is an internal dialect with no endpoint that runs it, and it is not a stable interface -- do not parse it, store it, or build on its syntax.
Caveats about this result set, in plain language and safe to show an end user as sent. The same sentences also appear in the response-level
warnings; read them here when you need to know which result set a caveat applies to.
Caveats that change how
answerandresult_setsshould be read -- a sampled result set, row data elided by a cap, a table withheld from this ask. Several conditions are reported nowhere else, so surface these alongside the answer rather than discarding them.
Show 1 field
4XXClient Error
Content type: application/vnd.api+json
5XXServer Error
Content type: application/vnd.api+json