# Chat Data

> Create and train Chat Data chatbots, send messages, and manage conversations, leads, actions and analytics.

App · 24 actions. Web page: https://docs.lodol.com/docs/integrations/chat-data

## Actions

### Add a webhook

Add a web address that receives the chatbot's events as they happen: chats, live chat escalations, lead submissions, and users coming online or going offline. Your plan must include webhooks, and a chatbot can have up to 5. Adding an event to an existing address subscribes it to that event too.

**Inputs**

- Chatbot (`chatbot_id`, text, required): The ID of the chatbot the webhook belongs to.
- URL (`url`, text, required): The URL endpoint that the chatbot delivers events to.
- Event (`event`, text, required): The type of event the webhook subscribes to. See [Webhooks](/api-reference/webhooks) for the chat, live-chat-escalation and lead-submission bodies. user-online and user-offline fire when the user joins or leaves a live chat session and carry chatbot_id, chatbot_name, conversation_id and, when known, the user's name, email, phone, source and user_uuid. If a webhook with this url already exists, the event is added to its subscriptions. One of: `chat`, `live-chat-escalation`, `lead-submission`, `user-online`, `user-offline`.
- Content type (`content_type`, text): The Content-Type of the deliveries. Endpoints on hook.make.com, hook.*.make.com, n8n.cloud and *.n8n.cloud always receive text/plain. Re-adding an existing url sets its content type to this value (text/plain when omitted). One of: `text/plain`, `application/json`.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "status": "success",
    "webhooks": []
  }
}
```

### Add an action

Add an action to a chatbot. An API action is tested before it is saved: Chat Data calls its address with each parameter's example value and rejects the action if that call fails.

**Inputs**

- Chatbot (`chatbot_id`, text, required): The ID of the chatbot to which the action will be added.
- API action (`api_action`, object, required): The action to add.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "action": {
      "bodyParams": [],
      "description": "example",
      "enableDateRestriction": false,
      "enabled": false,
      "headers": [],
      "includeImages": false,
      "includedDomains": [],
      "index": 1,
      "label": "example",
      "link": "example",
      "method": "GET",
      "name": "example",
      "pathParams": [],
      "prioritizeRecentResults": false,
      "queryParams": [],
      "return_file": false,
      "type": "example",
      "url": "example"
    },
    "status": "example"
  }
}
```

### Attach a lead to a conversation

Add or update the customer details (lead) linked to a conversation.

**Inputs**

- Chatbot (`chatbot_id`, text, required): The unique identifier of the chatbot.
- Conversation ID (`conversation_id`, text, required): The unique identifier of the conversation.
- Lead ID (`lead_id`, text): Lead UUID. Can be used alone to find an existing lead, but is not sufficient for creating a new lead. Important: Once a lead exists, its uuid can never be changed. Attempting to change it returns a 400 error. When creating a new lead, this value becomes its uuid; otherwise a new UUID is generated.
- Name (`name`, text): Lead name. Can be used to find an existing lead with an exact, case-sensitive string match. If several leads share the same name, one of them is used, and which one is not guaranteed. Use unique identifiers for deterministic matching.
- Email (`email`, text): Lead email address. Must be a valid, deliverable email address of at most 254 characters (RFC 5321).
- Phone (`phone`, text): Lead phone number. It must be a valid phone number in international format, starting with +.
- Psid (`psid`, text): Page-scoped ID (typically for Facebook Messenger).
- Ig username (`ig_username`, text): Instagram username.
- Username (`username`, text): Slack or Telegram username. A platform-specific identifier, distinct from ig_username (Instagram) and psid (Messenger).
- Info (`info`, text): Additional information about the lead, up to 1,000,000 characters. It may be truncated to 1,000 tokens if "User Info Truncation" is turned on in Settings > Limits Control.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "lead": {
      "email": "example",
      "ig_username": "example",
      "info": "example",
      "leadId": "example",
      "name": "example",
      "phone": "example",
      "psid": "example",
      "source": "example",
      "username": "example"
    },
    "status": "success"
  }
}
```

### Create and train a chatbot

Create a chatbot using one of Chat Data's medical chat models, your own uploaded data or a custom model. The model is required.

**Inputs**

- Chatbot name (`chatbot_name`, text): The name of the chatbot to be created. Defaults to an empty name.
- Source text (`source_text`, text): Text data for the chatbot, subject to character limits based on your plan. Relevant only if the model is custom-data-upload.
- URLS to scrape (`urls_to_scrape`, list): A list of URLs from which Chat Data extracts text content. Because the amount of text on a website cannot be known in advance, crawling stops when either the list of URLs is exhausted or the chatbot's character limit is reached. URLs must start with http:// or https://, for example https://www.chat-data.com. Relevant only if the model is custom-data-upload.
- Products (`products`, list): A list of products for training the chatbot.
- Q and as (`q_and_as`, list): A list of Q&As for the chatbot to learn specific topic answers. Items without both a question and an answer are skipped.
- Custom backend (`custom_backend`, text): The URL of your own backend, starting with http:// or https://. Required when model is custom-model; ignored for other models.
- Bearer (`bearer`, text): The bearer token sent to your custom backend. Only used when model is custom-model.
- Model (`model`, text, required): The model the chatbot uses: - For training with your own data: custom-data-upload - For human medical questions: medical-chat-human - For veterinary medical questions: medical-chat-vet - For a custom model: custom-model. One of: `custom-data-upload`, `medical-chat-human`, `medical-chat-vet`, `custom-model`.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "chatbotId": "example",
    "consumedCharacters": 1,
    "dataSources": [],
    "remainingCharacters": 1,
    "status": "success"
  }
}
```

### Delete a chatbot

Delete a chatbot and all of its data, including training data, conversations, leads and user monitoring data. This can't be undone.

**Inputs**

- Chatbot (`chatbot_id`, text, required): The unique identifier allocated to the chatbot.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "status": "success"
  }
}
```

### Delete a conversation

Delete one of a chatbot's conversations.

**Inputs**

- Chatbot (`chatbot_id`, text, required): The unique identifier of the chatbot.
- Conversation ID (`conversation_id`, text, required): The unique identifier of the conversation to be deleted.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "message": "example",
    "status": "success"
  }
}
```

### Delete a webhook

Delete the webhook with the given address and all its event subscriptions. Returns the chatbot's remaining webhooks, and changes nothing if no webhook has that address.

**Inputs**

- Chatbot (`chatbot_id`, text, required): The ID of the chatbot the webhook belongs to.
- URL (`url`, text, required): The URL endpoint that the chatbot delivers events to.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "status": "success",
    "webhooks": []
  }
}
```

### Delete an action

Delete a specific action from the chatbot by either name or index. Send exactly one of name or index.

**Inputs**

- Chatbot (`chatbot_id`, text, required): The unique identifier of the chatbot.
- Name (`name`, text): The name of the action to delete (mutually exclusive with index).
- Index (`index`, number): The index of the action to delete (mutually exclusive with name). At least 0.0.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "deletedAction": {
      "bodyParams": [],
      "description": "example",
      "enableDateRestriction": false,
      "enabled": false,
      "headers": [],
      "includeImages": false,
      "includedDomains": [],
      "index": 1,
      "label": "example",
      "link": "example",
      "method": "GET",
      "name": "example",
      "pathParams": [],
      "prioritizeRecentResults": false,
      "queryParams": [],
      "return_file": false,
      "type": "example",
      "url": "example"
    },
    "status": "success"
  }
}
```

### Get a chatbot

Get the details of one chatbot, in the same form as listing chatbots gives.

**Inputs**

