---
title: "Create Task"
method: POST
path: "/v1/tasks"
---

# Create Task

`POST /v1/tasks`

This API endpoint creates a task.

## Request body

- object
  - `name` string — The name of the task.
  - `description` string — The description of the task.
  - `parentTaskId` string — The parent task of the task, if task should be a subtask.
  - `status` string — The status of the task, one of todo/inProgress/completed.
  - `internalUserId` string — The uuid of the internal user assigned to this task.
  - `clientId` string — The uuid of the client user assigned to this task. Company ID field is required if this field is used.
  - `companyId` string — The uuid of the company assigned to this task. If assigning to a client user, this field is required as well.
  - `dueDate` string — The date the task is due, in RFC3339 format.
  - `templateId` string — ID of the template to use when creating this task
  - `viewers` object[] — The ID of the company or client that you would like to grant viewing access to the task. Viewers can only be added to tasks where the assignee is an internal user. Currently, only one entity (either a client or a company) can be added as a viewer per task.
    - `clientId` string — If the task viewer is a client, you must add both the clientId and their companyId.
    - `companyId` string — If the task viewer is a company, you must only add the companyId (leave clientId empty).

## Response `200`

200

- object
  - `archivedBy` string
  - `archivedDate` string
  - `clientId` string
  - `companyId` string
  - `completedBy` string
  - `completedByUserType` string
  - `completedDate` string
  - `createdBy` string
  - `createdDate` string
  - `creatorType` string
  - `deletedBy` string
  - `deletedDate` string
  - `description` string
  - `dueDate` string
  - `id` string
  - `isArchived` boolean
  - `isDeleted` boolean
  - `label` string
  - `name` string
  - `object` string
  - `parentTaskId` string
  - `source` string
  - `status` string
  - `templateId` string
  - `viewers` object[]
    - `clientId` string
    - `companyId` string
  - `attachments` object[]

## Other responses

- `400` — 400

---

[API](https://skmtc.net/assembly/apis/core-resources.md) · [All operations](https://skmtc.net/assembly/apis/core-resources/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/assembly/core-resources/versions/28a9e7d13a8c/schema)
