v66

OpenAPI 3.1.0raw.githubusercontent.com2026-08-0174265626.3 KB
apps

Update app

Update an existing app, identified by its id.

The app name, slug, default branch, and delete protection setting can be changed. Omitted fields are left unchanged. Changing the slug affects the deployment domains generated for this app.

Important: The slug cannot collide with an existing app in the same project. A duplicate slug returns a 409 conflict.

Required Permissions

Your root key must have one of the following permissions:

  • app.*.update_app (to update any app)
  • app.<app_id>.update_app (to update a specific app)
post/v2/apps.updateApp

Request body

projectstring required

Identifies a resource by either its unique ID or its slug. Accepts a prefixed ID (such as 'proj_' or 'app_') or a slug.

appstring required

Identifies a resource by either its unique ID or its slug. Accepts a prefixed ID (such as 'proj_' or 'app_') or a slug.

namestring

New human-readable name for the app. Omit this field to leave the current name unchanged.

slugstring

Identifies a resource by either its unique ID or its slug. Accepts a prefixed ID (such as 'proj_' or 'app_') or a slug.

defaultBranchstring

New default git branch deployments track for this app. Omit this field to leave the current branch unchanged.

deleteProtectionboolean

Enable or disable delete protection for the app. Omit this field to leave the current setting unchanged.

Example request

{
  "project": "proj_1234abcd",
  "app": "proj_1234abcd",
  "name": "Payments API",
  "slug": "proj_1234abcd",
  "defaultBranch": "main",
  "deleteProtection": true
}

Response

Successfully updated the app.

Example response

{
  "meta": {
    "requestId": "req_123"
  },
  "data": {
    "id": "app_1234abcd",
    "name": "Payments API",
    "slug": "payments-api",
    "defaultBranch": "main",
    "currentDeploymentId": "d_1234abcd",
    "createdAt": 1704067200000,
    "updatedAt": 1704153600000
  }
}