# Create a job title

Adds a role under the functional area named in the URL. The parent is taken from
the URL, so it is not a body field and cannot be set by sending one.
`code` has to be unique across the whole account, not just within this functional
area, and is stored in upper case whatever case it is sent in.
**The created role comes back without `deleted_at`**, which reading it includes.
Everything else matches the read shape.

Endpoint: POST /api/v2/headcount/functionalarea/{functionalarea_id}/jobtitle
Version: 2.0.0
Security: default

## Path parameters:

  - `functionalarea_id` (integer, required)
    The ID of the functional area.

## Header parameters:

  - `Rosterfy-Platform` (string)

## Request fields (application/json):

  - `name` (string, required)
    The name administrators see. Required.

  - `frontend_name` (string, required)
    The name volunteers see in the portal. Required, and shown in place of `name` to anyone without administrator access, so it is worth setting even when the two match.

  - `code` (string, required)
    A short reference for the role, unique across the account rather than just within the group. Letters, numbers, dashes and underscores only - spaces and punctuation are rejected. Stored and returned in upper case whatever case it is sent in.

  - `description` (string)
    What the role involves, as HTML. Shown to volunteers alongside the role. Sanitised on the way out, so unsupported markup will not be returned as sent.

  - `training_ids` (array)
    The IDs of the training modules assigned to anyone who takes on this role. **Replaces the whole list** rather than adding to it, so send every module you want kept. Omitting the field leaves the stored list untouched.

## Response 201 fields (application/json):

  - `object` (object)

  - `object.id` (integer)

  - `object.headcount_functional_area_id` (integer)

  - `object.name` (string)

  - `object.frontend_name` (string)

  - `object.code` (string)

  - `object.description` (string)

  - `object.training_ids` (array)

  - `object.deleted_at` (string | null)

  - `object.created_at` (string)

  - `object.updated_at` (string)

  - `object.uuid` (string)

  - `nice` (object)

  - `nice.rrn` (string)

  - `nice.functional_area_name` (string)

  - `relations` (object)

  - `relations.functional_area` (object)

  - `relations.functional_area.object` (object)

  - `relations.functional_area.object.id` (integer)

  - `relations.functional_area.object.account_id` (integer)

  - `relations.functional_area.object.headcount_functional_area_type_id` (integer)

  - `relations.functional_area.object.name` (string)

  - `relations.functional_area.object.frontend_name` (string)

  - `relations.functional_area.object.code` (string)

  - `relations.functional_area.object.target` (integer)

  - `relations.functional_area.object.auto_update_mode` (integer)

  - `relations.functional_area.object.rules` (array)

  - `relations.functional_area.object.training_ids` (array)

  - `relations.functional_area.object.is_system` (integer)

  - `relations.functional_area.object.deleted_at` (string | null)

  - `relations.functional_area.object.created_at` (string)

  - `relations.functional_area.object.updated_at` (string)

  - `relations.functional_area.object.updated_by` (integer)

  - `relations.functional_area.object.uuid` (string)

  - `relations.functional_area.nice` (object)

  - `relations.functional_area.nice.rrn` (string)

  - `permissions` (object)

  - `permissions.read` (boolean)

  - `permissions.update` (boolean)

  - `permissions.delete` (boolean)

