# Set Machine Memory Limit (/machines/Machines_set_memory_limit)

Set the memory limit for a machine using the balloon device

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

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `app_name` | path | `string` | Yes | Fly App Name |
| `machine_id` | path | `string` | Yes | Machine ID |

## Request Body

Type: `main.setMemoryLimitRequest`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `limit_mb` | `integer` | No |  |

## Responses

| Status | Description | Schema |
| --- | --- | --- |
| `200` | OK | `main.memoryResponse` |

The full machine-readable OpenAPI spec is available at /openapi.json.