> ## Documentation Index > Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt > Use this file to discover all available pages before exploring further. # Get DM Counters > Gets counters and information of direct messages. Permission required: `view-room-administration`. ### Changelog | Version | Description | | ---------------- | ------------| | 0.65.0 | Added | ## OpenAPI ````json GET /api/v1/dm.counters { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Messaging" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "Chat" }, { "name": "Direct Messages" }, { "name": "Auto-Translate" } ], "paths": { "/api/v1/dm.counters": { "get": { "tags": [ "Direct Messages" ], "summary": "Get DM Counters", "description": "Gets counters and information of direct messages. Permission required: `view-room-administration`.\n\n### Changelog\n| Version | Description | \n| ---------------- | ------------|\n| 0.65.0 | Added |", "operationId": "get-api-v1-im.counters", "parameters": [ { "$ref": "#/components/parameters/Auth-Token" }, { "$ref": "#/components/parameters/UserId" }, { "name": "roomId", "in": "query", "description": "The DM room ID", "required": true, "schema": { "type": "string" } }, { "name": "userId", "in": "query", "description": "The user ID to provide counters for.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK\n\n**Note**\n- `joined`: Boolean flag that shows that user has joined the room or not.\n- `members`: Count of current room members.\n- `unreads`: Count of unread messages for specified user (calling user or provided user ID).\n- `unreadsFrom`: Start date-time of unread interval for specified user.\n- `msgs`: Count of messages in the room.\n- `latest`: End date-time of unread interval for specified user (or date-time of last posted message).\n- `userMentions` - Count of user mentions in messages.", "content": { "application/json": { "schema": { "type": "object", "properties": { "joined": { "type": "boolean" }, "members": { "type": "integer" }, "unreads": { "type": "integer" }, "unreadsFrom": { "type": "string" }, "msgs": { "type": "integer" }, "latest": { "type": "string" }, "userMentions": { "type": "integer" }, "success": { "type": "boolean" } } }, "examples": { "Example 1": { "value": { "joined": true, "members": 2, "unreads": 4, "unreadsFrom": "2023-10-30T20:30:47.975Z", "msgs": 10, "latest": "2023-10-30T20:37:17.16Z", "userMentions": 0, "success": true } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" }, "errorType": { "type": "string" } } }, "examples": { "Example 1": { "value": { "success": false, "error": "Query param \"roomId\" is required [error-room-param-not-provided]", "errorType": "error-room-param-not-provided" } } } } } }, "401": { "$ref": "#/components/responses/authorizationError" } } } } }, "components": { "parameters": { "Auth-Token": { "name": "X-Auth-Token", "in": "header", "description": "The `authToken` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f" }, "UserId": { "name": "X-User-Id", "in": "header", "description": "The `userId` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "rbAXPnMktTFbNpwtJ" } }, "responses": { "authorizationError": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" }, "message": { "type": "string" } } }, "examples": { "Authorization Error": { "value": { "status": "error", "message": "You must be logged in to do this." } } } } } } } } } ````