- Chatbot (`chatbot_id`, text, required): The unique identifier allocated to the chatbot.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "chatbot": {
      "baseModel": "gpt-4o-mini",
      "basePrompt": "example",
      "bearer": "example",
      "bubbleSize": 1,
      "calCom": {
        "brandColor": "example",
        "calendarMessage": "example",
        "hideEventTypeDetails": false,
        "layout": "example",
        "showCalendar": false,
        "username": "example"
      },
      "calendar": {
        "calendarMessage": "example",
        "calendarUrl": "example",
        "showCalendar": false
      },
      "chatbotId": "example",
      "chatbotName": "example",
      "collectedCustomerInformation": [],
      "createdAt": 1,
      "customBackend": "example",
      "dataSources": [],
      "disallowedUrls": [],
      "domains": [],
      "enableBouncingAnimation": false,
      "enableBubbleSound": false,
      "ignoreDataSource": false,
      "imageDescriptionPrompt": "example",
      "initialMessages": [],
      "inputPlaceholderMsg": "example",
      "lastMessageAt": 1,
      "lastTrainedAt": 1,
      "leadsConfig": {
        "collectEmail": false,
        "collectName": false,
        "collectPhone": false,
        "emailMessage": "example",
        "message": "example",
        "nameMessage": "example",
        "phoneMessage": "example"
      },
      "model": "custom-data-upload",
      "notification": {
        "conversationEmails": [],
        "enableConversationEmails": false,
        "enableLeadsEmail": false,
        "leadsEmails": []
      },
      "numberOfConversations": 1,
      "onlyAllowOnAddedDomains": false,
      "padding": {
        "x": 1,
        "y": 1
      },
      "rateLimitMessage": "example",
      "rateLimitPoints": 1,
      "rateLimitTimeframe": 1,
      "status": 0,
      "storeChat": false,
      "styles": {
        "actionButtonColor": "example",
        "alignChatButton": "left",
        "autoOpenChatWindowAfter": 1,
        "bubblePictureFile": "example",
        "buttonColor": "example",
        "displayName": "example",
        "profilePictureFile": "example",
        "theme": "light",
        "userMessageColor": "example"
      },
      "suggestedMessages": [],
      "team": [],
      "temperature": 0,
      "toolsParams": [],
      "trackIpAddress": false,
      "visibility": "private",
      "webhooks": []
    },
    "status": "success"
  }
}
```

### Get a conversation

Get a conversation's details, including its messages, metadata and the customer's details when available.

**Inputs**

- Conversation ID (`conversation_id`, text, required): The unique identifier of the conversation.
- Chatbot (`chatbot_id`, text): The unique identifier of the chatbot to retrieve the conversation from. If not provided, the conversation is retrieved from any chatbot in your workspace.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "conversation": {
      "browserAgent": "example",
      "chatbotId": "example",
      "conversationId": "example",
      "createdAt": 1,
      "customer": {
        "createdAt": 1,
        "email": "example",
        "ig_username": "example",
        "info": "example",
        "ipAddress": "example",
        "leadId": "example",
        "name": "example",
        "phone": "example",
        "psid": "example",
        "source": "widget",
        "userCountry": "example",
        "username": "example"
      },
      "ipAddress": "example",
      "lastMessageAt": "2026-10-24T12:00:00Z",
      "liveChatEnded": false,
      "messages": [],
      "overalRating": 1,
      "requestedLiveChat": false,
      "source": "widget",
      "urlPath": "example",
      "userCountry": "example"
    },
    "status": "success"
  }
}
```

### Get all chatbots

List the chatbots your API key can reach: every chatbot in the workspace for a workspace key, or only its own chatbot for a chatbot key.

**Inputs**: None.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "chatbots": [],
    "status": "success"
  }
}
```

### Get an action

Get a specific action by name or index for the specified chatbot. Send exactly one of name or index.

**Inputs**

- Chatbot (`chatbot_id`, text, required): The unique identifier allocated to the chatbot.
- Name (`name`, text): The name of the action to retrieve (mutually exclusive with index).
- Index (`index`, number): The index of the action to retrieve (mutually exclusive with name). At least 0.0.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "action": {
      "bodyParams": [],
      "description": "example",
      "enableDateRestriction": false,
      "enabled": false,
      "headers": [],
      "includeImages": false,
      "includedDomains": [],
      "index": 1,
      "label": "example",
      "link": "example",
      "method": "GET",
      "name": "example",
      "pathParams": [],
      "prioritizeRecentResults": false,
      "queryParams": [],
      "return_file": false,
      "type": "example",
      "url": "example"
    },
    "status": "success"
  }
}
```

