Skip to main content
You can use the Apps resource to create and manage Fly Apps. A Fly App is an abstraction for a group of Machines running your code, along with the configuration, provisioned resources, and data we need to keep track of to run and route to your Machines. Learn more about Fly Apps.

Create a Fly App

POST /apps Machines must be associated with a Fly App. App names must be unique.

Body parameters

string
required
Name of the app to create
boolean
Used for Fly Kubernetes.
string
required
Slug of the org in which to create the app
string
Name for an IPv6 private network to segment the app onto.
POST/v1/apps
Status: 201 created - Example response
To segment the app into its own network, you can pass a network argument in the JSON body, for example: "network": "some-arbitrary-name". Any Machine started in such an app will not be able to access other apps within their organization over the private network. However, Machines within such an app can communicate to each other, and the fly-replay header can still be used to route requests to Machines within a segmented app.

Allocate an IP address for global request routing

If you intend for Machines to be accessible to the internet, you’ll need to allocate an IP address to the app. Currently this is done using flyctl or the Fly.io GraphQL API. This offers your app automatic, global routing via Anycast. Read more about this in the Networking section. Example:
The app will answer on this IP address, and after a small delay, at my-app-name.fly.dev.

Get app details

GET /apps/{app_name} Get details about an app, like its organization slug and name. Also, to check if the app exists!

Path parameters

string
required
The name of the Fly App to get the details of.
GET/v1/apps/{app_name}"
Status: 200 OK - Example response

Set app secrets

For sensitive environment variables, such as credentials, you can set secrets on the app:
Machines inherit secrets from the app. Existing Machines must be updated to pick up secrets set after the Machine was created. For non-sensitive information, you can configure environment variables per Machine when you create or update the Machine.

Delete a Fly App

DELETE /apps/{app_name} Machines should be stopped before attempting deletion. Append ?force=true to the URI to stop and delete immediately.

Path parameters

string
required
The name of the Fly App to delete.

Query parameters

Boolean
Stop all Machines and delete the app immediately.
DELETE/v1/apps/{app_name}
Status: 202 accepted

List apps in an organization

GET /apps?org_slug=

Query parameters

string
required
The organization to list apps for.
GET/v1/apps?org_slug=
Status: 200 OK - Example response