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

# Create a Form

> Creates a new form in the authenticated workspace.

import { ParamField } from "/snippets/param-field.mdx";

### POST /v1/forms

Creates a new form with the specified configuration.

#### Body Parameters

<ParamField name="name" type="string" required>
  The internal name of the form.
</ParamField>

<ParamField name="slug" type="string">
  A unique slug for the form. If not provided, one will be generated.
</ParamField>

<ParamField name="title" type="string">
  The public title of the form.
</ParamField>

<ParamField name="description" type="string">
  A description of the form.
</ParamField>

<ParamField name="status" type="string">
  The status of the form. Can be `draft` or `published`. Defaults to `draft`.
</ParamField>

<ParamField name="fields" type="array" required>
  An array of field objects that define the structure of the form.
</ParamField>

<ParamField name="settings" type="object">
  An object containing settings for the form, such as success messages and redirect URLs.
</ParamField>

<ParamField name="notification_emails" type="array">
  A list of email addresses to notify upon new submissions.
</ParamField>

#### Example Request

```bash theme={null}
curl -X POST "https://api.example.com/v1/forms" \
     -H "Authorization: Bearer <YOUR_API_KEY>" \
     -H "Content-Type: application/json" \
     -d '{
       "name": "New Inquiry Form",
       "title": "Submit an Inquiry",
       "fields": [
         { "id": "name", "type": "text", "label": "Name", "required": true },
         { "id": "email", "type": "email", "label": "Email", "required": true }
       ]
     }'
```

#### Example Response

```json theme={null}
{
  "id": "form_456",
  "name": "New Inquiry Form",
  "slug": "new-inquiry-form",
  "title": "Submit an Inquiry",
  "description": null,
  "status": "draft",
  "fields": [
    { "id": "name", "type": "text", "label": "Name", "required": true },
    { "id": "email", "type": "email", "label": "Email", "required": true }
  ],
  "settings": null,
  "notification_emails": [],
  "created_by": "user_123",
  "created_at": "2023-01-02T00:00:00.000Z",
  "updated_at": "2023-01-02T00:00:00.000Z"
}
```