### Get analytics

Get a chatbot's overall statistics.

**Inputs**

- Chatbot (`chatbot_id`, text, required): The unique identifier allocated to the chatbot.
- Start timestamp (`start_timestamp`, date and time): Start of the time range (inclusive), in milliseconds since the Unix epoch. Statistics are stored per UTC day, each dated at 00:00 UTC.
- End timestamp (`end_timestamp`, date and time): End of the time range (inclusive), in milliseconds since the Unix epoch.
- Source (`source`, list): Filter analytics by source. Repeat the parameter to match several sources. One or more of: `widget`, `iframe`, `site`, `api`, `Whatsapp`, `WhatsappWebAPI`, `Messenger`, `Instagram`, `Telegram`, `Line`, and 8 more.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "conversationsDistribution": [],
    "countryDistribution": [],
    "creditsDistribution": [],
    "downVotesDistribution": [],
    "hourDistribution": [],
    "leadsCountDistribution": [],
    "liveChatEmailsDistribution": [],
    "liveChatEscalationsDistribution": [],
    "liveChatSmsDistribution": [],
    "messagesDistribution": [],
    "ratingDistribution": [],
    "sentimentsDistribution": [],
    "status": "success",
    "topicsDistribution": [],
    "upVotesDistribution": [],
    "workflowEmailsDistribution": []
  }
}
```

### Get chatbot training status

Get a chatbot's current training progress.

**Inputs**

- Chatbot (`chatbot_id`, text, required): The unique identifier allocated to the chatbot.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "progress": 0,
    "status": "success"
  }
}
```

### Get confidence scores

Get confidence scores for the passages a chatbot would use to answer, as an estimate of how well it can answer before you send the message. Results are cached, so sending the same messages afterwards stays fast.

**Inputs**

- Messages (`messages`, list, required): The messages of the conversation, oldest first. On this endpoint, non-image files are not downloaded or parsed (only a provided content is used), and extra files are not dropped.
- Base model (`base_model`, text): Overrides the chatbot's baseModel setting when processing the RAG context for this request. One of: `gpt-4o-mini`, `gpt-4o`, `gpt-4`, `gpt-4.1-nano`, `gpt-4.1-mini`, `gpt-4.1`, `gpt-5-nano`, `gpt-5-mini`, `gpt-5`, `gpt-5.1`, and 37 more.
- Chatbot (`chatbot_id`, text, required): The ID of the chatbot.

**Outputs**

- `response` (object): When the chatbot uses `custom-model` or ignores its data source, the body is only `{ "status": "success", "score": 0 }`.

**Example output**

```json
{
  "response": {
    "averageScore": 0,
    "embeddingText": "example",
    "score": 0,
    "scoresArray": [],
    "sources": [],
    "status": "success"
  }
}
```

### Get conversations

