# Delete a task

Endpoint: DELETE /api/v1/tasks/{task_id}
Version: 0.0.1
Security: form_session, user_session, component_session, component_token, api_token

## Security:

  - `form_session` (unknown)
    http bearer Onboarded form session token

  - `user_session` (unknown)
    apiKey in cookie __session

  - `component_session` (unknown)
    apiKey in cookie __component

  - `component_token` (unknown)
    apiKey in header x-component-auth-token

  - `api_token` (unknown)
    http bearer Onboarded API token

## Path parameters:

  - `task_id` (string, required)

## Response 200:

  - `200` (unknown)
    Task

## Response 200 fields (application/json):

  - `id` (string, required)
    Task Identifier

  - `form_id` (string, required)
    Form Identifier (lineage uid)

  - `form_custom_attributes` (object, required)

  - `name` (string, required)
    The name of the form

  - `employee_id` (string, required)
    Employee Identifier

  - `employer_id` (any, required)

  - `client_id` (any, required)

  - `job_id` (any, required)

  - `status` (string, required)
    Enum: "requires_action", "completed", "expired"

  - `pdf` (object, required)

  - `pdf.status` (string, required)
    The availability state of the task PDF. When available, the task PDF download endpoint should return the PDF.
    Enum: "available", "generating", "pending_completion", "not_applicable"

  - `pdf.file_id` (any, required)
    Id of the file holding the task PDF. Set when the status is `available`, otherwise null.

  - `next_action` (object, required)

  - `next_action.type` (any, required)

  - `expired_at` (any, required)

  - `deletion_scheduled_at` (any, required)

  - `deletion_allowed_at` (any, required)

  - `due_at` (any, required)

  - `completed_at` (any, required)
    This field is set when the task status changes to completed.

  - `completed_out_of_band` (boolean, required)
    Whether the task was completed outside Onboarded rather than through the product. Such tasks support expiration rules, but have no generated task or audit PDF, cannot have change requests, and are excluded from candidate onboarding.

  - `progress` (object, required)

  - `progress.percent` (number, required)

  - `progress.numerator` (number, required)

  - `progress.denominator` (number, required)

  - `subtasks` (array, required)

  - `subtasks.id` (string, required)

  - `subtasks.form_page_id` (string, required)

  - `subtasks.assignee_type` (string, required)
    Enum: "employee", "employer"

  - `subtasks.form_section` (any, required)

  - `subtasks.form_section.id` (string, required)

  - `subtasks.form_section.position` (number, required)

  - `subtasks.form_section.assignee_type` (string, required)
    Enum: "employee", "employer", "system"

  - `subtasks.progress` (object, required)

  - `subtasks.progress.percent` (number, required)

  - `subtasks.progress.numerator` (number, required)

  - `subtasks.progress.denominator` (number, required)

  - `tags` (array, required)

  - `tags.name` (string, required)

  - `_tag` (string, required)
    Enum: "Task"

## Response 400:

  - `400` (unknown)
    The request did not match the expected schema

## Response 400 fields (application/json):

  - `issues` (array, required)

  - `issues._tag` (string, required)
    The tag identifying the type of parse issue
    Enum: "Pointer", "Unexpected", "Missing", "Composite", "Refinement", "Transformation", "Type", "Forbidden"

  - `issues.path` (array, required)
    The path to the property where the issue occurred

  - `issues.path._tag` (string, required)
    Enum: "symbol"

  - `issues.path.key` (string, required)

  - `issues.message` (string, required)
    A descriptive message explaining the issue

  - `message` (string, required)

  - `_tag` (string, required)
    Enum: "HttpApiDecodeError"

  - `_tag` (string, required)
    Enum: "BadRequestError"

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `message` (string, required)

  - `_tag` (string, required)
    Enum: "Unauthorized"

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 403 fields (application/json):

  - `message` (string, required)

  - `_tag` (string, required)
    Enum: "Forbidden"

## Response 404:

  - `404` (unknown)
    ResourceNotFoundError

## Response 404 fields (application/json):

  - `message` (string, required)

  - `_tag` (string, required)
    Enum: "ResourceNotFoundError"

