> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tracelm.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Fail Task

> Mark a task failed

## Path Parameters

* `task_id` (UUID)

## Request Body

All fields optional:

* `reason` (stored as `failure_reason` in metadata)
* `metadata`
* `project_id` (required for upsert if auth scope has multiple projects)
* `conversation_id`
* `user_id`
* `task_name`

## Response

```json theme={null}
{
  "id": "...",
  "status": "failed",
  "completed_at": "..."
}
```
