Skip to main content
The API is four JSON endpoints under https://api.trycurious.ai/v1; every SDK behaviour is documented, so calling them directly is a first-class choice. The full field reference is the API reference.

Every request

Every response carries X-Request-Id; keep it in your logs. Errors are always { "error": "<code>", "message": "<text>" }; see Errors.

The four calls

What to build around the calls

These are the behaviours the server SDK implements; do the same in your client.
  • A deadline and a fallback on decide. Set a client timeout (the SDK’s default is 1.5 seconds) and render your own content when it passes or on any non-200. Do not retry a decide: a retry creates a second decision that ends the first’s window. If you must retry, send the same idempotency_key so the retry replays rather than re-decides. See Fallbacks and timeouts.
  • Stable ids on events, and retries only under them. Generate the id before the first attempt. Retry network failures, 408, 429 (after Retry-After) and 5xx with exponential backoff; do not retry other 4xx. See Idempotency.
  • Batch events (up to 200 per request) rather than sending one request per event; handle per-item results, since one bad item never fails the others. See Batch calls.
  • Treat 502 and dropped connections as ambiguous. The origin may have committed; retry only with the same keys.
  • Send identify immediately and await it before a decision that should see the merged profile. See Identify users.
  • Keep secret keys on servers. A browser gets a publishable key, which can decide against declared elements and report events, and nothing else. See Keys and environments.
  • Never log a request body or a key. Log the X-Request-Id, the status and the error code.

Regions

The API is served from one region today and routes requests there without any header from you. There is nothing to configure.