Reference
Forms
Save a form definition and a version made of sections and fields. This is not the layout of a record page.
These routes author a form in the forms engine. They do not change the layout of a company or a deal page, and they do not create a system form.
| Method | Path | What it does |
|---|---|---|
| GET | /api/v1/x/forms | Definitions. Optional ownerModule |
| GET | /api/v1/x/forms/{id} | One definition, including sections on the current version |
| POST | /api/v1/x/forms | Create an inactive definition. Include sections to add the first version |
| POST | /api/v1/x/forms/{id}/versions | Add a version from sections |
| POST | /api/v1/x/forms/{id}/activate | Turn the form on. Calling it again on an active form succeeds |
| POST | /api/v1/x/forms/{id}/deactivate | Turn the form off. Calling it again on an inactive form succeeds |
Every call needs forms.definition.manage.
Create needs name. description, ownerModule, and category are optional. isSystemDefinition: true is 400 form_invalid.
A version body is sections. Each section has key, label, and fields. Each field has key, label, and fieldType. fieldType is exact: Text, RichText, Number, Currency, Boolean, Date, Select, MultiSelect, FileUpload, Rating. An unknown type is 400 form_invalid, and nothing is stored.
An active version is not edited in place. The next versions call starts a new draft. Assigning that form to a company or an investor, and collecting a response, stay in the product.
Example
Section titled “Example”POST /api/v1/x/forms with this body creates the definition and its first version. fieldType is one of the names above.
{ "name": "Company intake", "sections": [ { "key": "company", "label": "Company", "fields": [ { "key": "legal_name", "label": "Legal name", "fieldType": "Text", "required": true } ] } ]}GET /api/v1/x/forms/{id} returns the same keys as the list item, plus currentVersionId, currentVersionNumber, and sections. sections is the current version in the same shape you posted: key, label, description, and fields of key, label, fieldType, required, and description. A form with no version yet returns sections: [].
POST /api/v1/x/forms/{id}/versions sends the same sections array. The form stays inactive until POST /api/v1/x/forms/{id}/activate with an empty body. Activate on a form that is already active succeeds. Deactivate on a form that is already inactive succeeds. A system form still cannot be deactivated.