List a chatbot's conversations that have at least one user message, most recently active first. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Chatbot (`chatbot_id`, text, required): The unique identifier allocated to the chatbot.
- Start timestamp (`start_timestamp`, date and time): Start of the time range (inclusive), in milliseconds since the Unix epoch. A conversation matches when it was created or last active within the range.
- End timestamp (`end_timestamp`, date and time): End of the time range (exclusive), in milliseconds since the Unix epoch.
- Start (`start`, number): The start position of the results, used for pagination. A negative value disables pagination and returns all results.
- Size (`size`, number): The maximum number of results returned after the start position, used for pagination. A negative value returns all remaining results.
- Source (`source`, list): Filter conversations by source. Repeat the parameter to match several sources. One or more of: `widget`, `iframe`, `site`, `api`, `Whatsapp`, `WhatsappWebAPI`, `Messenger`, `Instagram`, `Telegram`, `Line`, and 5 more.
- Lead ID (`lead_id`, text): The UUID of the lead, which can be obtained from the lead-submission webhook event.
- Requested live chat (`requested_live_chat`, true/false): true returns only conversations that requested live chat support, false only those that did not.
- Live chat ended (`live_chat_ended`, true/false): true returns only conversations whose live chat has ended, false only those whose live chat has not ended.
- Overal rating (`overal_rating`, number): Filter conversations by their overall rating (1-5). From 1.0 to 5.0.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "conversations": [],
    "status": "success",
    "total": 1
  }
}
```

### Get customers

List the customers (leads) a chatbot has collected, newest first. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Chatbot (`chatbot_id`, text, required): The unique identifier allocated to the chatbot.
- Start timestamp (`start_timestamp`, date and time): Start of the time range (inclusive) for when customers were collected, in milliseconds since the Unix epoch.
- End timestamp (`end_timestamp`, date and time): End of the time range (exclusive), in milliseconds since the Unix epoch.
- Start (`start`, number): The start position of the results, used for pagination.
- Size (`size`, number): The maximum number of results returned after the start position, used for pagination. A negative value returns all remaining results; 0 returns a 400 error.
- Source (`source`, list): Filter customers by the source they were acquired from. Repeat the parameter to match several sources. One or more of: `widget`, `iframe`, `site`, `api`, `Whatsapp`, `WhatsappWebAPI`, `Messenger`, `Instagram`, `Telegram`, `Line`, and 5 more.
- Lead ID (`lead_id`, text): Filter by the lead's UUID (leadId).
- Psid (`psid`, text): Filter by the page-scoped user ID (Messenger).
- Ig username (`ig_username`, text): Filter by the Instagram username.
- Username (`username`, text): Filter by the Slack or Telegram username.
- Name (`name`, text): Filter by the customer name (exact match).
- Email (`email`, text): Filter by the customer email address (exact match).
- Phone (`phone`, text): Filter by the customer phone number (exact match of the stored value).

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "customers": [],
    "status": "success",
    "total": 1
  }
}
```

### Get the conversation portal link

Generate a shareable portal link for a specific conversation. The conversation portal must be enabled for the chatbot. The link is valid for 30 days.

**Inputs**

- Conversation ID (`conversation_id`, text, required): The UUID of the conversation.
- Chatbot (`chatbot_id`, text, required): The unique identifier of the chatbot.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "portalLink": "example",
    "status": "success"
  }
}
```

### Get the current plan

Get a summary of the workspace's current subscriptions and privileges.

**Inputs**: None.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "email": "example",
    "name": "example",
    "plan": {
      "api": false,
      "chatbotCharactersLimit": 1,
      "chatbots": 1,
      "chatbotsLimit": 1,
      "customDomain": false,
      "customModel": false,
      "files": 1,
      "gatherLeads": false,
      "gpt4": false,
      "notification": false,
      "refreshingCredits": 1,
      "refreshingTrainingChars": 1,
      "remainingCredits": 1,
      "remainingTrainingChars": 1,
      "removeBrand": false,
      "shareAnalysis": false,
      "subscriptions": {
        "customize_plan_1": 1,
        "entry": 1,
        "entry_legacy": 1,
        "extra_chatbots": 1,
        "extra_messages": 1,
        "free": 1,
        "live_chat": 1,
        "professional": 1,
        "remove_brand": 1,
        "remove_label": 1,
        "scrape": 1,
        "sso_login": 1,
        "standard": 1,
        "storage": 1,
        "webhook_delivery": 1
      },
      "userAnalysis": false
    },
    "status": "success"
  }
}
```

### List actions

Get all configured actions for the specified chatbot. Gets one page; to see more, run it again with the next page it gives.

**Inputs**

