Skip to content
Maua.Culturewire

Fly.io

Apps, machines, volumes and certificates (Machines API)

Developer toolsCatalog2 tools · 0 triggers

Managed auth

Authentication

Methods your end users can connect with. Credentials are stored encrypted, and secret values are never shown again or returned by the API.

  • API key

    Your users enter

    • API token (FlyV1 fm2_…)SecretRequired
    • Organization (slug)OptionalIdentifier

    Where to find them

    1. With flyctl installed and signed in (fly auth login), create a read-only token for the organization: fly tokens create readonly -o <organization> -x 8760h. If you will start, stop or modify machines, create an organization one: fly tokens create org -o <organization> -x 8760h (also from fly.io/dashboard → “Tokens”).
    2. Copy the full token, including “FlyV1 ”.
    3. Enter the organization slug (personal for yours). Deploy tokens (fly tokens deploy) only work for one app and do not pass the connection test.

Tools (2)

  • Fly.io API requestFLYIO_SEND_REQUEST

    Authenticated call to the Fly.io API (https://api.machines.dev/v1). Any endpoint of the API is allowed. {app} is the app name. Examples: GET /apps?org_slug=personal, GET /apps/{app}, GET /apps/{app}/machines, GET /apps/{app}/machines/{id}, POST /apps/{app}/machines/{id}/stop, POST /apps/{app}/machines/{id}/start, POST /apps/{app}/machines/{id}/suspend, GET /apps/{app}/machines/{id}/wait?state=started, GET /apps/{app}/volumes, GET /apps/{app}/volumes/{id}/snapshots, GET /apps/{app}/certificates, GET /apps/{app}/certificates/{domain}, POST /apps/{app}/certificates/{domain}/check. App IPs are not in the Machines API but in the GraphQL API: POST https://api.fly.io/graphql {"query": "{ app(name: \"…\") { ipAddresses { nodes { address type region } } } }"}.

    Required scopes

    No scopes required

    Input

    Fly.io API request input
    NameTypeDescription
    methodstringHTTP methodOne of: GET, POST, PUT, PATCH, DELETEDefault: "GET"
    pathrequiredstringPath relative to the API base URL, or a full URL on the same API (e.g. a next-page link)
    queryobjectQuery string parameters
    bodyunknownJSON body
    formobjectBody as application/x-www-form-urlencoded instead of JSON
    body_base64stringBinary body, base64 (at most 960000 characters)
    content_typestringContent-Type of body_base64
    headersobjectExtra headers such as Accept. Authentication is added automatically.
  • Machines of an appFLYIO_LIST_MACHINES

    Machines of an app with status (started, stopped, suspended…), region, process group, image, CPU, memory, private IP and dates, without the full configuration.

    Required scopes

    No scopes required

    Input

    Machines of an app input
    NameTypeDescription
    apprequiredstringApp name (GET /apps?org_slug=… lists them)
    regionstringOnly those in this region, e.g. iad or cdg
    statusstringOnly those in this state, e.g. started or stopped