---
title: "Create a new task"
method: POST
path: "/api/public/tasks"
tags: ["tasks"]
---

# Create a new task

`POST /api/public/tasks`

Creates a new task for the authenticated user. The task can be associated with a contact or customer, and assigned to one or more responsible users. Due dates can be specified with optional time and timezone information.

## Request body

- CreateTaskPublicDto
  - `title` string, required
  - `description` string, nullable, required
  - `dueDate` string, nullable, required
  - `dueTime` string, nullable, required
  - `timezone` string, nullable, required
  - `responsibleIds` string[], required
  - `aiContactId` string, nullable, required
  - `aiCustomerId` string, nullable, required
  - `priority` '0' | '1' | '2', required
  - `associateToCalendar` boolean

## Response `201`

Task created successfully

- TaskResponseDto

## Other responses

- `400` — Invalid request body - Check that all required fields are provided and valid
- `401` — Unauthorized - Invalid or missing authentication token
- `default`

---

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