---
title: "Retry a failed upgrade. The phase is preserved, so the state machine resumes from where it failed."
method: POST
path: "/external-services/{service_id}/upgrades/{id}/retry"
tags: ["Postgres Upgrades"]
---

# Retry a failed upgrade. The phase is preserved, so the state machine resumes from where it failed.

`POST /external-services/{service_id}/upgrades/{id}/retry`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/external-services/{service_id}/upgrades/{id}/retry`
- Auth: HTTP bearer

## Path parameters

- `service_id` integer, required
- `id` integer, required

## Response `200`

Retry scheduled

- PgUpgradeResponse
  - `attempt` integer, required
  - `created_at` string, required
  - `error_message` string, nullable
  - `finished_at` string, nullable
  - `from_image` string, required
  - `from_version` string, required
  - `id` integer, required
  - `log_id` string, required
  - `phase` string, required
  - `pre_upgrade_backup_id` integer, nullable
  - `rollback_volume_name` string, nullable
  - `service_id` integer, required
  - `started_at` string, nullable
  - `status` string, required
  - `to_image` string, required
  - `to_version` string, required

## Other responses

- `400`: Upgrade is not in a retriable state
- `401`: Unauthorized
- `403`: Insufficient permissions
- `404`: Not found
- `500`: Internal error

## Changes

- **2026-11-09** `12896146b193`: 2 breaking
  - removed the required property `extensions` from the response with the `401` status
  - removed the required property `extensions` from the response with the `403` status
- **2026-10-05** `4b228ebed583`: 2 info
  - added the optional property `status` to the response with the `401` status
  - added the optional property `status` to the response with the `403` status
- **2026-10-05** `63a80791dc58`: 2 warning
  - removed the optional property `status` from the response with the `401` status
  - removed the optional property `status` from the response with the `403` status
- **2026-09-23** `f4efc4d5c7b7`: 2 info
  - added the optional property `status` to the response with the `401` status
  - added the optional property `status` to the response with the `403` status
- **2026-09-07** `943f7f929e7c`: 2 info
  - added the non-success response with the status `401`
  - added the non-success response with the status `403`

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/external-services/:service_id/upgrades/:id/retry/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
