---
title: "Test the OpenAI Chat Bot with custom text input"
method: POST
path: "/bot/test"
tags: ["Bot"]
---

# Test the OpenAI Chat Bot with custom text input

`POST /bot/test`

## Request

- Base URL: `https://api.carbonvoice.app`
- URL: `https://api.carbonvoice.app/bot/test`
- Auth: one of:
  - API key in header `pxtoken`
  - OAuth 2 (implicit, authorization URL `https://api.carbonvoice.app/oauth/authorize`)

## Request body

- TestChatBotRequest
  - `text` string, required: The text to test with the chat bot
  - `sources` DerviedConversationSource[], required: Sources to use for testing
    - `type` 'user_id' | 'channel_id' | 'workspace_id' | 'message_id' | 'share_link_id', required
    - `value` string, required
  - `workspace_id` string, required: Workspace ID to use for testing
  - `chat_history_channel_id` string: Chat history channel ID to use for testing
  - `language` string: Language for the response

## Response `200`

Successfully generated response from the chat bot

- ResponseModel
  - `text` string, required: The answer text
  - `message_ids` string[], required: List of message IDs that were used to generate the answer
  - `channel_ids` string[], required: List of channel IDs that were searched
  - `workspace_id` string, required: The workspace ID that was searched

## Other responses

- `401`: Unauthorized - Authentication required

---

[API](https://skmtc.dev/carbonvoice/apis/carbon-voice-api.md) · [All operations](https://skmtc.dev/carbonvoice/apis/carbon-voice-api/llms.txt) · [OpenAPI document](https://skmtc.dev/carbonvoice/apis/carbon-voice-api/revisions/b91c5c845122?raw)
