# Managed Postgres is now in the Machines API

**URL:** <https://community.fly.io/t/managed-postgres-is-now-in-the-machines-api/28640>\
**Category:** Fresh Produce\
**Tags:** postgres, mpg\
**Created:** [September 15, 2026, 5:26pm UTC](https://community.fly.io/t/managed-postgres-is-now-in-the-machines-api/28640 "2026-09-15T17:26:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tripledoublev](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/tripledoublev/32/50306_2.png) [@tripledoublev](https://community.fly.io/u/tripledoublev)\
**Post date:** [September 15, 2026, 5:26pm UTC](https://community.fly.io/t/managed-postgres-is-now-in-the-machines-api/28640/1 "2026-09-15T17:26:33Z")

</div>

The Machines API now supports Managed Postgres (MPG). Using a Fly API token, you can create, inspect, fork, restore, and delete clusters through [`api.machines.dev/v1/postgres`](https://api.machines.dev/v1/postgres).

The API also covers backups, extensions, databases, users, credentials, and app attachments. Cluster creation, fork, restore, deletion, and backup creation are asynchronous. For example, a provisioning script can create a cluster, poll until it reports `ready`, then create the databases and users your app needs.

These endpoints support MPG v2 clusters only; requests for MPG v1 clusters return `404`. If you’re on v1, check your dashboard to see whether your cluster is eligible for migration.

App attachments track which apps use a cluster. Connection secrets such as `DATABASE_URL` are configured separately.

The [API reference](https://docs.machines.dev) and [OpenAPI spec](https://docs.machines.dev/openapi.json) are public. You can use them to write your own scripts or point a coding agent at them to help automate your setup.

Let us know if you run into bugs or rough edges, or if there’s a specific workflow you’d like to see supported.
