UserVane Public SDK API
Publishable-key routes used by browser and agent SDKs
Publishable-key routes used by browser and agent SDKs
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/uservane-com:uservane-com-public-sdk-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: UserVane Edge Public SDK API
version: '0.1'
description: 'Wire contract for the UserVane edge API (`api.uservane.com`).
Auth is load-bearing:
- **Publishable key** (`uv_pk_...`): browser / client SDK paths. Pass as
body `key`, query `key`, or (where noted) header. Never sufficient for
token mint, pending-scores, or privacy.
- **Secret key** (`uv_sk_...`): server-only. `Authorization: Bearer `
or `X-UserVane-Key: `. Used for session-bound token mint, Langfuse
pending-scores queue, and privacy export/erase.
Spec derived from `apps/uservane-api/src/schemas.ts` and route handlers in
`apps/uservane-api/src/app.ts`. Do not invent paths.'
contact:
name: UserVane
url: https://uservane.com
servers:
- url: https://api.uservane.com
description: Production
tags:
- name: Public SDK
description: Publishable-key routes used by browser and agent SDKs
paths:
/v1/sdk/bootstrap:
post:
tags:
- Public SDK
operationId: sdkBootstrap
summary: Bootstrap surveys, suppression, and unbound show-tokens
description: 'Returns active survey definitions, the server-authoritative suppression
set for the respondent, and per-survey single-use show-tokens (when
the respondent is eligible). Caps and quiet period are decided here
only (issue-time). Public (publishable) key.'
parameters:
- name: key
in: query
schema:
type: string
description: Publishable key (also accepted in body)
- name: userId
in: query
schema:
type: string
description: Respondent id (also accepted in body)
requestBody:
required: false
content:
application/json:
schema:
$ref: '#/components/schemas/BootstrapBody'
responses:
'200':
description: Bootstrap payload
content:
application/json:
schema:
$ref: '#/components/schemas/BootstrapResponse'
'400':
description: Missing or invalid key / body
'401':
description: Invalid public key
'403':
description: Origin not allowed
'429':
description: Rate limit exceeded
/v1/sdk/responses:
post:
tags:
- Public SDK
operationId: sdkSubmitResponse
summary: Submit a survey response (token-verified)
description: 'Ingests a rating after verifying the single-use show-token. Caps are
never enforced at submit; a valid unused token is always accepted.
Publishable key in body or query. Optional correlation fields
(`sessionId`, `observationId`) must match token-attested values when
the token was session-bound.'
parameters:
- name: key
in: query
schema:
type: string
description: Publishable key (also accepted in body)
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/SdkResponseBody'
responses:
'201':
description: Accepted
content:
application/json:
schema:
$ref: '#/components/schemas/IngestOk'
'400':
description: Invalid body
'401':
description: Invalid key or token
'403':
description: Origin not allowed
'404':
description: Survey not found
'409':
description: Token already used
'429':
description: Rate limit exceeded
/v1/dismissals:
post:
tags:
- Public SDK
operationId: dismissSurvey
summary: Record a dismissal (token-verified)
description: 'Records that the respondent dismissed the ask and adds the survey to
suppression. Same token rules as response submit. Publishable key.'
parameters:
- name: key
in: query
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/DismissalBody'
responses:
'201':
description: Dismissal recorded
content:
application/json:
schema:
$ref: '#/components/schemas/IngestOk'
'400':
description: Invalid body or missing public key
'401':
description: Invalid public key or token
'403':
description: Origin not allowed
'404':
description: Survey not found
'429':
description: Rate limit exceeded
components:
schemas:
IngestOk:
type: object
required:
- ok
- id
- at
properties:
ok:
type: boolean
enum:
- true
id:
type: string
at:
type: string
format: date-time
BootstrapResponse:
type: object
required:
- surveys
- suppression
properties:
surveys:
type: array
items:
$ref: '#/components/schemas/SurveyDefinition'
suppression:
type: array
items:
type: string
description: Survey ids this respondent has answered or dismissed
showTokens:
type: object
additionalProperties:
type: string
description: surveyId -> single-use show-token; missing means gated
SdkResponseBody:
type: object
required:
- showToken
- surveyId
- rating
properties:
showToken:
type: string
minLength: 1
surveyId:
type: string
minLength: 1
rating:
type: integer
minimum: 0
maximum: 10
description: Outer bound; per-type range enforced after survey load
text:
type: string
maxLength: 10000
followUpRequested:
type: boolean
userId:
type: string
minLength: 1
traits:
type: object
additionalProperties: true
key:
type: string
minLength: 1
description: Publishable key
sessionId:
type: string
minLength: 1
maxLength: 256
description: Must match token-attested session when bound
observationId:
type: string
minLength: 1
maxLength: 256
taskType:
type: string
minLength: 1
maxLength: 128
description: Untrusted display metadata for PM segmentation
identityKind:
type: string
enum:
- identified
- anon-device
- anon-conversation
DismissalBody:
type: object
required:
- showToken
- surveyId
- userId
properties:
showToken:
type: string
minLength: 1
surveyId:
type: string
minLength: 1
userId:
type: string
minLength: 1
key:
type: string
minLength: 1
BootstrapBody:
type: object
properties:
key:
type: string
minLength: 1
description: Publishable key
userId:
type:
- string
- 'null'
minLength: 1
traits:
type: object
additionalProperties: true
SurveyDefinition:
type: object
required:
- id
- slug
- type
- question
- presentation
- trigger
properties:
id:
type: string
slug:
type: string
type:
type: string
enum:
- nps
- csat
- ces
- pmf
question:
type: string
followUpQuestion:
type: string
presentation:
type: string
enum:
- corner
- inline
- banner
corner:
type: string
enum:
- bottom-right
- bottom-left
- top-right
- top-left
trigger:
type: string
enum:
- auto
- manual
delayMs:
type: number
samplePercent:
type: number
targeting:
type: array
items:
type: object
required:
- trait
- op
properties:
trait:
type: string
op:
type: string
enum:
- eq
- neq
- in
- gt
- lt
- gte
- lte
- exists
value: {}
showBadge:
type: boolean
endLabels:
type: object
properties:
low:
type: string
high:
type: string
securitySchemes:
SecretKeyBearer:
type: http
scheme: bearer
description: Project secret key (`uv_sk_...`). Server-only.
SecretKeyHeader:
type: apiKey
in: header
name: X-UserVane-Key
description: Alternate secret key header. Server-only.