---
title: "Patch Application"
method: PATCH
path: "/apps/{appId}"
tags: ["Applications"]
---

# Patch Application

`PATCH /apps/{appId}`

## Request

- Base URL: `https://api.bunny.net/mc`
- URL: `https://api.bunny.net/mc/apps/{appId}`
- Auth: API key in header `AccessKey`
- TypeScript: <https://skmtc.dev/bunny/apis/magic-containers-api/docs/apps/:appId/patch.ts> (a function with typed inputs; its response is checked against the schema)

Partially updates an existing application using JSON Merge Patch semantics. Only provided fields will be updated; existing fields not included in the request will remain unchanged. For arrays (containers, volumes, endpoints), items with matching IDs will be updated, items without IDs will be added as new, and items not included will be deleted.

## Path parameters

- `appId` string, required

## Request body

- PatchApplicationRequest
  - `name` string, nullable
  - `runtimeType` 'shared' | 'reserved'
  - `autoScaling` AutoscalingSettings
    - `min` integer, required
    - `max` integer, required
  - `regionSettings` UpdateRegionSettingsRequest
    - `allowedRegionIds` string[], nullable
    - `requiredRegionIds` string[], nullable
    - `maxAllowedRegions` integer, nullable
    - `nodeSelectors` object, nullable
  - `containerTemplates` ContainerRequest[], nullable
    - `id` string, nullable: Absence of the id means it is a new container. Presence of the id means it is an update of the existing.
    - `name` string, required
    - `image` string, nullable
    - `imageName` string, required
    - `imageNamespace` string, required
    - `imageTag` string, required
    - `imageDigest` string, nullable
    - `imageRegistryId` string, required
    - `imagePullPolicy` 'always' | 'ifNotPresent'
    - `entryPoint` ContainerEntryPoint
      - `command` string, nullable
      - `commandArray` string[], nullable
      - `arguments` string, nullable
      - `argumentsArray` string[], nullable
      - `workingDirectory` string, nullable
    - `probes` ContainerProbes
      - `startup` ContainerProbe
        - `initialDelaySeconds` integer, nullable
        - `periodSeconds` integer, nullable
        - `timeoutSeconds` integer, nullable
        - `failureThreshold` integer, nullable
        - `successThreshold` integer, nullable
        - `httpGet` HttpGetProbe
          - `request` HttpGetProbeRequestDetails
            - `path` string
            - `portNumber` integer
          - `response` HttpGetProbeResponseDetails
            - `expectedStatusCode` 'continue' | 'switchingProtocols' | 'processing' | 'earlyHints' | 'ok' | 'created' | 'accepted' | 'nonAuthoritativeInformation' | 'noContent' | 'resetContent' | 'partialContent' | 'multiStatus' | 'alreadyReported' | 'imUsed' | 'multipleChoices' | 'movedPermanently' | 'found' | 'seeOther' | 'notModified' | 'useProxy' | 'unused' | 'temporaryRedirect' | 'permanentRedirect' | 'badRequest' | 'unauthorized' | 'paymentRequired' | 'forbidden' | 'notFound' | 'methodNotAllowed' | 'notAcceptable' | 'proxyAuthenticationRequired' | 'requestTimeout' | 'conflict' | 'gone' | 'lengthRequired' | 'preconditionFailed' | 'requestEntityTooLarge' | 'requestUriTooLong' | 'unsupportedMediaType' | 'requestedRangeNotSatisfiable' | 'expectationFailed' | 'misdirectedRequest' | 'unprocessableEntity' | 'locked' | 'failedDependency' | 'upgradeRequired' | 'preconditionRequired' | 'tooManyRequests' | 'requestHeaderFieldsTooLarge' | 'unavailableForLegalReasons' | 'internalServerError' | 'notImplemented' | 'badGateway' | 'serviceUnavailable' | 'gatewayTimeout' | 'httpVersionNotSupported' | 'variantAlsoNegotiates' | 'insufficientStorage' | 'loopDetected' | 'notExtended' | 'networkAuthenticationRequired'
        - `tcpSocket` TcpSocketProbe
          - `request` TcpSocketProbeRequestDetails
            - `portNumber` integer
        - `grpc` GrpcProbe
          - `request` GrpcProbeRequestDetails
            - `portNumber` integer
            - `serviceName` string, nullable: If this is not specified, the default behavior is to probe the server's overall health status.
      - `readiness` ContainerProbe
        - `initialDelaySeconds` integer, nullable
        - `periodSeconds` integer, nullable
        - `timeoutSeconds` integer, nullable
        - `failureThreshold` integer, nullable
        - `successThreshold` integer, nullable
        - `httpGet` HttpGetProbe
          - `request` HttpGetProbeRequestDetails
            - `path` string
            - `portNumber` integer
          - `response` HttpGetProbeResponseDetails
            - `expectedStatusCode` 'continue' | 'switchingProtocols' | 'processing' | 'earlyHints' | 'ok' | 'created' | 'accepted' | 'nonAuthoritativeInformation' | 'noContent' | 'resetContent' | 'partialContent' | 'multiStatus' | 'alreadyReported' | 'imUsed' | 'multipleChoices' | 'movedPermanently' | 'found' | 'seeOther' | 'notModified' | 'useProxy' | 'unused' | 'temporaryRedirect' | 'permanentRedirect' | 'badRequest' | 'unauthorized' | 'paymentRequired' | 'forbidden' | 'notFound' | 'methodNotAllowed' | 'notAcceptable' | 'proxyAuthenticationRequired' | 'requestTimeout' | 'conflict' | 'gone' | 'lengthRequired' | 'preconditionFailed' | 'requestEntityTooLarge' | 'requestUriTooLong' | 'unsupportedMediaType' | 'requestedRangeNotSatisfiable' | 'expectationFailed' | 'misdirectedRequest' | 'unprocessableEntity' | 'locked' | 'failedDependency' | 'upgradeRequired' | 'preconditionRequired' | 'tooManyRequests' | 'requestHeaderFieldsTooLarge' | 'unavailableForLegalReasons' | 'internalServerError' | 'notImplemented' | 'badGateway' | 'serviceUnavailable' | 'gatewayTimeout' | 'httpVersionNotSupported' | 'variantAlsoNegotiates' | 'insufficientStorage' | 'loopDetected' | 'notExtended' | 'networkAuthenticationRequired'
        - `tcpSocket` TcpSocketProbe
          - `request` TcpSocketProbeRequestDetails
            - `portNumber` integer
        - `grpc` GrpcProbe
          - `request` GrpcProbeRequestDetails
            - `portNumber` integer
            - `serviceName` string, nullable: If this is not specified, the default behavior is to probe the server's overall health status.
      - `liveness` ContainerProbe
        - `initialDelaySeconds` integer, nullable
        - `periodSeconds` integer, nullable
        - `timeoutSeconds` integer, nullable
        - `failureThreshold` integer, nullable
        - `successThreshold` integer, nullable
        - `httpGet` HttpGetProbe
          - `request` HttpGetProbeRequestDetails
            - `path` string
            - `portNumber` integer
          - `response` HttpGetProbeResponseDetails
            - `expectedStatusCode` 'continue' | 'switchingProtocols' | 'processing' | 'earlyHints' | 'ok' | 'created' | 'accepted' | 'nonAuthoritativeInformation' | 'noContent' | 'resetContent' | 'partialContent' | 'multiStatus' | 'alreadyReported' | 'imUsed' | 'multipleChoices' | 'movedPermanently' | 'found' | 'seeOther' | 'notModified' | 'useProxy' | 'unused' | 'temporaryRedirect' | 'permanentRedirect' | 'badRequest' | 'unauthorized' | 'paymentRequired' | 'forbidden' | 'notFound' | 'methodNotAllowed' | 'notAcceptable' | 'proxyAuthenticationRequired' | 'requestTimeout' | 'conflict' | 'gone' | 'lengthRequired' | 'preconditionFailed' | 'requestEntityTooLarge' | 'requestUriTooLong' | 'unsupportedMediaType' | 'requestedRangeNotSatisfiable' | 'expectationFailed' | 'misdirectedRequest' | 'unprocessableEntity' | 'locked' | 'failedDependency' | 'upgradeRequired' | 'preconditionRequired' | 'tooManyRequests' | 'requestHeaderFieldsTooLarge' | 'unavailableForLegalReasons' | 'internalServerError' | 'notImplemented' | 'badGateway' | 'serviceUnavailable' | 'gatewayTimeout' | 'httpVersionNotSupported' | 'variantAlsoNegotiates' | 'insufficientStorage' | 'loopDetected' | 'notExtended' | 'networkAuthenticationRequired'
        - `tcpSocket` TcpSocketProbe
          - `request` TcpSocketProbeRequestDetails
            - `portNumber` integer
        - `grpc` GrpcProbe
          - `request` GrpcProbeRequestDetails
            - `portNumber` integer
            - `serviceName` string, nullable: If this is not specified, the default behavior is to probe the server's overall health status.
    - `environmentVariables` EnvironmentVariable[]
      - `name` string, required
      - `value` string
    - `endpoints` EndpointRequest[]
      - `displayName` string, required
      - `cdn` CdnEndpointRequest
        - `isSslEnabled` boolean
        - `stickySessions` StickySessionSettings
          - `enabled` boolean
          - `sessionHeaders` string[], required
          - `cookieName` string
        - `pullZoneId` integer, nullable
        - `portMappings` ContainerPortMappingRequest[]
          - `containerPort` integer, required
          - `exposedPort` integer, nullable
          - `protocols` Protocol[]
      - `anycast` AnycastEndpointRequest
        - `type` 'iPv4', required
        - `portMappings` ContainerPortMappingRequest[], required
          - `containerPort` integer, required
          - `exposedPort` integer, nullable
          - `protocols` Protocol[]
    - `volumeMounts` VolumeMountRequest[]
      - `name` string, required
      - `mountPath` string, required
  - `volumes` VolumeRequest[], nullable
    - `name` string, required
    - `size` integer, required
  - `gpu` GpuConfig
    - `type` string, required
    - `count` integer

