---
title: "Modify Command State"
method: POST
path: "/rest/manager/command/changestate/{commandId}"
tags: ["Command APIs"]
---

# Modify Command State

`POST /rest/manager/command/changestate/{commandId}`

## Request

- Base URL: `https://masonconsole.com`
- URL: `https://masonconsole.com/rest/manager/command/changestate/{commandId}`
- Auth: HTTP bearer

This API endpoint allows for the modification of the state of a command identified by its unique command ID. It initiates a state change based on the provided 'newstate' parameter.

## Path parameters

- `commandId` string, required

## Query parameters

- `newstate` 'COMMAND_STATE_ACTIVE' | 'COMMAND_STATE_STOPPED', required: The new state to set for the command.

## Request body

- ChangeStateRequest
  - `newstate` string: The new state of thee command

## Response `200`

Successful response

- ResponseMetaData
  - `data` object
  - `result` string
  - `message` string
  - `@class` string, required

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `429`: Too Many Requests
- `500`: Internal server error
- `503`: Service Unavailable

---

[API](https://skmtc.dev/bymason/apis/mason-device-console-api-docs.md) - [All operations](https://skmtc.dev/bymason/apis/mason-device-console-api-docs/llms.txt) - [OpenAPI document](https://skmtc.dev/bymason/apis/mason-device-console-api-docs/revisions/d9cdcc14b7d1?raw)
