Create service
render_create_serviceCreates a new Render service (static site, web service, private service, background worker, or cron job) with the specified configuration and triggers the first deploy.
Instructions
Create service. Creates a new Render service in the specified workspace with the specified configuration. Calls POST /services on the Render Public API. Usage: Pick the serviceDetails branch whose title matches type: static_site→staticSiteDetailsPOST, web_service→webServiceDetailsPOST, private_service→privateServiceDetailsPOST, background_worker→backgroundWorkerDetailsPOST, cron_job→cronJobDetailsPOST. Source comes from either repo (+branch) for a build, or image for a prebuilt container — never both. Inside serviceDetails, envSpecificDetails follows runtime: use the dockerDetails branch (dockerfilePath, dockerContext, dockerCommand) when runtime is docker, and the nativeEnvironmentDetails branch (buildCommand, startCommand) for every language runtime. A private registry is referenced by registryCredentialId inside the top-level image, not inside serviceDetails — create the credential first with render_create_registry_credential. schedule is a standard five-field cron expression in UTC and is required for cron jobs. Creating a service starts a first deploy; follow with render_wait_for_deploy. Example — a cron job that builds from a Dockerfile and runs every day at 03:00 UTC: {"type":"cron_job","name":"nightly-report","ownerId":"tea-abc123","repo":"https://github.com/acme/reports","branch":"main","serviceDetails":{"runtime":"docker","schedule":"0 3 * * *","plan":"starter","region":"oregon","envSpecificDetails":{"dockerfilePath":"./Dockerfile","dockerContext":".","dockerCommand":"python report.py"}}} Example — the same cron job from a prebuilt image, with no repo to build: {"type":"cron_job","name":"nightly-report","ownerId":"tea-abc123","image":{"ownerId":"tea-abc123","imagePath":"docker.io/acme/reports:latest"},"serviceDetails":{"runtime":"image","schedule":"0 3 * * *","plan":"starter","region":"oregon","envSpecificDetails":{"dockerCommand":"python report.py"}}} Example — a Node web service built from a repo: {"type":"web_service","name":"api","ownerId":"tea-abc123","repo":"https://github.com/acme/api","branch":"main","serviceDetails":{"runtime":"node","plan":"starter","region":"oregon","envSpecificDetails":{"buildCommand":"npm ci","startCommand":"node server.js"}}}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The service's name. Must be unique within the workspace. | |
| repo | No | The service's repository URL. Do not specify a branch in this string (use the `branch` parameter instead). | |
| type | Yes | ||
| image | No | ||
| branch | No | The repo branch to pull, build, and deploy. If omitted, uses the repository's default branch. | |
| envVars | No | ||
| ownerId | Yes | The ID of the workspace the service belongs to. Obtain your workspace's ID from its Settings page in the Render Dashboard. | |
| rootDir | No | ||
| autoDeploy | No | yes | |
| buildFilter | No | ||
| secretFiles | No | ||
| environmentId | No | 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 | No | Selected by `type`: `static_site` → staticSiteDetailsPOST, `web_service` → webServiceDetailsPOST, `private_service` → privateServiceDetailsPOST, `background_worker` → backgroundWorkerDetailsPOST, `cron_job` → cronJobDetailsPOST. The matching schema is applied by this object's `allOf` rules, where each branch's fields are listed; sending a field from another branch is rejected. |