---
title: "Create Task (V1)"
method: POST
path: "/v1.0/tasks"
tags: ["Tasks & Appointments"]
---

# Create Task (V1)

`POST /v1.0/tasks`

Creates a task on the target lead.

Notes:
- content, leadId, deadline, type and assignedRole are required.
- Caller must have manage permission on the lead.
- The response contains only the new task's ID under the 'taskId' key.

## Headers

- `Authorization` string, required
- `Content-Type` string, required

## Request body

- TaskRequest — Task payload.
  - `content` string, required — Description of the task.
  - `leadId` integer, required — ID of the lead this task belongs to.
  - `deadline` integer, required — Deadline of the task, in milliseconds since Unix epoch (UTC).
  - `type` 'Other' | 'Call' | 'Email' | 'Text', required — Type of the task.
  - `assignedRole` 'Agent' | 'Assistant', required — Role the task is assigned to.
  - `finishFlag` boolean — When true on update, the task is marked completed and other fields are ignored.

## Response `200`

Task created. Response contains the new task's ID.

- TaskIdResponse — Wrapped response for POST /v1.0/tasks. The new task's ID is returned under the 'taskId' key.
  - `taskId` integer — ID of the newly created task.

## Other responses

- `400` — Missing or invalid parameter (20012 INVALID_PARAMETER), or caller has no access to the lead (20017 PERMISSION_DENIED).
- `401` — Missing or invalid authentication token.
- `500` — Internal server error.

---

[API](https://skmtc.net/lofty/apis/lofty-service-open-apis.md) · [All operations](https://skmtc.net/lofty/apis/lofty-service-open-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lofty/lofty-service-open-apis/versions/23e640467118/schema)
