Heroku Formation API

Process type scaling

GitHub OpenAPI

Operations 7

GET /apps/{app_id_or_name}/formation List formation #
PATCH /apps/{app_id_or_name}/formation Batch update formation #
PATCH /apps/{app_id_or_name}/formation/{formation_id_or_type} Update a process type #
GET /apps/{app_identity}/formation/{formation_identity} Info #
PATCH /apps/{app_identity}/formation/{formation_identity} Update #
GET /apps/{app_identity}/formation List #
PATCH /apps/{app_identity}/formation Batch Update #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/heroku:heroku-formation-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

heroku-formation-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Heroku Formation API
  version: '3'
  description: 'Operations tagged Formation across 2 of this provider''s published API definitions: heroku-platform-api.yml, heroku-platform-api-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.heroku.com
  description: Heroku Platform API
tags:
- name: Formation
  description: Process type scaling
paths:
  /apps/{app_id_or_name}/formation:
    get:
      operationId: listFormation
      summary: List formation
      description: List process type scaling info.
      tags:
      - Formation
      parameters:
      - $ref: '#/components/parameters/appIdOrName'
      responses:
        '200':
          description: Formation info
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Formation'
      security:
      - BearerAuth: []
    patch:
      operationId: batchUpdateFormation
      summary: Batch update formation
      description: Update scaling for multiple process types.
      tags:
      - Formation
      parameters:
      - $ref: '#/components/parameters/appIdOrName'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - updates
              properties:
                updates:
                  type: array
                  items:
                    type: object
                    required:
                    - type
                    properties:
                      type:
                        type: string
                      quantity:
                        type: integer
                      size:
                        type: string
      responses:
        '200':
          description: Formation updated
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Formation'
      security:
      - BearerAuth: []
    servers:
    - url: https://api.heroku.com
      description: Heroku Platform API
  /apps/{app_id_or_name}/formation/{formation_id_or_type}:
    patch:
      operationId: updateFormation
      summary: Update a process type
      tags:
      - Formation
      parameters:
      - $ref: '#/components/parameters/appIdOrName'
      - name: formation_id_or_type
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                quantity:
                  type: integer
                size:
                  type: string
      responses:
        '200':
          description: Process type updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Formation'
      security:
      - BearerAuth: []
    servers:
    - url: https://api.heroku.com
      description: Heroku Platform API
  /apps/{app_identity}/formation/{formation_identity}:
    get:
      operationId: formationInfo
      summary: Info
      description: Info for a process type
      tags:
      - Formation
      parameters:
      - name: app_identity
        in: path
        required: true
        schema:
          type: string
      - name: formation_identity
        in: path
        required: true
        schema:
          type: string
      x-hyper-schema-rel: self
      x-source: https://api.heroku.com/schema#/definitions/formation/links
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/formation'
      security:
      - bearerAuth: []
    patch:
      operationId: formationUpdate
      summary: Update
      description: Update process type
      tags:
      - Formation
      parameters:
      - name: app_identity
        in: path
        required: true
        schema:
          type: string
      - name: formation_identity
        in: path
        required: true
        schema:
          type: string
      x-hyper-schema-rel: update
      x-source: https://api.heroku.com/schema#/definitions/formation/links
      requestBody:
        content:
          application/json:
            schema:
              properties:
                dyno_size:
                  $ref: '#/components/schemas/formation/definitions/dyno_size'
                quantity:
                  $ref: '#/components/schemas/formation/definitions/quantity'
              type:
              - object
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/formation'
      security:
      - bearerAuth: []
    servers:
    - url: https://api.heroku.com
  /apps/{app_identity}/formation:
    get:
      operationId: formationList
      summary: List
      description: List process type formation
      tags:
      - Formation
      parameters:
      - name: app_identity
        in: path
        required: true
        schema:
          type: string
      x-hyper-schema-rel: instances
      x-source: https://api.heroku.com/schema#/definitions/formation/links
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/formation'
                type:
                - array
      security:
      - bearerAuth: []
    patch:
      operationId: formationBatchUpdate
      summary: Batch Update
      description: Batch update process types
      tags:
      - Formation
      parameters:
      - name: app_identity
        in: path
        required: true
        schema:
          type: string
      x-hyper-schema-rel: update
      x-source: https://api.heroku.com/schema#/definitions/formation/links
      requestBody:
        content:
          application/json:
            schema:
              properties:
                updates:
                  type:
                  - array
                  items:
                    $ref: '#/components/schemas/formation/definitions/update'
                  description: Array with formation updates. Each element must have "type", the id or name of the process type to be updated, and can optionally update its "quantity" or "dyno_size".
              required:
              - updates
              type:
              - object
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/formation'
                type:
                - array
      security:
      - bearerAuth: []
    servers:
    - url: https://api.heroku.com
