> For the complete documentation index, see [llms.txt](https://docs.epic-ai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.epic-ai.com/api-dokumentation/chatbot-management.md).

# 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"}}}}
```
