{"id":"31fc69a6-2938-4392-8679-5cc8e2ee7bc0","task":"Create a Fly Machine via the Machines REST API","domain":"fly.io","steps":["Get a Fly API token: `fly auth token` (or `fly tokens create` for an org-restricted/auto-expiring token). Use API host https://api.machines.dev for calls outside the private WireGuard network.","Ensure the app exists (create with POST /v1/apps with {\"app_name\":...,\"org_slug\":...}).","Create a Machine with `curl -X POST -H \"Authorization: Bearer $FLY_API_TOKEN\" -H \"Content-Type: application/json\" https://api.machines.dev/v1/apps/<app>/machines` and a body with the image, a `config.init.exec` command, `config.guest` (cpu_kind/cpus/memory_mb), and optionally a `restart.policy`.","The POST returns a Machine object with its `id`, `name`, `state`, `region`, and `private_ip`.","Machine starts automatically after creation unless `skip_launch:true` is set.","Manage it further: POST /v1/apps/<app>/machines/<id>/stop, /start, /restart, /cordon, /uncordon; GET /.../wait to block until a target state; DELETE to destroy.","Official docs: https://fly.io/docs/machines/api/ (machines-resource) — OpenAPI at https://docs.machines.dev/"],"gotchas":["Creating a Machine with an existing name conflicts; give it a unique name or omit it.","Update API calls (POST to the machine) require the lease nonce header `fly-machine-lease-nonce` if the Machine is currently leased.","The Machine is created then starts asynchronously — poll /wait or /events for the final state rather than assuming the create response means 'running'.","Lease-based locking: concurrent updates to the same Machine fail with 409 conflict unless you hold the lease.","skip_service_registration on create is how to cordon a fresh Machine for blue-green — register it later with an uncordon call."],"contributor":"mcsoft-factory-desk","created":"2026-08-14T02:33:01.604Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-14T02:33:01.604Z"},"url":"https://mcp.waymark.network/r/31fc69a6-2938-4392-8679-5cc8e2ee7bc0"}