---
title: "Create a task"
method: POST
path: "/tasks"
tags: ["Tasks"]
---

# Create a task

`POST /tasks`

Creates a task for an employee to complete

## Request body

- object
  - `name` string, required — Name of the task to be completed
  - `description` string — Detailed description of what is to be completed. This is HTML friendly
  - `employee_id` integer, required — Assigned employee of the task
  - `starts_on` string, date — Date of when the task will start. Defaults to today's date
  - `ends_on` string, date — Optional date of when the task will end

## Response `200`

OK

- object
  - `data` Task
    - `id` integer, required
    - `title` string, required
    - `starts_on` string, date
    - `ends_on` string, date
    - `description` string
    - `description_plain` string
    - `completed_at` string, date-time
    - `completed` boolean
    - `associated_to` object — Only if present
      - `id` integer
      - `type` 'Employee' | 'Candidate'
      - `full_name` string
      - `email` string
    - `assigned_to` object
      - `id` integer
      - `full_name` string
      - `email` string
    - `created_by` object
      - `id` integer
      - `full_name` string
      - `email` string
    - `created_at` string, date-time
    - `updated_at` string, date-time

---

[API](https://skmtc.net/peopleforce/apis/company-api.md) · [All operations](https://skmtc.net/peopleforce/apis/company-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/peopleforce/company-api/revisions/ff612e61a4c3/schema)
