The SDK’s job is to wrap five endpoints into idiomatic mobile code. If you’re integrating from a platform we don’t have an SDK for yet (Flutter, Swift, Kotlin, web), call these directly. Base URL:Documentation Index
Fetch the complete documentation index at: https://docs.insito.app/llms.txt
Use this file to discover all available pages before exploring further.
https://api.insito.app/v1/sdk. See
Authentication for the Bearer proj_xxx
header.
POST /identify
Idempotent upsert of a respondent. Call once when your user signs in
or as early as you have a stable userId.
Request
Response
(project_id, userId) — calling again with the same
userId updates platform, appVersion, metadata, and
last_seen_at but doesn’t create a new respondent.
POST /event
Trigger evaluation. Decides whether to show a survey.
Request
Response (no survey)
Response (survey shown)
options shape per question type:
nps:null— score is always 0–10rating:{ "max": 5 }multiple_choice:{ "choices": ["A", "B", "C"], "multiSelect": false }open_text:{ "maxLength": 280 }
POST /impression
Records that a survey was shown to a user. Sets the per-user
throttle window in Redis. The SDK fires this right after rendering
the modal — don’t call it from a wait, did the user see it?
position.
Request
Response
POST /response
Submit the user’s answers. Counts against your plan.
Request
Response (success)
Response (plan exhausted)
402 Payment Required. The SDK surfaces this as a
response_failed event with reason: "response_limit_reached".
Answer value shapes
| Question type | value |
|---|---|
nps | Integer 0..10 |
rating | Integer 1..5 |
multiple_choice (single) | String matching one of options.choices |
multiple_choice (multi) | Array of strings |
open_text | String, ≤ options.maxLength |
POST /screen-map
Batch upsert of screen visits. The SDK aggregates locally for ~60s
then flushes here. Send null or omit if you don’t use screen
tracking.
Request
Response
Cross-cutting
All five endpoints:- Authenticate with
Authorization: Bearer proj_xxx. - Take a JSON body (
Content-Type: application/json). - Validate with zod — 400 returns a
validation_failedbody with the offending field path. - Return
internal_error500 on database failures (with arequestIdfor support correlation).