Skip to content

Machines API docs: create-app name, IP assignments, wait range - #2688

Merged
mlr merged 4 commits into
mainfrom
no-build-machines-api-docs
Nov 25, 2026
Merged

mlr merged 4 commits into
mainfrom
no-build-machines-api-docs

Conversation

@mlr

@mlr mlr commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary of changes

Three fixes for readers who call the Machines API directly:

  • Create an app with name, not app_name. The Apps page documented app_name as the required body field, and six examples sent it. The OpenAPI spec's CreateAppRequest has name. The API still takes app_name on its own, but a request that sends both (easy to do when you read the page and the spec together) gets 400 {"error":"name and app_name params conflict, please use only name"}. Now the Apps page, the custom private networks page, the MCP Machines API guide, the warm pool blueprint and the two create-app snippets use name.
  • Allocate an IP address with the API. The Apps page said this needs flyctl or the GraphQL API. The Machines API has POST /v1/apps/{app_name}/ip_assignments. Now the page documents it, with the type body field and an example, and keeps the flyctl example. The MCP Machines API guide now calls ip_assignments too, instead of GraphQL.
  • Wait timeout range. For the wait endpoint, timeout said only "Default is 60". The API refuses anything outside 1–60 seconds. Now the page gives the range.

Preview

Related Fly.io community and GitHub links

Notes

I checked each change against the live API:

POST /v1/apps {"name":"my-app-name","org_slug":"personal"}                    -> 201
POST /v1/apps {"app_name":"my-app-name","org_slug":"personal"}                -> 201
POST /v1/apps {"name":"…","app_name":"…","org_slug":"personal"}               -> 400 {"error":"name and app_name params conflict, please use only name"}
POST /v1/apps/my-app-name/ip_assignments {"type":"shared_v4"}                 -> 200 {"ip":"66.241.125.240","shared":true,…}
POST /v1/apps/my-app-name/ip_assignments {"type":"v6"}                        -> 200 {"ip":"2a09:8280:1::…","region":"global",…}
GET  /v1/apps/my-app-name/machines/{id}/wait?state=started&timeout=90|61|0    -> 400 {"error":"invalid_argument: invalid WaitMachineRequest.Timeout: value must be inside range [1s, 1m0s]"}
GET  /v1/apps/my-app-name/machines/{id}/wait?state=started&timeout=60s        -> 400 {"error":"invalid timeout"}
GET  /v1/apps/my-app-name/machines/{id}/wait?state=started&timeout=60         -> 200 {"ok":true,"state":"started",…}
GET  https://my-app-name.fly.dev/                                             -> 200, served by the Machine over the shared IPv4 address

The new curl example uses \ line continuations. The older examples on these pages use \\, which a shell doesn't read as a line continuation; I left those as they are.

@mintlify

mintlify Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
fly-io 🟢 Ready View Preview Nov 25, 2026, 4:29 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

@mlr
mlr marked this pull request as ready for review November 24, 2026 00:02
@mlr
mlr requested a review from a team as a code owner November 24, 2026 00:02
@kcmartin

Copy link
Copy Markdown
Contributor

Looks good, thanks for testing it against the live API. One more page has the same two problems: model-context-protocol/deploy-with/machines-api.mdx creates the app with app_name and allocates IPs with GraphQL. You could fix it here or follow up after merging.

@mlr

mlr commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

Added the MCP guide fix in f754ea2: it now creates the app with name and allocates IPs with ip_assignments. Thanks for catching it.

@mlr
mlr merged commit baace83 into main Nov 25, 2026
1 check passed
@mlr
mlr deleted the no-build-machines-api-docs branch November 25, 2026 04:46

This branch was successfully deployed

1 active deployment
staging — f754ea26 Deployed Nov 25, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants