POST /api/vms/{id}/boot
Updated
Start a VM. Read GET /api/vms/{id} afterward to confirm the resulting state.
| Property | Value |
|---|---|
| Scope | readwrite |
| Request body | none |
| Success | 204 No Content |
Endpoint
POST
${baseUrl}/api/vms/${id}/boot Start a created or stopped VM.
Use your host URL and API key as shell variables:
baseUrl="https://agent.example.com"
VIRT_AGENT_API_KEY="<your-api-key>" cURL template
curl --request POST "${baseUrl}/api/vms/${id}/boot" \
--header "Authorization: Bearer ${VIRT_AGENT_API_KEY}" Request
Section titled “Request”| Location | Name | Type | Required | Description |
|---|---|---|---|---|
| Header | Authorization | bearer token | yes | Bearer ${VIRT_AGENT_API_KEY} from a readwrite key. |
| Path | id | string | yes | VM id. |
Response
Section titled “Response”| Status | Body | Description |
|---|---|---|
204 No Content | none | Boot request was accepted by the host. Read GET /api/vms/{id} to confirm state and display_state. |
Examples
Section titled “Examples”Call example
Section titled “Call example”baseUrl="https://agent.example.com"VIRT_AGENT_API_KEY="<your-api-key>"id="demo-api-vm"
curl --request POST "${baseUrl}/api/vms/${id}/boot" \ --header "Authorization: Bearer ${VIRT_AGENT_API_KEY}"Response example
Section titled “Response example”HTTP/1.1 204 No ContentErrors
Section titled “Errors”| Status | Code | Description |
|---|---|---|
401 | UNAUTHORIZED | API key is missing or invalid. |
403 | FORBIDDEN | Key is read-only or endpoint is outside the key allowlist. |
404 | NOT_FOUND | VM id does not exist. |
409 | INVALID_STATE | VM state does not allow boot. |
500 | CH_ERROR, NETWORK_ERROR, STORAGE_ERROR, or INTERNAL | Host failed to start the VM. |