FormsEdit a form

Edit a form

Needs: Forms, Read-write

Edits a form with ordered operations. They are all saved together or not at all, and the form builder's rules are checked. The edit is refused if it would break a rule or a mapping. A published form changes immediately for submitters.

Operations

  • set_details: name, description, tags (names, or {name, color} only if a colour is wanted).
  • add_step, update_step, remove_step, move_step, duplicate_step: steps, by step_id, position or after_step_id.
  • add_field, update_field, remove_field, move_field, duplicate_field: fields, by field_id, step_id, position or after_field_id.
  • set_visibility: field_id and visible_if (effect, combinator, conditions), or null to remove.
  • set_routing: step_id and rules (name, go_to a step id or submit, combinator, conditions, enabled), or null.
  • update_settings: step numbers, step navigation, button text, success message, submitter id collection, redirect URL, response assignment, embed options, locking, cover style and icon, and branding.
  • set_incident, set_prospect, set_client_prefill: map form fields to incident or prospect fields, or pre-fill client fields. Custom attribute keys come from the field types endpoint.

Removing a field or step also removes the rules and mappings that used it. Locked fields must be unlocked first.

curl -X PATCH "https://app.imploy.com.au/api/integrations/v1/forms/123" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "operations": [
    {
      "op": "add_field",
      "step_id": "step_1",
      "field": {
        "type": "textarea",
        "label": "Anything else?"
      }
    },
    {
      "op": "update_settings",
      "submit_button_text": "Send feedback"
    }
  ]
}'
{
  "updated": 14,
  "id": 14,
  "name": "Visit feedback",
  "description": "Collect feedback after a visit.",
  "published": "off",
  "url": null,
  "settings": {
    "allow_step_navigation": false,
    "show_step_numbers": true,
    "submit_button_text": "Submit"
  }
}
PATCH
/forms/{id}
PATCH
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

An organisation access token that starts with imp_at_. Send it as Authorization: Bearer imp_at_XXXX.

An organisation access token that starts with imp_at_. Send it as Authorization: Bearer imp_at_XXXX.
Content-Typestring
Required

The media type of the request body

Options: application/json
operationsarray
Required

Ordered changes, each an object with an op. See the list below.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. An organisation access token that starts with imp_at_. Send it as Authorization: Bearer imp_at_XXXX.

Path Parameters

idinteger
Required

The form id.

Body

application/json
operationsarray
Required

Ordered changes, each an object with an op. See the list below.

Responses

OK