> ## 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.

# Deploy Botsify AI Agent — POST /api/v1/deploy-ai-agent

> Push your Botsify AI agent to production. Deploy the active version, a specific saved version, or create a new named snapshot in one request.

Use this endpoint to push your Botsify AI agent to production. You can deploy the current active version, target a specific saved version by ID, or optionally create a brand-new named version on the fly and deploy it in a single request. Once deployed, live conversations will immediately use the deployed configuration.

## Request

**`POST https://app.botsify.com/api/v1/deploy-ai-agent`**

**Authorization:** Bearer token — include your token in the `Authorization: Bearer <token>` header.

### Body Parameters

<ParamField body="version_id" type="integer">
  The ID of the version to deploy. When omitted, the currently active version is deployed. You can retrieve available version IDs from the [List Agent Versions](/api-reference/agent-versions/list-versions) endpoint.
</ParamField>

<ParamField body="new_version_name" type="string">
  When provided, Botsify creates a new version snapshot with this name from the current agent configuration and deploys it. Takes precedence over `version_id` if both are supplied.
</ParamField>

## Example — Deploy the Active Version

```bash theme={null}
curl --request POST \
  --url "https://app.botsify.com/api/v1/deploy-ai-agent" \
  --header "Authorization: Bearer <your_token>" \
  --header "Content-Type: application/json" \
  --data '{}'
```

## Example — Deploy a Specific Version

```bash theme={null}
curl --request POST \
  --url "https://app.botsify.com/api/v1/deploy-ai-agent" \
  --header "Authorization: Bearer <your_token>" \
  --header "Content-Type: application/json" \
  --data '{
    "version_id": 12
  }'
```

## Example — Create a New Version and Deploy

```bash theme={null}
curl --request POST \
  --url "https://app.botsify.com/api/v1/deploy-ai-agent" \
  --header "Authorization: Bearer <your_token>" \
  --header "Content-Type: application/json" \
  --data '{
    "new_version_name": "v4.0 — Summer Release"
  }'
```

## Response

A successful deployment returns `200 OK` with details about the deployed version.

```json theme={null}
{
  "success": true,
  "deployed_version": {
    "id": 15,
    "name": "v4.0 — Summer Release",
    "is_active": true,
    "deployed_at": "2024-06-15T08:00:00Z"
  },
  "message": "Agent deployed successfully."
}
```


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