Publishing a Form
Publishing makes a form live — available via the API to callers, embedded forms, and workflow nodes. The publishing workflow has three stages: Draft, In Review, and Published. Each transition has guards and audit trail entries.
The Publishing Lifecycle
Draft
Default state for all new forms. The form is editable in the designer. Not visible via the API. Only accessible in Form Studio by form authors.
In Review
Click Submit for Review. The form is locked — no further design edits until reviewed. A reviewer receives notification. The reviewer can approve (move to Published) or reject (return to Draft with comments).
Published
The form is live. Callers can fetch it via getFormByName() or getFormById(). Workflow nodes referencing this form will use the published schema.
Version History
Every publish creates a new version entry in the form's history. You can view all previous versions in the History tab of the designer. Each version entry shows:
- Version number (1, 2, 3...)
- Published date and time
- Published by (user name)
- Change summary (optional note entered at publish time)
- Schema snapshot (click to view the schema at that version)
Updating a Published Form
You cannot directly edit a published form. To make changes:
- Click Create New Version on the published form
- This creates a Draft copy of the current schema
- Make your edits in the designer
- Submit for Review and Publish as normal
- The new published version replaces the old one
- The old version remains in history (accessible for rollback)
Rollback
If a newly published form has an issue, you can rollback to a previous version:
- Open the form's History tab
- Click Restore on any previous version
- This creates a new Draft from the historical schema
- Review and publish as a new version
Archive vs Delete
Forms are never permanently deleted via the Studio UI. Archiving is the end-of-life action:
| Action | Effect | Reversible |
|---|---|---|
| Archive | Soft-delete — hidden from API, marked inactive in DB | Yes (un-archive in admin) |
| Hard Delete | Physical DB row removal — API only, not in Studio UI | No |
Publish API Call
Publishing is a status update on the form record:
// Update form status to published
await apiClient.updateForm(formId, {
...currentDefinition,
metadata: {
...currentDefinition.metadata,
status: 'published',
publishedAt: new Date().toISOString(),
publishedBy: currentUser.id
}
});