---
title: "Text Outcome Trend Route"
method: GET
path: "/api/v1/text-ai/text-agents/{text_agent_id}/outcome-trend"
tags: ["text-ai", "text_agents"]
---

# Text Outcome Trend Route

`GET /api/v1/text-ai/text-agents/{text_agent_id}/outcome-trend`

## Request

- Base URL: `https://api.getanana.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getanana.com/api/v1/text-ai/text-agents/{text_agent_id}/outcome-trend`
- Auth: none declared

Per-version outcome-rate trend for this text agent.

The text mirror of ``GET /voice-agents/{id}/outcome-trend`` — the signal
that answers "did version N improve outcomes over version N-1?". Human-
reviewed outcomes only; AI-inferred ones are never blended in.

An agent with no reviewed outcomes yet returns empty buckets, so the UI
can say "no data yet, review some sessions first" rather than render an
empty chart.

## Path parameters

- `text_agent_id` string, uuid, required

## Response `200`

Successful Response

- TextOutcomeTrendResponse: Per-version outcome counts for a text agent. Wraps the shared ``OutcomeTrendBucket`` rather than mutating it, so the text-only ``unversioned_total`` cannot leak into voice's response shape. ``unversioned_total`` counts human-reviewed sessions with no ``text_agent_version_id`` — sessions that started before the stamp existed. They are reported rather than absorbed into a bucket so the chart never implies a version owns outcomes it did not produce.
  - `buckets` OutcomeTrendBucket[]
    - `version_id` string, uuid, required
    - `version_number` integer, required
    - `outcome_counts` object, required
    - `total` integer, required
  - `unversioned_total` integer

## Other responses

- `404`: Text agent not found
- `422`: Validation Error

## Changes

> 55 revisions in range; 1 not diffed.

- **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

[Operation history](https://skmtc.dev/getanana/apis/cleon-api/changes/api/v1/text-ai/text-agents/:text_agent_id/outcome-trend/get.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.dev/getanana/apis/cleon-api/revisions/4d9d38769a75?raw)
