POST/forms/:id/unpublish

Unpublish 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/unpublish

Path Parameters

Headers

HeaderValue
AuthorizationBearer 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

StatusCondition
403Form is not currently in PUBLISHED status
403Form has already expired
404Form 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.