---
title: "Create Text Widget Test Session"
method: POST
path: "/api/v1/text-ai/text-widget-groups/{group_id}/test-sessions"
tags: ["text-ai", "text_widget_groups"]
---

# Create Text Widget Test Session

`POST /api/v1/text-ai/text-widget-groups/{group_id}/test-sessions`

## 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-widget-groups/{group_id}/test-sessions`
- Auth: none declared

Start a cockpit test chat with the group's head agent.

The cockpit used to open the public widget's session, which took the
agent's environment: a test of a live agent was a production session — in
the logs, the metrics and the bookings — and React's double effect made two
of them per open. This one is staging: kept out of production reporting,
and its write tools run as dry runs (``ToolExecutionContext.environment``
comes from the session). The overlay then talks to it through the public
widget's message and end routes with the returned token, like a visitor.

## Path parameters

- `group_id` string, uuid, required

## Response `201`

Successful Response

- TextWidgetSessionCreated: Response after creating a text widget session.
  - `session_id` string, uuid, required
  - `session_token` string, required
  - `greeting_message` string, nullable, required

## Other responses

- `403`: Needs the Manage agents permission
- `404`: Widget group not found
- `409`: The personal assistant has its own test chat, or the group has no agent
- `422`: Validation Error

## Changes

> 55 revisions in range; 1 not diffed.

- **2026-10-15** `a9cebb28e243`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/getanana/apis/cleon-api/changes/api/v1/text-ai/text-widget-groups/:group_id/test-sessions/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.dev/getanana/apis/cleon-api/revisions/4d9d38769a75?raw)
