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

# Create Task

`POST /api/v1/tasks`

## Request

- Base URL: `https://api.badgeia.com`
- URL: `https://api.badgeia.com/api/v1/tasks`
- Auth: none declared

Create a new benchmark task. Admin-only — tasks are global catalog rows
that every user can run against; only operators should add them.

## Request body

- TaskCreate
  - `title` string, required
  - `description` string, required
  - `domain` 'code_generation' | 'data_extraction' | 'tool_use' | 'customer_support' | 'rag' | 'research' | 'writing' | 'reasoning' | 'custom'
  - `difficulty` 'easy' | 'medium' | 'hard'
  - `prompt` string, required
  - `max_tokens_hint` integer
  - `expected_output` string, nullable
  - `is_secret` boolean
  - `suite_id` string, nullable
  - `suite_version` integer

## Response `201`

Successful Response

- TaskAdminRead: Operator echo of a task just authored (``POST /tasks``, admin only). The caller posted the answer; echoing it back lets the authoring UI confirm what was stored. A secret task's answer is still withheld (AC-C1-1): once a task is marked secret the key never leaves the server, on any surface, regardless of ``SECRET_SUITES_ENABLED``.
  - `title` string, required
  - `description` string, required
  - `domain` 'code_generation' | 'data_extraction' | 'tool_use' | 'customer_support' | 'rag' | 'research' | 'writing' | 'reasoning' | 'custom'
  - `difficulty` 'easy' | 'medium' | 'hard'
  - `prompt` string, required
  - `max_tokens_hint` integer
  - `id` string, uuid, required
  - `is_active` boolean, required
  - `created_at` string, date-time, required
  - `is_secret` boolean
  - `suite_id` string, nullable
  - `suite_version` integer
  - `has_expected_output` boolean
  - `expected_output` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/badgeia/apis/badge.md) · [All operations](https://skmtc.dev/badgeia/apis/badge/llms.txt) · [OpenAPI document](https://skmtc.dev/badgeia/apis/badge/revisions/7e7f7fee8b77?raw)
