---
title: "Post API agent hook event"
method: POST
path: "/api/agent-hook/event"
---

# Post API agent hook event

`POST /api/agent-hook/event`

## Request

- The document declares no server URL.
- Auth: none declared

## Request body

- Request
  - `$schema` string, uri: A URL to the JSON Schema for this object.
  - `agent` string, required
  - `commit_threshold` integer, required
  - `defer_post_tool_reminder` boolean
  - `event` Input, required
    - `cwd` string
    - `hook_event_name` string
    - `last_assistant_message` string
    - `session_id` string, required
    - `stop_hook_active` boolean
    - `tool_input` object
    - `tool_name` string
    - `tool_response` unknown
    - `tool_use_id` string
    - `transcript_path` string
    - `turn_id` string
  - `failed_review_threshold` integer, required
  - `instruction` string, required
  - `threshold` integer, required

## Response `200`

OK

- AgentHookResponse
  - `$schema` string, uri: A URL to the JSON Schema for this object.
  - `commit_count` integer
  - `commit_threshold` integer
  - `count` integer, required
  - `diagnosis` string
  - `failed_review_count` integer
  - `failed_review_threshold` integer
  - `fix_session_id` string
  - `reason` string
  - `remind_count` integer
  - `session_id` string, required
  - `skipped` boolean
  - `threshold` integer, required
  - `triggered` boolean, required
  - `triggered_by` string

## Other responses

- `default`: Error

## Changes

- **2026-10-14** `815b8d22044e`: 1 info
  - added the optional property `diagnosis` to the response with the `200` status
- **2026-09-16** `ae2b2ce88ebe`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kenn-io/apis/roborev/changes/api/agent-hook/event/post.md)

---

[API](https://skmtc.dev/kenn-io/apis/roborev.md) - [All operations](https://skmtc.dev/kenn-io/apis/roborev/llms.txt) - [OpenAPI document](https://skmtc.dev/kenn-io/apis/roborev/revisions/5803a85073e3?raw)
