---
title: "Ingest CLI codact failures"
method: POST
path: "/api/v3.1/cli/codact_failures"
tags: ["CLI"]
---

# Ingest CLI codact failures

`POST /api/v3.1/cli/codact_failures`

Accepts CLI-reported codact failures authenticated by user API key and stores them in ClickHouse for later analysis.

## Headers

- `x-user-api-key` string, required — User API key used to authenticate the CLI codact failure.

## Request body

- object
  - `failure_type` 'wrong_tool_slug' | 'wrong_tool_input_param', required — Type of codact failure being recorded.
  - `tool_info` object — Optional tool metadata when the failure can be tied to a toolkit or concrete tool version.
    - `toolkit` string
    - `tool` object
      - `slug` string, required
      - `version` string, required
  - `ctx` object, required — Arbitrary failure context from the CLI.
  - `session` object, required — Arbitrary session payload from the CLI.
  - `request_id` string — Optional request identifier associated with the failure.

## Response `200`

CLI codact failure accepted and stored.

- object
  - `tracked` boolean, required — Whether the codact failure row was accepted for storage.
  - `id` string, required — Unique identifier for the stored failure row.

## Other responses

- `400` — Bad request.
- `401` — Unauthorized. A valid user API key is required.
- `500` — Internal server error.

---

[API](https://skmtc.net/composiohq/apis/composio-platform-api-v3-1.md) · [All operations](https://skmtc.net/composiohq/apis/composio-platform-api-v3-1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/composiohq/composio-platform-api-v3-1/versions/4239836857f8/schema)
