Skip to main content
POST
Generate answers for a questionnaire

Authorizations

X-API-Key
string
header
required

API key for authentication

Path Parameters

id
string
required

Response

200 - application/json
questionnaireId
string
required

The questionnaire whose answers are being generated.

Example:

"qst_6a179d26c4ad2c1c816ee16d"

runId
string
required

Background run identifier for the generation job (Trigger.dev run id).

Example:

"run_cmpotsz153eac0ultc1ya87f5"

publicAccessToken
string
required

Token for tracking the run via Trigger.dev realtime. Optional — MCP/agent clients should poll GET /v1/questionnaire/:id instead.

Example:

"pat_..."

status
string
required

Always 'generating' on a successful trigger. Poll GET /v1/questionnaire/:id; answers are ready once answeredQuestions equals totalQuestions.

Example:

"generating"

totalQuestions
number
required

Total number of questions in the questionnaire.

Example:

23

answeredQuestions
number
required

Questions already answered at the moment generation was triggered (answers without a value are (re)generated).

Example:

0

message
string
required

Human-readable summary of what to do next.

Example:

"Generating answers for 23 questions. Poll GET /v1/questionnaire/qst_... until answeredQuestions reaches totalQuestions."