const url = 'https://platform.fomr.io/v1/forms/example/draft';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://platform.fomr.io/v1/forms/example/draft \ --header 'Authorization: Bearer <token>'Reads the Draft Document: the whole form as it stands in the editor, hidden pages and blocks included, with every ID and default filled in. The response carries a weak ETag equal to the draft hash; keep it to tell whether the draft moved under you. A draft that cannot be published reads fine. Needs forms:read or templates:read. Costs 1 API credit.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The public ID of the form or Private Template.
Responses
Section titled “Responses”Default Response
object
Public ID of the form (10 characters). Read-only: assigned by the server on create and ignored on write.
Form name shown in the app.
Whether the resource is a Private Template. Read-only on draft writes; honored when creating a form.
Conditional logic rules in evaluation order. Rules show, hide, require, or skip to pages, update Calculated values, and redirect (Pro) based on answers, Hidden values, and Calculated values. Rule, condition, and action IDs are 1-22 URL-safe characters chosen by the client and must stay stable.
object
Public ID of the rule, unique within the form. 1-22 URL-safe characters.
When the rule applies.
object
Whether all or any of the items must match. A rule without items always applies.
Conditions and condition groups.
object
Marks a single condition.
ID of this item, unique within the rule. 1-22 URL-safe characters.
object
What the condition tests.
Public ID of the question whose answer is tested.
object
What the condition tests.
Key of the Hidden value that is tested.
object
What the condition tests.
Public ID of the Calculated value that is tested.
object
What the condition tests.
Public ID of the page the respondent must have visited.
object
Matches once the respondent reaches an ending.
How the subject is compared. The allowed operators depend on the subject type.
object
Marks a group of conditions.
ID of this item, unique within the rule. 1-22 URL-safe characters.
Whether all or any of the grouped conditions must match.
The grouped conditions. Groups do not nest.
object
Marks a single condition.
ID of this item, unique within the rule. 1-22 URL-safe characters.
object
What the condition tests.
Public ID of the question whose answer is tested.
object
What the condition tests.
Key of the Hidden value that is tested.
object
What the condition tests.
Public ID of the Calculated value that is tested.
object
What the condition tests.
Public ID of the page the respondent must have visited.
object
Matches once the respondent reaches an ending.
How the subject is compared. The allowed operators depend on the subject type.
What the rule does when it applies, in order.
object
ID of this item, unique within the rule. 1-22 URL-safe characters.
Shows the target. A show target starts hidden until a matching rule shows it.
object
ID of this item, unique within the rule. 1-22 URL-safe characters.
Hides the target.
object
ID of this item, unique within the rule. 1-22 URL-safe characters.
Makes the question required.
Public ID of the question to require.
object
ID of this item, unique within the rule. 1-22 URL-safe characters.
Makes the question optional.
Public ID of the question to make optional.
object
ID of this item, unique within the rule. 1-22 URL-safe characters.
Skips ahead when the respondent advances. Jumps only go forward.
Public ID of a later question page or of an ending.
object
ID of this item, unique within the rule. 1-22 URL-safe characters.
Sets a number Calculated value from a formula.
Public ID of the Calculated value this action updates.
Arithmetic formula over answers and Calculated values.
object
ID of this item, unique within the rule. 1-22 URL-safe characters.
Redirects the respondent to a URL after an ending. Needs the Pro plan.
The URL to redirect to. Pipes are allowed.
object
ID of this item, unique within the rule. 1-22 URL-safe characters.
Updates a text Calculated value.
Public ID of the Calculated value this action updates.
Whether the text replaces the value, is appended to it, or is prepended to it.
The text to write. Pipes are allowed.
Calculated values that logic rules update and that pipes and conditions read, in display order.
Pages in display order. Array order is canonical: the server renumbers page and node order on write.
object
Public ID of the page (4 characters). Always present on read.
Page name shown in the editor and used by the Form Title block when use_page_name is true.
Page kind: intro, normal, or final. An intro page comes first. Final pages are endings and come last; the first is the Default ending, the others are reached by jump rules.
Whether the page is hidden: kept in the draft, skipped by publish validation, and absent from the published form.
Whether respondents start on this page. Always the first page: true on any other page is rejected on write.
Whether answering the page’s single eligible question advances to the next page automatically. Derived by the server from the page’s blocks; ignored on write.
Blocks on the page in display order. Layout children reference their row through parent_node_id.
- actions
- text_input_short
- text_input_long
- text_input_email
- text_input_link
- number_input
- phone_number_input
- file_upload
- switch
- checkbox
- dropdown
- dropdown_multiselect
- multiple_choice
- checkbox_choice
- yes_no
- ranking
- slider
- rating
- rating_number
- nps
- date_picker
- time_picker
- date_time_picker
- date_range_picker
- text
- image
- media
- divider
- layout_row
- matrix
- form_title
- progress_bar
- thank_you
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of the page button row.
object
Text of the page’s primary button.
Whether this page overrides the theme’s button behavior (back button, arrows, and alignment).
Text of the Back button.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of a Short Answer question.
object
Answer validation rules. Omitting it on write makes the question required.
object
Whether respondents must answer before continuing.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of a Long Answer question.
object
Answer validation rules. Omitting it on write makes the question required.
object
Whether respondents must answer before continuing.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of an Email question.
object
Answer validation rules. Omitting it on write makes the question required.
object
Whether respondents must answer before continuing.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of a Link question.
object
Answer validation rules. Omitting it on write makes the question required.
object
Whether respondents must answer before continuing.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of a Number question.
object
Answer validation rules. Omitting it on write makes the question required.
object
Whether respondents must answer before continuing.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of a Phone question.
object
Answer validation rules. Omitting it on write makes the question required.
object
Whether respondents must answer before continuing.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of a File Upload question.
object
Answer validation rules. Omitting it on write makes the question required.
object
Whether respondents must answer before continuing.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of a Switch question.
object
Answer validation rules. Omitting it on write makes the question required.
object
Whether respondents must answer before continuing.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of a Checkbox question.
object
Answer validation rules. Omitting it on write makes the question required.
object
Whether respondents must answer before continuing.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of a Dropdown question.
object
Selectable options in display order.
object
Stable option value stored in answers.
Option label shown to respondents.
Option label as inline rich text HTML; derived from label when omitted.
Whether the options are shuffled for each respondent.
Answer validation rules. Omitting it on write makes the question required.
object
Whether respondents must answer before continuing.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of a Multiselect question.
object
Selectable options in display order.
object
Stable option value stored in answers.
Option label shown to respondents.
Option label as inline rich text HTML; derived from label when omitted.
Whether the options are shuffled for each respondent.
Answer validation rules. Omitting it on write makes the question required.
object
Whether respondents must answer before continuing.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of a Multiple Choice question.
object
Selectable options in display order.
object
Stable option value stored in answers.
Option label shown to respondents.
Option label as inline rich text HTML; derived from label when omitted.
Whether the options are shuffled for each respondent.
Whether respondents pick one option (single) or several (multiple).
Option layout: list, bordered, or inline; applies only when is_select_options_layout_override is true.
Key shown before each option: number or alphabet.
Answer validation rules. Omitting it on write makes the question required.
object
Whether respondents must answer before continuing.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of a Checkboxes question.
object
Selectable options in display order.
object
Stable option value stored in answers.
Option label shown to respondents.
Option label as inline rich text HTML; derived from label when omitted.
Whether the options are shuffled for each respondent.
Whether respondents pick one option (single) or several (multiple).
Control style of the options: checkbox or radio.
Option layout: list, bordered, or inline; applies only when is_select_options_layout_override is true.
Answer validation rules. Omitting it on write makes the question required.
object
Whether respondents must answer before continuing.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of a Yes/No question.
object
Selectable options in display order.
object
Stable option value stored in answers.
Option label shown to respondents.
Option label as inline rich text HTML; derived from label when omitted.
Control style of the options: checkbox or radio.
Option layout: list, bordered, or inline; applies only when is_select_options_layout_override is true.
Answer validation rules. Omitting it on write makes the question required.
object
Whether respondents must answer before continuing.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of a Ranking question.
object
Selectable options in display order.
object
Stable option value stored in answers.
Option label shown to respondents.
Option label as inline rich text HTML; derived from label when omitted.
Whether the options are shuffled for each respondent.
Option layout: list, bordered, or inline; applies only when is_select_options_layout_override is true.
Answer validation rules. Omitting it on write makes the question required.
object
Whether respondents must answer before continuing.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of a Slider question.
object
Increment between selectable values.
Lowest and highest selectable values.
object
Lowest selectable value.
Highest selectable value.
When the current value is displayed: none, hover, or always.
Answer validation rules. Omitting it on write makes the question required.
object
Whether respondents must answer before continuing.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of a Rating question.
object
Whether half steps can be selected.
Number of stars on the Rating question.
Answer validation rules. Omitting it on write makes the question required.
object
Whether respondents must answer before continuing.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of a Linear Scale question.
object
Highest selectable Linear Scale value.
Answer validation rules. Omitting it on write makes the question required.
object
Whether respondents must answer before continuing.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of a Net Promoter Score question.
object
Answer validation rules. Omitting it on write makes the question required.
object
Whether respondents must answer before continuing.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of a Date question.
object
Display format of dates, for example DD/MM/YYYY.
object
Static for a fixed value, relative for the moment the respondent opens the form.
The fixed value used when type is static.
object
Static for a fixed value, relative for the moment the respondent opens the form.
Answer validation rules. Omitting it on write makes the question required.
object
Whether respondents must answer before continuing.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of a Time question.
object
Display format of times: HH:mm or hh:mm A.
Minute increment offered by the time picker: 1, 5, 10, 15, 30, or 60.
object
Static for a fixed value, relative for the moment the respondent opens the form.
The fixed value used when type is static.
object
Static for a fixed value, relative for the moment the respondent opens the form.
Answer validation rules. Omitting it on write makes the question required.
object
Whether respondents must answer before continuing.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of a Date Time question.
object
Display format of dates, for example DD/MM/YYYY.
Display format of times: HH:mm or hh:mm A.
Minute increment offered by the time picker: 1, 5, 10, 15, 30, or 60.
object
Static for a fixed value, relative for the moment the respondent opens the form.
The fixed value used when type is static.
object
Static for a fixed value, relative for the moment the respondent opens the form.
Answer validation rules. Omitting it on write makes the question required.
object
Whether respondents must answer before continuing.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of a Date Range question.
object
Display format of dates, for example DD/MM/YYYY.
Answer validation rules. Omitting it on write makes the question required.
object
Whether respondents must answer before continuing.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of an Image block.
object
Horizontal alignment of the image: left, center, or right.
Whether the image stretches to the full form width.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of a Media block.
object
Horizontal alignment of the embed: left, center, or right.
Whether the embed stretches to the full form width.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
A Divider block has no settings; the meta must be an empty object.
object
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Content and settings of a Matrix question.
object
Selectable options in display order.
object
Stable option value stored in answers.
Option label shown to respondents.
Option label as inline rich text HTML; derived from label when omitted.
Matrix rows in display order; the columns come from select_options_data.
object
Stable option value stored in answers.
Option label shown to respondents.
Option label as inline rich text HTML; derived from label when omitted.
Answer validation rules. Omitting it on write makes the question required.
object
Whether respondents must answer before continuing.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
object
Public ID of the node (4 characters). Always present on read.
Position among siblings in the same parent and column. Array order is canonical: the server renumbers from 1.
Whether the node is hidden: kept in the draft and absent from the published form.
Node type key that selects the meta shape.
Notification settings of the form. A key left out on a draft write keeps its stored value; a key left out on create receives its default.
object
Email addresses of the organization members who receive the owner email, at most ten. Each must belong to an active member of the organization. Turning owner emails on while the list is empty adds the token owner, as the app does; an empty list sends no owner email.
Behavior and search-engine properties of the form. A key left out on a draft write keeps its stored value; a key left out on create receives its default.
object
Whether the form accepts submissions. Read-only: owned by the close, reopen, and access operations.
object
One completed response per respondent IP address.
object
The matching method: ip_address, submission_id, or component.
One completed response per browser, using the completed response ID saved in it.
object
The matching method: ip_address, submission_id, or component.
Rejects a completed response that repeats an earlier answer to one question. Blank optional answers are not checked.
object
The matching method: ip_address, submission_id, or component.
Public ID of the question whose answer must be unique: a visible short text, email, phone, link, or number block on a visible page.
Theme applied to the form. Only theme_id is writable: on create and on a draft write. Override properties are edited in the app.
object
Name of the applied theme. Read-only.
object
Font family name.
Example
{ "logic_rules": [ { "conditions": { "match": "all", "items": [ { "kind": "condition", "subject": { "type": "answer" }, "operator": "is" } ] }, "actions": [ { "type": "show", "target": { "kind": "node" } } ] } ], "calculated_values": [ { "type": "number" } ], "pages": [ { "type": "intro", "nodes": [ { "type": "actions", "meta": { "is_page_actions_override": false, "back_button_label": "Back", "action_button_alignment": "left" } } ] } ], "settings": { "email_notifications_enabled_owner": 0, "email_notifications_enabled_respondent": 0 }, "properties": { "show_branding": 0, "auto_jump_next_page": 0, "allow_back_navigation": 0, "meta_index": 0, "partial_response_capture_enabled": 0 }, "access": { "is_closed": 0, "duplicate_response_rule": { "type": "ip_address" } }, "styles": { "override_properties": { "form_width": "xs", "form_size": "xs", "form_spacing": "xs", "form_align_x": "left", "form_align_y": "top", "is_form_background_color": 0, "is_form_background_blur": 0, "border_radius": "none", "border_shadow": "none", "logo_align_x": "left", "is_logo_hidden": 0, "is_logo_full_width": 0, "page_actions_show_back_button": 0, "page_actions_show_button_arrows": 0, "page_actions_alignment": "left", "select_options_layout": "list" } }}Default Response
object
The stable code to branch on.
A human-readable explanation. Not part of the contract; never branch on it.
The ID of the failed request, also sent as the X-Request-Id response header.
Every value the request got wrong.
object
The path into the request, with property names and numeric array indexes.
What is wrong with the value at this path.
The stable code for the issue. Branch on it, and use it with params to write your own text.
Accepted values when a node type or enum value is rejected.
Example
{ "code": "INVALID_INPUT"}Default Response
object
The stable code to branch on.
A human-readable explanation. Not part of the contract; never branch on it.
The ID of the failed request, also sent as the X-Request-Id response header.
Example
{ "code": "INVALID_INPUT"}Default Response
object
The stable code to branch on.
A human-readable explanation. Not part of the contract; never branch on it.
The ID of the failed request, also sent as the X-Request-Id response header.
Example
{ "code": "INVALID_INPUT"}Default Response
object
Returned for a form that does not exist, is in Trash, or belongs to another organization. The three are not told apart.
A human-readable explanation. Not part of the contract; never branch on it.
The ID of the failed request, also sent as the X-Request-Id response header.
Example
{ "code": "NOT_FOUND"}A rejected call. The organization budget names the policy it rejected the call under; the request floor that bounds hammering sends the envelope alone.
object
The stable code to branch on.
A human-readable explanation. Not part of the contract; never branch on it.
The ID of the failed request, also sent as the X-Request-Id response header.
The policy that rejected the call.
The plan whose numbers were applied.
The policy limit in credits.
Credits already spent in the open window.
Credits still available under the policy.
What the rejected call would have cost.
How long the policy window lasts.
When the window that rejected the call ends.
Seconds to wait before retrying. Also sent as the Retry-After response header.
object
The stable code to branch on.
A human-readable explanation. Not part of the contract; never branch on it.
The ID of the failed request, also sent as the X-Request-Id response header.
Example
{ "code": "INVALID_INPUT", "policy": "minute", "plan": "free"}Default Response
object
The stable code to branch on.
A human-readable explanation. Not part of the contract; never branch on it.
The ID of the failed request, also sent as the X-Request-Id response header.
Example
{ "code": "INVALID_INPUT"}