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
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 adecide: a retry creates a second decision that ends the first’s window. If you must retry, send the sameidempotency_keyso the retry replays rather than re-decides. See Fallbacks and timeouts. - Stable
ids on events, and retries only under them. Generate theidbefore the first attempt. Retry network failures,408,429(afterRetry-After) and5xxwith exponential backoff; do not retry other4xx. 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
502and dropped connections as ambiguous. The origin may have committed; retry only with the same keys. - Send
identifyimmediately 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 theerrorcode.