> ## Documentation Index
> Fetch the complete documentation index at: https://docs.formbox.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a form

> Update a form for the authenticated organization.



## OpenAPI

````yaml patch /forms/{formId}
openapi: 3.1.0
info:
  title: Formbox API
  description: Formbox is an all in one forms solution for your business.
  version: 0.0.1
  contact:
    name: Formbox Support
    email: support@formbox.app
    url: https://docs.formbox.app/api-reference
servers:
  - url: https://app.formbox.app/api/v1
    description: Production API
security: []
paths:
  /forms/{formId}:
    patch:
      tags:
        - Forms
      summary: Update a form
      description: Update a form for the authenticated organization.
      operationId: updateForm
      parameters:
        - in: path
          name: formId
          required: true
          description: The unique ID of the form.
          example: clux0rgak00011...
          schema:
            $ref: '#/components/schemas/FormIdParam'
        - in: header
          name: api-key
          description: The API key.
          schema:
            $ref: '#/components/schemas/ApiKeyHeaderValue'
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateFormBody'
      responses:
        '200':
          description: The updated form.
          headers:
            Retry-After:
              description: Seconds until the current rate limit window resets.
              example: '60'
              schema:
                $ref: '#/components/schemas/RetryAfterHeader'
              required: true
            X-RateLimit-Limit:
              description: The number of requests allowed in the current rate limit window.
              example: '100'
              schema:
                $ref: '#/components/schemas/RateLimitLimitHeader'
              required: true
            X-RateLimit-Remaining:
              description: >-
                The number of requests remaining in the current rate limit
                window.
              example: '99'
              schema:
                $ref: '#/components/schemas/RateLimitRemainingHeader'
              required: true
            X-RateLimit-Reset:
              description: The Unix timestamp when the current rate limit window resets.
              example: '1711910400'
              schema:
                $ref: '#/components/schemas/RateLimitResetHeader'
              required: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FormResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          description: >-
            Your API key requires `full` access scope. Some settings —
            respondent email notifications, custom redirects, and auto-close —
            require a paid plan.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - forbidden
                        description: A short code indicating the error code returned.
                        example: forbidden
                      message:
                        type: string
                        description: A human readable explanation of what went wrong.
                        example: >-
                          Your API key requires full access scope. Some settings
                          such as respondent email notifications, custom
                          redirects, and auto-close require a paid plan.
                    required:
                      - code
                      - message
                required:
                  - error
        '404':
          description: >-
            No form with this ID exists in your organization. Verify the
            `formId` is correct and belongs to the organization associated with
            your API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - not_found
                        description: A short code indicating the error code returned.
                        example: not_found
                      message:
                        type: string
                        description: A human readable explanation of what went wrong.
                        example: >-
                          No form with this ID exists in your organization.
                          Check that the formId is correct and belongs to the
                          organization associated with your API key.
                    required:
                      - code
                      - message
                required:
                  - error
        '422':
          description: >-
            Request body validation failed. `type` must be `endpoint` or
            `hosted`; `submissionStorageDuration` must be one of `30`, `60`,
            `90`, `365`, `forever`, or `never`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - unprocessable_entity
                        description: A short code indicating the error code returned.
                        example: unprocessable_entity
                      message:
                        type: string
                        description: A human readable explanation of what went wrong.
                        example: >-
                          submissionStorageDuration: Invalid enum value —
                          expected '30' | '60' | '90' | '365' | 'forever' |
                          'never'.
                    required:
                      - code
                      - message
                required:
                  - error
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
      security:
        - token: []
