---
title: "Generate answers for a questionnaire"
method: POST
path: "/v1/questionnaire/{id}/auto-answer"
tags: ["Questionnaire"]
---

# Generate answers for a questionnaire

`POST /v1/questionnaire/{id}/auto-answer`

Starts background answer generation for an already-parsed questionnaire and returns a run handle immediately. Poll GET /v1/questionnaire/:id until answeredQuestions equals totalQuestions, then read the answers from its questions.

## Path parameters

- `id` string, required

## Response `200`

- TriggerAutoAnswerResponseDto
  - `questionnaireId` string, required — The questionnaire whose answers are being generated.
  - `runId` string, required — Background run identifier for the generation job (Trigger.dev run id).
  - `publicAccessToken` string, required — Token for tracking the run via Trigger.dev realtime. Optional — MCP/agent clients should poll GET /v1/questionnaire/:id instead.
  - `status` string, required — Always 'generating' on a successful trigger. Poll GET /v1/questionnaire/:id; answers are ready once answeredQuestions equals totalQuestions.
  - `totalQuestions` number, required — Total number of questions in the questionnaire.
  - `answeredQuestions` number, required — Questions already answered at the moment generation was triggered (answers without a value are (re)generated).
  - `message` string, required — Human-readable summary of what to do next.

## Changes

> 56 revisions in range; 4 could not be searched.

- **2026-06-04** `d7d0199d846f` — 1 info
  - the endpoint scheme security `oauth2` was removed from the API
- **2026-05-29** `5382c53ab431` — 1 info
  - the endpoint scheme security `oauth2` was added to the API
- **2026-05-28** `7c0713bef5b1` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/trycompai/apis/comp-ai-api/changes/v1/questionnaire/:id/auto-answer/post.md)

---

[API](https://skmtc.dev/trycompai/apis/comp-ai-api.md) · [All operations](https://skmtc.dev/trycompai/apis/comp-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/trycompai/comp-ai-api/revisions/726b9523fb22/schema)
