const url = 'https://platform.fomr.io/v1/forms/example/workflows/example/disable';const options = {method: 'POST', 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 POST \ --url https://platform.fomr.io/v1/forms/example/workflows/example/disable \ --header 'Authorization: Bearer <token>'Turns the workflow off, as pausing it in the app does: later completed responses no longer run it. Its graph can then be replaced. A workflow that is already disabled answers 200 and writes nothing. Needs forms:write and workflows:write. Costs 1 API credit.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The public ID of the form the workflow belongs to.
The public ID of the workflow, as listFormWorkflows returns it.
Responses
Section titled “Responses”The Workflow Document: a workflow of a form with its whole graph. Read it, change it, and send it back to replace it.
The Workflow Document: a workflow of a form with its whole graph. Read it, change it, and send it back to replace it.
object
The public ID of the workflow. Use it in the other workflow calls.
Workflow name shown in the Workflows tab of the form.
Whether the workflow runs when a respondent completes the form. Change it with enable and disable.
Unchecked until the workflow is first enabled, valid once it passed the enable checks, invalid when the last check failed.
When the workflow was created.
When the workflow last changed.
The nodes of the workflow graph, oldest first. Issue paths index into this array.
Node type form_completed: New response. Runs when a respondent completes this form. Kind: trigger.
object
The public ID of the node. Edges name their endpoints with it.
Discriminates the node type. A node keeps its type: to change it, replace the node with a new one.
Canvas position of the node in the app workflow builder. It has no effect on how the workflow runs.
object
Horizontal canvas coordinate of the node in the app workflow builder.
Vertical canvas coordinate of the node in the app workflow builder.
Node type google_sheets_add_row: Sync to Google Sheets. Append a completed response to a spreadsheet. Kind: action.
object
The public ID of the node. Edges name their endpoints with it.
Discriminates the node type. A node keeps its type: to change it, replace the node with a new one.
Canvas position of the node in the app workflow builder. It has no effect on how the workflow runs.
object
Horizontal canvas coordinate of the node in the app workflow builder.
Vertical canvas coordinate of the node in the app workflow builder.
The Google Sheets destination of the step. Once set, fomr creates the spreadsheet, and the destination cannot change afterwards: replace the node with a new one to use another spreadsheet.
object
The public ID of a connected Google Sheets connection of the organization, as listIntegrationConnections returns it.
Name of the spreadsheet fomr creates in that Google account to receive the completed responses, trimmed.
The spreadsheet fomr created for the step. Read-only.
The edges of the workflow graph, oldest first. Issue paths index into this array.
A connection that runs the target node after the source node.
object
The public ID of the edge.
The public ID of the node the edge starts from.
The public ID of the node the edge leads to.
Example
{ "validation_status": "unchecked", "validation_error_code": "WORKFLOW_VALIDATION_TOO_MANY_WORKFLOWS", "nodes": [ { "node_type_key": "form_completed" } ]}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 or workflow that does not exist, is in Trash or deleted, belongs to another organization, or for a Private Template, which has no workflows. These cases 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"}Default Response
object
The requested operation has no available capacity. Retry after the Retry-After header says.
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.
Seconds to wait before retrying. Also sent as the Retry-After response header.
Example
{ "code": "SERVICE_UNAVAILABLE"}