---
title: "Create service"
method: POST
path: "/services"
tags: ["Services"]
---

# Create service

`POST /services`

Creates a new Render service in the specified workspace with the specified configuration.

## Request body

- ServicePOST
  - `type` 'static_site' | 'web_service' | 'private_service' | 'background_worker' | 'cron_job', required
  - `name` string, required — The service's name. Must be unique within the workspace.
  - `ownerId` string, required — The ID of the workspace the service belongs to. Obtain your workspace's ID from its Settings page in the Render Dashboard.
  - `repo` string — The service's repository URL. Do not specify a branch in this string (use the `branch` parameter instead).
  - `autoDeploy` 'yes' | 'no'
  - `branch` string — The repo branch to pull, build, and deploy. If omitted, uses the repository's default branch.
  - `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).
  - `buildFilter` BuildFilter
    - `paths` string[], required
    - `ignoredPaths` string[], required
  - `rootDir` string
  - `envVars` union[]
    - union
      - object
        - `key` string, required
        - `value` string, required
      - object
        - `key` string, required
        - `generateValue` boolean, required — If true, Render generates a strong random value for this environment variable on creation. Cannot be combined with `value`.
  - `secretFiles` object[]
    - `name` string, required
    - `content` string, required
  - `environmentId` string — The ID of the environment the service belongs to, if any. Obtain an environment's ID from its Settings page in the Render Dashboard.
  - `serviceDetails` union
    - StaticSiteDetailsPOST
      - `buildCommand` string
      - `headers` HeaderInput[]
        - `path` string, required — The request path to add the header to. Wildcards will cause headers to be applied to all matching paths.
        - `name` string, required — Header name
        - `value` string, required — Header value
      - `publishPath` string — Defaults to "public"
      - `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"
      - `routes` RoutePost[]
        - `type` 'redirect' | 'rewrite', required
        - `source` string, required
        - `destination` string, required
        - `priority` integer — Redirect and Rewrite Rules are applied in priority order starting at 0. Defaults to last in the priority list.
      - `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
    - WebServiceDetailsPOST
      - `autoscaling` Autoscaling — unresolved $ref
      - `disk` ServiceDisk
        - `name` string, required
        - `mountPath` string, required
        - `sizeGB` integer — Defaults to 1
      - `env` 'docker' | 'elixir' | 'go' | 'node' | 'python' | 'ruby' | 'rust' | 'image' — This field has been deprecated, runtime should be used in its place.
      - `runtime` 'docker' | 'elixir' | 'go' | 'node' | 'python' | 'ruby' | 'rust' | 'image', required — Runtime
      - `envSpecificDetails` union
        - DockerDetailsPOST
          - `dockerCommand` string
          - `dockerContext` string
          - `dockerfilePath` string — Defaults to "./Dockerfile"
          - `registryCredentialId` string
        - NativeEnvironmentDetailsPOST — Fields for native environment (runtime) services
          - `buildCommand` string, required
          - `startCommand` string, required
      - `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.
      - `numInstances` integer — Defaults to 1
      - `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"
      - `region` 'frankfurt' | 'oregon' | 'ohio' | 'singapore' | 'virginia' — Defaults to "oregon"
      - `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
    - PrivateServiceDetailsPOST
      - `autoscaling` Autoscaling — unresolved $ref
      - `disk` ServiceDisk
        - `name` string, required
        - `mountPath` string, required
        - `sizeGB` integer — Defaults to 1
      - `env` 'docker' | 'elixir' | 'go' | 'node' | 'python' | 'ruby' | 'rust' | 'image' — This field has been deprecated, runtime should be used in its place.
      - `runtime` 'docker' | 'elixir' | 'go' | 'node' | 'python' | 'ruby' | 'rust' | 'image', required — Runtime
      - `envSpecificDetails` union
        - DockerDetailsPOST
          - `dockerCommand` string
          - `dockerContext` string
          - `dockerfilePath` string — Defaults to "./Dockerfile"
          - `registryCredentialId` string
        - NativeEnvironmentDetailsPOST — Fields for native environment (runtime) services
          - `buildCommand` string, required
          - `startCommand` string, required
      - `numInstances` integer — Defaults to 1
      - `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"
      - `region` 'frankfurt' | 'oregon' | 'ohio' | 'singapore' | 'virginia' — Defaults to "oregon"
      - `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.
    - BackgroundWorkerDetailsPOST
      - `autoscaling` Autoscaling — unresolved $ref
      - `disk` ServiceDisk
        - `name` string, required
        - `mountPath` string, required
        - `sizeGB` integer — Defaults to 1
      - `env` 'docker' | 'elixir' | 'go' | 'node' | 'python' | 'ruby' | 'rust' | 'image' — This field has been deprecated, runtime should be used in its place.
      - `runtime` 'docker' | 'elixir' | 'go' | 'node' | 'python' | 'ruby' | 'rust' | 'image', required — Runtime
      - `envSpecificDetails` union
        - DockerDetailsPOST
          - `dockerCommand` string
          - `dockerContext` string
          - `dockerfilePath` string — Defaults to "./Dockerfile"
          - `registryCredentialId` string
        - NativeEnvironmentDetailsPOST — Fields for native environment (runtime) services
          - `buildCommand` string, required
          - `startCommand` string, required
      - `numInstances` integer — Defaults to 1
      - `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"
      - `region` 'frankfurt' | 'oregon' | 'ohio' | 'singapore' | 'virginia' — Defaults to "oregon"
      - `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.
    - CronJobDetailsPOST
      - `env` 'docker' | 'elixir' | 'go' | 'node' | 'python' | 'ruby' | 'rust' | 'image' — This field has been deprecated, runtime should be used in its place.
      - `runtime` 'docker' | 'elixir' | 'go' | 'node' | 'python' | 'ruby' | 'rust' | 'image', required — Runtime
      - `envSpecificDetails` union
        - 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
      - `plan` 'starter' | 'standard' | 'pro' | 'pro_plus' | 'pro_max' | 'pro_ultra' — Defaults to `starter` when creating a new database.
      - `region` 'frankfurt' | 'oregon' | 'ohio' | 'singapore' | 'virginia' — Defaults to "oregon"
      - `schedule` string, required

## Response `201`

Created

- ServiceAndDeploy
  - `service` 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
              - …
            - `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
              - …
          - 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
              - …
          - 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
              - …
          - 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
              - …
          - 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
  - `deployId` string

## 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.
- `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.
- `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)
