---
title: "Validate App Rollback"
method: POST
path: "/v2/apps/{app_id}/rollback/validate"
tags: ["DigitalOcean-public.v2-new_Apps"]
---

# Validate App Rollback

`POST /v2/apps/{app_id}/rollback/validate`

Check whether an app can be rolled back to a specific deployment. This endpoint can also be used
to check if there are any warnings or validation conditions that will cause the rollback to proceed
under unideal circumstances. For example, if a component must be rebuilt as part of the rollback
causing it to take longer than usual.

## Path parameters

- `app_id` string, required

## Request body

- AppsRollbackAppRequest
  - `deployment_id` string — The ID of the deployment to rollback to.
  - `skip_pin` boolean — Whether to skip pinning the rollback deployment. If false, the rollback deployment will be pinned and any new deployments including Auto Deploy on Push hooks will be disabled until the rollback is either manually committed or reverted via the CommitAppRollback or RevertAppRollback endpoints respectively. If true, the rollback will be immediately committed and the app will remain unpinned.

## Response `200`

A JSON object with the validation results.

- object
  - `valid` boolean — Indicates whether the app can be rolled back to the specified deployment.
  - `error` object — Contains the failing condition that is causing the rollback to be invalid.
    - `code` 'incompatible_phase' | 'incompatible_result' | 'exceeded_revision_limit' | 'app_pinned' | 'database_config_conflict' | 'region_conflict' | 'static_site_requires_rebuild' | 'image_source_missing_digest' — A code identifier that represents the failing condition. Failing conditions: - `incompatible_phase` - indicates that the deployment's phase is not suitable for rollback. - `incompatible_result` - indicates that the deployment's result is not suitable for rollback. - `exceeded_revision_limit` - indicates that the app has exceeded the rollback revision limits for its tier. - `app_pinned` - indicates that there is already a rollback in progress and the app is pinned. - `database_config_conflict` - indicates that the deployment's database config is different than the current config. - `region_conflict` - indicates that the deployment's region differs from the current app region. Warning conditions: - `static_site_requires_rebuild` - indicates that the deployment contains at least one static site that will require a rebuild. - `image_source_missing_digest` - indicates that the deployment contains at least one component with an image source that is missing a digest.
    - `message` string — A human-readable message describing the failing condition.
    - `components` string[]
  - `warnings` AppRollbackValidationCondition[] — Contains a list of warnings that may cause the rollback to run under unideal circumstances.
    - `code` 'incompatible_phase' | 'incompatible_result' | 'exceeded_revision_limit' | 'app_pinned' | 'database_config_conflict' | 'region_conflict' | 'static_site_requires_rebuild' | 'image_source_missing_digest' — A code identifier that represents the failing condition. Failing conditions: - `incompatible_phase` - indicates that the deployment's phase is not suitable for rollback. - `incompatible_result` - indicates that the deployment's result is not suitable for rollback. - `exceeded_revision_limit` - indicates that the app has exceeded the rollback revision limits for its tier. - `app_pinned` - indicates that there is already a rollback in progress and the app is pinned. - `database_config_conflict` - indicates that the deployment's database config is different than the current config. - `region_conflict` - indicates that the deployment's region differs from the current app region. Warning conditions: - `static_site_requires_rebuild` - indicates that the deployment contains at least one static site that will require a rebuild. - `image_source_missing_digest` - indicates that the deployment contains at least one component with an image source that is missing a digest.
    - `message` string — A human-readable message describing the failing condition.
    - `components` string[]

## Other responses

- `401` — Authentication failed due to invalid credentials.
- `404` — The resource was not found.
- `429` — The API rate limit has been exceeded.
- `500` — There was a server error.
- `default` — There was an unexpected error.

---

[API](https://skmtc.net/digitalocean/apis/digitalocean-api.md) · [All operations](https://skmtc.net/digitalocean/apis/digitalocean-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/digitalocean/digitalocean-api/versions/cb3bf9b21459/schema)
