---
title: "Roll back to a deployment"
method: POST
path: "/api/v1/apps/services/{service_id}/rollback"
tags: ["Raff Apps"]
---

# Roll back to a deployment

`POST /api/v1/apps/services/{service_id}/rollback`

Pin the service back to an earlier deployment's image. Creates a new
deployment from the target's digest and config snapshot.

## Path parameters

- `service_id` string, required

## Request body

- object
  - `target_deployment_id` string, uuid, required

## Response `201`

Rollback deployment queued

- object
  - `success` boolean
  - `deployment` AppDeployment
    - `id` string, uuid
    - `service_id` string, uuid
    - `deployment_number` integer
    - `channel` 'console' | 'git_push' | 'cli' | 'compose' | 'rollback'
    - `status` 'queued' | 'building' | 'deploying' | 'live' | 'superseded' | 'failed' | 'canceled'
    - `rollback_of` string, uuid — Set when this deployment is a rollback
    - `image_digest` string
    - `commit_sha` string
    - `commit_message` string
    - `error` string
    - `build_duration_ms` integer
    - `started_at` string, date-time
    - `finished_at` string, date-time
    - `created_at` string, date-time

## Other responses

- `400` — Invalid request parameters
- `401` — Authentication required
- `404` — Resource not found

## Changes

> 28 revisions in range; 4 could not be searched.

- **2026-08-20** `efd3c11c5c92` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/rafftechnologies/apis/raff-api/changes/api/v1/apps/services/:service_id/rollback/post.md)

---

[API](https://skmtc.dev/rafftechnologies/apis/raff-api.md) · [All operations](https://skmtc.dev/rafftechnologies/apis/raff-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rafftechnologies/raff-api/revisions/2f4df56be77c/schema)
