---
title: "Create Task"
method: POST
path: "/v1/tasks/"
tags: ["tasks"]
---

# Create Task

`POST /v1/tasks/`

## Request

- Base URL: `https://api.karma.domains`
- URL: `https://api.karma.domains/v1/tasks/`
- Auth: HTTP bearer

Create a usercheck v2 task (validate, debit credits, enqueue pipeline steps).

Caps: ``usertasks.max_items_per_task`` accepted items per task (checker or recheck).
Daily ``usertasks.daily_items_limit`` accepted items per UTC day (shared with web UI;
restarts count). HTTP 400 when per-task cap exceeded; HTTP 429 when daily cap exceeded
(message includes remaining quota). Requires spendable credits (HTTP 402). Honors
``usertasks.v2_enabled`` / ``accept_new`` (HTTP 503). Idempotent replays do not count
toward the daily item quota.

## Headers

- `Idempotency-Key` string, nullable

## Request body

- PublicNewTaskSchema: POST /v1/tasks body; optional idempotency_key when the header is omitted.
  - `task_name` string, required
  - `task_desc` string, required
  - `report_type` string, required
  - `queries` string[]
  - `idempotency_key` string, nullable

## Response `200`

Successful Response

- CreateTaskResponseSchema: POST /tasks/ response for usercheck v2. Plain BaseModel so empty ``invalid=[]`` is not stripped by APISchema.check_empty.
  - `task_id` string, required
  - `accepted` integer, required
  - `duplicates` integer
  - `invalid` string[]
  - `charged` integer
  - `status` string
  - `message` string

## Other responses

- `402`: Payment required — x402 agent credits. Read PAYMENT-REQUIRED header (base64 JSON) and retry same URL with PAYMENT-SIGNATURE and optional X-Karma-Plan-Id.
- `422`: Validation Error

## Changes

- **2026-11-11** `1eae46c0dec4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/karma/apis/karma-domains-public-api/changes/v1/tasks/post.md)

---

[API](https://skmtc.dev/karma/apis/karma-domains-public-api.md) - [All operations](https://skmtc.dev/karma/apis/karma-domains-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/karma/apis/karma-domains-public-api/revisions/a86fc0bfa15d?raw)
