UpdateForm

Partial update for a form. Every field is optional, only supplied properties change. Supplying fields replaces the entire field array; pass null to description/slug to clear them. To edit one field without resending the whole array, use the /v1/forms/{id}/fields sub-resource instead.

  • description
    Type: string | null
    max length:  
    2000

    Optional longer description shown beneath the title on the public form page.

  • fields
    Type: array · Field[] …100

    Ordered list of a form’s fields (max 100). Field keys must be unique within the form. The order here is the order fields render on the public page.

    • A single form field. The type discriminator selects which extra constraint props are valid, e.g. options for select/multiselect/radio, min/max for number/date, minLength/maxLength for text/textarea.

      A single form field. The type discriminator selects which extra constraint props are valid, e.g. options for select/multiselect/radio, min/max for number/date, minLength/maxLength for text/textarea.

      • key
        Type: string
        min length:  
        1
        max length:  
        64
        Pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
        required

        Stable machine name for the field. Used verbatim as the property name in a submission body, so it must start with a letter and contain only letters, digits, and underscores. Unique within a form and safe to keep constant across edits.

      • label
        Type: string
        min length:  
        1
        max length:  
        200
        required

        Human-readable label rendered above the input on the public form page.

      • type
        enum
        const:  
        text
        required

        Single-line free text input.

        values
        • text
      • description
        Type: string
        max length:  
        1000

        Optional helper text shown beneath the input to guide the respondent.

      • maxLength
        Type: integer
        greater than:  
        0

        Maximum number of characters allowed.

      • minLength
        Type: integer
        min:  
        0

        Minimum number of characters allowed.

      • pattern
        Type: string
        max length:  
        500

        Optional JavaScript-flavoured regular expression the value must match in full.

      • placeholder
        Type: string
        max length:  
        200

        Optional placeholder text shown inside an empty input.

      • required
        Type: boolean

        Whether a value must be supplied. Required fields are re-validated server-side on every submission regardless of client-side checks.

  • slug
    Type: string | null
    min length:  
    2
    max length:  
    64
    Pattern: ^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$

    Optional human-friendly URL segment for the public form (/f/{slug}). Lowercase alphanumeric with dashes; must be unique per owner. The form’s id always works as a URL even without a slug.

  • status
    Type: string enum

    Lifecycle state. draft forms are private (not publicly viewable or submittable); published forms accept public submissions; closed forms are viewable but reject new submissions.

    values
    • draft
    • published
    • closed
  • title
    Type: string
    min length:  
    1
    max length:  
    200

    Form title, shown as the heading on the public form page.