---
title: "Trigger deploy"
method: POST
path: "/services/{serviceId}/deploys"
tags: ["Deploys"]
---

# Trigger deploy

`POST /services/{serviceId}/deploys`

Trigger a deploy for the service with the provided ID.

## Request body

- object
  - `clearCache` 'clear' | 'do_not_clear' — If `clear`, Render clears the service's build cache before deploying. This can be useful if you're experiencing issues with your build.
  - `commitId` string — The SHA of a specific Git commit to deploy for a service. Defaults to the latest commit on the service's connected branch. Note that deploying a specific commit with this endpoint does not disable autodeploys for the service. You can toggle autodeploys for your service with the [Update service](https://api-docs.render.com/reference/update-service) endpoint or in the Render Dashboard. Not supported for cron jobs.
  - `imageUrl` string — The URL of the image to deploy for an image-backed service. The host, repository, and image name all must match the currently configured image for the service.
  - `deployMode` 'deploy_only' | 'build_and_deploy' — Controls deployment behavior when triggering a deploy. - `deploy_only`: Deploy the last successful build without rebuilding (minimizes downtime) - `build_and_deploy`: Build new code and deploy it (default behavior when not specified) **Note:** `deploy_only` cannot be combined with `commitId`, `imageUrl` or `clearCache` parameters, as those are build related fields.

## Response `201`

Created

- Deploy
  - `id` string, required
  - `commit` object
    - `id` string
    - `message` string
    - `createdAt` string, date-time
  - `image` object — Image information used when creating the deploy. Not present for Git-backed deploys
    - `ref` string — Image reference used when creating the deploy
    - `sha` string — SHA that the image reference was resolved to when creating the deploy
    - `registryCredential` string — Name of credential used to pull the image, if provided
  - `status` 'created' | 'queued' | 'build_in_progress' | 'update_in_progress' | 'live' | 'deactivated' | 'build_failed' | 'update_failed' | 'canceled' | 'pre_deploy_in_progress' | 'pre_deploy_failed'
  - `trigger` 'api' | 'blueprint_sync' | 'deploy_hook' | 'deployed_by_render' | 'manual' | 'other' | 'new_commit' | 'rollback' | 'service_resumed' | 'service_updated'
  - `startedAt` string, date-time
  - `finishedAt` string, date-time
  - `createdAt` string, date-time
  - `updatedAt` string, date-time

## Other responses

- `202` — Queued
- `400` — The request could not be understood by the server.
- `401` — Authorization information is missing or invalid.
- `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.net/render/apis/render-public-api.md) · [All operations](https://skmtc.net/render/apis/render-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/render/render-public-api/versions/80e0ff74d033/schema)
