> ## 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. # Set DM Topic > Set the topic of a DM. ### Changelog | Version | Description | | ---------------- | ------------| | 0.48.0 | Added | ## OpenAPI ````json POST /api/v1/dm.setTopic { "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.setTopic": { "post": { "tags": [ "Direct Messages" ], "summary": "Set DM Topic", "description": "Set the topic of a DM.\n\n### Changelog\n| Version | Description | \n| ---------------- | ------------|\n| 0.48.0 | Added |", "operationId": "post-api-v1-im.setTopic", "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 of the direct message." }, "topic": { "type": "string", "description": "The topic of the DM." } }, "required": [ "roomId", "topic" ] }, "examples": { "Example": { "value": { "roomId": "ByehQjC44FwMeiLbX", "topic": "Discuss all of the testing" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "topic": { "type": "string" }, "success": { "type": "boolean" } } }, "examples": { "Example": { "value": { "topic": "Discuss all of the testing", "success": true } } } } } }, "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": { "Example": { "value": { "success": false, "error": "Body param \"roomId\" is required [error-room-param-not-provided]", "errorType": "error-room-param-not-provided" } } } } } } } } } }, "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": { "success": { "type": "boolean" }, "error": { "type": "string" } } }, "examples": { "Authorization Error": { "value": { "success": false, "error": "You must be logged in to do this." } } } } } } } } } ````