---
title: "Create Task"
method: POST
path: "/v2.0/tasks"
tags: ["Tasks & Appointments V2"]
---

# Create Task

`POST /v2.0/tasks`

Creates a new task or appointment on the target lead. Whether an appointment or a regular task is created depends on the payload's type field.

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

## Headers

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

## Request body

- TaskRequestV2 — Task or appointment payload.
  - `content` string — Description of the task
  - `leadId` integer — The ID of the lead this task is related to
  - `type` string, required — The type of the task. Could be `Other`, `Call`, `Email`, `Text`, `Appointment`
  - `assignedRole` string — Role the task should be assigned to (Agent or Assistant)
  - `startAt` string — When this task/appointment should start. ISO8601 format in specified timezone, e.g., '2026-03-01T15:00:00-08:00'
  - `endAt` string — When this task/appointment should end. ISO8601 format in specified timezone, e.g., '2026-03-01T16:00:00-08:00'. For regular tasks, this represents the deadline
  - `timeZoneCode` string — Timezone code for this task/appointment
  - `address` string — Address/location for appointment type tasks

## Response `200`

Task or appointment created. Response contains the new entry's ID.

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

## 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)
