---
title: "Create a new form definition"
method: POST
path: "/api/forms/{formId}/definitions"
tags: ["Forms"]
---

# Create a new form definition

`POST /api/forms/{formId}/definitions`

Creates a new form definition for a given form.

## Path parameters

- `formId` integer, required

## Request body

- CreateFormDefinitionRequest — Request model for creating a form definition.
  - `isDraft` boolean, required — Indicates if the form definition is a draft.
  - `jsonData` string, required — The JSON data of the form definition.

## Response `201`

Form definition created successfully.

- CreateFormDefinitionResponse — Response model for creating a form definition.
  - `id` string, nullable — The ID of the form definition.
  - `isDraft` boolean — Indicates if the form definition is a draft.
  - `jsonData` string, nullable — The JSON data of the form definition.
  - `formId` string, nullable — The ID of the associated form.
  - `createdAt` string, date-time — The date and time when the form definition was created.
  - `modifiedAt` string, date-time, nullable — The date and time when the form definition was last modified.

## Other responses

- `400` — Invalid input data.
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Form not found.

## Changes

- **2025-03-24** `fbc3fe6ecbf1` — 3 warning, 1 info
  - removed the optional property `allOf[#/components/schemas/FormDefinitionModel]/customQuestions` from the response with the `201` status
  - removed the optional property `allOf[#/components/schemas/FormDefinitionModel]/requiresReCaptcha` from the response with the `201` status
  - removed the optional property `allOf[#/components/schemas/FormDefinitionModel]/themeModel` from the response with the `201` status
  - added the media type `application/problem+json` for the response with the status `400`

[Change history](https://skmtc.dev/endatix/apis/endatix-platform-rest-api/changes/api/forms/:formId/definitions/post.md)

---

[API](https://skmtc.dev/endatix/apis/endatix-platform-rest-api.md) · [All operations](https://skmtc.dev/endatix/apis/endatix-platform-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/endatix/endatix-platform-rest-api/revisions/a0bda80cd84a/schema)
