# Submit a form

Submits the form returned by `GET /form/{id}/view`, filled in by whoever is
calling. What it creates depends on the form's type: a user, an update to the
caller, or a submission stored on its own.
**This endpoint does not require a token.** Anonymous forms the account has marked
public can be submitted by anyone holding the form's id or token, and those
submissions must carry a `recaptcha` response. Every other form requires a
signed-in caller who may use it. Forms that create anything other than a user or a
standalone submission cannot be submitted here at all.
The body is the form's own fields, sent by the `name` each one carries in the
render response - `user:custom_email_attribute`, and so on. Validation errors come
back keyed by field. Nothing is stored unless the whole submission validates.
The success response is the form rendered again, so the answers just stored can be
shown back, with the caller's own previous submissions under `submissions`. Where
the form does not allow resubmission the response is the success content and a
short message instead, because there is no longer a form to render.

Endpoint: POST /api/v2/form/{form_id}/process
Version: 2.0.0
Security: default

## Path parameters:

  - `form_id` (string, required)
    The id of the form, or its token.

## Header parameters:

  - `Rosterfy-Platform` (string)

## Request fields (application/json):

  - `user:{field}` (string)
    A field value, keyed by the `name` the render
response gives it. The set of fields differs per form.

  - `recaptcha` (string)
    A reCAPTCHA response. Required when submitting a public
  form without signing in, and ignored otherwise.

## Response 200 fields (application/json):

  - `success_content` (string)

  - `message` (string)

  - `fields` (array)

  - `fields.name` (string)

  - `fields.type` (string)

  - `fields.required` (boolean)

  - `fields.label` (string)

  - `rrns` (object)

  - `rrns.user_form_submission` (string)

  - `rrns.user` (string)

  - `public` (integer)

  - `title` (string | null)

  - `close_content` (string)

  - `values` (array)

  - `options` (object)

  - `options.resubmit` (boolean)

  - `options.read_only` (boolean)

  - `submissions` (array)

  - `submissions.object` (object)

  - `submissions.object.id` (integer)

  - `submissions.object.form_id` (integer)

  - `submissions.object.user_id` (integer)

  - `submissions.object.entity` (string)

  - `submissions.object.entity_id` (integer)

  - `submissions.object.data` (array)

  - `submissions.object.requires_resubmission` (integer)

  - `submissions.object.deleted_at` (string | null)

  - `submissions.object.is_erased` (integer)

  - `submissions.object.created_at` (string)

  - `submissions.object.updated_at` (string)

  - `submissions.object.custom_address_attribute` (string | null)

  - `submissions.object.custom_boolean_attribute` (string | null)

  - `submissions.object.custom_country_attribute` (string | null)

  - `submissions.object.custom_date_attribute` (string | null)

  - `submissions.object.custom_datetime_attribute` (string | null)

  - `submissions.object.custom_document_attribute` (string | null)

  - `submissions.object.custom_email_attribute` (string | null)

  - `submissions.object.custom_file_attribute` (string | null)

  - `submissions.object.custom_html_attribute` (string | null)

  - `submissions.object.custom_image_attribute` (string | null)

  - `submissions.object.custom_multiselect_attribute` (string | null)

  - `submissions.object.custom_number_attribute` (string | null)

  - `submissions.object.custom_rating_attribute` (string | null)

  - `submissions.object.custom_select_attribute` (string | null)

  - `submissions.object.custom_telephone_attribute` (string | null)

  - `submissions.object.custom_text_attribute` (string | null)

  - `submissions.object.custom_textarea_attribute` (string | null)

  - `submissions.nice` (object)

  - `submissions.nice.rrn` (string)

  - `submissions.relations` (object)

  - `submissions.permissions` (object)

  - `submissions.permissions.read` (boolean)

  - `submissions.permissions.update` (boolean)

  - `submissions.permissions.delete` (boolean)

  - `submissions.attributes` (object)

