Revert to the previous version
revert_formRoll back a publish: put the previously published version of a form back live, changing what respondents see now; the version it replaces becomes the previous one, so calling it twice undoes the revert. It is not the way to undo edits that were saved but not published (the user says "undo my changes" while has_unpublished_draft is true): it leaves that draft as it is and takes the current live version down, while discard_draft drops the draft. A pending draft and the destinations are left as they are. Works only when get_form shows previous_published_at; otherwise it answers NOTHING_TO_REVERT. It changes the live form, so it is best confirmed with the user first.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"form_id": "<form_id>"
},
"name": "revert_form"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| form_id | Yes | The form id, from list_forms or get_form. | |
| workspace_id | No | The workspace this call acts in: an id from list_my_workspaces. Required for a person signed in with several workspaces and for staff of this deployment; optional with an API key or with only one workspace. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| form | Yes | ||
| workspace | Yes | The workspace this call acted in, to compare with the one the user means. | |
| last_published_at | Yes | When publish_form last made a draft live. Null when publish_form never ran: the form serves what it was created with, which is an empty form when is_live is false. | |
| previous_published_at | Yes | When the version revert_form would bring back went live. Null when there is nothing to revert to. |