---
title: "Modifying a Form"
method: PATCH
path: "/v1/projects/{projectId}/forms/{xmlFormId}"
tags: ["Individual Form"]
---

# Modifying a Form

`PATCH /v1/projects/{projectId}/forms/{xmlFormId}`

It is currently possible to modify only one thing about a `Form`: its `state`, which governs whether it is available for download onto survey clients and whether it accepts new `Submission`s. See the `state` Attribute in the Request documentation to the right to see the possible values and their meanings.

We use `PATCH` rather than `PUT` to represent the update operation, so that you only have to supply the properties you wish to change. Anything you do not supply will remain untouched.

## Path parameters

- `projectId` number, required
- `xmlFormId` string, required

## Response `200`

OK

- object
  - `projectId` number, required — The `id` of the project this form belongs to.
  - `xmlFormId` string, required — The `id` of this form as given in its XForms XML definition
  - `name` string — The friendly name of this form. It is given by the `<title>` in the XForms XML definition.
  - `version` string, required — The `version` of this form as given in its XForms XML definition. If no `version` was specified in the Form, a blank string will be given.
  - `enketoId` string — If it exists, this is the survey ID of this Form on Enketo at `/-`. This will be the ID of the published version if it exists, otherwise it will be the draft ID. Only a cookie-authenticated user may access the preview through Enketo.
  - `hash` string, required — An MD5 sum automatically computed based on the XForms XML definition. This is required for OpenRosa compliance.
  - `keyId` number — If a public encryption key is present on the form, its numeric ID as tracked by Central is given here.
  - `state` 'open' | 'closing' | 'closed', required — The present lifecycle status of this form. Controls whether it is available for download on survey clients or accepts new submissions.
  - `publishedAt` string — Indicates when a draft has most recently been published for this Form. If this value is `null`, this Form has never been published yet, and contains only a draft.
  - `createdAt` string, required — ISO date format
  - `updatedAt` string — ISO date format

## Other responses

- `400` — Bad Request

## Changes

- **2026-06-26** `dcd5409827e1` — 2 warning
  - removed the request property `webformsEnabled`
  - removed the optional property `webformsEnabled` from the response with the `200` status
- **2026-06-23** `28f47a477c02` — 2 info
  - added the new optional request property `webformsEnabled`
  - added the optional property `webformsEnabled` to the response with the `200` status
- **2025-12-20** `022694254f0d` — 1 info
  - api operation id `Modifying a Form` removed and replaced with `modifyForm`
- **2025-10-27** `b11b54eea487` — 1 info
  - removed the non-success response with the status `403`
- **2025-03-13** `e8c2858fd4eb` — 2 info
  - api operation id `modifyForm` removed and replaced with `Modifying a Form`
  - added the non-success response with the status `403`

[Change history](https://skmtc.dev/getodk/apis/odk-central-api/changes/v1/projects/:projectId/forms/:xmlFormId/patch.md)

---

[API](https://skmtc.dev/getodk/apis/odk-central-api.md) · [All operations](https://skmtc.dev/getodk/apis/odk-central-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/getodk/odk-central-api/revisions/2ff2c2a4dfc7/schema)
