Skip to content

Update a questionnaire

PATCH
/api/v1/questionnaires/{id}

aasm_state accepts only needs_input and approved; any other value is dropped silently and the rest of the update still applies. Setting approved also approves every item that can be approved.

NameType
id
required
string

The record’s prefixed ID

Media typeapplication/json
object
questionnaire
required
object
title
string

Defaults to the filename on create

description
string
deadline
string format: date
file
string format: binary

.xlsx or .docx; multipart create only

aasm_state
string
Allowed values: needs_input approved

Other values are dropped silently

portal_url
string format: uri

200

The updated questionnaire

Response body
Media typeapplication/json
object
id
string
web_link
string format: uri

The questionnaire’s page in the web app

title
string
description
string | null
deadline
string | null format: date
state
string
Allowed values: new qa_complete mapping_complete items_generated processing_items needs_input approved

Processing and review state

filetype
string | null
Allowed values: pdf xlsx docx
framework
string | null
Allowed values: nist-csf-2.0 hecvat-3.06 hecvat-4.1 rh-1.0 cjis-5 cjis-6
portal_url
string | null format: uri

Set for questionnaires answered in a third-party portal

created_at
string format: date-time
updated_at
string format: date-time
owner
One of:

The member who owns or answered a record. id is the numeric database ID.

object
id
integer
name
string
email
string format: email
stats

Item counts. Discarded items are excluded.

object
total_items
integer
needs_input_items
integer

Items the AI could not answer confidently

auto_answered_items
integer
approved_items
integer
overall_completion_percentage
integer
<= 100

Approved items as a percentage of total

403

Insufficient scope, role, or credits

Response body
Media typeapplication/json
object
error
object
code
string

A stable machine-readable code

message
string
details
Array<string>

Present on validation errors; one entry per failed validation

404

No such record in this account

Response body
Media typeapplication/json
object
error
object
code
string

A stable machine-readable code

message
string
details
Array<string>

Present on validation errors; one entry per failed validation

422

The record could not be saved

Response body
Media typeapplication/json
object
error
object
code
string

A stable machine-readable code

message
string
details
Array<string>

Present on validation errors; one entry per failed validation