FormsForm templates
Add a form template version
POST
Numbered next. Forms already started keep the version they were started from; new ones get this one. The body depends on the template's kind.
Who may call it: Anyone on the project whose permission profile allows form-template.update. API keys: yes, given form-template.update for this project.
cookie
gamma.session_token<token>The session cookie a sign-in sets. Over HTTPS its name carries the __Secure- prefix. Browsers send it on their own; other clients keep it from the sign-in response.
projectId*stringThe project's id.
templateId*stringapplication/json- body
A native template: its whole new layout.
sections*array<>Created.
application/json- response
version*One immutable version of a template's contents; forms are pinned to the version they were started from.
Example Request
curl -X POST 'http://localhost:3000/api/projects/string/form-templates/string/versions' \ -H 'Content-Type: application/json' \ -d '{ "sections": [ { "id": "string", "title": "string", "fields": [ { "id": "string", "label": "string", "required": true, "type": "text" } ] } ]}'Example Response
{ "version": { "id": "string", "version": -9007199254740991, "createdById": "string", "createdAt": "2019-08-24T14:15:22Z", "fileName": "string", "sections": [ { "id": "string", "title": "string", "fields": [ { "id": "string", "label": "string", "description": "string", "required": true, "requiredWhen": { "logic": "and", "conditions": [ { "fieldId": "string", "operator": "eq", "value": "string" } ] }, "type": "text", "multiline": true, "maxLength": -9007199254740991 } ] } ], "pdfFields": [ { "name": "string", "type": "text", "options": [ "string" ], "multiline": true, "maxLength": -9007199254740991, "required": true, "widgets": [ { "page": -9007199254740991, "rect": [ 0 ] } ] } ], "pdfPages": [ { "width": 0, "height": 0 } ] }}