Discard an open draft
discard_formDiscard the open draft of a form that belongs to the authenticated organization. Requires an org API key or OAuth sign-in with the forms:write scope. Same checks as POST /api/v1/forms/{id}/discard. An open draft is an unpublished version newer than the published snapshot. This deletes that draft and clears drafted public settings. The published form stays. Returns { ok: true }. A form with no open draft returns 404 { error: "not found", message: "No open draft to discard." }. That includes a form that was never published and a published form with nothing left to discard. If the form changed since this discard was read, it writes nothing and returns 409 'This form changed. Reload and try again.' This does not delete the form. A form that belongs to another organization is not found.
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": {
"formId": "<formId>"
},
"name": "discard_form"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| formId | Yes | Form id in the authenticated organization. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | The open draft was discarded. The published form stays. |