---
title: "Create Text Widget Group"
method: POST
path: "/api/v1/text-ai/text-widget-groups"
tags: ["text-ai", "text_widget_groups"]
---

# Create Text Widget Group

`POST /api/v1/text-ai/text-widget-groups`

Create a new Text Widget Group with an auto-created first agent.

## Request body

- TextWidgetGroupCreate — Schema for creating a TextWidgetGroup.
  - `name` string, required
  - `greeting_message` string, nullable
  - `branding` object, nullable
  - `home_screen` object, nullable
  - `collect_fields` string[]
  - `entries` TextWidgetGroupEntryBase[]
    - `label` string, required
    - `icon` string, nullable
    - `description` string, nullable
    - `text_agent_id` string, uuid, required
    - `dispatch_config` DispatchScenarioConfig — Operator-configurable dispatch behavior for an entry. Lives on the TARGET entry — the Weddings entry defines how other agents dispatch TO Weddings, regardless of which source agent initiates.
      - `condition` string, nullable
      - `pre_instruction` string, nullable
      - `post_instruction` string, nullable
  - `session_timeout_minutes` integer, nullable
  - `production_origins` string[]
  - `consent_config` ConsentConfig — GDPR consent configuration for the text widget. Controls the pre-chat consent gate shown to visitors.
    - `enabled` boolean
    - `consent_text` string
    - `privacy_policy_url` string, nullable
    - `privacy_policy_label` string
    - `privacy_policy_show_on_pages` string[]
    - `show_ai_disclosure` boolean
    - `ai_disclosure_text` string
    - `consent_button_label` string
    - `data_retention_days` integer, nullable
    - `company_name` string, nullable
    - `data_processor_name` string, nullable
    - `consent_version` string, nullable

## Response `200`

Successful Response

- TextWidgetGroupRead — Full widget group representation for admin views.
  - `id` string, uuid, required
  - `name` string, required
  - `greeting_message` string, nullable
  - `branding` object, nullable
  - `home_screen` object, nullable
  - `collect_fields` string[]
  - `entries` TextWidgetGroupEntryBase[]
    - `label` string, required
    - `icon` string, nullable
    - `description` string, nullable
    - `text_agent_id` string, uuid, required
    - `dispatch_config` DispatchScenarioConfig — Operator-configurable dispatch behavior for an entry. Lives on the TARGET entry — the Weddings entry defines how other agents dispatch TO Weddings, regardless of which source agent initiates.
      - `condition` string, nullable
      - `pre_instruction` string, nullable
      - `post_instruction` string, nullable
  - `session_timeout_minutes` integer, nullable
  - `production_origins` string[]
  - `consent_config` ConsentConfig — GDPR consent configuration for the text widget. Controls the pre-chat consent gate shown to visitors.
    - `enabled` boolean
    - `consent_text` string
    - `privacy_policy_url` string, nullable
    - `privacy_policy_label` string
    - `privacy_policy_show_on_pages` string[]
    - `show_ai_disclosure` boolean
    - `ai_disclosure_text` string
    - `consent_button_label` string
    - `data_retention_days` integer, nullable
    - `company_name` string, nullable
    - `data_processor_name` string, nullable
    - `consent_version` string, nullable
  - `tenant_id` string, uuid, required
  - `publishable_key` string, required
  - `enabled` boolean, required
  - `environment` string
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `422` — Validation Error

---

[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/c0f54348e251/schema)