- Chatbot (`chatbot_id`, text, required): The unique identifier allocated to the chatbot.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "actions": [],
    "status": "success"
  }
}
```

### Query the knowledge base

Get the passages from a chatbot's knowledge base that are relevant to a query, for example to give a custom GPT. Results are cached by query.

**Inputs**

- Chatbot (`chatbot_id`, text, required): The unique identifier allocated to the chatbot.
- Query (`query`, text, required): The text used to search the knowledge base by vector (cosine) similarity.
- Count (`count`, number): The minimum number of context segments to select when available. More are added until a minimum token budget is met, then the list is trimmed to a maximum token budget, so the result can hold more or fewer. Only segments with a positive cosine similarity to the query are returned.

**Outputs**

- `response` (list): Response.

**Example output**

```json
{
  "response": []
}
```

### Retrain an existing chatbot

Retrain a chatbot built from your own uploaded data, adding new information to its knowledge base or removing existing data.

**Inputs**

- Chatbot (`chatbot_id`, text, required): The unique identifier allocated to the chatbot.
- Source text (`source_text`, text): Text data intended for chatbot training, subject to character limits based on your plan. A chatbot has one text source: this value replaces the current text. Send an empty string to remove the text; omit the field to keep the current text.
- URLS to scrape (`urls_to_scrape`, list): A list of URLs provided for text content extraction. The web crawling process concludes once the list of URLs is fully processed or the chatbot's character limit is reached. URLs must begin with 'http://' or 'https://'. Applicable only to chatbots using the custom-data-upload model. A website that already exists with the same URL is recrawled to get the latest content.
- Options (`options`, object): Configuration options that control how websites are scraped from the URLs provided in the urlsToScrape parameter. These options affect the content extraction process for each URL being crawled.
- Products (`products`, list): A list of products for training the chatbot.
- Q and as (`q_and_as`, list): A list of Q&As for the chatbot to learn specific topic answers. Items without both a question and an answer are skipped, and a pair identical to an existing one is not added twice.
- Deletes (`deletes`, list): A list of knowledge sources to remove from the chatbot's knowledge base. To remove the plain text source, send sourceText as an empty string instead.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "chatbotId": "example",
    "consumedCharacters": 1,
    "dataSources": [],
    "remainingCharacters": 1,
    "status": "success"
  }
}
```

### Send a message

Send messages to a chatbot and get its reply. It can also reply in an OpenAI-compatible format.

**Inputs**

