---
title: "Report the units a plan step will work on (session owner only)"
method: POST
path: "/agents/sessions/{session_id}/runs/{run_id}/units"
tags: ["AI", "Agents"]
---

# Report the units a plan step will work on (session owner only)

`POST /agents/sessions/{session_id}/runs/{run_id}/units`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/agents/sessions/{session_id}/runs/{run_id}/units`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-KEY` and API key in header `X-API-SECRET` and API key in header `X-WORKSPACE-ID`

Queues the objects the step will work on, so the panel can show them and measure progress. A unit already listed is left as it is.

## Path parameters

- `session_id` string, required
- `run_id` integer, required

## Request body

- AgentRunUnitsRequest
  - `step` integer, required
  - `kind` string, required
  - `units` AgentRunUnitIn[], required
    - `id` integer, required
    - `name` string, nullable
    - `project_id` integer, nullable

## Response `200`

Request fulfilled, document follows

- AgentRunUnitsRegistered
  - `registered` integer, required
  - `units_total` integer, required

## Other responses

- `400`: Bad request syntax or unsupported method
- `403`: Request forbidden -- authorization will not help

---

[API](https://skmtc.dev/mammoth/apis/mammoth-analytics.md) · [All operations](https://skmtc.dev/mammoth/apis/mammoth-analytics/llms.txt) · [OpenAPI document](https://skmtc.dev/mammoth/apis/mammoth-analytics/revisions/9d8804f81a10?raw)
