# Chatbot management

## Retrieves a specific chatbot

> \
> \
> \*\*Required Permission:\*\* \`chatbots.get\`\
> \
> \*\*Resource:\*\* \`chatbots/:chatbotId\`

```json
{"openapi":"3.0.0","info":{"title":"ChatCaptain API","version":"1.0"},"tags":[{"name":"Chatbot management","description":""}],"servers":[{"url":"https://api.chatcaptain.com","description":"Production"}],"security":[{},{}],"paths":{"/v1/workspaces/{workspaceId}/chatbots/{chatbotId}":{"get":{"operationId":"ChatbotController_getChatbot[1]_v1","parameters":[{"name":"chatbotId","required":true,"in":"path","description":"The ID of the chatbot to be retrieved.","schema":{"type":"string"}},{"name":"workspaceId","required":true,"in":"path","description":"The ID of the workspace.","schema":{"type":"string"}}],"responses":{"200":{"description":"Details of the chatbot.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetChatbotResponseDto"}}}},"403":{"description":"Insufficient permissions."}},"summary":"Retrieves a specific chatbot","tags":["Chatbot management"],"description":"\n\n**Required Permission:** `chatbots.get`\n\n**Resource:** `chatbots/:chatbotId`"}}},"components":{"schemas":{"GetChatbotResponseDto":{"type":"object","properties":{"chatbot":{"description":"The retrieved chatbot.","allOf":[{"$ref":"#/components/schemas/ChatbotDto"}]},"buckets":{"description":"A list of buckets associated with the chatbot.","type":"array","items":{"$ref":"#/components/schemas/BucketDto"}},"error":{"type":"string","description":"Optional error message."}},"required":["buckets"]},"ChatbotDto":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the chatbot."},"name":{"type":"string","description":"The name of the chatbot."},"workspaceId":{"type":"string","description":"The ID of the workspace this chatbot belongs to."},"type":{"type":"string","description":"The type of the chatbot."},"created":{"type":"string","description":"The creation timestamp of the chatbot."},"updated":{"type":"string","description":"The last update timestamp of the chatbot."},"enabled":{"type":"boolean","description":"Indicates whether the chatbot is enabled."},"timeZone":{"type":"string","description":"The timezone of the chatbot."},"edition":{"description":"The edition of the bot.\n\n- `0`: ENTERPRISE\n- `1`: VOICE_AGENT_GO_TEMPLATE\n- `2`: VOICE_AGENT_GO\n- `3`: AI_ASSISTANT","allOf":[{"$ref":"#/components/schemas/BotEdition"}]}},"required":["name","workspaceId","type","created","updated","enabled","timeZone","edition"]},"BotEdition":{"type":"number","enum":[0,1,2,3,-1],"description":"The edition of the bot.\n\n- `0`: ENTERPRISE\n- `1`: VOICE_AGENT_GO_TEMPLATE\n- `2`: VOICE_AGENT_GO\n- `3`: AI_ASSISTANT"},"BucketDto":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the bucket."},"name":{"type":"string","description":"The name of the bucket."},"created":{"type":"string","description":"The creation timestamp of the bucket."},"updated":{"type":"string","description":"The last update timestamp of the bucket."}},"required":["id","name","created","updated"]}}}}
```

## Updates an existing chatbot

> \
> \
> \*\*Required Permission:\*\* \`chatbots.edit\`\
> \
> \*\*Resource:\*\* \`chatbots/:chatbotId\`

```json
{"openapi":"3.0.0","info":{"title":"ChatCaptain API","version":"1.0"},"tags":[{"name":"Chatbot management","description":""}],"servers":[{"url":"https://api.chatcaptain.com","description":"Production"}],"security":[{},{}],"paths":{"/v1/workspaces/{workspaceId}/chatbots/{chatbotId}":{"patch":{"operationId":"ChatbotController_updateChatbot[1]_v1","parameters":[{"name":"chatbotId","required":true,"in":"path","description":"The ID of the chatbot to be updated.","schema":{"type":"string"}},{"name":"workspaceId","required":true,"in":"path","description":"The ID of the workspace.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChatbotRequestDto"}}}},"responses":{"200":{"description":"Chatbot updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatbotResponseDto"}}}},"400":{"description":"Invalid input data."},"403":{"description":"Insufficient permissions."}},"summary":"Updates an existing chatbot","tags":["Chatbot management"],"description":"\n\n**Required Permission:** `chatbots.edit`\n\n**Resource:** `chatbots/:chatbotId`"}}},"components":{"schemas":{"UpdateChatbotRequestDto":{"type":"object","properties":{"updateChatbot":{"description":"The object containing the fields to be updated.","allOf":[{"$ref":"#/components/schemas/UpdateChatbotPayloadDto"}]}},"required":["updateChatbot"]},"UpdateChatbotPayloadDto":{"type":"object","properties":{"name":{"type":"string","description":"The new name of the chatbot."},"timeZone":{"type":"string","description":"The new timezone of the chatbot."}}},"ChatbotResponseDto":{"type":"object","properties":{"chatbot":{"description":"The chatbot object.","allOf":[{"$ref":"#/components/schemas/ChatbotDto"}]},"error":{"type":"string","description":"Optional error message."}}},"ChatbotDto":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the chatbot."},"name":{"type":"string","description":"The name of the chatbot."},"workspaceId":{"type":"string","description":"The ID of the workspace this chatbot belongs to."},"type":{"type":"string","description":"The type of the chatbot."},"created":{"type":"string","description":"The creation timestamp of the chatbot."},"updated":{"type":"string","description":"The last update timestamp of the chatbot."},"enabled":{"type":"boolean","description":"Indicates whether the chatbot is enabled."},"timeZone":{"type":"string","description":"The timezone of the chatbot."},"edition":{"description":"The edition of the bot.\n\n- `0`: ENTERPRISE\n- `1`: VOICE_AGENT_GO_TEMPLATE\n- `2`: VOICE_AGENT_GO\n- `3`: AI_ASSISTANT","allOf":[{"$ref":"#/components/schemas/BotEdition"}]}},"required":["name","workspaceId","type","created","updated","enabled","timeZone","edition"]},"BotEdition":{"type":"number","enum":[0,1,2,3,-1],"description":"The edition of the bot.\n\n- `0`: ENTERPRISE\n- `1`: VOICE_AGENT_GO_TEMPLATE\n- `2`: VOICE_AGENT_GO\n- `3`: AI_ASSISTANT"}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.chatcaptain.com/api/api-dokumentation/chatbot-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
