---
title: "Roll back deploy"
method: POST
path: "/services/{serviceId}/rollback"
tags: ["Deploys"]
---

# Roll back deploy

`POST /services/{serviceId}/rollback`

Trigger a rollback to a previous deploy of the specified service.

Triggering a rollback with this endpoint does not disable autodeploys for the service. This means an autodeploy might restore changes you had intentionally rolled back.

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.

## Request body

- object
  - `deployId` string, required — The ID of the deploy to roll back to

## Response `201`

OK

- 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

- `400` — The request could not be understood by the server.
- `401` — Authorization information is missing or invalid.
- `403` — You do not have permissions for the requested resource.
- `404` — Unable to find the requested resource.
- `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)
