---
title: "Set Machine Memory Limit"
method: PUT
path: "/apps/{app_name}/machines/{machine_id}/memory"
tags: ["Machines"]
---

# Set Machine Memory Limit

`PUT /apps/{app_name}/machines/{machine_id}/memory`

Set the memory limit for a machine using the balloon device

## Path parameters

- `app_name` string, required
- `machine_id` string, required

## Request body

- MainSetMemoryLimitRequest
  - `limit_mb` integer

## Response `200`

OK

- MainMemoryResponse
  - `available_mb` integer
  - `limit_mb` integer

---

[API](https://skmtc.dev/fly/apis/machines-api.md) · [All operations](https://skmtc.dev/fly/apis/machines-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/fly/machines-api/revisions/f5ad396d55d7/schema)
