---
title: "Update a form"
method: PATCH
path: "/api/v2/forms/{form_id}"
tags: ["Forms"]
---

# Update a form

`PATCH /api/v2/forms/{form_id}`

Update a form's properties such as its name, description, or datastore configuration.

## Path parameters

- `form_id` string, uuid, required

## Request body

- UpdateFormRequest — A request to update a form.
  - `data` UpdateFormData, required — The data for updating a form.
    - `attributes` UpdateFormDataAttributes, required — The attributes for updating a form.
      - `form_update` FormUpdateAttributes, required — The fields to update on a form. At least one field must be provided.
        - `datastore_config` FormDatastoreConfigAttributes — The datastore configuration for a form.
          - `datastore_id` string, uuid, required — The ID of the datastore.
          - `primary_column_name` string, required — The name of the primary column in the datastore.
          - `primary_key_generation_strategy` string, required — The strategy used to generate primary keys in the datastore.
        - `description` string — The updated description of the form.
        - `name` string — The updated name of the form.
    - `id` string, uuid — The ID of the form.
    - `type` 'forms', required — The resource type for a form.

## Response `200`

OK

- FormResponse — A response containing a single form.
  - `data` FormData, required — A form resource object.
    - `attributes` FormDataAttributes, required — The attributes of a form.
      - `active` boolean, required — Whether the form is currently active.
      - `anonymous` boolean, required — Whether the form accepts anonymous submissions.
      - `created_at` string, date-time, required — The time at which the form was created.
      - `datastore_config` FormDatastoreConfigAttributes, required — The datastore configuration for a form.
        - `datastore_id` string, uuid, required — The ID of the datastore.
        - `primary_column_name` string, required — The name of the primary column in the datastore.
        - `primary_key_generation_strategy` string, required — The strategy used to generate primary keys in the datastore.
      - `description` string, required — The description of the form.
      - `end_date` string, date-time, nullable — The date and time at which the form stops accepting responses.
      - `has_submitted` boolean, nullable — Whether the current user has already submitted this form. Only present for forms with `single_response` set to `true`.
      - `idp_survey` boolean, required — Whether the form is an IDP survey.
      - `modified_at` string, date-time, required — The time at which the form was last modified.
      - `name` string, required — The name of the form.
      - `org_id` integer, required — The ID of the organization that owns this form.
      - `publication` FormPublicationAttributes — The attributes of a form publication.
        - `created_at` string, date-time, required — The time at which the publication was created.
        - `form_id` string, uuid, required — The ID of the form.
        - `form_version` integer, required — The version number that was published.
        - `id` string — The ID of the form publication.
        - `modified_at` string, date-time, required — The time at which the publication was last modified.
        - `org_id` integer, required — The ID of the organization that owns this publication.
        - `publish_seq` integer, required — The sequential publication number for this form.
        - `user_id` integer, required — The ID of the user who created this publication.
        - `user_uuid` string, uuid, required — The UUID of the user who created this publication.
      - `self_service` boolean, required — Whether the form is available in the self-service catalog.
      - `single_response` boolean, required — Whether each user can only submit one response.
      - `user_id` integer, required — The ID of the user who created this form.
      - `user_uuid` string, uuid, required — The UUID of the user who created this form.
      - `version` FormVersionAttributes — The attributes of a form version.
        - `created_at` string, date-time, required — The time at which the version was created.
        - `data_definition` FormDataDefinition, required — A JSON Schema definition that describes the form's data fields.
          - `description` string — A description shown to form respondents.
          - `properties` object — A map of field names to their JSON Schema definitions.
          - `required` string[] — List of field names that must be answered.
          - `title` string — The title of the form schema.
          - `type` 'object' — The root schema type.
        - `definition_signature` string, required — The signature of the version definition.
        - `etag` string, nullable, required — The ETag for optimistic concurrency control.
        - `id` string — The ID of the form version.
        - `modified_at` string, date-time, required — The time at which the version was last modified.
        - `state` 'draft' | 'frozen', required — The state of a form version.
        - `ui_definition` FormUiDefinition, required — UI configuration for rendering form fields, including widget overrides, field ordering, and themes.
          - `ui:order` string[] — The order in which form fields are displayed.
          - `ui:theme` FormUiDefinitionUiTheme — The visual theme applied to the form.
            - `primaryColor` 'gray' | 'red' | 'orange' | 'yellow' | 'green' | 'light-blue' | 'dark-blue' | 'magenta' | 'indigo' — The primary color of the form theme.
        - `user_id` integer, required — The ID of the user who created this version.
        - `user_uuid` string, uuid, required — The UUID of the user who created this version.
        - `version` integer, required — The sequential version number.
    - `id` string, uuid, required — The ID of the form.
    - `type` 'forms', required — The resource type for a form.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `429` — Too many requests

---

[API](https://skmtc.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/revisions/da68bf029e4c/schema)
