Publish a form
publish_formPublish a draft form that belongs to the authenticated organization. Requires an org API key or OAuth sign-in with the forms:write scope. Runs the same checks as POST /api/v1/forms/{id}/publish, including field identity and stage validation. A form with no fields is rejected (400 'A form must have at least one field to publish.'). Publish returns 409 'Publish would remove a field that already has answers or consents.' when the draft would drop a field key that already has answers or consents on any version of the form. Returns formId, status published, publicUrl (the public form URL, the same value as publicFormUrl), the embed URL, and the embed snippet. Does not publish a form that belongs to another organization.
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": "publish_form"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| formId | Yes | Form id of a draft in the authenticated organization. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| formId | Yes | Published form id. | |
| status | Yes | ||
| version | Yes | ||
| embedUrl | No | Iframe URL, /{org}/{form}?embed=1. Omitted when the form has never been published or is soft-deleted. | |
| publicUrl | No | Same URL as publicFormUrl. Omitted when the form has never been published or is soft-deleted. | |
| versionId | Yes | ||
| embedSnippet | No | Script tag that embeds the form. Omitted when the form has never been published or is soft-deleted. | |
| publicFormUrl | No | Canonical public form URL. Omitted when the form has never been published or is soft-deleted. |