---
title: "Regenerate Ai Text"
method: POST
path: "/comms/chat/regenerate-suggestion"
tags: ["provider", "comms"]
---

# Regenerate Ai Text

`POST /comms/chat/regenerate-suggestion`

## Request

- Base URL: `https://docs.decodahealth.com` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.decodahealth.com/comms/chat/regenerate-suggestion`
- Auth: none declared. Required headers: `TENANT`, `API-KEY`
- TypeScript: <https://skmtc.dev/decodahealth/apis/decoda-api/docs/comms/chat/regenerate-suggestion/post.ts> (a function with typed inputs; its response is checked against the schema)

## Headers

- `TENANT` string, required
- `API-KEY` string, required

## Request body

- RegenerateAISuggestion
  - `suggestedMessageId` string, required
  - `feedback` string, required

## Response `200`

Successful Response

- union
  - SuggestedMessageSummary
    - `id` string, required
    - `chatId` string, required
    - `fromMessageId` string, required
    - `content` string, required
    - `assistantId` string, required
    - `isSelected` boolean, required
    - `createdDate` string, date-time, required
  - ToolCallSummary
    - `id` string, required
    - `callId` string, nullable
    - `messageId` string, nullable
    - `alertId` string, nullable
    - `toolName` string, required
    - `toolArguments` object, required
    - `toolCallId` string, nullable
    - `result` object, nullable
    - `toolCallDescription` string, nullable
    - `hasBeenCalled` boolean
    - `createdDate` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/decodahealth/apis/decoda-api.md) - [All operations](https://skmtc.dev/decodahealth/apis/decoda-api/llms.txt) - [OpenAPI document](https://skmtc.dev/decodahealth/apis/decoda-api/revisions/4ab18c80f9e9?raw)
