# Inbox views

## Lists all views for a chatbot

> \
> \
> \*\*Required Permission:\*\* \`chatbots.inbox.views.list\`\
> \
> \*\*Resource:\*\* \`chatbots/:chatbotId\`

```json
{"openapi":"3.0.0","info":{"title":"ChatCaptain API","version":"1.0"},"tags":[{"name":"Inbox views","description":""}],"servers":[{"url":"https://api.chatcaptain.com","description":"Production"}],"security":[{},{}],"paths":{"/v1/inbox/{chatbotId}/views":{"get":{"operationId":"InboxViewController_listViews[1]_v1","parameters":[{"name":"chatbotId","required":true,"in":"path","description":"The ID of the chatbot","schema":{"type":"string"}}],"responses":{"200":{"description":"List of all views.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListViewsResponseDto"}}}},"403":{"description":"Permission denied."}},"summary":"Lists all views for a chatbot","tags":["Inbox views"],"description":"\n\n**Required Permission:** `chatbots.inbox.views.list`\n\n**Resource:** `chatbots/:chatbotId`"}}},"components":{"schemas":{"ListViewsResponseDto":{"type":"object","properties":{"views":{"description":"The list of views.","type":"array","items":{"$ref":"#/components/schemas/ViewDto"}},"error":{"type":"string","description":"Optional error message."}},"required":["views"]},"ViewDto":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the view."},"created":{"type":"string","description":"Timestamp when the view was created."},"updated":{"type":"string","description":"Timestamp when the view was last updated."},"name":{"type":"string","description":"The name of the view."},"icon":{"type":"string","description":"The name of the icon for the view."},"tags":{"description":"A list of tag IDs to filter by.","type":"array","items":{"type":"string"}},"unread":{"type":"boolean","description":"Filters only by unread conversations."},"sorting":{"type":"string","description":"The field to sort by."},"selfAssigned":{"type":"boolean","description":"Filters only by conversations assigned to the current agent."},"open":{"type":"boolean","description":"Filters by open conversations."},"closed":{"type":"boolean","description":"Filters by closed conversations."},"inProgress":{"type":"boolean","description":"Filters by conversations in progress."},"sortingDirection":{"description":"The sort direction\n\n- `0`: ASC\n- `1`: DESC","allOf":[{"$ref":"#/components/schemas/SortDirection"}]}},"required":["id","created","updated","name","icon","tags","unread","sorting","selfAssigned","open","closed","inProgress","sortingDirection"]},"SortDirection":{"type":"number","enum":[0,1,-1],"description":"Sort direction\n\n- `0`: ASC\n- `1`: DESC"}}}}
```

## Creates a new view

> \
> \
> \*\*Required Permission:\*\* \`chatbots.inbox.views.create\`\
> \
> \*\*Resource:\*\* \`chatbots/:chatbotId\`

```json
{"openapi":"3.0.0","info":{"title":"ChatCaptain API","version":"1.0"},"tags":[{"name":"Inbox views","description":""}],"servers":[{"url":"https://api.chatcaptain.com","description":"Production"}],"security":[{},{}],"paths":{"/v1/inbox/{chatbotId}/views":{"post":{"operationId":"InboxViewController_createView[1]_v1","parameters":[{"name":"chatbotId","required":true,"in":"path","description":"The ID of the chatbot","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrUpdateViewRequestDto"}}}},"responses":{"201":{"description":"View created successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViewResponseDto"}}}},"400":{"description":"Invalid input data."},"403":{"description":"Permission denied."}},"summary":"Creates a new view","tags":["Inbox views"],"description":"\n\n**Required Permission:** `chatbots.inbox.views.create`\n\n**Resource:** `chatbots/:chatbotId`"}}},"components":{"schemas":{"CreateOrUpdateViewRequestDto":{"type":"object","properties":{"name":{"type":"string","description":"The name of the view."},"icon":{"type":"string","description":"The name of the icon for the view."},"tags":{"description":"A list of tag IDs for filtering.","default":[],"type":"array","items":{"type":"string"}},"unread":{"type":"boolean","description":"Display only unread conversations.","default":false},"sorting":{"type":"string","description":"Sort field (e.g., \"created\", \"updated\")."},"selfAssigned":{"type":"boolean","description":"Display only self-assigned conversations.","default":false},"open":{"type":"boolean","description":"Display open conversations.","default":true},"closed":{"type":"boolean","description":"Display closed conversations.","default":true},"inProgress":{"type":"boolean","description":"Display conversations in progress.","default":true},"sortingDirection":{"description":"Sort direction\n\n- `0`: ASC\n- `1`: DESC","default":1,"allOf":[{"$ref":"#/components/schemas/SortDirection"}]}},"required":["name","icon","tags","unread","sorting","selfAssigned","open","closed","inProgress","sortingDirection"]},"SortDirection":{"type":"number","enum":[0,1,-1],"description":"Sort direction\n\n- `0`: ASC\n- `1`: DESC"},"ViewResponseDto":{"type":"object","properties":{"view":{"description":"The view.","nullable":true,"allOf":[{"$ref":"#/components/schemas/ViewDto"}]},"error":{"type":"string","description":"Optional error message."}},"required":["view"]},"ViewDto":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the view."},"created":{"type":"string","description":"Timestamp when the view was created."},"updated":{"type":"string","description":"Timestamp when the view was last updated."},"name":{"type":"string","description":"The name of the view."},"icon":{"type":"string","description":"The name of the icon for the view."},"tags":{"description":"A list of tag IDs to filter by.","type":"array","items":{"type":"string"}},"unread":{"type":"boolean","description":"Filters only by unread conversations."},"sorting":{"type":"string","description":"The field to sort by."},"selfAssigned":{"type":"boolean","description":"Filters only by conversations assigned to the current agent."},"open":{"type":"boolean","description":"Filters by open conversations."},"closed":{"type":"boolean","description":"Filters by closed conversations."},"inProgress":{"type":"boolean","description":"Filters by conversations in progress."},"sortingDirection":{"description":"The sort direction\n\n- `0`: ASC\n- `1`: DESC","allOf":[{"$ref":"#/components/schemas/SortDirection"}]}},"required":["id","created","updated","name","icon","tags","unread","sorting","selfAssigned","open","closed","inProgress","sortingDirection"]}}}}
```

## Retrieves a specific view

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

```json
{"openapi":"3.0.0","info":{"title":"ChatCaptain API","version":"1.0"},"tags":[{"name":"Inbox views","description":""}],"servers":[{"url":"https://api.chatcaptain.com","description":"Production"}],"security":[{},{}],"paths":{"/v1/inbox/{chatbotId}/views/{viewId}":{"get":{"operationId":"InboxViewController_getView[1]_v1","parameters":[{"name":"chatbotId","required":true,"in":"path","description":"The ID of the chatbot","schema":{"type":"string"}},{"name":"viewId","required":true,"in":"path","description":"The ID of the view","schema":{"type":"string"}}],"responses":{"200":{"description":"View details.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViewResponseDto"}}}},"403":{"description":"Permission denied."}},"summary":"Retrieves a specific view","tags":["Inbox views"],"description":"\n\n**Required Permission:** `chatbots.inbox.views.get`\n\n**Resource:** `chatbots/:chatbotId`"}}},"components":{"schemas":{"ViewResponseDto":{"type":"object","properties":{"view":{"description":"The view.","nullable":true,"allOf":[{"$ref":"#/components/schemas/ViewDto"}]},"error":{"type":"string","description":"Optional error message."}},"required":["view"]},"ViewDto":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the view."},"created":{"type":"string","description":"Timestamp when the view was created."},"updated":{"type":"string","description":"Timestamp when the view was last updated."},"name":{"type":"string","description":"The name of the view."},"icon":{"type":"string","description":"The name of the icon for the view."},"tags":{"description":"A list of tag IDs to filter by.","type":"array","items":{"type":"string"}},"unread":{"type":"boolean","description":"Filters only by unread conversations."},"sorting":{"type":"string","description":"The field to sort by."},"selfAssigned":{"type":"boolean","description":"Filters only by conversations assigned to the current agent."},"open":{"type":"boolean","description":"Filters by open conversations."},"closed":{"type":"boolean","description":"Filters by closed conversations."},"inProgress":{"type":"boolean","description":"Filters by conversations in progress."},"sortingDirection":{"description":"The sort direction\n\n- `0`: ASC\n- `1`: DESC","allOf":[{"$ref":"#/components/schemas/SortDirection"}]}},"required":["id","created","updated","name","icon","tags","unread","sorting","selfAssigned","open","closed","inProgress","sortingDirection"]},"SortDirection":{"type":"number","enum":[0,1,-1],"description":"Sort direction\n\n- `0`: ASC\n- `1`: DESC"}}}}
```

## Updates an existing view

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

```json
{"openapi":"3.0.0","info":{"title":"ChatCaptain API","version":"1.0"},"tags":[{"name":"Inbox views","description":""}],"servers":[{"url":"https://api.chatcaptain.com","description":"Production"}],"security":[{},{}],"paths":{"/v1/inbox/{chatbotId}/views/{viewId}":{"put":{"operationId":"InboxViewController_updateView[1]_v1","parameters":[{"name":"chatbotId","required":true,"in":"path","description":"The ID of the chatbot","schema":{"type":"string"}},{"name":"viewId","required":true,"in":"path","description":"The ID of the view to update","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrUpdateViewRequestDto"}}}},"responses":{"200":{"description":"View updated successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ViewResponseDto"}}}},"400":{"description":"Invalid input data."},"403":{"description":"Permission denied."}},"summary":"Updates an existing view","tags":["Inbox views"],"description":"\n\n**Required Permission:** `chatbots.inbox.views.edit`\n\n**Resource:** `chatbots/:chatbotId`"}}},"components":{"schemas":{"CreateOrUpdateViewRequestDto":{"type":"object","properties":{"name":{"type":"string","description":"The name of the view."},"icon":{"type":"string","description":"The name of the icon for the view."},"tags":{"description":"A list of tag IDs for filtering.","default":[],"type":"array","items":{"type":"string"}},"unread":{"type":"boolean","description":"Display only unread conversations.","default":false},"sorting":{"type":"string","description":"Sort field (e.g., \"created\", \"updated\")."},"selfAssigned":{"type":"boolean","description":"Display only self-assigned conversations.","default":false},"open":{"type":"boolean","description":"Display open conversations.","default":true},"closed":{"type":"boolean","description":"Display closed conversations.","default":true},"inProgress":{"type":"boolean","description":"Display conversations in progress.","default":true},"sortingDirection":{"description":"Sort direction\n\n- `0`: ASC\n- `1`: DESC","default":1,"allOf":[{"$ref":"#/components/schemas/SortDirection"}]}},"required":["name","icon","tags","unread","sorting","selfAssigned","open","closed","inProgress","sortingDirection"]},"SortDirection":{"type":"number","enum":[0,1,-1],"description":"Sort direction\n\n- `0`: ASC\n- `1`: DESC"},"ViewResponseDto":{"type":"object","properties":{"view":{"description":"The view.","nullable":true,"allOf":[{"$ref":"#/components/schemas/ViewDto"}]},"error":{"type":"string","description":"Optional error message."}},"required":["view"]},"ViewDto":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the view."},"created":{"type":"string","description":"Timestamp when the view was created."},"updated":{"type":"string","description":"Timestamp when the view was last updated."},"name":{"type":"string","description":"The name of the view."},"icon":{"type":"string","description":"The name of the icon for the view."},"tags":{"description":"A list of tag IDs to filter by.","type":"array","items":{"type":"string"}},"unread":{"type":"boolean","description":"Filters only by unread conversations."},"sorting":{"type":"string","description":"The field to sort by."},"selfAssigned":{"type":"boolean","description":"Filters only by conversations assigned to the current agent."},"open":{"type":"boolean","description":"Filters by open conversations."},"closed":{"type":"boolean","description":"Filters by closed conversations."},"inProgress":{"type":"boolean","description":"Filters by conversations in progress."},"sortingDirection":{"description":"The sort direction\n\n- `0`: ASC\n- `1`: DESC","allOf":[{"$ref":"#/components/schemas/SortDirection"}]}},"required":["id","created","updated","name","icon","tags","unread","sorting","selfAssigned","open","closed","inProgress","sortingDirection"]}}}}
```

## Deletes a view

> \
> \
> \*\*Required Permission:\*\* \`chatbots.inbox.views.delete\`\
> \
> \*\*Resource:\*\* \`chatbots/:chatbotId\`

```json
{"openapi":"3.0.0","info":{"title":"ChatCaptain API","version":"1.0"},"tags":[{"name":"Inbox views","description":""}],"servers":[{"url":"https://api.chatcaptain.com","description":"Production"}],"security":[{},{}],"paths":{"/v1/inbox/{chatbotId}/views/{viewId}":{"delete":{"operationId":"InboxViewController_deleteView[1]_v1","parameters":[{"name":"chatbotId","required":true,"in":"path","description":"The ID of the chatbot","schema":{"type":"string"}},{"name":"viewId","required":true,"in":"path","description":"The ID of the view to delete","schema":{"type":"string"}}],"responses":{"200":{"description":"View deleted successfully."},"403":{"description":"Permission denied."}},"summary":"Deletes a view","tags":["Inbox views"],"description":"\n\n**Required Permission:** `chatbots.inbox.views.delete`\n\n**Resource:** `chatbots/:chatbotId`"}}}}
```

## Lists conversations for a view

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

```json
{"openapi":"3.0.0","info":{"title":"ChatCaptain API","version":"1.0"},"tags":[{"name":"Inbox views","description":""}],"servers":[{"url":"https://api.chatcaptain.com","description":"Production"}],"security":[{},{}],"paths":{"/v1/inbox/{chatbotId}/views/{viewId}/conversations":{"get":{"operationId":"InboxViewController_listViewConversations[1]_v1","parameters":[{"name":"chatbotId","required":true,"in":"path","description":"The ID of the chatbot","schema":{"type":"string"}},{"name":"viewId","required":true,"in":"path","description":"The ID of the view","schema":{"type":"string"}},{"name":"limit","required":true,"in":"query","schema":{"type":"number"}},{"name":"pageToken","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"List of conversations for the view."},"403":{"description":"Permission denied."}},"summary":"Lists conversations for a view","tags":["Inbox views"],"description":"\n\n**Required Permission:** `chatbots.conversations.list`\n\n**Resource:** `chatbots/:chatbotId`"}}}}
```

## Gets the conversation count for a view

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

```json
{"openapi":"3.0.0","info":{"title":"ChatCaptain API","version":"1.0"},"tags":[{"name":"Inbox views","description":""}],"servers":[{"url":"https://api.chatcaptain.com","description":"Production"}],"security":[{},{}],"paths":{"/v1/inbox/{chatbotId}/views/{viewId}/count":{"get":{"operationId":"InboxViewController_getViewConversationCount[1]_v1","parameters":[{"name":"chatbotId","required":true,"in":"path","description":"The ID of the chatbot","schema":{"type":"string"}},{"name":"viewId","required":true,"in":"path","description":"The ID of the view","schema":{"type":"string"}}],"responses":{"200":{"description":"The conversation count for the view."},"403":{"description":"Permission denied."}},"summary":"Gets the conversation count for a view","tags":["Inbox views"],"description":"\n\n**Required Permission:** `chatbots.conversations.list`\n\n**Resource:** `chatbots/:chatbotId`"}}}}
```


---

# 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/inbox-views.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.
