---
title: "Create a task"
method: POST
path: "/v2/tasks"
tags: ["Tasks"]
---

# Create a task

`POST /v2/tasks`

## Request

- Base URL: `https://api.zenzap.co`
- URL: `https://api.zenzap.co/v2/tasks`
- Auth: one of:
  - HTTP bearer and API key in header `X-Signature`
  - OAuth 2
    - Client credentials
    - Token URL: `https://api.zenzap.co/oauth/token` scopes: `task:write`
- TypeScript: <https://skmtc.dev/zenzap/apis/zenzap-external-integration-api/docs/v2/tasks/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a task in a topic. Tasks can be assigned to specific users and have due dates.

Limits:
- task title is limited to 256 characters
- task description is limited to 10000 characters
- you can only assign tasks to members that are already in your topic
- task due date must be a valid Unix timestamp in milliseconds (e.g., 1699564800000)
- task externalId is limited to 100 characters

## Headers

- `X-Signature` string
- `X-Timestamp` integer

## Request body

- TaskCreateRequest
  - `topicId` string, uuid, required: The ID of the topic where the task should be created
  - `title` string, required: The task title
  - `description` string: Optional task description
  - `assignee` string, uuid: Optional user ID to assign the task to
  - `dueDate` integer: Optional due date as Unix timestamp in milliseconds
  - `externalId` string: Optional external identifier for tracking purposes

## Response `201`

Task created successfully

- TaskCreateResponse
  - `id` string, uuid: The created task ID
  - `topicId` string, uuid: The topic ID where the task was created
  - `title` string: The task title
  - `createdAt` integer: Unix timestamp in milliseconds

## Other responses

- `400`: Bad request - invalid input
- `401`: Unauthorized - invalid or missing API token
- `500`: Internal server error

---

[API](https://skmtc.dev/zenzap/apis/zenzap-external-integration-api.md) - [All operations](https://skmtc.dev/zenzap/apis/zenzap-external-integration-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zenzap/apis/zenzap-external-integration-api/revisions/37faae2c2036?raw)
