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

# Create Your First Botsify Bot or AI Agent with API

> Step-by-step guide to creating a chatbot, AI agent, or voice bot in your Botsify workspace using the REST API. Covers all agent types.

Every Botsify automation starts with a bot — a named workspace that holds your conversation flows, AI configuration, and channel connections. This guide walks you through picking the right agent type and making your first API call to spin one up.

**1. Choose your agent type**

Botsify supports three agent types, each suited to different use cases. Pass one of the following values as `agent_type` when you create a bot:

| `agent_type` | Best for |
| - | - |
| `chatbot` | Rule-based or flow-driven conversations; FAQ bots; lead-capture forms |
| `agent` | AI-powered assistants that reason, use tools, and handle open-ended questions |
| `voice` | Phone or audio-based interactions where responses are spoken rather than typed |

If you are unsure, start with `chatbot` for predictable, scripted experiences or `agent` when you need a large-language-model backbone.

**2. Authenticate your request**

All Botsify API calls require a valid API key. If you have not set up authentication yet, see the [Authentication guide](/authentication.md) for instructions on obtaining and passing your key.

Your API key is typically sent as a header or included in the request body depending on the endpoint — the create-bot endpoint uses header-based auth.

**3. Create the bot**

Call `POST /api/v1/create-bot` with a JSON body containing the bot name and agent type. The optional `template` field lets you pre-populate the bot from an existing configuration.

```bash theme={null}
curl --request POST \
  --url https://app.botsify.com/api/v1/create-bot \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --data '{
    "bot_name": "Support Assistant",
    "agent_type": "agent",
    "template": "customer-support"
  }'
```

**Request body fields**

| Field | Type | Required | Description |
| - | - | - | - |
| `bot_name` | string | ✅ | A human-readable name for the bot |
| `agent_type` | string | ✅ | One of `chatbot`, `agent`, or `voice` |
| `template` | string | ❌ | Slug of a pre-built template to clone |

A successful response returns a JSON object that includes the newly created bot's details.

**4. Save the bot\_id**

The response body contains a `bot_id` (sometimes referred to as `id`). **Copy this value** — you will need it for every subsequent operation such as updating agent configuration, sending messages, and deploying versions.

```json theme={null}
{
  "bot_id": "bot_abc123",
  "bot_name": "Support Assistant",
  "agent_type": "agent",
  "created_at": "2025-01-15T10:30:00Z"
}
```

Store `bot_id` securely alongside your API key in your environment configuration.

**5. Verify by listing your bots**

Confirm the bot was created by fetching your full bot list. You have two endpoints available:

**Option A — List agents (GET, supports filtering)**

```bash theme={null}
curl --request GET \
  --url 'https://app.botsify.com/api/v1/list-agents?tab=my&page=1' \
  --header 'Authorization: Bearer <YOUR_API_KEY>'
```

Supported query parameters: `page`, `query` (search term), `tab` (`my` or `shared`), `per-page`.

**Option B — Get bots (POST)**

```bash theme={null}
curl --request POST \
  --url https://app.botsify.com/api/v1/get-bots \
  --header 'Content-Type: application/json' \
  --data '{
    "apikey": "<YOUR_API_KEY>"
  }'
```

Both endpoints return an array of bots belonging to your account.

> [!TIP]
>
> **Start from a template.** Pass the `template` field in your `create-bot` request to clone a pre-built configuration — including conversation flows, default responses, and AI prompts. This can save significant setup time for common use cases like e-commerce support or lead generation.

## Next steps

Now that you have a bot, you can:

* **Configure AI behavior** — see [Deploy an Agent](/guides/deploy-an-agent) to set up instructions, memory, and versioned deployments.
* **Send proactive messages** — see [Send Messages](/guides/send-messages) to reach users on Messenger or other channels.
* **Connect WhatsApp** — see [WhatsApp Integration](/guides/whatsapp-integration) to broadcast messages via WhatsApp templates.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.