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

# 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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListViewConversationsResponseDto"}}}},"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`"}}},"components":{"schemas":{"ListViewConversationsResponseDto":{"type":"object","properties":{"conversations":{"description":"The list of conversations for the view.","type":"array","items":{"$ref":"#/components/schemas/ConversationDto"}},"nextPageToken":{"type":"string","description":"Token for the next page of results."},"error":{"type":"string","description":"Optional error message."}},"required":["conversations"]},"ConversationDto":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the conversation."},"contactId":{"type":"string","description":"The ID of the contact associated with this conversation."},"archived":{"type":"boolean","description":"Whether the conversation is archived."},"channelId":{"type":"string","description":"The ID of the channel for this conversation."},"channelType":{"type":"string","description":"The type of channel (e.g., web, whatsapp, telegram)."},"chatbotId":{"type":"string","description":"The ID of the chatbot handling this conversation."},"idToken":{"type":"string","description":"The ID token for this conversation."},"language":{"type":"string","description":"The language code of the conversation."},"operatorId":{"type":"string","description":"The ID of the assigned operator."},"photoUrl":{"type":"string","description":"The URL of the contact's photo."},"sessionCount":{"type":"number","description":"The number of sessions in this conversation."},"tags":{"description":"Tags associated with this conversation.","type":"array","items":{"type":"string"}},"unread":{"type":"boolean","description":"Whether the conversation has unread messages."},"variables":{"type":"object","description":"Custom variables for this conversation.","additionalProperties":{"type":"string"}},"lastBlock":{"description":"The last block visited in the flow.","allOf":[{"$ref":"#/components/schemas/ConversationBlockDto"}]},"lastButton":{"description":"The last button clicked by the user.","allOf":[{"$ref":"#/components/schemas/ConversationBlockDto"}]},"created":{"type":"string","description":"Timestamp when the conversation was created."},"updated":{"type":"string","description":"Timestamp when the conversation was last updated."},"providerId":{"type":"string","description":"The external provider ID for this conversation."},"name":{"type":"string","description":"The display name of the contact."},"lastMessage":{"description":"The content of the last message in the conversation.","allOf":[{"$ref":"#/components/schemas/ContentDto"}]},"snoozed":{"type":"string","description":"Timestamp until which the conversation is snoozed."},"lastUserAction":{"type":"string","description":"Timestamp of the last user action."},"mentions":{"description":"List of user IDs mentioned in this conversation.","type":"array","items":{"type":"string"}},"mentionsRead":{"type":"object","description":"Map of mentions to their read status.","additionalProperties":{"type":"boolean"}},"notes":{"description":"Notes attached to this conversation.","allOf":[{"$ref":"#/components/schemas/ConversationNotesDto"}]},"lastSender":{"type":"string","description":"The type of the last sender (user, bot, operator)."},"userInput":{"description":"Current user input state.","allOf":[{"$ref":"#/components/schemas/ConversationUserInputDto"}]},"environment":{"type":"string","description":"The environment.","enum":["dev","test","prod"]},"metadata":{"type":"object","description":"Custom metadata for this conversation.","additionalProperties":{"type":"string"}},"lastUserInput":{"type":"string","description":"The last user input text."},"leadAiConversation":{"description":"Lead AI conversation state.","allOf":[{"$ref":"#/components/schemas/ConversationLeadAiConversationDto"}]},"team":{"description":"The team assigned to this conversation.","allOf":[{"$ref":"#/components/schemas/ConversationTeamDto"}]},"state":{"description":"The current state of the conversation.\n\n- `0`: OPEN\n- `1`: BOT\n- `2`: IN_PROGRESS\n- `3`: CLOSED","allOf":[{"$ref":"#/components/schemas/ConversationStatus"}]},"lastAssignedOperatorId":{"type":"string","description":"The ID of the last assigned operator."},"lastSeen":{"type":"string","description":"Timestamp when the conversation was last seen."}},"required":["id","contactId","archived","channelId","channelType","chatbotId","idToken","language","operatorId","photoUrl","sessionCount","tags","unread","variables","created","updated","name","snoozed","lastUserAction","mentions","mentionsRead","environment","metadata","state"]},"ConversationBlockDto":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the block."},"name":{"type":"string","description":"The display name of the block."}},"required":["id","name"]},"ContentDto":{"type":"object","properties":{"text":{"type":"string"},"file":{"$ref":"#/components/schemas/MessageContentFileDto"},"buttons":{"$ref":"#/components/schemas/MessageContentButtonsDto"},"selectedButton":{"$ref":"#/components/schemas/MessageContentButtonReplyDto"},"template":{"$ref":"#/components/schemas/MessageTemplateDto"},"contact":{"$ref":"#/components/schemas/MessageContentContactDto"},"location":{"$ref":"#/components/schemas/MessageLocationDto"},"note":{"$ref":"#/components/schemas/MessageNoteDto"},"voiceHangup":{"$ref":"#/components/schemas/MessageVoiceHangupDto"},"voiceTransfer":{"$ref":"#/components/schemas/MessageVoiceTransferDto"},"agentHandover":{"$ref":"#/components/schemas/MessageAgentHandoverDto"},"email":{"$ref":"#/components/schemas/MessageContentEmailDto"},"transcription":{"$ref":"#/components/schemas/MessageContentTranscriptionDto"},"textToSpeech":{"$ref":"#/components/schemas/MessageContentTextToSpeechDto"},"reaction":{"$ref":"#/components/schemas/MessageContentReactionDto"},"callSettings":{"$ref":"#/components/schemas/MessageContentCallSettingsDto"},"metaWhatsappTemplate":{"$ref":"#/components/schemas/MessageMetaWhatsAppTemplateDto"},"operator":{"$ref":"#/components/schemas/OperatorDto"},"delay":{"type":"number"},"leadAiId":{"type":"string"}}},"MessageContentFileDto":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"},"type":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"number"},"attachmentRef":{"type":"string"},"caption":{"type":"string"},"transcript":{"type":"string"}},"required":["name","url","type","mimeType","size","attachmentRef"]},"MessageContentButtonsDto":{"type":"object","properties":{"buttons":{"type":"array","items":{"$ref":"#/components/schemas/MessageContentButtonDto"}}},"required":["buttons"]},"MessageContentButtonDto":{"type":"object","properties":{"label":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"},"payload":{"type":"string"}},"required":["label","type","value"]},"MessageContentButtonReplyDto":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"},"payload":{"type":"string"},"type":{"type":"string"},"reference":{"type":"string"}},"required":["label","value","reference"]},"MessageTemplateDto":{"type":"object","properties":{"body":{"type":"string"},"header":{"type":"string"},"footer":{"type":"string"}},"required":["body"]},"MessageContentContactDto":{"type":"object","properties":{"addresses":{"type":"array","items":{"$ref":"#/components/schemas/MessageContentContactAddressDto"}},"emails":{"type":"array","items":{"$ref":"#/components/schemas/MessageContentContactEmailDto"}},"name":{"$ref":"#/components/schemas/MessageContentContactNameDto"},"org":{"$ref":"#/components/schemas/MessageContentContactOrgDto"},"phones":{"type":"array","items":{"$ref":"#/components/schemas/MessageContentContactPhoneDto"}}},"required":["addresses","emails","phones"]},"MessageContentContactAddressDto":{"type":"object","properties":{"city":{"type":"string"},"country":{"type":"string"},"countryCode":{"type":"string"},"street":{"type":"string"},"type":{"type":"string"},"zip":{"type":"string"}}},"MessageContentContactEmailDto":{"type":"object","properties":{"email":{"type":"string","format":"email"},"type":{"type":"string"}},"required":["email"]},"MessageContentContactNameDto":{"type":"object","properties":{"firstName":{"type":"string"},"formattedName":{"type":"string"},"lastName":{"type":"string"}}},"MessageContentContactOrgDto":{"type":"object","properties":{"company":{"type":"string"},"title":{"type":"string"}}},"MessageContentContactPhoneDto":{"type":"object","properties":{"phone":{"type":"string"},"type":{"type":"string"},"waId":{"type":"string"}}},"MessageLocationDto":{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"}},"required":["latitude","longitude"]},"MessageNoteDto":{"type":"object","properties":{"text":{"type":"string"},"mentions":{"type":"array","items":{"type":"string"}}},"required":["text","mentions"]},"MessageVoiceHangupDto":{"type":"object","properties":{"reason":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}}},"required":["reason","headers"]},"MessageVoiceTransferDto":{"type":"object","properties":{"target":{"type":"string"},"reason":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}}},"required":["target","headers"]},"MessageAgentHandoverDto":{"type":"object","properties":{"reason":{"type":"string"},"timeoutSeconds":{"type":"number"},"agentId":{"type":"string"},"groupId":{"type":"string"},"assignmentMethod":{"type":"string"}},"required":["reason"]},"MessageContentEmailDto":{"type":"object","properties":{"subject":{"type":"string"},"body":{"type":"string"},"from":{"type":"string"},"to":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"bcc":{"type":"array","items":{"type":"string"}},"attachmentIds":{"type":"array","items":{"type":"string"}},"references":{"type":"array","items":{"type":"string"}}},"required":["subject","body","from","to","cc","bcc","attachmentIds","references"]},"MessageContentTranscriptionDto":{"type":"object","properties":{"text":{"type":"string"},"language":{"type":"string"},"audioRef":{"type":"string"}},"required":["text","language","audioRef"]},"MessageContentTextToSpeechDto":{"type":"object","properties":{"text":{"type":"string"},"speech":{"type":"string"}},"required":["text"]},"MessageContentReactionDto":{"type":"object","properties":{"reactionToMid":{"type":"string"},"action":{"type":"string"},"reaction":{"type":"string"},"emoji":{"type":"string"}},"required":["reactionToMid","action","reaction","emoji"]},"MessageContentCallSettingsDto":{"type":"object","properties":{"userInputSpeechDetectionTimeout":{"type":"number"},"dtmf":{"type":"boolean"},"bargeIn":{"type":"boolean"}}},"MessageMetaWhatsAppTemplateDto":{"type":"object","properties":{"templateName":{"type":"string","description":"The name of the template on Meta."},"language":{"type":"string","description":"The language code of the template."},"bodyText":{"type":"string","description":"The body text of the message. Placeholders are in the form `{{1}}`."},"headerText":{"type":"string","description":"The text in the header (if present)."},"footerText":{"type":"string","description":"The text in the footer (if present)."},"header":{"description":"The header component, which can contain a file or text parameters.","allOf":[{"$ref":"#/components/schemas/MessageMetaWhatsAppTemplate_HeaderDto"}]},"bodyParameters":{"description":"A list of values that replace the placeholders in the `bodyText`.","type":"array","items":{"type":"string"}},"buttons":{"description":"A list of buttons attached to the message.","type":"array","items":{"$ref":"#/components/schemas/MessageMetaWhatsAppTemplate_ButtonDto"}}},"required":["templateName","language","bodyText","bodyParameters","buttons"]},"MessageMetaWhatsAppTemplate_HeaderDto":{"type":"object","properties":{"file":{"description":"The file attachment for the header.","allOf":[{"$ref":"#/components/schemas/MessageMetaWhatsAppTemplate_Header_FileDto"}]},"parameters":{"description":"List of parameter values for header placeholders.","type":"array","items":{"type":"string"}}},"required":["parameters"]},"MessageMetaWhatsAppTemplate_Header_FileDto":{"type":"object","properties":{"name":{"type":"string","description":"The file name."},"url":{"type":"string","description":"The URL to access the file."},"type":{"type":"string","description":"The file type category."},"mimeType":{"type":"string","description":"The MIME type of the file."},"size":{"type":"number","description":"The file size in bytes."},"attachmentRef":{"type":"string","description":"The internal attachment reference ID."}},"required":["name","url","type","mimeType","size","attachmentRef"]},"MessageMetaWhatsAppTemplate_ButtonDto":{"type":"object","properties":{"label":{"type":"string","description":"The display label of the button."},"type":{"type":"string","description":"The button type (e.g., QUICK_REPLY, URL, PHONE_NUMBER)."},"url":{"type":"string","description":"The URL for URL-type buttons."},"value":{"type":"string","description":"The value for quick reply buttons."}},"required":["label","type"]},"OperatorDto":{"type":"object","properties":{"operatorId":{"type":"string","description":"The unique identifier of the operator."}},"required":["operatorId"]},"ConversationNotesDto":{"type":"object","properties":{"notes":{"description":"List of notes attached to the conversation.","type":"array","items":{"type":"string"}}},"required":["notes"]},"ConversationUserInputDto":{"type":"object","properties":{"redirect":{"type":"string","description":"The redirect destination for user input."},"isSensitive":{"type":"boolean","description":"Whether the user input contains sensitive data."}},"required":["redirect"]},"ConversationLeadAiConversationDto":{"type":"object","properties":{"flowId":{"type":"string","description":"The ID of the flow being executed."},"stepId":{"type":"string","description":"The ID of the current step in the flow."},"interactions":{"type":"number","description":"The number of interactions in this conversation."},"executionId":{"type":"string","description":"The unique execution ID for this conversation flow."}},"required":["flowId","stepId","interactions","executionId"]},"ConversationTeamDto":{"type":"object","properties":{"teamId":{"type":"string","description":"The ID of the team assigned to this conversation."}},"required":["teamId"]},"ConversationStatus":{"type":"number","enum":[0,1,2,3,-1],"description":"The current state of the conversation.\n\n- `0`: OPEN\n- `1`: BOT\n- `2`: IN_PROGRESS\n- `3`: CLOSED"}}}}
```

## 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.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetViewConversationCountResponseDto"}}}},"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`"}}},"components":{"schemas":{"GetViewConversationCountResponseDto":{"type":"object","properties":{"count":{"type":"number","description":"The number of conversations in the view."}},"required":["count"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.chatcaptain.com/api/api-dokumentation/inbox-views.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
