Get number of unread items
This action retrieves the count of a user's unread messages, unread mentioned messages, or received invitations in group channels. You can use this action to display an unread count in the UI and prompt the user to check unread items. This is only available for group channels.
HTTP request
Note: If you are using the in-app channel in Delight AI agent, the endpoint for your API request should start with
https://api-{application_id}.svc.delight.ai/v3instead ofhttps://api-{application_id}.sendbird.com/v3. For more details, refer to our Delight AI agent guide.
Parameters
The following table lists the parameters that this action supports.
Parameters
| Required | Type | Description |
|---|---|---|
user_id | string | Specifies the unique ID of a user. |
item_keys | string | Specifies which unread items to count in a comma-separated string. Acceptable values are the following: |
| Optional | Type | Description |
|---|---|---|
custom_types | string | Specifies custom channel types in a comma-separated string. If specified, only unread items in channels with the specified custom types are included in the count. |
Responses
If successful, this action returns the total count of items in the response body.
Error
In the case of an error, an error object like below is returned. See the error codes section for more details.