# Chatbot endpoints (Client API: VDS)

> 6 FeatherPanel Client API: VDS endpoints from user/vds/chatbot.php: methods, paths, auth, permissions, rate limits, parameters and responses.

Source: https://featherpanel.com/docs/api/reference/user/vds/chatbot/

Defined in [`backend/app/routes/user/vds/chatbot.php`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/vds/chatbot.php). Authentication used here: **Signed-in user**. Read [Authentication](https://featherpanel.com/docs/api/authentication/) for how to send credentials and [Rate limits and errors](https://featherpanel.com/docs/api/rate-limits-and-errors/) for the response envelope.

Paths, methods, permissions and rate limits come from the route file. Summaries, parameters and response codes come from the OpenAPI annotations on the controllers; endpoints without annotations show only what the route file declares.

## Endpoints

### POST `/api/user/vds-chatbot/chat`

- Auth: Signed-in user
- Default rate limit: 30 / minute (`user-vds-chatbot`)
- Route name: `vds-chatbot-chat`
- Controller: [`VdsChatbotController::chat`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/VdsChatbotController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/vds/chatbot.php#L26)

**Send a message to the VDS AI chatbot** Send a message to the VDS AI assistant and receive a response. Optionally include chat history for context.

Request body: [`VdsChatbotRequest`](https://featherpanel.com/docs/api/schemas/#schema-vdschatbotrequest) (application/json)

| Body field | Type | Required | Description |
| --- | --- | --- | --- |
| `message` | string | yes | User message |
| `history` | object\[\] | no | Chat history |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `response` | string |  |

```bash
curl -X POST "$PANEL_URL/api/user/vds-chatbot/chat" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"message":"","history":[]}'
```

Responses: `200` Chat response received successfully · `400` Invalid request · `401` Unauthorized

### POST `/api/user/vds-chatbot/chat/stream`

- Auth: Signed-in user
- Default rate limit: 30 / minute (`user-vds-chatbot`)
- Route name: `vds-chatbot-chat-stream`
- Controller: [`VdsChatbotController::streamChat`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/VdsChatbotController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/vds/chatbot.php#L38)

```bash
curl -X POST "$PANEL_URL/api/user/vds-chatbot/chat/stream" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

### GET `/api/user/vds-chatbot/conversations`

- Auth: Signed-in user
- Default rate limit: 30 / minute (`user-vds-chatbot`)
- Route name: `vds-chatbot-conversations`
- Controller: [`VdsChatbotController::getConversations`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/VdsChatbotController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/vds/chatbot.php#L50)

**Get user VDS chatbot conversations** Retrieve all VDS chatbot conversations for the authenticated user.

| Response `data` field | Type | Description |
| --- | --- | --- |
| `conversations` | object\[\] |  |

```bash
curl -X GET "$PANEL_URL/api/user/vds-chatbot/conversations" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Conversations retrieved successfully · `401` Unauthorized

### GET `/api/user/vds-chatbot/conversations/{id}`

- Auth: Signed-in user
- Default rate limit: 30 / minute (`user-vds-chatbot`)
- Route name: `vds-chatbot-conversation`
- Controller: [`VdsChatbotController::getConversation`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/VdsChatbotController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/vds/chatbot.php#L62)

**Get VDS chatbot conversation messages** Retrieve all messages for a specific VDS chatbot conversation.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Conversation ID |

| Response `data` field | Type | Description |
| --- | --- | --- |
| `conversation` | object |  |
| `messages` | object\[\] |  |

```bash
curl -X GET "$PANEL_URL/api/user/vds-chatbot/conversations/$ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Responses: `200` Messages retrieved successfully · `401` Unauthorized · `404` Conversation not found

### DELETE `/api/user/vds-chatbot/conversations/{id}`

- Auth: Signed-in user
- Default rate limit: 10 / minute (`user-vds-chatbot`)
- Route name: `vds-chatbot-conversation-delete`
- Controller: [`VdsChatbotController::deleteConversation`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/VdsChatbotController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/vds/chatbot.php#L79)

**Delete VDS chatbot conversation** Delete a VDS chatbot conversation and all its messages.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Conversation ID |

```bash
curl -X DELETE "$PANEL_URL/api/user/vds-chatbot/conversations/$ID" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json"
```

Plugin events: [`featherpanel:chatbot:conversation:delete`](https://featherpanel.com/docs/plugins/events/chatbot/#conversation-deleted)

Responses: `200` Conversation deleted successfully · `401` Unauthorized · `404` Conversation not found

### PATCH `/api/user/vds-chatbot/conversations/{id}/memory`

- Auth: Signed-in user
- Default rate limit: 10 / minute (`user-vds-chatbot`)
- Route name: `vds-chatbot-conversation-memory`
- Controller: [`VdsChatbotController::updateMemory`](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/Controllers/User/VdsChatbotController.php)
- [route source](https://github.com/MythicalLTD/FeatherPanel/blob/15b94e9fc9df233123706b47c42728b81e48cb3d/backend/app/routes/user/vds/chatbot.php#L96)

**Update VDS chatbot conversation memory** Update the memory field for a VDS chatbot conversation. This memory is included in the AI context for future messages.

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | integer | yes | Conversation ID |

| Body field | Type | Required | Description |
| --- | --- | --- | --- |
| `memory` | string | no | Memory content |

```bash
curl -X PATCH "$PANEL_URL/api/user/vds-chatbot/conversations/$ID/memory" \
  -H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"memory":""}'
```

Plugin events: [`featherpanel:chatbot:conversation:memory:update`](https://featherpanel.com/docs/plugins/events/chatbot/#conversation-memory-updated)

Responses: `200` Memory updated successfully · `401` Unauthorized · `404` Conversation not found
