v1

latestOpenAPI 3.1.12026-08-063445179.6 KB
apps

Update app

All fields are optional. labels and layers replace the entire value. env_vars performs a deep merge with existing variables. config replaces the entire deploy config (no deep merge).

Updating layers or env_vars will restart running isolates.

patch/v2/apps/{app}

Path parameters

appstring required

The app ID or slug. App slugs must be 3–32 characters long, may contain only lowercase letters, numbers, and hyphens, cannot contain underscores, must not start or end with a hyphen, must not have consecutive hyphens in positions 3 and 4, and cannot be a reserved slug. App IDs are UUIDs.

Request body

slugstring

New app slug. App slugs must be 3–32 characters long, may contain only lowercase letters, numbers, and hyphens, cannot contain underscores, must not start or end with a hyphen, must not have consecutive hyphens in positions 3 and 4, and cannot be a reserved slug.

labelsLabels

Example request

{
  "labels": {
    "custom.customer_id": "cust_123",
    "custom.environment": "production",
    "custom.regions": [
      "us-east",
      "eu-west"
    ]
  },
  "env_vars": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "value": "postgres://prod-host/db"
    }
  ],
  "config": {
    "framework": "nextjs",
    "install": "npm install",
    "build": "npm run build"
  }
}

Response

OK

idstring uuid required

Unique app identifier (UUID)

slugstring required

Human-readable app slug. App slugs must be 3–32 characters long, may contain only lowercase letters, numbers, and hyphens, cannot contain underscores, must not start or end with a hyphen, must not have consecutive hyphens in positions 3 and 4, and cannot be a reserved slug.

labelsLabels
updated_atstring required

ISO 8601 timestamp of last modification

created_atstring required

ISO 8601 timestamp of creation

Example response

{
  "id": "00000000-0000-0000-0000-000000000000",
  "slug": "my-customer-app",
  "labels": {
    "custom.customer_id": "cust_123",
    "custom.environment": "production"
  },
  "layers": [
    {
      "id": "lyr_abc123",
      "slug": "shared-secrets"
    }
  ],
  "env_vars": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "key": "APP_NAME",
      "value": "My Customer App",
      "secret": false,
      "contexts": "all"
    }
  ],
  "config": {
    "framework": "nextjs",
    "install": "npm install",
    "build": "npm run build"
  },
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}