# Machines

Source: https://opvs.ai/docs/api/machines

## `POST` /api/v1/machines/updates

**Request All Machine Updates**

Queue every owned machine; never invoke the Ansible roll from HTTP.

```bash
curl -X POST 'https://app.opvs.ai/api/v1/machines/updates' \
  -H 'Authorization: Bearer <token>'
```

```python
import httpx

resp = httpx.post(
    "https://app.opvs.ai/api/v1/machines/updates",
    headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/machines/updates", {
  method: "POST",
  headers: { "Authorization": "Bearer <token>" }
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
)

func main() {
	req, _ := http.NewRequest("POST", "https://app.opvs.ai/api/v1/machines/updates", nil)
	req.Header.Set("Authorization", "Bearer <token>")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}
```

**Responses**

- `202` — Successful Response

## `GET` /api/v1/machines

**List Machines**

**Parameters**

- `format` (query, any, optional)

```bash
curl -X GET 'https://app.opvs.ai/api/v1/machines' \
  -H 'Authorization: Bearer <token>'
```

```python
import httpx

resp = httpx.get(
    "https://app.opvs.ai/api/v1/machines",
    headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/machines", {
  method: "GET",
  headers: { "Authorization": "Bearer <token>" }
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://app.opvs.ai/api/v1/machines", nil)
	req.Header.Set("Authorization", "Bearer <token>")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}
```

**Responses**

- `200` — Successful Response
- `422` — Validation Error

## `GET` /api/v1/machines/{machine_id}

**Get Machine**

**Parameters**

- `machine_id` (path, string, required)
- `format` (query, any, optional)

```bash
curl -X GET 'https://app.opvs.ai/api/v1/machines/{machine_id}' \
  -H 'Authorization: Bearer <token>'
```

```python
import httpx

resp = httpx.get(
    "https://app.opvs.ai/api/v1/machines/{machine_id}",
    headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/machines/{machine_id}", {
  method: "GET",
  headers: { "Authorization": "Bearer <token>" }
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://app.opvs.ai/api/v1/machines/{machine_id}", nil)
	req.Header.Set("Authorization", "Bearer <token>")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}
```

**Responses**

- `200` — Successful Response
- `422` — Validation Error

## `PATCH` /api/v1/machines/{machine_id}

**Update Machine**

**Parameters**

- `machine_id` (path, string, required)

**Request body**

```bash
curl -X PATCH 'https://app.opvs.ai/api/v1/machines/{machine_id}' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "provider": "string",
  "provider_ref": "string",
  "region": "string",
  "capabilities": {
    "browser": true,
    "network_install": true,
    "scratch_folder": true,
    "skills": true,
    "web_fetch": true,
    "web_search": true
  },
  "roles": [
    "string"
  ],
  "product": "string",
  "price_eur_month": 0.0,
  "contract_ends_on": "2026-01-01"
}'
```

```python
import httpx

resp = httpx.patch(
    "https://app.opvs.ai/api/v1/machines/{machine_id}",
    headers={"Authorization": "Bearer <token>", "Content-Type": "application/json"},
    json={"name": "string", "provider": "string", "provider_ref": "string", "region": "string", "capabilities": {"browser": true, "network_install": true, "scratch_folder": true, "skills": true, "web_fetch": true, "web_search": true}, "roles": ["string"], "product": "string", "price_eur_month": 0.0, "contract_ends_on": "2026-01-01"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/machines/{machine_id}", {
  method: "PATCH",
  headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" },
  body: JSON.stringify({"name": "string", "provider": "string", "provider_ref": "string", "region": "string", "capabilities": {"browser": true, "network_install": true, "scratch_folder": true, "skills": true, "web_fetch": true, "web_search": true}, "roles": ["string"], "product": "string", "price_eur_month": 0.0, "contract_ends_on": "2026-01-01"})
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{"name": "string", "provider": "string", "provider_ref": "string", "region": "string", "capabilities": {"browser": true, "network_install": true, "scratch_folder": true, "skills": true, "web_fetch": true, "web_search": true}, "roles": ["string"], "product": "string", "price_eur_month": 0.0, "contract_ends_on": "2026-01-01"}`)
	req, _ := http.NewRequest("PATCH", "https://app.opvs.ai/api/v1/machines/{machine_id}", body)
	req.Header.Set("Authorization", "Bearer <token>")
	req.Header.Set("Content-Type", "application/json")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}
