Quick start

Evaluate a CQL expression in under a minute.

The Evaluation API exposes endpoints for executing CQL expressions in real time against the current user context, available in a client-side variant authenticated with a public application ID and a server-side variant authenticated with a secret API key.

Evaluate an expression

Make a POST request to /client/web/evaluate with the expression to evaluate:

1234567891011
const response = await fetch('https://api.croct.io/client/web/evaluate', {  method: 'POST',  headers: {    'Content-Type': 'application/json',    'X-App-Id': '<APP ID>',    'X-Client-Id': '<CLIENT ID>',  },  body: JSON.stringify({query: 'user is returning'}),});
const result = await response.json();

The response is the JSON-serializable result of the expression. In this case, a boolean:

1
true

See the endpoint reference for more details.