# Update Metadata (set/remove multiple keys) (/machines/Machines_update_metadata)

Update multiple metadata keys at once. Null values and empty strings remove keys.
+ If `machine_version` is provided and no longer matches the current machine version, returns 412 Precondition Failed.

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

## Parameters

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

## Request Body

Type: `updateMetadataRequest`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `machine_version` | `string` | No |  |
| `metadata` | `map<string, string>` | No |  |
| `updated_at` | `string` | No |  |

## Responses

| Status | Description | Schema |
| --- | --- | --- |
| `204` | No Content |  |
| `400` | Bad Request | `ErrorResponse` |
| `412` | Precondition Failed | `ErrorResponse` |

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