Discard unpublished edits
discard_draftThrow away the unpublished draft (everything saved with update_form since the last publish), so the form goes back to what is live now. This is how to undo or drop changes that were not published. What respondents see does not change. The draft cannot be recovered, so it is best confirmed with the user first. With no draft pending it changes nothing. revert_form rolls back something already published.
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": "discard_draft"
}
}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. | |
| expected_updated_at | No | Recommended: the updated_at you last read, so you only throw away the draft you saw. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| form | Yes | ||
| discarded | Yes | True when a draft was thrown away; false when there was none. | |
| 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. |