---
title: "Send and receive a conversation response"
method: POST
path: "/conversation/{conversationId}/complete"
tags: ["Conversation"]
---

# Send and receive a conversation response

`POST /conversation/{conversationId}/complete`

## Request

- Base URL: `https://api.chatbotkit.com/api/v1`
- URL: `https://api.chatbotkit.com/api/v1/conversation/{conversationId}/complete`
- Auth: HTTP bearer

## Path parameters

- `conversationId` string, required: The ID of the conversation to receive message from

## Headers

- `X-Timezone` string

## Request body

- object
  - `text` string: The text of the message to send. Omit to continue receiving from the existing conversation state without sending a new user message.
  - `entities` Entity[]: Known entities
    - `type` string, required: The entity type
    - `begin` number, required: Start offset
    - `end` number, required: End offset
    - `text` string, required: The text value of the entity
    - `replacement` object
      - `begin` number, required: Start offset
      - `end` number, required: End offset
      - `text` string, required: The text value of the replacement
  - `functions` object[]: An array of functions to be added to the conversation
    - `name` string, required: The name of the function (must be a valid JS identifier, max 64 chars)
    - `description` string, required: The description of the function
    - `parameters` object, required: JSON Schema definition for the function parameters
      - `type` 'object', required: The schema type, must be "object"
      - `properties` object, required: Object property definitions
      - `required` string[]: Required property names
    - `result` union: The result of the function execution
      - object
        - `data` unknown, required
      - object
        - `channel` string, required: The channel for streaming function results
    - `call` object: Configuration for when this function should be automatically called
      - `start` boolean: If true, this function will be force-called at the start of the conversation
      - `end` boolean: If true, this function will be force-called at the end of the conversation
  - `extensions` ExtensionsDefinition: Extensions to enhance the bot's capabilities
    - `backstory` string: Additional backstory for the bot
    - `datasets` object[]: Inline datasets to provide additional context
      - `name` string, nullable: The name of the dataset
      - `description` string, nullable: The description of the dataset
      - `records` object[], required: The records in the dataset
        - `text` string, required: The text content of the record
        - `meta` object: Additional metadata for the record
    - `skillsets` object[]: Inline skillsets to provide additional abilities
      - `name` string, nullable: The name of the skillset
      - `description` string, nullable: The description of the skillset
      - `abilities` object[], required: The abilities in the skillset
        - `name` string, required: The name of the ability
        - `description` string, required: The description of the ability
        - `instruction` string, required: The instruction for the ability
        - `linkedSecretId` string: Optional secret ID for the ability
        - `linkedSpaceId` string: Optional space ID for the ability
        - `meta` object: Additional metadata for the ability
    - `features` object[]: Feature flags to enable specific bot capabilities
      - `name` string, required: The name of the feature to enable
      - `options` object: Optional configuration options for the feature
  - `limits` ExecutionLimits: Execution limits to control conversation processing bounds
    - `iterations` integer: Maximum number of agentic iterations. Controls how many times the model can iterate through tool calls and responses.
    - `continuations` integer: Maximum number of model continuations. Controls how many times the model can continue generating after reaching a stop condition.
    - `calls` integer: Maximum number of function/tool calls. Controls how many total function calls can be made during the conversation.

## Response `200`

The next message in the conversation completed successfully

- object
  - `id` string, required: The ID of the created message
  - `text` string, required: The text of the message received
  - `usage` Usage, required: Usage information
    - `token` number, required: The tokens used in this exchange
  - `end` CompleteEnd, required: Information about why the completion ended
    - `reason` 'length' | 'stop' | 'activity' | 'abort' | 'error' | 'iteration', required: The reason why the completion ended

## Other responses

- `default`: An error response

---

[API](https://skmtc.dev/chatbotkit/apis/cbk-api.md) · [All operations](https://skmtc.dev/chatbotkit/apis/cbk-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chatbotkit/apis/cbk-api/revisions/13d250576136?raw)
