Skip to main content
POST
Submit Response

Authorizations

Authorization
string
header
required

A personal access token (haico_pat_...), created under Profile → API keys. Send it as Authorization: Bearer <key>. The browser session JWT is also accepted but is an internal mechanism and is not part of the public contract.

Path Parameters

session_id
integer
required

Body

application/json

Submit one questionnaire instrument's answers (upsert per slot).

The answers are validated against the instrument's declared item ids and scales (services/study_instruments.py) before the row is written.

instrument_id
string
required
Maximum string length: 64
answers
Answers · object
required
instrument_version
string
default:1
Maximum string length: 16
condition
string
default:""
Maximum string length: 32
task_id
string
default:""
Maximum string length: 32
duration_ms
integer | null
Required range: x >= 0

Response

Successful Response

id
integer
required
instrument_id
string
required
instrument_version
string
required
condition
string
required
task_id
string
required
answers
Answers · object
required
computed
Computed · object
required
submitted_at
string<date-time>
required
duration_ms
integer | null