---
title: "Create a new task"
method: POST
path: "/task/create"
tags: ["Task"]
---

# Create a new task

`POST /task/create`

## Request

- Base URL: `https://api.chatbotkit.com/api/v1`
- URL: `https://api.chatbotkit.com/api/v1/task/create`
- Auth: HTTP bearer

Create a new task with the given parameters.

## Request body

- object: Blueprint properties
  - `name` string: The associated name
  - `description` string: The associated description
  - `meta` Meta: Meta data information
  - `blueprintId` string, nullable: The ID of the blueprint
  - `contactId` string: The contact associated with the task
  - `botId` string: The bot associated with the task
  - `schedule` string: The schedule of the task. Cron expressions and date-based schedules are evaluated in the provided timezone when set.
  - `timezone` string, nullable: An optional IANA timezone identifier used when evaluating the task schedule.
  - `expiresAt` number, nullable: An optional epoch-millisecond timestamp after which the task is automatically deleted. Pass null or omit for no expiry.
  - `sessionDuration` number: The session duration of the Widget integration
  - `maxIterations` number: The maximum number of iterations per task execution
  - `maxTime` number: The maximum time per task execution in milliseconds
  - `maxCalls` number, nullable: The maximum number of tool calls across the whole task run (0 or null for unbounded)

## Response `200`

The task was created successfully

- object
  - `id` string, required: The ID of the created task

## Other responses

- `default`: An error response

---

[API](https://skmtc.dev/chatbotkit/apis/cbk-api.md) · [All operations](https://skmtc.dev/chatbotkit/apis/cbk-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chatbotkit/apis/cbk-api/revisions/13d250576136?raw)
