# Create a task Endpoint: POST /api/v1/tasks Version: 0.0.1 Security: bearerAuth ## Query parameters: - `allow_duplicate` (string) Enum: "true", "false", "True", "False" ## Request fields (application/json): - `form_id` (string, required) - `employee_id` (string, required) - `employer_id` (string,null) - `client_id` (string,null) - `job_id` (string,null) - `placement_id` (string,null) Tasks are designed to be reusable across multiple placements. However, if your form uses placement attribute scoping, you must provide a placement id here so that Onboarded can retrieve the scoped value from your placement. - `expired_at` (string,null) Datetime for when the task expires. If not included in the request payload, default value from the form will be used (when applicable). Set this property to if you do not want this task to inherit form default expiration time. - `due_at` (string,null) Datetime for when the task is due. If not included in the request payload, default value from the form will be used (when applicable). Set this property to if you do not want this task to inherit form default due time. - `deletion_scheduled_at` (string,null) Set this field to automatically delete a task at a specific time in the future. This can be helpful when certain tasks need to be deleted after a specific retention period. - `deletion_allowed_at` (string,null) Set this field to prevent a task from being deleted until the specified time. This can be helpful when ensuring completed tasks are retained for compliance reasons. ## Response 201 fields (application/json): - `id` (string, required) - `form_id` (string, required) - `form_custom_attributes` (object, required) Custom attribute values - `name` (string, required) Name of the form. - `employee_id` (string, required) - `employer_id` (string,null, required) - `client_id` (string,null, required) - `job_id` (string,null, required) - `status` (string, required) Enum: "requires_action", "completed", "expired" - `next_action` (object, required) - `next_action.type` (string,null, required) Enum: "employer_action", "employee_action", "system_action" - `expired_at` (string,null, required) Expiration time is re-evaluated at the time of task completion. If your integration reads the field value before a task is completed, please note that the value may change when the task is completed. - `deletion_scheduled_at` (string,null, required) When this field is set, the task will be automatically deleted at the specified time. - `deletion_allowed_at` (string,null, required) When this field is set, the task cannot be deleted until the specified time. - `due_at` (string,null, required) - `progress` (object, required) - `progress.percent` (number, required) - `progress.numerator` (number, required) - `progress.denominator` (number, required) - `subtasks` (array, required) - `subtasks.form_page_id` (string, required) - `subtasks.assignee_type` (string, required) Enum: "employee", "employer" - `tags` (array, required) - `tags.name` (string, required) - `created_at` (string, required) - `updated_at` (string, required) ## Response 400 fields (application/json): - `message` (string, required) ## Response 401 fields (application/json): - `message` (string, required) Enum: "Not authorized" ## Response 409 fields (application/json): - `message` (string, required) Enum: "Duplicate task found"