Can't find how to choose a region when creating a machine using REST API

Hello!

When I create a machine using the REST API (Machines · Fly Docs), it is automatically created in the region closest to me. I’ve read through all the documentation but couldn’t find a way to specify the region where I want the machine to be created. I checked the config object but didn’t see any attribute related to region selection.

Can anyone help?

It looks like the documentation on fly.io/docs/machines/api is outdated, you can use the one at https://docs.machines.dev which has up-to-date API documentation.

(to directly reply to your question: provide a top-level region key with your chosen region.)

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.