---
title: "RetryJob"
method: POST
path: "/depot.ci.v1.CIService/RetryJob"
tags: ["CIService"]
---

# RetryJob

`POST /depot.ci.v1.CIService/RetryJob`

## Request

- Base URL: `https://api.depot.dev`
- URL: `https://api.depot.dev/depot.ci.v1.CIService/RetryJob`
- Auth: HTTP bearer

Retries a failed or cancelled job, along with any skipped jobs that depend on it. Fails when a job that depends on it has already started; use `RetryFailedJobs` to retry related failures together.

## Headers

- `Connect-Protocol-Version` 1, required: Define the version of the Connect protocol
- `Connect-Timeout-Ms` number: Define the timeout, in ms

## Request body

- DepotCiV1RetryJobRequest
  - `workflowId` string, required: Unique identifier for the workflow containing the job. Returned by `GetRunStatus` and `ListWorkflows`.
  - `jobId` string, required: Unique identifier for the job to retry. Returned by `GetRunStatus` and `GetWorkflow`.

## Response `200`

Success

- DepotCiV1RetryJobResponse
  - `jobId` string: Unique identifier for the job. Matches the request `jobId`. A retry creates a new attempt rather than a new job.
  - `attemptId` string: Empty in the response. The new attempt is created once the job runs again and appears in the `attempts` array returned by `GetJob`.
  - `attempt` integer: Attempt number the next attempt will use, one greater than the prior attempt.
  - `status` string: Updated job status. Should be "queued".

## Other responses

- `default`: Error

---

[API](https://skmtc.dev/depot/apis/depot-ci-api.md) - [All operations](https://skmtc.dev/depot/apis/depot-ci-api/llms.txt) - [OpenAPI document](https://skmtc.dev/depot/apis/depot-ci-api/revisions/6cf759b535b4?raw)