## Response `200`

Application was successfully updated.

- AddApplicationResponse
  - `id` string

## Other responses

- `400`: Invalid input.
- `401`: User is unauthorized.
- `403`: User has invalid card or suspended.
- `404`: Application not found.
- `422`: Unprocessable entity.
- `500`: Unexpected server error.

## Changes

- **2026-11-12** `7bb58a0591b0`: 3 info
  - added the new optional request property `gpu` (media type: application/json)
  - added the new optional request property `gpu` (media type: text/json)
  - added the new optional request property `gpu` (media type: application/*+json)
- **2026-04-26** `62fb48c758fb`: 582 breaking, 590 info
  - removed the enum value `Accepted` of the request property `containerTemplates/items/probes/liveness/httpGet/response/expectedStatusCode` (media type: application/json)
  - removed the enum value `Accepted` of the request property `containerTemplates/items/probes/liveness/httpGet/response/expectedStatusCode` (media type: text/json)
  - removed the enum value `Accepted` of the request property `containerTemplates/items/probes/liveness/httpGet/response/expectedStatusCode` (media type: application/*+json)
  - removed the enum value `Accepted` of the request property `containerTemplates/items/probes/readiness/httpGet/response/expectedStatusCode` (media type: application/json)
  - …1168 more

[Operation history](https://skmtc.dev/bunny/apis/magic-containers-api/changes/apps/:appId/patch.md)

---

[API](https://skmtc.dev/bunny/apis/magic-containers-api.md) - [All operations](https://skmtc.dev/bunny/apis/magic-containers-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bunny/apis/magic-containers-api/revisions/7bb58a0591b0?raw)
