---
title: "Update service"
method: PATCH
path: "/services/{serviceId}"
tags: ["Services"]
---

# Update service

`PATCH /services/{serviceId}`

Update the service with the provided ID.

## Request body

- ServicePATCH
  - `autoDeploy` 'yes' | 'no'
  - `repo` string
  - `branch` string
  - `image` Image
    - `ownerId` string, required — The ID of the owner for this image. This should match the owner of the service as well as the owner of any specified registry credential.
    - `registryCredentialId` string — Optional reference to the registry credential passed to the image repository to retrieve this image.
    - `imagePath` string, required — Path to the image used for this server (e.g docker.io/library/nginx:latest).
  - `name` string
  - `buildFilter` BuildFilter
    - `paths` string[], required
    - `ignoredPaths` string[], required
  - `rootDir` string
  - `serviceDetails` union
    - StaticSiteDetailsPATCH
      - `buildCommand` string
      - `publishPath` string
      - `pullRequestPreviewsEnabled` 'yes' | 'no' — This field has been deprecated. previews.generation should be used in its place.
      - `previews` Previews
        - `generation` 'off' | 'manual' | 'automatic' — Defaults to "off"
      - `renderSubdomainPolicy` 'enabled' | 'disabled' — Controls whether render.com subdomains are available for the service
      - `ipAllowList` CidrBlockAndDescription[]
        - `cidrBlock` string, required
        - `description` string, required — User-provided description of the CIDR block
    - WebServiceDetailsPATCH
      - `envSpecificDetails` union
        - DockerDetailsPATCH
          - `dockerCommand` string
          - `dockerContext` string
          - `dockerfilePath` string
          - `registryCredentialId` string
        - NativeEnvironmentDetailsPATCH
          - `buildCommand` string
          - `startCommand` string
      - `healthCheckPath` string
      - `maintenanceMode` MaintenanceMode
        - `enabled` boolean, required
        - `uri` string, required — The page to be served when [maintenance mode](https://render.com/docs/maintenance-mode) is enabled. When empty, the default maintenance mode page is served.
      - `plan` 'starter' | 'starter_plus' | 'standard' | 'standard_plus' | 'pro' | 'pro_plus' | 'pro_max' | 'pro_ultra' | 'free' | 'custom' | 'starter_legacy' | 'standard_legacy' | 'standard_plus_legacy' | 'pro_legacy' | 'pro_plus_legacy' — The instance type to use. Legacy variants (`*_legacy`) identify grandfathered plans no longer offered for new services. Note that base services on any paid instance type can't create preview instances with the `free` instance type.
      - `preDeployCommand` string
      - `pullRequestPreviewsEnabled` 'yes' | 'no' — This field has been deprecated. previews.generation should be used in its place.
      - `previews` Previews
        - `generation` 'off' | 'manual' | 'automatic' — Defaults to "off"
      - `runtime` 'docker' | 'elixir' | 'go' | 'node' | 'python' | 'ruby' | 'rust' | 'image' — Runtime
      - `maxShutdownDelaySeconds` integer — The maximum amount of time (in seconds) that Render waits for your application process to exit gracefully after sending it a SIGTERM signal.
      - `renderSubdomainPolicy` 'enabled' | 'disabled' — Controls whether render.com subdomains are available for the service
      - `ipAllowList` CidrBlockAndDescription[]
        - `cidrBlock` string, required
        - `description` string, required — User-provided description of the CIDR block
      - `cache` Cache
        - `profile` 'no-cache' | 'origin-controlled' | 'origin-controlled-all', required
    - PrivateServiceDetailsPATCH
      - `envSpecificDetails` union
        - DockerDetailsPATCH
          - `dockerCommand` string
          - `dockerContext` string
          - `dockerfilePath` string
          - `registryCredentialId` string
        - NativeEnvironmentDetailsPATCH
          - `buildCommand` string
          - `startCommand` string
      - `plan` 'starter' | 'standard' | 'pro' | 'pro_plus' | 'pro_max' | 'pro_ultra' — Defaults to `starter` when creating a new database.
      - `preDeployCommand` string
      - `pullRequestPreviewsEnabled` 'yes' | 'no' — This field has been deprecated. previews.generation should be used in its place.
      - `previews` Previews
        - `generation` 'off' | 'manual' | 'automatic' — Defaults to "off"
      - `runtime` 'docker' | 'elixir' | 'go' | 'node' | 'python' | 'ruby' | 'rust' | 'image' — Runtime
      - `maxShutdownDelaySeconds` integer — The maximum amount of time (in seconds) that Render waits for your application process to exit gracefully after sending it a SIGTERM signal.
    - BackgroundWorkerDetailsPATCH
      - `envSpecificDetails` union
        - DockerDetailsPATCH
          - `dockerCommand` string
          - `dockerContext` string
          - `dockerfilePath` string
          - `registryCredentialId` string
        - NativeEnvironmentDetailsPATCH
          - `buildCommand` string
          - `startCommand` string
      - `plan` 'starter' | 'standard' | 'pro' | 'pro_plus' | 'pro_max' | 'pro_ultra' — Defaults to `starter` when creating a new database.
      - `preDeployCommand` string
      - `pullRequestPreviewsEnabled` 'yes' | 'no' — This field has been deprecated. previews.generation should be used in its place.
      - `previews` Previews
        - `generation` 'off' | 'manual' | 'automatic' — Defaults to "off"
      - `runtime` 'docker' | 'elixir' | 'go' | 'node' | 'python' | 'ruby' | 'rust' | 'image' — Runtime
      - `maxShutdownDelaySeconds` integer — The maximum amount of time (in seconds) that Render waits for your application process to exit gracefully after sending it a SIGTERM signal.
    - CronJobDetailsPATCH
      - `envSpecificDetails` union
        - DockerDetailsPATCH
          - `dockerCommand` string
          - `dockerContext` string
          - `dockerfilePath` string
          - `registryCredentialId` string
        - NativeEnvironmentDetailsPATCH
          - `buildCommand` string
          - `startCommand` string
      - `plan` 'starter' | 'standard' | 'pro' | 'pro_plus' | 'pro_max' | 'pro_ultra' — Defaults to `starter` when creating a new database.
      - `schedule` string
      - `runtime` 'docker' | 'elixir' | 'go' | 'node' | 'python' | 'ruby' | 'rust' | 'image' — Runtime

## Response `200`

OK

- Service
  - `id` string, required
  - `autoDeploy` 'yes' | 'no', required
  - `branch` string
  - `buildFilter` BuildFilter
    - `paths` string[], required
    - `ignoredPaths` string[], required
  - `createdAt` string, date-time, required
  - `dashboardUrl` string, required — The URL to view the service in the Render Dashboard
  - `environmentId` string
  - `imagePath` string
  - `name` string, required
  - `notifyOnFail` 'default' | 'notify' | 'ignore', required
  - `ownerId` string, required
  - `registryCredential` RegistryCredentialSummary
    - `id` string, required
    - `name` string, required
  - `repo` string
  - `rootDir` string, required
  - `slug` string, required
  - `suspended` 'suspended' | 'not_suspended', required
  - `suspenders` SuspenderType[], required
  - `type` 'static_site' | 'web_service' | 'private_service' | 'background_worker' | 'cron_job', required
  - `updatedAt` string, date-time, required
  - `serviceDetails` union, required
    - StaticSiteDetails
      - `buildCommand` string, required
      - `ipAllowList` CidrBlockAndDescription[]
        - `cidrBlock` string, required
        - `description` string, required — User-provided description of the CIDR block
      - `parentServer` Resource
        - `id` string, required
        - `name` string, required
      - `publishPath` string, required
      - `pullRequestPreviewsEnabled` 'yes' | 'no' — This field has been deprecated. previews.generation should be used in its place.
      - `previews` Previews
        - `generation` 'off' | 'manual' | 'automatic' — Defaults to "off"
      - `url` string, required
      - `buildPlan` 'starter' | 'performance', required
      - `renderSubdomainPolicy` 'enabled' | 'disabled' — Controls whether render.com subdomains are available for the service
    - WebServiceDetails
      - `autoscaling` object
        - `enabled` boolean, required
        - `min` integer, required — The minimum number of instances for the service
        - `max` integer, required — The maximum number of instances for the service
        - `criteria` object, required
          - `cpu` object, required
            - `enabled` boolean, required
            - `percentage` integer, required — Determines when your service will be scaled. If the average resource utilization is significantly above/below the target, we will increase/decrease the number of instances.
          - `memory` Cpu, required — unresolved $ref
      - `cache` Cache
        - `profile` 'no-cache' | 'origin-controlled' | 'origin-controlled-all', required
      - `disk` object
        - `id` Schema, required — unresolved $ref
        - `name` string, required
        - `sizeGB` integer, required
        - `mountPath` string, required
      - `env` 'docker' | 'elixir' | 'go' | 'node' | 'python' | 'ruby' | 'rust' | 'image', required — This field has been deprecated, runtime should be used in its place.
      - `envSpecificDetails` union, required
        - DockerDetails
          - `dockerCommand` string, required
          - `dockerContext` string, required
          - `dockerfilePath` string, required
          - `preDeployCommand` string
          - `registryCredential` RegistryCredential
            - `id` string, required — Unique identifier for this credential
            - `name` string, required — Descriptive name for this credential
            - `registry` 'GITHUB' | 'GITLAB' | 'DOCKER' | 'GOOGLE_ARTIFACT' | 'AWS_ECR', required — The registry to use this credential with
            - `username` string, required — The username associated with the credential
            - `updatedAt` string, date-time, required — Last updated time for the credential
        - NativeEnvironmentDetails
          - `buildCommand` string, required
          - `startCommand` string, required
          - `preDeployCommand` string
      - `healthCheckPath` string, required
      - `ipAllowList` CidrBlockAndDescription[]
        - `cidrBlock` string, required
        - `description` string, required — User-provided description of the CIDR block
      - `maintenanceMode` MaintenanceMode
        - `enabled` boolean, required
        - `uri` string, required — The page to be served when [maintenance mode](https://render.com/docs/maintenance-mode) is enabled. When empty, the default maintenance mode page is served.
      - `numInstances` integer, required — For a *manually* scaled service, this is the number of instances the service is scaled to. DOES NOT indicate the number of running instances for an *autoscaled* service.
      - `openPorts` ServerPort[], required
        - `port` integer, required
        - `protocol` 'TCP' | 'UDP', required
      - `parentServer` Resource
        - `id` string, required
        - `name` string, required
      - `plan` 'starter' | 'starter_plus' | 'standard' | 'standard_plus' | 'pro' | 'pro_plus' | 'pro_max' | 'pro_ultra' | 'free' | 'custom' | 'starter_legacy' | 'standard_legacy' | 'standard_plus_legacy' | 'pro_legacy' | 'pro_plus_legacy', required — The instance type to use. Legacy variants (`*_legacy`) identify grandfathered plans no longer offered for new services. Note that base services on any paid instance type can't create preview instances with the `free` instance type.
      - `pullRequestPreviewsEnabled` 'yes' | 'no' — This field has been deprecated. previews.generation should be used in its place.
      - `previews` Previews
        - `generation` 'off' | 'manual' | 'automatic' — Defaults to "off"
      - `region` 'frankfurt' | 'oregon' | 'ohio' | 'singapore' | 'virginia', required — Defaults to "oregon"
      - `runtime` 'docker' | 'elixir' | 'go' | 'node' | 'python' | 'ruby' | 'rust' | 'image', required — Runtime
      - `sshAddress` string — The SSH address for the service. Only present for services that have SSH enabled.
      - `url` string, required
      - `buildPlan` 'starter' | 'performance', required
      - `maxShutdownDelaySeconds` integer — The maximum amount of time (in seconds) that Render waits for your application process to exit gracefully after sending it a SIGTERM signal.
      - `renderSubdomainPolicy` 'enabled' | 'disabled' — Controls whether render.com subdomains are available for the service
    - PrivateServiceDetails
      - `autoscaling` Autoscaling — unresolved $ref
      - `disk` Disk — unresolved $ref
      - `env` 'docker' | 'elixir' | 'go' | 'node' | 'python' | 'ruby' | 'rust' | 'image', required — This field has been deprecated, runtime should be used in its place.
      - `envSpecificDetails` union, required
        - DockerDetails
          - `dockerCommand` string, required
          - `dockerContext` string, required
          - `dockerfilePath` string, required
          - `preDeployCommand` string
          - `registryCredential` RegistryCredential
            - `id` string, required — Unique identifier for this credential
            - `name` string, required — Descriptive name for this credential
            - `registry` 'GITHUB' | 'GITLAB' | 'DOCKER' | 'GOOGLE_ARTIFACT' | 'AWS_ECR', required — The registry to use this credential with
            - `username` string, required — The username associated with the credential
            - `updatedAt` string, date-time, required — Last updated time for the credential
        - NativeEnvironmentDetails
          - `buildCommand` string, required
          - `startCommand` string, required
          - `preDeployCommand` string
      - `numInstances` integer, required — For a *manually* scaled service, this is the number of instances the service is scaled to. DOES NOT indicate the number of running instances for an *autoscaled* service.
      - `openPorts` ServerPort[], required
        - `port` integer, required
        - `protocol` 'TCP' | 'UDP', required
      - `parentServer` Resource
        - `id` string, required
        - `name` string, required
      - `plan` 'starter' | 'starter_plus' | 'standard' | 'standard_plus' | 'pro' | 'pro_plus' | 'pro_max' | 'pro_ultra' | 'free' | 'custom' | 'starter_legacy' | 'standard_legacy' | 'standard_plus_legacy' | 'pro_legacy' | 'pro_plus_legacy', required — The instance type to use. Legacy variants (`*_legacy`) identify grandfathered plans no longer offered for new services. Note that base services on any paid instance type can't create preview instances with the `free` instance type.
      - `pullRequestPreviewsEnabled` 'yes' | 'no' — This field has been deprecated. previews.generation should be used in its place.
      - `previews` Previews
        - `generation` 'off' | 'manual' | 'automatic' — Defaults to "off"
      - `region` 'frankfurt' | 'oregon' | 'ohio' | 'singapore' | 'virginia', required — Defaults to "oregon"
      - `runtime` 'docker' | 'elixir' | 'go' | 'node' | 'python' | 'ruby' | 'rust' | 'image', required — Runtime
      - `sshAddress` string — The SSH address for the service. Only present for services that have SSH enabled.
      - `url` string, required
      - `buildPlan` 'starter' | 'performance', required
      - `maxShutdownDelaySeconds` integer — The maximum amount of time (in seconds) that Render waits for your application process to exit gracefully after sending it a SIGTERM signal.
    - BackgroundWorkerDetails
      - `autoscaling` Autoscaling — unresolved $ref
      - `disk` Disk — unresolved $ref
      - `env` 'docker' | 'elixir' | 'go' | 'node' | 'python' | 'ruby' | 'rust' | 'image', required — This field has been deprecated, runtime should be used in its place.
      - `envSpecificDetails` union, required
        - DockerDetails
          - `dockerCommand` string, required
          - `dockerContext` string, required
          - `dockerfilePath` string, required
          - `preDeployCommand` string
          - `registryCredential` RegistryCredential
            - `id` string, required — Unique identifier for this credential
            - `name` string, required — Descriptive name for this credential
            - `registry` 'GITHUB' | 'GITLAB' | 'DOCKER' | 'GOOGLE_ARTIFACT' | 'AWS_ECR', required — The registry to use this credential with
            - `username` string, required — The username associated with the credential
            - `updatedAt` string, date-time, required — Last updated time for the credential
        - NativeEnvironmentDetails
          - `buildCommand` string, required
          - `startCommand` string, required
          - `preDeployCommand` string
      - `numInstances` integer, required — For a *manually* scaled service, this is the number of instances the service is scaled to. DOES NOT indicate the number of running instances for an *autoscaled* service.
      - `parentServer` Resource
        - `id` string, required
        - `name` string, required
      - `plan` 'starter' | 'starter_plus' | 'standard' | 'standard_plus' | 'pro' | 'pro_plus' | 'pro_max' | 'pro_ultra' | 'free' | 'custom' | 'starter_legacy' | 'standard_legacy' | 'standard_plus_legacy' | 'pro_legacy' | 'pro_plus_legacy', required — The instance type to use. Legacy variants (`*_legacy`) identify grandfathered plans no longer offered for new services. Note that base services on any paid instance type can't create preview instances with the `free` instance type.
      - `pullRequestPreviewsEnabled` 'yes' | 'no' — This field has been deprecated. previews.generation should be used in its place.
      - `previews` Previews
        - `generation` 'off' | 'manual' | 'automatic' — Defaults to "off"
      - `region` 'frankfurt' | 'oregon' | 'ohio' | 'singapore' | 'virginia', required — Defaults to "oregon"
      - `runtime` 'docker' | 'elixir' | 'go' | 'node' | 'python' | 'ruby' | 'rust' | 'image', required — Runtime
      - `sshAddress` string — The SSH address for the service. Only present for services that have SSH enabled.
      - `buildPlan` 'starter' | 'performance', required
      - `maxShutdownDelaySeconds` integer — The maximum amount of time (in seconds) that Render waits for your application process to exit gracefully after sending it a SIGTERM signal.
    - CronJobDetails
      - `env` 'docker' | 'elixir' | 'go' | 'node' | 'python' | 'ruby' | 'rust' | 'image', required — This field has been deprecated, runtime should be used in its place.
      - `envSpecificDetails` union, required
        - DockerDetails
          - `dockerCommand` string, required
          - `dockerContext` string, required
          - `dockerfilePath` string, required
          - `preDeployCommand` string
          - `registryCredential` RegistryCredential
            - `id` string, required — Unique identifier for this credential
            - `name` string, required — Descriptive name for this credential
            - `registry` 'GITHUB' | 'GITLAB' | 'DOCKER' | 'GOOGLE_ARTIFACT' | 'AWS_ECR', required — The registry to use this credential with
            - `username` string, required — The username associated with the credential
            - `updatedAt` string, date-time, required — Last updated time for the credential
        - NativeEnvironmentDetails
          - `buildCommand` string, required
          - `startCommand` string, required
          - `preDeployCommand` string
      - `lastSuccessfulRunAt` string, date-time
      - `plan` 'starter' | 'starter_plus' | 'standard' | 'standard_plus' | 'pro' | 'pro_plus' | 'pro_max' | 'pro_ultra' | 'free' | 'custom' | 'starter_legacy' | 'standard_legacy' | 'standard_plus_legacy' | 'pro_legacy' | 'pro_plus_legacy', required — The instance type to use. Legacy variants (`*_legacy`) identify grandfathered plans no longer offered for new services. Note that base services on any paid instance type can't create preview instances with the `free` instance type.
      - `region` 'frankfurt' | 'oregon' | 'ohio' | 'singapore' | 'virginia', required — Defaults to "oregon"
      - `runtime` 'docker' | 'elixir' | 'go' | 'node' | 'python' | 'ruby' | 'rust' | 'image', required — Runtime
      - `schedule` string, required
      - `buildPlan` 'starter' | 'performance', required

## Other responses

- `400` — The request could not be understood by the server.
- `401` — Authorization information is missing or invalid.
- `402` — You must enter payment information to perform this request.
- `403` — You do not have permissions for the requested resource.
- `404` — Unable to find the requested resource.
- `406` — Unable to generate preferred media types as specified by Accept request header.
- `409` — The current state of the resource conflicts with this request.
- `410` — The requested resource is no longer available.
- `429` — Rate limit has been surpassed.
- `500` — An unexpected server error has occurred.
- `503` — Server currently unavailable.

---

[API](https://skmtc.dev/render/apis/render-public-api.md) · [All operations](https://skmtc.dev/render/apis/render-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/render/render-public-api/revisions/80e0ff74d033/schema)