components:
  schemas:
    FormIdParam:
      type: string
    ApiKeyHeaderValue:
      type: string
      description: The API key.
      title: api-key
    UpdateFormBody:
      type: object
      properties:
        name:
          type: string
        type:
          type: string
          enum:
            - endpoint
            - hosted
        removeFormboxBranding:
          type: boolean
        sendEmailNotifications:
          type: boolean
        emailsToNotify:
          type: array
          items:
            type: string
        submissionStorageDuration:
          type: string
          enum:
            - '30'
            - '60'
            - '90'
            - '365'
            - forever
            - never
        sendRespondentEmailNotifications:
          type: boolean
        respondentEmailFromName:
          type: string
        respondentEmailSubject:
          type: string
        respondentEmailMessageHTML:
          type: string
        limitResponses:
          type: boolean
        isClosed:
          type: boolean
        autoCloseEnabled:
          type: boolean
        autoCloseDate:
          type:
            - string
            - 'null'
        autoCloseTimezone:
          type:
            - string
            - 'null'
        autoCloseTime:
          type:
            - string
            - 'null'
        maxResponses:
          type: number
        useCustomThankYouPage:
          type: boolean
        tpButtonText:
          type: string
        tpButtonColor:
          type: string
        tpButtonBackgroundColor:
          type: string
        tpBackgroundColor:
          type: string
        tpTextColor:
          type: string
        tpHeader:
          type: string
        tpMessage:
          type: string
        tpButtonUrl:
          type: string
        useCustomRedirect:
          type: boolean
        customSuccessUrl:
          type: string
        customHoneypot:
          type: string
        googleRecaptchaEnabled:
          type: boolean
        googleRecaptchaSecretKey:
          type: string
        seoTitle:
          type: string
          maxLength: 60
        seoDescription:
          type: string
          maxLength: 160
        seoImage:
          anyOf:
            - type: string
              minLength: 0
              maxLength: 0
            - type: string
              format: uri
        allowedDomains:
          type: string
        allowedCountries:
          type: string
    RetryAfterHeader:
      type: string
    RateLimitLimitHeader:
      type: string
    RateLimitRemainingHeader:
      type: string
    RateLimitResetHeader:
      type: string
    FormResponse:
      type: object
      properties:
        id:
          type: string
          description: The unique ID of the form.
        name:
          type: string
          description: The name of the form.
        organizationId:
          type: string
          description: The ID of the organization.
        removeFormboxBranding:
          type: boolean
          description: Whether to remove Formbox branding from the form.
        sendEmailNotifications:
          type: boolean
          description: Whether to send email notifications for new submissions.
        emailsToNotify:
          type: array
          items:
            type: string
          description: Email addresses to send notifications to.
        submissionStorageDuration:
          type: string
          description: The duration of the submission storage.
        sendRespondentEmailNotifications:
          type: boolean
          description: Whether to send respondent email notifications.
        respondentEmailFromName:
          type: string
          description: From name for respondent email notifications.
        respondentEmailSubject:
          type: string
          description: Subject for respondent email notifications.
        respondentEmailMessageHTML:
          type: string
          description: Message for respondent email notifications.
        submitButtonText:
          type: string
          description: Text for the submit button.
        limitResponses:
          type: boolean
          description: Whether to limit the number of responses for the form.
        isClosed:
          type: boolean
          description: Is the form closed?
        autoCloseEnabled:
          type: boolean
          description: Whether to auto close the form on a specific date.
        autoCloseDate:
          type:
            - string
            - 'null'
          description: The date to auto close the form.
        autoCloseTime:
          type:
            - string
            - 'null'
          description: The time to auto close the form.
        autoCloseTimezone:
          type:
            - string
            - 'null'
          description: The timezone for the auto close date and time.
        maxResponses:
          type:
            - number
            - 'null'
          description: Maximum number of responses for the form.
        useCustomRedirect:
          type: boolean
          description: Whether to use a custom redirect URL.
        customSuccessUrl:
          type: string
          description: Custom redirect URL for successful submissions.
        webhookEnabled:
          type: boolean
          description: Whether to enable webhooks.
          deprecated: true
        webhookUrl:
          type: string
          description: Webhook URL.
          deprecated: true
        customHoneypot:
          type: string
          description: Custom honeypot field name.
        googleRecaptchaEnabled:
          type: boolean
          description: Whether to enable Google reCAPTCHA.
        allowedDomains:
          type: string
          description: Allowed domains for the form.
        allowedCountries:
          type: string
          description: Allowed countries for the form.
        createdAt:
          type: string
          description: The date the form was created.
        updatedAt:
          type: string
          description: The date the form was last updated.
        type:
          type: string
          enum:
            - endpoint
            - hosted
          description: The type of the form. Can be `endpoint` or `hosted`.
        fields:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              label:
                type: string
              description:
                type: string
              type:
                type: string
              subtype:
                type: string
              required:
                type: boolean
              ratingCount:
                type: number
              scaleMin:
                type: number
              scaleMax:
                type: number
              minLabel:
                type: string
              maxLabel:
                type: string
              options:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    value:
                      type: string
                  required:
                    - id
                    - value
              showDescription:
                type: boolean
              logic:
                type: object
                properties:
                  rules:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        action:
                          type: string
                          enum:
                            - show_field
                            - hide_field
                            - require_answer
                            - jump_to_page
                            - hide_button
                        when:
                          type: object
                          properties:
                            combinator:
                              type: string
                              enum:
                                - all
                                - any
                            conditions:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                  sourceFieldId:
                                    type: string
                                  operator:
                                    type: string
                                    enum:
                                      - is_empty
                                      - is_not_empty
                                      - equals
                                      - not_equals
                                      - contains
                                      - not_contains
                                      - gt
                                      - gte
                                      - lt
                                      - lte
                                      - includes_any
                                      - includes_all
                                      - excludes_all
                                      - before
                                      - after
                                  value:
                                    anyOf:
                                      - type: string
                                      - type: number
                                      - type: boolean
                                      - type: array
                                        items:
                                          type: string
                                required:
                                  - id
                                  - sourceFieldId
                                  - operator
                          required:
                            - combinator
                            - conditions
                        targetFieldId:
                          type: string
                        targetFieldIds:
                          type: array
                          items:
                            type: string
                        targetPageId:
                          anyOf:
                            - type: string
                            - type: string
                              const: end
                      required:
                        - id
                        - action
                        - when
            required:
              - id
              - label
              - type
              - subtype
              - required
              - showDescription
          description: The form fields for hosted forms.
        accentColor:
          type: string
          description: The form accent color.
        backgroundColor:
          type: string
          description: The form background color.
        buttonBackgroundColor:
          type: string
          description: The form button background color.
        buttonBorderStyle:
          type: string
          enum:
            - full
            - flat
            - rounded
          description: The form button border style.
        buttonTextColor:
          type: string
          description: The form button text color.
        closeMessageDescription:
          type: string
          description: Description for the closed message.
        closeMessageTitle:
          type: string
          description: Title for the closed message.
        headerDescription:
          type: string
          description: Description for the header.
        headerImage:
          type: string
          description: The form header image.
        headerTitle:
          type: string
          description: Title for the header.
        seoDescription:
          type: string
          description: Description used for social sharing and link previews.
        seoImage:
          type: string
          description: Absolute HTTPS image URL used for social sharing previews.
        seoTitle:
          type: string
          description: Title used for social sharing and link previews.
        inputBorderStyle:
          type: string
          enum:
            - full
            - flat
            - rounded
          description: The form input border style.
        logo:
          type: string
          description: The form logo.
        pageMode:
          type: string
          enum:
            - compact
            - full
          description: The form page mode.
        saveAnswers:
          type: boolean
          description: Whether answers are saved.
        showCustomClosedMessage:
          type: boolean
          description: Whether to show a custom closed message.
        textColor:
          type: string
          description: The form text color.
        tpBackgroundColor:
          type: string
          description: Background color for the thank you page.
        tpButtonColor:
          type: string
          description: Text color for the thank you page button.
        tpButtonText:
          type: string
          description: Text for the thank you page button.
        tpButtonUrl:
          type: string
          description: URL for the thank you page button.
        tpHeader:
          type: string
          description: Header text for the thank you page.
        tpMessage:
          type: string
          description: Message text for the thank you page.
        tpTextColor:
          type: string
          description: Text color for the thank you page.
        useCustomThankYouPage:
          type: boolean
          description: Whether to use a custom thank you page.
        tpButtonBackgroundColor:
          type: string
          description: Background color for the thank you page button.
        ipBlacklist:
          type: string
          description: IP blacklist for the form.
        imageCompressionType:
          type: array
          items:
            type: string
            enum:
              - webp
              - jpeg
              - png
          description: The image types used for this form.
        disableEmailDataCensoring:
          type: boolean
          description: >-
            Whether to disable email data censoring for submission
            notifications.
      required:
        - id
        - name
        - organizationId
        - removeFormboxBranding
        - sendEmailNotifications
        - emailsToNotify
        - submissionStorageDuration
        - sendRespondentEmailNotifications
        - respondentEmailFromName
        - respondentEmailSubject
        - respondentEmailMessageHTML
        - submitButtonText
        - limitResponses
        - isClosed
        - autoCloseEnabled
        - autoCloseDate
        - autoCloseTime
        - autoCloseTimezone
        - maxResponses
        - useCustomRedirect
        - customSuccessUrl
        - webhookEnabled
        - webhookUrl
        - customHoneypot
        - googleRecaptchaEnabled
        - allowedDomains
        - allowedCountries
        - createdAt
        - updatedAt
        - type
        - fields
        - accentColor
        - backgroundColor
        - buttonBackgroundColor
        - buttonBorderStyle
        - buttonTextColor
        - closeMessageDescription
        - closeMessageTitle
        - headerDescription
        - headerImage
        - headerTitle
        - seoDescription
        - seoImage
        - seoTitle
        - inputBorderStyle
        - logo
        - pageMode
        - saveAnswers
        - showCustomClosedMessage
        - textColor
        - tpBackgroundColor
        - tpButtonColor
        - tpButtonText
        - tpButtonUrl
        - tpHeader
        - tpMessage
        - tpTextColor
        - useCustomThankYouPage
        - tpButtonBackgroundColor
        - ipBlacklist
        - imageCompressionType
        - disableEmailDataCensoring
      title: Form
  responses:
    '401':
      description: >-
        No valid API key was provided. Include your API key in the `api-key`
        request header. You can generate API keys in your Formbox organization
        settings.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - unauthorized
                    description: A short code indicating the error code returned.
                    example: unauthorized
                  message:
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: >-
                      No API key provided. Pass your API key in the api-key
                      header.
                required:
                  - code
                  - message
            required:
              - error
    '429':
      description: >-
        Too many requests. Check the X-RateLimit-* headers and retry after the
        reset time.
      headers:
        Retry-After:
          description: Seconds until the current rate limit window resets.
          example: '60'
          schema:
            $ref: '#/components/schemas/RetryAfterHeader'
          required: true
        X-RateLimit-Limit:
          description: The number of requests allowed in the current rate limit window.
          example: '100'
          schema:
            $ref: '#/components/schemas/RateLimitLimitHeader'
          required: true
        X-RateLimit-Remaining:
          description: The number of requests remaining in the current rate limit window.
          example: '99'
          schema:
            $ref: '#/components/schemas/RateLimitRemainingHeader'
          required: true
        X-RateLimit-Reset:
          description: The Unix timestamp when the current rate limit window resets.
          example: '1711910400'
          schema:
            $ref: '#/components/schemas/RateLimitResetHeader'
          required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - rate_limit_exceeded
                    description: A short code indicating the error code returned.
                    example: rate_limit_exceeded
                  message:
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: Too many requests. Please slow down and try again shortly.
                required:
                  - code
                  - message
            required:
              - error
    '500':
      description: An unexpected error occurred on the server.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - internal_server_error
                    description: A short code indicating the error code returned.
                    example: internal_server_error
                  message:
                    type: string
                    description: A human readable explanation of what went wrong.
                    example: >-
                      An internal server error occurred. Please contact support
                      if the problem persists.
                required:
                  - code
                  - message
            required:
              - error

````