components:
  schemas:
    Formation:
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          description: Process type name (web, worker, etc.)
        command:
          type: string
        quantity:
          type: integer
        size:
          type: string
        app:
          type: object
          properties:
            id:
              type: string
              format: uuid
            name:
              type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    formation:
      description: The formation of processes that should be maintained for an app. Update the formation to scale processes or change dyno sizes. Available process type names and commands are defined by the `process_types` attribute for the [slug](#slug) currently released on an app.
      $schema: http://json-schema.org/draft-04/hyper-schema
      stability: production
      strictProperties: true
      title: Heroku Platform API - Formation
      type:
      - object
      definitions:
        command:
          description: command to use to launch this process
          example: bundle exec rails server -p $PORT
          readOnly: false
          type:
          - string
        created_at:
          description: when process type was created
          example: '2012-01-01T12:00:00Z'
          format: date-time
          readOnly: true
          type:
          - string
        dyno_size:
          description: dyno size
          example:
            id: 01234567-89ab-cdef-0123-456789abcdef
          identity:
            anyOf:
            - type: object
              description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.
              x-ae-placeholder: true
            - type: object
              description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.
              x-ae-placeholder: true
          properties:
            id:
              description: unique identifier of the dyno size
              example: 01234567-89ab-cdef-0123-456789abcdef
              format: uuid
              readOnly: true
              type:
              - string
            name:
              description: name of the dyno size
              example: Standard-1X
              readOnly: true
              type:
              - string
          readOnly: false
          type:
          - object
        id:
          description: unique identifier of this process type
          example: 01234567-89ab-cdef-0123-456789abcdef
          format: uuid
          readOnly: true
          type:
          - string
        identity:
          anyOf:
          - $ref: '#/components/schemas/formation/definitions/id'
          - $ref: '#/components/schemas/formation/definitions/type'
        quantity:
          description: number of processes to maintain
          example: 1
          readOnly: false
          type:
          - integer
        size:
          deprecated: true
          description: deprecated, refer to 'dyno_size' instead
          example: standard-1X
          readOnly: false
          type:
          - string
        type:
          description: type of process to maintain
          example: web
          readOnly: true
          pattern: ^[-\w]{1,128}$
          type:
          - string
        updated_at:
          description: when dyno type was updated
          example: '2012-01-01T12:00:00Z'
          format: date-time
          readOnly: true
          type:
          - string
        update:
          additionalProperties: false
          description: Properties to update a process type
          properties:
            dyno_size:
              $ref: '#/components/schemas/formation/definitions/dyno_size'
            quantity:
              $ref: '#/components/schemas/formation/definitions/quantity'
            type:
              $ref: '#/components/schemas/formation/definitions/type'
          readOnly: false
          required:
          - type
          type:
          - object
      properties:
        app:
          description: app formation belongs to
          properties:
            name:
              $ref: '#/components/schemas/app/definitions/name'
            id:
              $ref: '#/components/schemas/app/definitions/id'
          type:
          - object
        command:
          $ref: '#/components/schemas/formation/definitions/command'
        created_at:
          $ref: '#/components/schemas/formation/definitions/created_at'
        dyno_size:
          description: dyno size
          properties:
            id:
              $ref: '#/components/schemas/dyno-size/definitions/id'
            name:
              $ref: '#/components/schemas/dyno-size/definitions/name'
          type:
          - object
        id:
          $ref: '#/components/schemas/formation/definitions/id'
        quantity:
          $ref: '#/components/schemas/formation/definitions/quantity'
        size:
          $ref: '#/components/schemas/formation/definitions/size'
        type:
          $ref: '#/components/schemas/formation/definitions/type'
        updated_at:
          $ref: '#/components/schemas/formation/definitions/updated_at'
    app:
      description: An app represents the program that you would like to deploy and run on Heroku.
      $schema: http://json-schema.org/draft-04/hyper-schema
      stability: production
      strictProperties: true
      title: Heroku Platform API - App
      type:
      - object
      definitions:
        archived_at:
          description: when app was archived
          example: '2012-01-01T12:00:00Z'
          format: date-time
          readOnly: true
          type:
          - 'null'
          - string
        buildpack_provided_description:
          description: description from buildpack of app
          example: Ruby/Rack
          readOnly: true
          type:
          - 'null'
          - string
        created_at:
          description: when app was created
          example: '2012-01-01T12:00:00Z'
          format: date-time
          readOnly: true
          type:
          - string
        generation:
          description: Generation of the Heroku platform for this app
          readOnly: true
          type:
          - object
          properties:
            id:
              description: unique identifier of the generation of the Heroku platform for this app
              example: 01234567-89ab-cdef-0123-456789abcdef
              format: uuid
              readOnly: true
              type:
              - string
            name:
              description: unique name of the generation of the Heroku platform for this app
              example: cedar
              readOnly: true
              type:
              - string
        git_url:
          description: git repo URL of app
          example: https://git.heroku.com/example.git
          pattern: ^https://git\.heroku\.com/[a-z][a-z0-9-]{2,29}\.git$
          readOnly: true
          type:
          - string
        id:
          description: unique identifier of app
          example: 01234567-89ab-cdef-0123-456789abcdef
          format: uuid
          readOnly: true
          type:
          - string
        identity:
          anyOf:
          - $ref: '#/components/schemas/app/definitions/id'
          - $ref: '#/components/schemas/app/definitions/name'
        maintenance:
          default: false
          description: maintenance status of app
          example: false
          readOnly: false
          type:
          - boolean
        name:
          description: unique name of app
          example: example
          pattern: ^[a-z][a-z0-9-]{1,28}[a-z0-9]$
          readOnly: false
          type:
          - string
        released_at:
          default: null
          description: when app was released
          example: '2012-01-01T12:00:00Z'
          format: date-time
          readOnly: true
          type:
          - 'null'
          - string
        repo_size:
          default: null
          description: git repo size in bytes of app
          example: 0
          readOnly: true
          type:
          - integer
          - 'null'
        slug_size:
          default: null
          description: slug size in bytes of app
          example: 0
          readOnly: true
          type:
          - integer
          - 'null'
        updated_at:
          description: when app was updated
          example: '2012-01-01T12:00:00Z'
          format: date-time
          readOnly: true
          type:
          - string
        web_url:
          description: web URL of app
          example: https://example.herokuapp.com/
          format: uri
          pattern: ^https?://[a-z][a-z0-9-]{3,43}\.herokuapp\.com/$
          readOnly: true
          type:
          - 'null'
          - string
        acm:
          description: ACM status of this app
          default: false
          example: false
          readOnly: true
          type:
          - boolean
      properties:
        acm:
          $ref: '#/components/schemas/app/definitions/acm'
        archived_at:
          $ref: '#/components/schemas/app/definitions/archived_at'
        buildpack_provided_description:
          $ref: '#/components/schemas/app/definitions/buildpack_provided_description'
        build_stack:
          description: identity of the stack that will be used for new builds
          properties:
            id:
              $ref: '#/components/schemas/stack/definitions/id'
            name:
              $ref: '#/components/schemas/stack/definitions/name'
          strictProperties: true
          type:
          - object
        created_at:
          $ref: '#/components/schemas/app/definitions/created_at'
        generation:
          $ref: '#/components/schemas/app/definitions/generation'
        git_url:
          $ref: '#/components/schemas/app/definitions/git_url'
        id:
          $ref: '#/components/schemas/app/definitions/id'
        internal_routing:
          $ref: '#/components/schemas/team-app/definitions/internal_routing'
        maintenance:
          $ref: '#/components/schemas/app/definitions/maintenance'
        name:
          $ref: '#/components/schemas/app/definitions/name'
        owner:
          description: identity of app owner
          properties:
            email:
              $ref: '#/components/schemas/account/definitions/email'
            id:
              $ref: '#/components/schemas/account/definitions/id'
          strictProperties: true
          type:
          - object
        organization:
          description: identity of team
          properties:
            id:
              $ref: '#/components/schemas/team/definitions/id'
            name:
              $ref: '#/components/schemas/team/definitions/name'
          type:
          - 'null'
          - object
        team:
          description: identity of team
          properties:
            id:
              $ref: '#/components/schemas/team/definitions/id'
            name:
              $ref: '#/components/schemas/team/definitions/name'
          type:
          - 'null'
          - object
        region:
          description: identity of app region
          properties:
            id:
              $ref: '#/components/schemas/region/definitions/id'
            name:
              $ref: '#/components/schemas/region/definitions/name'
          strictProperties: true
          type:
          - object
        released_at:
          $ref: '#/components/schemas/app/definitions/released_at'
        repo_size:
          $ref: '#/components/schemas/app/definitions/repo_size'
        slug_size:
          $ref: '#/components/schemas/app/definitions/slug_size'
        space:
          description: identity of space
          properties:
            id:
              $ref: '#/components/schemas/space/definitions/id'
            name:
              $ref: '#/components/schemas/space/definitions/name'
            shield:
              $ref: '#/components/schemas/space/definitions/shield'
          type:
          - 'null'
          - object
        stack:
          description: identity of app stack
          properties:
            id:
              $ref: '#/components/schemas/stack/definitions/id'
            name:
              $ref: '#/components/schemas/stack/definitions/name'
          strictProperties: true
          type:
          - object
        updated_at:
          $ref: '#/components/schemas/app/definitions/updated_at'
        web_url:
          $ref: '#/components/schemas/app/definitions/web_url'
    dyno-size:
      description: 'Dyno sizes are the values and details of sizes that can be assigned to dynos. This information can also be found at : [https://devcenter.heroku.com/articles/dyno-types](https://devcenter.heroku.com/articles/dyno-types).'
      $schema: http://json-schema.org/draft-04/hyper-schema
      stability: prototype
      strictProperties: true
      title: Heroku Platform API - Dyno Size
      type:
      - object
      definitions:
        architecture:
          description: CPU architecture of this dyno size
          example: amd64
          readOnly: true
          type:
          - string
        compute:
          description: minimum vCPUs, non-dedicated may get more depending on load
          example: 1
          readOnly: true
          type:
          - integer
        dedicated:
          description: whether this dyno will be dedicated to one user
          example: false
          readOnly: true
          type:
          - boolean
        generation:
          description: Generation of the Heroku platform for this dyno size
          readOnly: true
          type:
          - object
          properties:
            id:
              description: unique identifier of the generation of the Heroku platform for this dyno size
              example: 01234567-89ab-cdef-0123-456789abcdef
              format: uuid
              readOnly: true
              type:
              - string
            name:
              description: unique name of the generation of the Heroku platform for this dyno size
              example: cedar
              readOnly: true
              type:
              - string
        id:
          description: unique identifier of the dyno size
          example: 01234567-89ab-cdef-0123-456789abcdef
          format: uuid
          readOnly: true
          type:
          - string
        identity:
          anyOf:
          - $ref: '#/components/schemas/dyno-size/definitions/id'
          - $ref: '#/components/schemas/dyno-size/definitions/name'
        memory:
          description: amount of RAM in GB
          example: 0.5
          readOnly: true
          type:
          - number
        name:
          description: name of the dyno size
          example: eco
          readOnly: true
          type:
          - string
        cost:
          description: price information for this dyno size
          readOnly: true
          type:
          - 'null'
          - object
          definitions:
            cents:
              description: price in cents per unit time
              example: 0
              readOnly: true
              type:
              - integer
            unit:
              description: unit of price for dyno
              readOnly: true
              example: month
              type:
              - string
        precise_dyno_units:
          description: unit of consumption for Heroku Enterprise customers to 2 decimal places
          example: 0.28
          readOnly: true
          type:
          - number
        private_space_only:
          description: whether this dyno can only be provisioned in a private space
          example: false
          readOnly: true
          type:
          - boolean
      properties:
        architecture:
          $ref: '#/components/schemas/dyno-size/definitions/architecture'
        compute:
          $ref: '#/components/schemas/dyno-size/definitions/compute'
        cost:
          $ref: '#/components/schemas/dyno-size/definitions/cost'
        dedicated:
          $ref: '#/components/schemas/dyno-size/definitions/dedicated'
        precise_dyno_units:
          $ref: '#/components/schemas/dyno-size/definitions/precise_dyno_units'
        generation:
          $ref: '#/components/schemas/dyno-size/definitions/generation'
        id:
          $ref: '#/components/schemas/dyno-size/definitions/id'
        memory:
          $ref: '#/components/schemas/dyno-size/definitions/memory'
        name:
          $ref: '#/components/schemas/dyno-size/definitions/name'
        private_space_only:
          $ref: '#/components/schemas/dyno-size/definitions/private_space_only'
  parameters:
    appIdOrName:
      name: app_id_or_name
      in: path
      required: true
      schema:
        type: string
      description: App ID (UUID) or app name
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Heroku API key or OAuth token
    bearerAuth:
      type: http
      scheme: bearer
      description: 'OAuth access token or API key (see https://devcenter.heroku.com/articles/platform-api-reference#authentication). Requests must send Accept: application/vnd.heroku+json; version=3.'
x-refined-from:
- heroku-platform-api.yml
- heroku-platform-api-openapi.yml