---
title: "Opt this machine in or out of renter-supplied public images (host owner)"
method: PUT
path: "/api/v1/hosts/machines/{id}/custom-images"
tags: ["hosts"]
---

# Opt this machine in or out of renter-supplied public images (host owner)

`PUT /api/v1/hosts/machines/{id}/custom-images`

## Request

- Base URL: `https://amplerun-api.spiry.org`
- URL: `https://amplerun-api.spiry.org/api/v1/hosts/machines/{id}/custom-images`
- Auth: HTTP bearer

Default false: a machine that never opted in never receives a custom image. Opting in is 409 while the marketplace has custom images disabled; opting out always works and wins any reservation in flight. Custom images still run under the mandatory launch profile. Each change is audited.

## Path parameters

- `id` string, uuid, required

## Headers

- `Idempotency-Key` string, uuid, required

## Request body

- object
  - `accept` boolean, required

## Response `200`

Current opt-in.

- object
  - `machine_id` string, uuid, required
  - `accepts_custom_images` boolean, required

## Other responses

- `default`: Error envelope. 401 unauthenticated, 403/404 forbidden, 409 conflict, 422 invalid input, 429 rate limited (code UNAVAILABLE, retryable:true, no Retry-After header), 503 unavailable money/provider state with retryable:true.

---

[API](https://skmtc.dev/amplerun/apis/amplerun-business-api.md) · [All operations](https://skmtc.dev/amplerun/apis/amplerun-business-api/llms.txt) · [OpenAPI document](https://skmtc.dev/amplerun/apis/amplerun-business-api/revisions/40944687fa52?raw)
