> ## 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 Command's Preview Data > Fetches the command's preview data or executes the preview item ## OpenAPI ````json GET /api/v1/commands.preview { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Miscellaneous" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "Commands" }, { "name": "Email Inbox" }, { "name": "Licenses" }, { "name": "Mailer" }, { "name": "Calendar Events" }, { "name": "WhatsApp" }, { "name": "Rasa App" }, { "name": "Jitsi App" } ], "paths": { "/api/v1/commands.preview": { "get": { "tags": [ "Commands" ], "summary": "Get Command's Preview Data", "description": "Fetches the command's preview data or executes the preview item", "operationId": "get-api-v1-commands.preview", "parameters": [ { "$ref": "#/components/parameters/Auth-Token" }, { "$ref": "#/components/parameters/UserId" }, { "name": "command", "in": "query", "description": "The name of the command to be executed.", "required": true, "schema": { "type": "string" }, "example": "unmute" }, { "name": "roomId", "in": "query", "description": "The ID of the room.", "required": true, "schema": { "type": "string" }, "example": "ByehQjC44FwMeiLbX" }, { "name": "params", "in": "query", "description": "Parameters of the command if required. It is `undefined` by default.", "schema": { "type": "string" }, "example": "@user123" } ], "responses": { "200": { "$ref": "#/components/responses/trueSuccess" }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" } } }, "examples": { "Example 1": { "value": { "success": false, "error": "You must provide a command to get the previews from." } } } } } }, "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": { "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." } } } } } } } } } ````