> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# CloseBot

> Manage CloseBot bots, leads, conversations, sources, library knowledge, personas, and Smart FAQs with an API key.

```ts automations/message-closebot-lead.automation.ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { closeBot } from "automate.ax/closebot"
import { z } from "zod"

export default automation("Message a CloseBot lead", () => {
  const request = onHttpRequest({
    body: z.object({ leadId: z.string(), message: z.string() }),
  })

  closeBot.sendLeadMessage({
    leadId: request.body.leadId,
    body: request.body.message,
  })
})
```

Create a key in [CloseBot API key settings](https://app.closebot.com/settings?tab=keys), then connect it to your Automate.ax project. CloseBot keys belong to individual user accounts, so the connected user determines which agency resources each action can access.

CloseBot does not expose an outbound webhook-subscription contract. This integration provides actions but no managed triggers. Use an Automate.ax HTTP trigger with a CloseBot custom webhook when a specific bot flow should start an automation.

## Exports

```ts theme={null}
import { closeBot, closeBotAccount, getCloseBotApi } from "automate.ax/closebot"
```

* `closeBot` contains the packaged actions.
* `closeBotAccount("name")` selects a named CloseBot connection.
* `getCloseBotApi` creates an authenticated client for a custom account-backed action.

## Actions

* [Get agency](/reference/integrations/closebot/actions/get-agency)
* [List bots](/reference/integrations/closebot/actions/list-bots)
* [List bot templates](/reference/integrations/closebot/actions/list-bot-templates)
* [Get bot](/reference/integrations/closebot/actions/get-bot)
* [Create bot](/reference/integrations/closebot/actions/create-bot)
* [Create bot with AI](/reference/integrations/closebot/actions/create-bot-with-ai)
* [Update bot](/reference/integrations/closebot/actions/update-bot)
* [Delete bot](/reference/integrations/closebot/actions/delete-bot)
* [Duplicate bot](/reference/integrations/closebot/actions/duplicate-bot)
* [End persona split test](/reference/integrations/closebot/actions/end-persona-split-test)
* [Attach source to bot](/reference/integrations/closebot/actions/attach-source-to-bot)
* [Detach source from bot](/reference/integrations/closebot/actions/detach-source-from-bot)
* [Publish bot](/reference/integrations/closebot/actions/publish-bot)
* [List folders](/reference/integrations/closebot/actions/list-folders)
* [Get folder](/reference/integrations/closebot/actions/get-folder)
* [Create folder](/reference/integrations/closebot/actions/create-folder)
* [Update folder](/reference/integrations/closebot/actions/update-folder)
* [Delete folder](/reference/integrations/closebot/actions/delete-folder)
* [List leads](/reference/integrations/closebot/actions/list-leads)
* [Search leads](/reference/integrations/closebot/actions/search-leads)
* [Get lead](/reference/integrations/closebot/actions/get-lead)
* [Update lead](/reference/integrations/closebot/actions/update-lead)
* [Delete lead](/reference/integrations/closebot/actions/delete-lead)
* [Get lead AI status](/reference/integrations/closebot/actions/get-lead-ai-status)
* [Update lead AI status](/reference/integrations/closebot/actions/update-lead-ai-status)
* [List lead history](/reference/integrations/closebot/actions/list-lead-history)
* [Create lead note](/reference/integrations/closebot/actions/create-lead-note)
* [Update lead note](/reference/integrations/closebot/actions/update-lead-note)
* [Delete lead note](/reference/integrations/closebot/actions/delete-lead-note)
* [Send lead message](/reference/integrations/closebot/actions/send-lead-message)
* [List scheduled messages](/reference/integrations/closebot/actions/list-scheduled-messages)
* [Create scheduled message](/reference/integrations/closebot/actions/create-scheduled-message)
* [Update scheduled message](/reference/integrations/closebot/actions/update-scheduled-message)
* [Cancel scheduled message](/reference/integrations/closebot/actions/cancel-scheduled-message)
* [Update lead instance](/reference/integrations/closebot/actions/update-lead-instance)
* [List sources](/reference/integrations/closebot/actions/list-sources)
* [Get source](/reference/integrations/closebot/actions/get-source)
* [Delete source](/reference/integrations/closebot/actions/delete-source)
* [Update source](/reference/integrations/closebot/actions/update-source)
* [List source calendars](/reference/integrations/closebot/actions/list-source-calendars)
* [List source channels](/reference/integrations/closebot/actions/list-source-channels)
* [List source fields](/reference/integrations/closebot/actions/list-source-fields)
* [List source tags](/reference/integrations/closebot/actions/list-source-tags)
* [List source owners](/reference/integrations/closebot/actions/list-source-owners)
* [List source variables](/reference/integrations/closebot/actions/list-source-variables)
* [Update source variable](/reference/integrations/closebot/actions/update-source-variable)
* [List library files](/reference/integrations/closebot/actions/list-library-files)
* [Get library file](/reference/integrations/closebot/actions/get-library-file)
* [Get library file preview](/reference/integrations/closebot/actions/get-library-file-preview)
* [Upload library file](/reference/integrations/closebot/actions/upload-library-file)
* [Replace library file](/reference/integrations/closebot/actions/replace-library-file)
* [Delete library file](/reference/integrations/closebot/actions/delete-library-file)
* [Attach library file to source](/reference/integrations/closebot/actions/attach-library-file-to-source)
* [Detach library file from source](/reference/integrations/closebot/actions/detach-library-file-from-source)
* [Create web scrape](/reference/integrations/closebot/actions/create-web-scrape)
* [List web-scrape pages](/reference/integrations/closebot/actions/list-web-scrape-pages)
* [Update web-scrape pages](/reference/integrations/closebot/actions/update-web-scrape-pages)
* [List personas](/reference/integrations/closebot/actions/list-personas)
* [Get persona](/reference/integrations/closebot/actions/get-persona)
* [Create persona](/reference/integrations/closebot/actions/create-persona)
* [Update persona](/reference/integrations/closebot/actions/update-persona)
* [Delete persona](/reference/integrations/closebot/actions/delete-persona)
* [List Smart FAQs](/reference/integrations/closebot/actions/list-smart-faqs)
* [Create Smart FAQ](/reference/integrations/closebot/actions/create-smart-faq)
* [Answer Smart FAQs](/reference/integrations/closebot/actions/answer-smart-faqs)
* [Follow up on Smart FAQ](/reference/integrations/closebot/actions/follow-up-on-smart-faq)
* [Delete Smart FAQ](/reference/integrations/closebot/actions/delete-smart-faq)
