---
title: "Creates a App resource."
method: POST
path: "/v1/apps"
tags: ["App"]
---

# Creates a App resource.

`POST /v1/apps`

## Request

- Base URL: `https://api.fortrabbit.com`
- URL: `https://api.fortrabbit.com/v1/apps`
- Auth: HTTP bearer

Creates a App resource.

## Request body

- AppAppCreateApiRequest
  - `teamId` string, nullable
  - `name` string, required
  - `region` string, required: Region identifier, e.g. "eu-w1a" or "us-e1a".
  - `softwarePresetName` string, nullable: Software preset slug; defaults to "general-php".
  - `initialEnvironment` object, nullable: Initial environment configuration.
    - `softwareVersion` string, nullable: Major version only, e.g. "11".
    - `phpVersion` string, nullable: PHP runtime version for the initial environment, e.g. "8.4". Defaults to the platform default. Setting it stops the environment from being auto-updated to newer PHP versions.
    - `components` object: Component plans keyed by component slug. The value is a size key (e.g. "sm") or "off" to disable an optional component. Omitted optional components default to "off".
    - `autoscaling` boolean: Enable autoscaling for the initial environment. Optional; defaults to true.
    - `deployment` object, nullable: Deployment configuration. The git field is required to configure deployment; omit the whole object to skip deployment.
      - `git` object, required
        - `repository` string, required
        - `branch` string, required
        - `directory` string: Deploy directory. Optional; defaults to "/". Must not be null or empty when provided.
      - `buildCommands` string[]
      - `postDeployCommands` string[]
      - `startFirstDeployment` boolean: Trigger a first deployment right after the app is created.
  - `paymentMethodId` string, nullable

## Response `201`

App resource created

- AppApiRead
  - `publicId` string
  - `name` string
  - `description` string, nullable
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `paymentMethod` string, nullable
  - `environments` string[]
  - `people` string[]
  - `teams` string[]
  - `region` string, nullable
  - `software` string, nullable
  - `trial` boolean

## Other responses

- `400`: Invalid input
- `422`: An error occurred

---

[API](https://skmtc.dev/fortrabbit/apis/fortrabbit-api.md) · [All operations](https://skmtc.dev/fortrabbit/apis/fortrabbit-api/llms.txt) · [OpenAPI document](https://skmtc.dev/fortrabbit/apis/fortrabbit-api/revisions/36ca73befa52?raw)
