> ## 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. # Close DM > Removes the direct message from the user's list of direct messages. ### Changelog | Version | Description | | ------------ | ------------| | 0.48.0 | Added | ## OpenAPI ````json POST /api/v1/dm.close { "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.close": { "post": { "tags": [ "Direct Messages" ], "summary": "Close DM", "description": "Removes the direct message from the user's list of direct messages.\n\n### Changelog\n| Version | Description | \n| ------------ | ------------|\n| 0.48.0 | Added |", "operationId": "post-api-v1-im.close", "parameters": [ { "$ref": "#/components/parameters/Auth-Token" }, { "$ref": "#/components/parameters/UserId" } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "roomId": { "type": "string", "description": "The room ID." } }, "required": [ "roomId" ] }, "examples": { "Example": { "value": { "roomId": "ByehQjC44FwMeiLbX" } } } } } }, "responses": { "200": { "$ref": "#/components/responses/trueSuccess" }, "401": { "$ref": "#/components/responses/authorizationError" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" }, "errorType": { "type": "string" } } }, "examples": { "RoomId is required": { "value": { "success": false, "error": "Body param \"roomId\" is required [error-room-param-not-provided]", "errorType": "error-room-param-not-provided" } }, "Invalid room ID or user is not member of room": { "value": { "success": false, "error": "The user is not subscribed to the room" } } } } } } } } } }, "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": { "trueSuccess": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } }, "examples": { "Success": { "value": { "success": true } } } } } }, "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." } } } } } } } } } ````