v1

latestOpenAPI 3.0.22026-07-26207170320.9 KB
Services

Create service

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

post/services

Request body

type'static_site' | 'web_service' | 'private_service' | 'background_worker' | 'cron_job' required
namestring required

The service's name. Must be unique within the workspace.

ownerIdstring required

The ID of the workspace the service belongs to. Obtain your workspace's ID from its Settings page in the Render Dashboard.

repostring

The service's repository URL. Do not specify a branch in this string (use the branch parameter instead).

autoDeploy'yes' | 'no'
branchstring

The repo branch to pull, build, and deploy. If omitted, uses the repository's default branch.

rootDirstring
environmentIdstring

The ID of the environment the service belongs to, if any. Obtain an environment's ID from its Settings page in the Render Dashboard.

Example request

{
  "repo": "https://github.com/render-examples/flask-hello-world",
  "serviceDetails": {
    "headers": [
      {
        "path": "/static/*",
        "name": "Cache-Control",
        "value": "public, max-age=604800"
      }
    ],
    "routes": [
      {
        "source": "/:bar/foo",
        "destination": "/foo/:bar"
      }
    ]
  }
}

Response

Created

deployIdstring