PUT
/
open
/
forms
/
{id}
curl --request PUT \
  --url https://api.opnform.com/open/forms/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "workspace_id": 123,
  "title": "<string>",
  "visibility": "public",
  "tags": [
    "<string>"
  ],
  "language": "<string>",
  "custom_domain": "<string>",
  "theme": "default",
  "font_family": "<string>",
  "color": "<string>",
  "dark_mode": "light",
  "width": "centered",
  "size": "sm",
  "border_radius": "none",
  "layout_rtl": true,
  "uppercase_labels": true,
  "cover_picture": "<string>",
  "logo_picture": "<string>",
  "no_branding": true,
  "transparent_background": true,
  "submit_button_text": "<string>",
  "submitted_text": "<string>",
  "redirect_url": "<string>",
  "re_fillable": true,
  "re_fill_button_text": "<string>",
  "confetti_on_submission": true,
  "show_progress_bar": true,
  "closes_at": "2023-11-07T05:31:56Z",
  "closed_text": "<string>",
  "max_submissions_count": 2,
  "max_submissions_reached_text": "<string>",
  "auto_save": true,
  "auto_focus": true,
  "enable_partial_submissions": true,
  "editable_submissions": true,
  "editable_submissions_button_text": "<string>",
  "password": "<string>",
  "use_captcha": true,
  "captcha_provider": "recaptcha",
  "can_be_indexed": true,
  "seo_meta": {},
  "custom_code": "<string>",
  "database_fields_update": [
    "<any>"
  ],
  "properties": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "type": "<string>",
      "name": "<string>",
      "help": "<string>",
      "hidden": true,
      "required": true,
      "placeholder": "<string>",
      "width": "full"
    }
  ]
}'
{
  "id": 123,
  "slug": "<string>",
  "title": "<string>",
  "visibility": "public",
  "tags": [
    "<string>"
  ],
  "language": "<string>",
  "custom_domain": "<string>",
  "theme": "default",
  "font_family": "<string>",
  "color": "<string>",
  "dark_mode": "light",
  "width": "centered",
  "size": "sm",
  "border_radius": "none",
  "layout_rtl": true,
  "uppercase_labels": true,
  "cover_picture": "<string>",
  "logo_picture": "<string>",
  "no_branding": true,
  "transparent_background": true,
  "submit_button_text": "<string>",
  "submitted_text": "<string>",
  "redirect_url": "<string>",
  "re_fillable": true,
  "re_fill_button_text": "<string>",
  "confetti_on_submission": true,
  "show_progress_bar": true,
  "closes_at": "2023-11-07T05:31:56Z",
  "closed_text": "<string>",
  "max_submissions_count": 2,
  "max_submissions_reached_text": "<string>",
  "auto_save": true,
  "auto_focus": true,
  "enable_partial_submissions": true,
  "editable_submissions": true,
  "editable_submissions_button_text": "<string>",
  "password": "<string>",
  "use_captcha": true,
  "captcha_provider": "recaptcha",
  "can_be_indexed": true,
  "seo_meta": {},
  "custom_code": "<string>",
  "database_fields_update": [
    "<any>"
  ],
  "properties": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "type": "<string>",
      "name": "<string>",
      "help": "<string>",
      "hidden": true,
      "required": true,
      "placeholder": "<string>",
      "width": "full"
    }
  ]
}

Update Form

Update an existing form. You can modify any attribute that can be set when creating a form.

Authentication & Scope

Requires a token with the forms-write ability.

Request

PUT /open/forms/{id} HTTP/1.1
Host: api.opnform.com
Content-Type: application/json
Authorization: Bearer <token>

Path Parameters

ParameterTypeDescription
idnumberNumeric ID of the form to edit

Body Parameters (partial)

All fields from the Create Form endpoint may be supplied. Only the fields you include will be updated; omitting a field leaves its current value unchanged.

Important:

  • Passing a new slug will regenerate the form URL (self-hosted only).
  • The workspace_id can not be changed via this endpoint—use /open/forms/{id}/workspace/{workspace_id} instead.

Example:

{
  "title": "Customer Feedback (v2)",
  "visibility": "draft",
  "properties": [
    {
      "id": "field-1",
      "type": "short_text",
      "name": "First name",
      "required": true
    }
  ]
}

Response

200 OK – Returns the updated Form object.

403 Forbidden – The token lacks forms-write or you don’t have permission.

Authorizations

Authorization
string
header
required

Personal Access Token

Path Parameters

id
number
required

Body

application/json

Response

200
application/json

Updated

The response is of type object.