# Create a form

Creates an empty form in the account you are calling as. The response is the
created form, carrying only the fields the create set - read it back with
`GET /form/{id}` for the full shape.
A form is created with no fields. Add them through the field resource beneath it
before publishing it, or send `_options[from_template]` to build it from one of
the account's form templates, which copies the template's name and type and
saves you sending either.
`form_type_id` cannot be changed afterwards, so it is worth getting right: it
decides what submitting the form does. Sub-account registration forms
additionally require `options[account_type_id]`.

Endpoint: POST /api/v2/form
Version: 2.0.0
Security: default

## Header parameters:

  - `Rosterfy-Platform` (string)

## Request fields (application/json):

  - `_options` (object)
    Create-time options that are not stored on the form.

  - `_options.from_template` (integer)
    The id of a form template to build this
form from. The template supplies the name and the form type, so neither has to
be sent; a `name` you do send is kept.

  - `name` (string, required)
    The name administrators see for this form in the admin console. Not shown to the people filling it in.

  - `form_type_id` (integer, required)
    What the form is for, and therefore what submitting it creates - a user registration, a standalone submission, an update to a user, and so on. Cannot be changed once the form exists. Read the available types from the form type resource.

  - `form_title` (string)
    The title shown at the top of the form to the people filling it in. May be sent as a plain string, or as an object keyed by locale code to give each language its own title.

  - `success_content` (string)
    HTML shown after the form is submitted successfully. Accepts a locale-keyed object in the same way as the title.

  - `close_content` (string)
    HTML shown in place of the form once it has closed. Accepts a locale-keyed object in the same way as the title.

  - `form_category_id` (integer)
    The category the form is filed under in the admin console.

  - `options` (object)
    Form-wide settings. The keys available depend on the form type; send the object back as you read it, changing only what you mean to change.

  - `rules` (object)
    Visibility rules deciding which fields are shown, keyed by field. Sending an invalid rule set is rejected rather than partially applied.

  - `public` (boolean)
    Whether the form may be opened without signing in. Only takes effect on anonymous forms; every other type still requires a signed-in caller.

  - `is_archived` (boolean)
    Whether the form is archived. Archived forms stay readable but are filtered out of the admin console listings.

## Response 200 fields (application/json):

  - `object` (object)

  - `object.options` (array)

  - `object.rules` (array)

  - `object.name` (string)

  - `object.form_type_id` (integer)

  - `object.token` (string)

  - `object.updated_at` (string)

  - `object.created_at` (string)

  - `object.id` (integer)

  - `nice` (object)

  - `nice.rrn` (string)

  - `nice.is_open` (string)

  - `nice.close_at` (string | null)

  - `nice.is_foreign_account` (boolean)

  - `relations` (array)

  - `permissions` (object)

  - `permissions.read` (boolean)

  - `permissions.update` (boolean)

  - `permissions.delete` (boolean)

  - `permissions.copy` (boolean)

