# [BETA] Update VM instance state

```http
PUT /compute/v1/tenants/{tenantId}/instances/{instanceId}/state
```

Base URL: `https://api-portal.aur.lu/api`

Operation ID: `UpdateInstanceState`

Authentication: ApiKeyAuth (API key in header `X-Api-Key`)

Required permission: `operate:compute:instances`

Updates the state (e.g. start/stop) of a specific VM instance

## Parameters

### Path parameters

- `tenantId` (string, required) — Tenant ID
- `instanceId` (string, required) — Instance ID

## Request body (required)

Update state request

Content type: `application/json`

- `state` (string, one of: `Starting`, `Running`, `Stopping`, `Stopped`, `Destroyed`, `Expunging`, `Migrating`, `Error`, `Unknown`, `Shutdown`, `Restoring`)

Example request body:

```json
{
  "state": "Starting"
}
```

## Responses

### 200 — OK

Content type: `application/json`

- `id` (string)
- `jobId` (string)

### 400 — Bad Request

Content type: `application/json`

- `message` (string)

### 403 — Compute is read-only or suspended for this tenant

Content type: `application/json`

- `message` (string)
