---
title: "Create compliance task"
method: POST
path: "/v1/tasks"
tags: ["Tasks"]
---

# Create compliance task

`POST /v1/tasks`

Create a compliance task for evidence collection, remediation, review, or recurring control work inside an organization.

## Request body

- object
  - `title` string, required
  - `description` string, required
  - `assigneeId` string, nullable
  - `frequency` 'daily' | 'weekly' | 'monthly' | 'quarterly' | 'yearly', nullable
  - `department` string, nullable — Built-in values: none, admin, gov, hr, it, itsm, qms. Custom department names are also accepted.
  - `controlIds` string[]
  - `taskTemplateId` string, nullable
  - `vendorId` string, nullable — Vendor ID to connect this task to

## Response `201`

Task created successfully

- TaskResponseDto
  - `id` string, required — Unique identifier for the task
  - `title` string, required — Task title
  - `description` string — Task description
  - `status` 'todo' | 'in_progress' | 'done' | 'blocked', required — Task status
  - `createdAt` string, date-time, required — Task creation timestamp
  - `updatedAt` string, date-time, required — Task last update timestamp
  - `taskTemplateId` object, nullable — Task template ID
  - `integrationScheduleFrequency` 'daily' | 'weekly' | 'monthly' | 'quarterly' | 'yearly', required — Cadence for running the integration check attached to this task
  - `integrationLastRunAt` object, nullable — Last successful integration check run timestamp

## Other responses

- `400` — Invalid request body

## Changes

> 56 revisions in range; 4 could not be searched.

- **2026-06-05** `33c685841b7a` — 7 breaking, 1 warning
  - removed the enum value `admin` of the request property `department`
  - removed the enum value `gov` of the request property `department`
  - removed the enum value `hr` of the request property `department`
  - removed the enum value `it` of the request property `department`
  - …4 more
- **2026-06-05** `7ca7c363a732` — 1 breaking, 7 info
  - request property `department` was restricted to a list of enum values
  - added the new `admin` enum value to the request property `department`
  - added the new `gov` enum value to the request property `department`
  - added the new `hr` enum value to the request property `department`
  - …4 more
- **2026-06-05** `d0f58f24175b` — 7 breaking, 1 warning
  - removed the enum value `admin` of the request property `department`
  - removed the enum value `gov` of the request property `department`
  - removed the enum value `hr` of the request property `department`
  - removed the enum value `it` of the request property `department`
  - …4 more
- **2026-06-04** `d7d0199d846f` — 1 info
  - the endpoint scheme security `oauth2` was removed from the API
- **2026-05-29** `5382c53ab431` — 1 info
  - the endpoint scheme security `oauth2` was added to the API

[Full history](https://skmtc.dev/trycompai/apis/comp-ai-api/changes/v1/tasks/post.md)

---

[API](https://skmtc.dev/trycompai/apis/comp-ai-api.md) · [All operations](https://skmtc.dev/trycompai/apis/comp-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/trycompai/comp-ai-api/revisions/726b9523fb22/schema)
