SDK: project API keys
All/v1/sdk/* routes require a Bearer token in the
Authorization header. The token is your project’s API key from
admin.insito.app → your app →
Settings → Mobile SDK.
- Format:
proj_followed by a 32-character hex string (generated per project). The auth middleware accepts aproj_<alphanumeric>bearer token. - One key per project. Settings → Mobile SDK → Regenerate key creates a new key and invalidates the old one immediately.
- The key binds every request to a single project, so all SDK traffic is
automatically scoped to that project. A missing, malformed, or rotated key
returns
401 unauthorized.
The project key is public, not a secret: it ships inside every build of
your app and anyone can extract it. Abuse is bounded by per-key rate
limits and your plan’s response quota. It only grants the SDK endpoints,
never dashboard data. Still keep it out of public repos (pass it in at
build time) so you can regenerate it without a code change.
Dashboard: Supabase JWTs
/v1/dashboard/* routes require a Supabase auth JWT in the same
Authorization: Bearer shape.
sub (user ID) and the
members table. Cross-org access returns 404.
Rate limits
/v1/sdk/* routes use sliding one-minute windows in Upstash Redis:
- 120 requests per minute per API key per client IP, so one device or script can’t use up an app’s budget;
- 3,000 requests per minute per API key across all clients;
- 30 unknown API keys per minute per client IP. Past that, keys that
aren’t already known return
429instead of being looked up, which stops key guessing. Valid keys already in use from that IP keep working.
429 with { "error": "too_many_requests" } and
X-RateLimit-Limit / X-RateLimit-Remaining headers. There is no
Retry-After header; the window is one minute. /v1/dashboard/* routes
allow 300 requests per minute per signed-in user or API key. See
Plan limits for response caps.
Changes to an app (a regenerated key, deactivation, Brand Kit or labels) take
effect on the SDK’s next request.
Error shape
Validation failures (Zod) return:error plus any context fields at the
top level (there is no details wrapper):
Versioning
The API is versioned via URL prefix (/v1). We bump major versions
for breaking changes; backwards-compatible additions never get a new
version.