---
title: "Publishing a Draft Form"
method: POST
path: "/v1/projects/{projectId}/forms/{xmlFormId}/draft/publish"
tags: ["Draft Form"]
---

# Publishing a Draft Form

`POST /v1/projects/{projectId}/forms/{xmlFormId}/draft/publish`

This will publish your current Draft Form and make it the active Form definition (and attachments).

If your Draft `version` conflicts with an older version of the Form, you will get an error.

If you wish for the `version` to be set on your behalf as part of the publish operation, you can provide the new version string as a querystring parameter `?version`.

Once the Draft is published, there will no longer be a Draft version of the form.

Starting with Version 2022.3, publishing a Draft Form that defines a Dataset schema will also publish the Dataset. It will generate `dataset.create` event in Audit logs and make the Dataset available in [Datasets APIs](/central-api-dataset-management). If the Dataset is already published and the Form adds new properties then `dataset.update` event will be generated.

## Path parameters

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

## Query parameters

- `version` string

## Response `200`

OK

- Success
  - `success` boolean, required

## Other responses

- `409` — Conflict

## Changes

- **2025-12-20** `022694254f0d` — 1 info
  - api operation id `Publishing a Draft Form` removed and replaced with `publishDraftForm`
- **2025-10-27** `b11b54eea487` — 1 info
  - removed the non-success response with the status `403`
- **2025-03-13** `e8c2858fd4eb` — 2 info
  - api operation id `publishDraftForm` removed and replaced with `Publishing a Draft 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/draft/publish/post.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/d4f5ba77f644/schema)
