Skip to content

Create a questionnaire

POST
/api/v1/questionnaires

Send the questionnaire as a multipart upload with file set to an .xlsx or .docx. Processing is asynchronous: the response returns the questionnaire before any items exist, and items appear as the file is analysed. state moves through the processing states and settles in needs_input once every item has been answered.

For portal questionnaires (answered in a third-party portal) send portal_url and no file; nothing is processed. When title is omitted it is derived from the filename. The caller becomes the questionnaire’s owner. Rate limited to 3 per minute.

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

201

The created 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

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