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

# Update Form

> Update a form's draft. Omitted (or empty) name, description, and content are left unchanged. Set is_published to true to publish the resulting draft, or is_enabled to false to stop the form accepting new sessions without deleting it.



## OpenAPI

````yaml /sections/api-reference/openapi-spec-v2.yaml put /v2/forms/{id}
openapi: 3.1.0
info:
  title: Serval Public API
  description: Serval Public API
  contact:
    name: Serval
    url: https://serval.com
    email: support@serval.com
  license:
    name: Serval License
    url: https://serval.com/license
  version: 2.0.0
servers:
  - url: https://public.api.serval.com
security:
  - BearerAuth: []
tags:
  - name: Access Policy API
  - name: Access Policy Approval Procedure API
  - name: Access Profile API
  - name: Access Relationship API
  - name: Access Request API
  - name: Agent API
  - name: App Instance API
  - name: App Resource API
  - name: App Resource Role API
  - name: Approval Delegation API
  - name: Approval Request API
  - name: Audit Log API
  - name: Change Blackout API
  - name: Change Model API
  - name: Custom Field API
  - name: Custom Service API
  - name: Entity API
  - name: Entity Field Mapping API
  - name: Entity Ingestion Config API
  - name: Entity Scan Action API
  - name: Entity Type API
  - name: Folder API
  - name: Forms API
  - name: Group API
  - name: Guidance API
  - name: Help Agent API
  - name: Journey API
  - name: Knowledge API
  - name: Knowledge Base API
  - name: Report API
  - name: SLA API
  - name: Schedule API
  - name: Tag API
  - name: Team API
  - name: Team Group API
  - name: Team User API
  - name: Ticket API
  - name: Topic API
  - name: User API
  - name: User Relationship API
  - name: Workflow API
  - name: Workflow Approval Procedure API
  - name: Workflow Run API
paths:
  /v2/forms/{id}:
    put:
      tags:
        - Forms API
      summary: Update Form
      description: >-
        Update a form's draft. Omitted (or empty) name, description, and content
        are left unchanged. Set is_published to true to publish the resulting
        draft, or is_enabled to false to stop the form accepting new sessions
        without deleting it.
      operationId: svrelay.publicv2.PublicAPIServiceV2.UpdateForm
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            title: id
            description: The ID of the form.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  title: name
                  description: >-
                    Display name of the form. Omit or send empty to leave
                    unchanged.
                description:
                  type: string
                  title: description
                  description: What the form is for. Omit or send empty to leave unchanged.
                content:
                  type: string
                  title: content
                  description: >-
                    The form module source. Omit or send empty to leave
                    unchanged.
                isPublished:
                  type:
                    - boolean
                    - 'null'
                  title: is_published
                  description: >-
                    Whether the form is published. Set to true to publish the
                    current draft.
                isEnabled:
                  type:
                    - boolean
                    - 'null'
                  title: is_enabled
                  description: >-
                    Whether the form accepts new sessions. Set false to stop it
                    being
                     fillable without deleting it; its versions and published state are kept.
              title: UpdateFormRequest
              additionalProperties: false
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/svflow.publicapi.UpdateFormResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    svflow.publicapi.UpdateFormResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/svflow.pubapimodels.Form'
          title: data
          description: The updated form.
          x-stainless-terraform-configurability: optional
      title: UpdateFormResponse
      additionalProperties: false
    svflow.pubapimodels.Form:
      type: object
      properties:
        id:
          type: string
          title: id
          description: The ID of the form.
          readOnly: true
          x-stainless-terraform-configurability: computed
        teamId:
          type: string
          title: team_id
          description: The ID of the team that the form belongs to.
          x-stainless-terraform-configurability: optional
        name:
          type: string
          title: name
          description: The name of the form.
          x-stainless-terraform-configurability: optional
        description:
          type: string
          title: description
          description: A description of the form.
          x-stainless-terraform-configurability: optional
        content:
          type: string
          title: content
          description: |-
            The form module source: TSX importing "serval/forms", exporting
             `main = view({ fn })`. Compiled when the form is published.
          x-stainless-terraform-configurability: optional
        isPublished:
          type: boolean
          title: is_published
          description: Whether the form is published. Set to true to publish the form.
          x-stainless-terraform-configurability: computed_optional
        hasUnpublishedChanges:
          type: boolean
          title: has_unpublished_changes
          description: >-
            Whether there are unpublished changes to the form (computed by
            server).
          readOnly: true
          x-stainless-terraform-configurability: computed
        isEnabled:
          type: boolean
          title: is_enabled
          description: >-
            Whether the form accepts new sessions. A form that is not enabled
            keeps
             its versions and its published state; it just stops being fillable.
          x-stainless-terraform-configurability: computed_optional
        scopedId:
          type: string
          title: scoped_id
          description: |-
            The copy-invariant scoped ID of the form (e.g. "form_..."), stable
             across cross-team copies. Set it explicitly at create time to push a
             form between teams or environments under one identity; resolve it back
             to a form id with ResolveScopedRefs.
          readOnly: true
          x-stainless-terraform-configurability: computed
        folderId:
          type:
            - string
            - 'null'
          title: folder_id
          description: |-
            The ID of the folder the form lives in, if any. Unset means the form
             lives at the team root.
          readOnly: true
          x-stainless-terraform-configurability: computed
        workflowIds:
          type: array
          items:
            type: string
            readOnly: true
          title: workflow_ids
          description: >-
            The IDs of the workflows this form's content references — the
            workflow
             its submit handler runs, plus any it queries for data. Extracted from
             the module source on every save, so they describe the same version of
             the form the other fields do.
          readOnly: true
          x-stainless-terraform-configurability: computed
      title: Form
      additionalProperties: false
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````