```

**Responses**

- `200` — Successful Response
- `422` — Validation Error

## `DELETE` /api/v1/machines/{machine_id}

**Delete Machine**

Remove a brand-owned machine that has no desks and hosts no others.

**Parameters**

- `machine_id` (path, string, required)

```bash
curl -X DELETE 'https://app.opvs.ai/api/v1/machines/{machine_id}' \
  -H 'Authorization: Bearer <token>'
```

```python
import httpx

resp = httpx.delete(
    "https://app.opvs.ai/api/v1/machines/{machine_id}",
    headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/machines/{machine_id}", {
  method: "DELETE",
  headers: { "Authorization": "Bearer <token>" }
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
)

func main() {
	req, _ := http.NewRequest("DELETE", "https://app.opvs.ai/api/v1/machines/{machine_id}", nil)
	req.Header.Set("Authorization", "Bearer <token>")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}
```

**Responses**

- `200` — Successful Response
- `422` — Validation Error

## `POST` /api/v1/machines/{machine_id}/updates

**Request Machine Update**

Record a customer request for the existing, build-draining roll path.

**Parameters**

- `machine_id` (path, string, required)

```bash
curl -X POST 'https://app.opvs.ai/api/v1/machines/{machine_id}/updates' \
  -H 'Authorization: Bearer <token>'
```

```python
import httpx

resp = httpx.post(
    "https://app.opvs.ai/api/v1/machines/{machine_id}/updates",
    headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())
```

```javascript
const resp = await fetch("https://app.opvs.ai/api/v1/machines/{machine_id}/updates", {
  method: "POST",
  headers: { "Authorization": "Bearer <token>" }
});
const data = await resp.json();
console.log(data);
```

```go
package main

import (
	"net/http"
)

func main() {
	req, _ := http.NewRequest("POST", "https://app.opvs.ai/api/v1/machines/{machine_id}/updates", nil)
	req.Header.Set("Authorization", "Bearer <token>")
	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
}
```

**Responses**

- `202` — Successful Response
- `422` — Validation Error

## Request All Machine Updates

`POST https://app.opvs.ai/api/v1/machines/updates`

Also as: MCP `tool_call software-factory.requestAllMachineUpdates` · skill `software-factory`

Queue every owned machine; never invoke the Ansible roll from HTTP.

## List Machines

`GET https://app.opvs.ai/api/v1/machines`

Also as: MCP `tool_call software-factory.listMachines` · skill `software-factory`

| Code | When | What to do |
| --- | --- | --- |
| 422 | Validation Error |  |

## Get Machine

`GET https://app.opvs.ai/api/v1/machines/{machine_id}`

Also as: MCP `tool_call software-factory.getMachine` · skill `software-factory`

| Code | When | What to do |
| --- | --- | --- |
| 422 | Validation Error |  |

## Update Machine

`PATCH https://app.opvs.ai/api/v1/machines/{machine_id}`

Also as: MCP `tool_call software-factory.updateMachine` · skill `software-factory`

| Code | When | What to do |
| --- | --- | --- |
| 422 | Validation Error |  |

## Delete Machine

`DELETE https://app.opvs.ai/api/v1/machines/{machine_id}`

Also as: MCP `tool_call software-factory.deleteMachine` · skill `software-factory`

Remove a brand-owned machine that has no desks and hosts no others.

| Code | When | What to do |
| --- | --- | --- |
| 422 | Validation Error |  |

## Request Machine Update

`POST https://app.opvs.ai/api/v1/machines/{machine_id}/updates`

Also as: MCP `tool_call software-factory.requestMachineUpdate` · skill `software-factory`

Record a customer request for the existing, build-draining roll path.

| Code | When | What to do |
| --- | --- | --- |
| 422 | Validation Error |  |
