Rewrite an item's answer
/api/v1/questionnaires/{questionnaire_id}/questionnaire_items/{id}/rewrite_answerSynchronous. Rewrites the current answer, saves the result on the
item and returns it. Consumes credits. To preview a rewrite without
saving, use ai_enhance_answer instead.
Authorizations
Section titled “Authorizations”Path Parameters
Section titled “Path Parameters”Example
qu_1a2bThe questionnaire’s prefixed ID
The record’s prefixed ID
Responses
Section titled “Responses”200
The item with its rewritten answer
The item with its rewritten answer
object
Why the answer was given
Guidance text supplied with the question
Markdown explanation of the question; see explain_question
explanation rendered as HTML
For yes/no questions
0–1, encoded as a decimal string
Decimal string; 0 when there is no confidence
Answer formatted for pasting into a portal
Why the knowledge base was insufficient
1-based position in the questionnaire
A knowledge base item or source passage retrieved for an answer
object
Numeric database ID
Numeric database ID of the referenced record
Vector distance from the question
The passage quoted in the answer, when it was used
Present when reference_type is KnowledgeBaseItem
object
Present when reference_type is Embedding
object
The passage text
Page of the source document
Heading path to the section
403
Out of credits, or no active subscription (usage_blocked)
Out of credits, or no active subscription (usage_blocked)
object
object
A stable machine-readable code
Present on validation errors; one entry per failed validation
404
No such record in this account
No such record in this account
object
object
A stable machine-readable code
Present on validation errors; one entry per failed validation
422
There is no answer to rewrite, or the rewrite failed
There is no answer to rewrite, or the rewrite failed
object
object
A stable machine-readable code
Present on validation errors; one entry per failed validation