---
title: "Run Task Definition"
method: POST
path: "/v1/workspaces/{workspace}/task-definitions/{definition_id}/run"
tags: ["v1", "protected", "task-definitions"]
---

# Run Task Definition

`POST /v1/workspaces/{workspace}/task-definitions/{definition_id}/run`

## Request

- The document declares no server URL.
- Auth: HTTP bearer

Run a saved task now with its agent, text and parameters; the run acts as the agent.

``parameters`` in the body are merged over the saved ones for this run only.

## Path parameters

- `definition_id` string, uuid, required
- `workspace` string, required: Slug of the workspace the request acts in

## Request body

- TaskDefinitionRun: One run of a saved task.
  - `parameters` object, nullable: Merged over the saved task's own parameters for this run only.

## Response `201`

Successful Response

- TaskResponse
  - `agent_id` string, uuid, required
  - `created_at` string, date-time, required
  - `created_by` string, nullable
  - `description` string, required
  - `end_user_id` string, nullable
  - `error` string, nullable
  - `execution_id` string, nullable
  - `failure_reason` string, nullable
  - `id` string, uuid, required
  - `metadata` object, nullable
  - `parameters` object, required
  - `provenance` TaskProvenance: Why a task exists: who or what started it, and the event that caused it.
    - `causation_id` string, nullable
    - `correlation_id` string, nullable
    - `depth` integer
    - `origin_id` string, nullable
    - `origin_type` 'user' | 'trigger' | 'agent' | 'api' | 'a2a', nullable
    - `parent_task_id` string, uuid, nullable
    - `source_identity` string, nullable
    - `task_definition_id` string, uuid, nullable
  - `result` union
    - object
    - string
  - `scheduled_at` string, date-time, nullable
  - `status` string, required
  - `total_cost` number, nullable
  - `total_tokens` integer, nullable

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-20** `1868622eed6d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agentarea/apis/agentarea-api/changes/v1/workspaces/:workspace/task-definitions/:definition_id/run/post.md)

---

[API](https://skmtc.dev/agentarea/apis/agentarea-api.md) - [All operations](https://skmtc.dev/agentarea/apis/agentarea-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentarea/apis/agentarea-api/revisions/5b651833a114?raw)
