---
title: "Patch Container Template"
method: PATCH
path: "/apps/{appId}/containers/{containerId}"
tags: ["Containers"]
---

# Patch Container Template

`PATCH /apps/{appId}/containers/{containerId}`

## Request

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

Partially updates a container template within an application. Only provided fields will be updated; existing fields not included in the request will remain unchanged.

## Path parameters

- `appId` string, required
- `containerId` string, required

## Request body

- PatchContainerRequest
  - `name` string, nullable
  - `image` string, nullable
  - `imageName` string, nullable
  - `imageNamespace` string, nullable
  - `imageTag` string, nullable
  - `imageDigest` string, nullable
  - `imageRegistryId` string, nullable
  - `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[], nullable
    - `name` string, required
    - `value` string
  - `endpoints` EndpointRequest[], nullable
    - `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[], nullable
    - `name` string, required
    - `mountPath` string, required

## Response `200`

Container template was successfully updated.

- ContainerTemplate: Container template model
  - `id` string, required
  - `name` string, required
  - `packageId` string, required
  - `image` string, required
  - `imageName` string, required
  - `imageNamespace` string, required
  - `imageTag` string, required
  - `imageRegistryId` string, required
  - `imageDigest` string, required
  - `imagePullPolicy` 'always' | 'ifNotPresent', required
  - `entryPoint` ContainerEntryPoint, required
    - `command` string, nullable
    - `commandArray` string[], nullable
    - `arguments` string, nullable
    - `argumentsArray` string[], nullable
    - `workingDirectory` string, nullable
  - `probes` ContainerProbes, required
    - `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[], required
    - `name` string, required
    - `value` string
  - `endpoints` ContainerEndpoint[], required
    - `id` string, required: Unique endpoint id. Use this value as `container_endpoint_id` when creating a pull zone that targets this endpoint.
    - `displayName` string, required
    - `publicHost` string, required
    - `type` 'cdn' | 'anycast' | 'publicIp', required
    - `isSslEnabled` boolean, required
    - `pullZoneId` string, required
    - `portMappings` EndpointPortMapping[], required
      - `containerPort` integer, required
      - `exposedPort` integer, required
      - `protocols` ProtocolV3[], required
    - `stickySessions` EndpointStickySession
      - `enabled` boolean, required
      - `sessionHeaders` string[], required
      - `cookieName` string, required
    - `internalIpAddresses` EndpointInternalIp[], nullable
      - `address` string, required
      - `region` string, required
    - `publicIpAddresses` EndpointInternalIp[], nullable
      - `address` string, required
      - `region` string, required
  - `volumeMounts` ContainerVolumeMount[], required
    - `name` string, required
    - `mountPath` string, required

## Other responses

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

## Changes

- **2026-08-08** `0054dcaa32fb`: 1 info
  - added the required property `endpoints/items/id` to the response with the `200` status
- **2026-04-26** `62fb48c758fb`: 576 breaking, 191 warning, 775 info
  - removed the enum value `Accepted` of the request property `probes/liveness/httpGet/response/expectedStatusCode` (media type: application/json)
  - removed the enum value `Accepted` of the request property `probes/liveness/httpGet/response/expectedStatusCode` (media type: text/json)
  - removed the enum value `Accepted` of the request property `probes/liveness/httpGet/response/expectedStatusCode` (media type: application/*+json)
  - removed the enum value `Accepted` of the request property `probes/readiness/httpGet/response/expectedStatusCode` (media type: application/json)
  - …1538 more

[Operation history](https://skmtc.dev/bunny/apis/magic-containers-api/changes/apps/:appId/containers/:containerId/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)