- Messages (`messages`, list, required): The messages of the conversation, oldest first. Every role must be user or assistant, and the last message must not be empty.
- Chatbot (`chatbot_id`, text, required): The ID of the chatbot.
- Include reasoning (`include_reasoning`, true/false): Whether to include reasoning in the response. This parameter overrides the chatbot's reasoning settings and has an effect only with models that support reasoning. For Claude models, a chatbot with AI actions shows reasoning only in the answer generated after an action is called. Non-streaming responses start with the reasoning in a tag followed by a blank line, for example {reasoning}\n\n{response}. Streaming responses wrap the reasoning in … for Claude models and … for deepseek-r1.
- Base model (`base_model`, text): Overrides the chatbot's baseModel for this request, i.e. the LLM that generates the answer. In a HIPAA workspace, a model not covered by the BAA is rejected. One of: `gpt-4o-mini`, `gpt-4o`, `gpt-4`, `gpt-4.1-nano`, `gpt-4.1-mini`, `gpt-4.1`, `gpt-5-nano`, `gpt-5-mini`, `gpt-5`, `gpt-5.1`, and 37 more.
- Base prompt (`base_prompt`, text): Overrides the chatbot's basePrompt (system prompt) for this request. Must be a non-empty string.
- Append messages (`append_messages`, true/false): If true, messages must contain exactly one user message, which is appended to the stored messages of the conversation with the same conversationId. If false, it is assumed that the messages parameter contains the entire message history.
- Conversation ID (`conversation_id`, text): ID of the current conversation. If omitted, the chatbot generates one, which is not returned in the response.
- Skip cache (`skip_cache`, true/false): When true, bypasses the response cache lookup for this request and runs the LLM pipeline normally. On success, the new response overwrites the prior cached entry under the same cache key, unless an AI action was triggered or failed (those responses are never cached). This is useful for regenerating answers when the cached response is no longer wanted.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "choices": [],
    "id": "example"
  }
}
```

### Update chatbot settings

Change a chatbot's settings. Only the fields you fill in are changed; empty ones are left as they are.

**Inputs**

- Chatbot (`chatbot_id`, text, required): The unique identifier allocated to the chatbot.
- Chatbot name (`chatbot_name`, text): The new name of the chatbot.
- Base prompt (`base_prompt`, text): The base prompt (instructions) for the chatbot.
- Initial messages (`initial_messages`, list): Array of initial messages the chatbot shows when a conversation starts.
- Suggested messages (`suggested_messages`, list): Array of suggested messages shown in the chatbot.
- Visibility (`visibility`, text): The visibility of the chatbot. It controls whether your chatbot is accessible to others. One of: `private`, `public`.
- Only allow on added domains (`only_allow_on_added_domains`, true/false): Whether the chatbot can be embedded (iframe or widget) on other websites; false disables embedding. Allowed domains are set by domains.
- Domains (`domains`, list): The domains on which the iframe and widget are allowed. Replaces the current list.
- Disallowed URLS (`disallowed_urls`, list): Pages on which the chat widget is not shown. Replaces the current list.
- Rate limit points (`rate_limit_points`, number): The maximum number of messages one device can send every rateLimitTimeframe seconds. Each message counts as one here, however many message credits its model consumes.
- Rate limit timeframe (`rate_limit_timeframe`, number): The time window, in seconds, to which the rateLimitPoints message limit applies.
- Rate limit message (`rate_limit_message`, text): The error message shown to the user when the conversation is rate limited.
- Base model (`base_model`, text): The large language model (OpenAI GPT, Anthropic Claude, Google Gemini or DeepSeek) used in our RAG processing pipeline. In a HIPAA workspace, models not covered by a BAA are rejected. One of: `gpt-4o-mini`, `gpt-4o`, `gpt-4`, `gpt-4.1-nano`, `gpt-4.1-mini`, `gpt-4.1`, `gpt-5-nano`, `gpt-5-mini`, `gpt-5`, `gpt-5.1`, and 37 more.
- Temperature (`temperature`, number): The temperature of the AI model, in the range [0, 1]. From 0.0 to 1.0.
- Store chat (`store_chat`, true/false): Indicates whether chat history is stored on our server. All chatbot models, including medical-chat-human and medical-chat-vet, start with storage enabled by default. Storage can be disabled for any model.
- Q a links (`q_a_links`, list): Links to frequently asked questions pages shown in the chatbot. Replaces the current links; items without both text and link are dropped.
- Show calendar (`show_calendar`, true/false): Specifies whether the Calendly booking button should be displayed in the chatbot widget or iframe.
- Calendar URL (`calendar_url`, text): The Calendly URL where users can schedule appointments.
- Calendar message (`calendar_message`, text): The message to display for appointment scheduling.
- Cal com (`cal_com`, object): The Cal.com booking button settings. The object replaces the current settings as a whole.
- Enable bouncing animation (`enable_bouncing_animation`, true/false): Whether the chat bubble bounces at the start of a session to attract attention.
- Enable bubble sound (`enable_bubble_sound`, true/false): Whether a sound plays when the initial-message bubble pops up.
- Bubble size (`bubble_size`, number): The size of the chat bubble button, in pixels. Values that are not positive numbers are ignored.
- Input placeholder msg (`input_placeholder_msg`, text): The placeholder text of the message input.
- Rerank (`rerank`, true/false): Whether retrieved knowledge base chunks are reranked before the chatbot answers. Reranking costs extra message credits.
- Sources (`sources`, object): Whether and how the sources used for an answer are shown under it.
- Footer (`footer`, text): Text shown at the bottom of the chat widget.
- Ignore data source (`ignore_data_source`, true/false): Whether your uploaded data should be ignored when the chatbot responds. If set to true, the chatbot answers like a general-purpose AI chatbot without your knowledge base. This option applies to chatbots based on the custom-data-upload model.
- Leads config (`leads_config`, object): The information to be collected from potential customers.
- Styles (`styles`, object): The appearance settings of the chat widget.

**Outputs**

- `response` (object): Response.

**Example output**

```json
{
  "response": {
    "status": "success"
  }
}
```
