---
title: "Trigger Scan"
method: POST
path: "/api/v1/report-ai/trend-scans"
tags: ["report-ai", "trend-scans"]
---

# Trigger Scan

`POST /api/v1/report-ai/trend-scans`

Trigger a trend scan. Returns immediately with status='running'.

The actual 5-stage pipeline runs asynchronously via an arq task.
Poll GET /trend-scans/{scan_id}/status to track progress.

## Request body

- TriggerScanRequest
  - `report_agent_id` string, uuid, required
  - `window_start` string, date-time, required
  - `window_end` string, date-time, required

## Response `200`

Successful Response

- TrendScanRunRead
  - `id` string, uuid, required
  - `tenant_id` string, uuid, required
  - `report_agent_id` string, uuid, required
  - `report_agent_name` string, nullable
  - `window_start` string, date-time, required
  - `window_end` string, date-time, required
  - `status` 'running' | 'completed' | 'failed', required — Lifecycle status of a trend scan run.
  - `current_stage` string, nullable, required
  - `triggered_by_user_id` string, uuid, nullable, required
  - `started_at` string, date-time, required
  - `completed_at` string, date-time, nullable, required
  - `total_eligible_investigations` integer, required
  - `total_investigations_scanned` integer, required
  - `excluded` object, nullable, required
  - `cached_tag_count` integer, required
  - `fresh_tag_count` integer, required
  - `total_trends_found` integer, required
  - `tagger_version` string, required
  - `error_message` string, nullable, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `409` — A scan is already running for this agent.
- `422` — Validation Error

## Changes

- **2026-09-03** `d65b8fefae34` — 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status

[Change history](https://skmtc.dev/getanana/apis/cleon-api/changes/api/v1/report-ai/trend-scans/post.md)

---

[API](https://skmtc.dev/getanana/apis/cleon-api.md) · [All operations](https://skmtc.dev/getanana/apis/cleon-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/getanana/cleon-api/revisions/38166468bfc5/schema)
