POST
/forms/:id/unpublishUnpublish Form
Unpublish a published form to stop accepting responses
Scope: FORMS_WRITE
Overview
Unpublishes a currently published form by expiring it immediately. The form's share URL will stop accepting new submissions. Existing responses are preserved.
Request
POST
/forms/:id/unpublishPath Parameters
Headers
| Header | Value |
|---|---|
Authorization | Bearer fxk_live_<your-api-key> |
Request Body
No request body required.
Example Request
curl -X POST "https://api.formfex.com/api/v1/public/forms/FORM_ID/unpublish" \
-H "Authorization: Bearer $FORMFEX_API_KEY"Response
Error Cases
| Status | Condition |
|---|---|
403 | Form is not currently in PUBLISHED status |
403 | Form has already expired |
404 | Form not found or soft-deleted |
How It Works
Unpublishing sets the form's expiresAt to the current timestamp, which immediately prevents new submissions. The publishStatus remains PUBLISHED but the form is effectively expired.
Webhooks & Integrations
Unpublishing a form triggers the FORM_UNPUBLISHED webhook event and sends notifications to configured Slack or Teams integrations.
n8n
In n8n, this operation is available as Unpublish under the Form resource in the Formfex node.