---
title: "Retry Failed SMS Scans"
method: POST
path: "/api/v2/deployments/{deploymentId}/scans/retry"
tags: ["ScansService"]
---

# Retry Failed SMS Scans

`POST /api/v2/deployments/{deploymentId}/scans/retry`

Retry one or more failed Semgrep Managed Scans (SMS). Only scans that are SMS and have failed or never finished can be retried. Send a single scan ID or multiple; returns one task per successful retry and one error per failed retry.

## Path parameters

- `deploymentId` string, int64, required — The unique numerical identifier of the deployment associated with the scan.

## Request body

- ProtosScanV2RetryScansRequest
  - `scanIds` string[] — Scan IDs to retry (SMS scans that failed or never finished). Send one ID for single retry or multiple for batch. Maximum 10 IDs per request.

## Response `200`

OK

- ProtosScanV2RetryScansResponse
  - `tasks` ProtosScanV2RetryScansTask[] — One task per successfully scheduled retry
    - `repoId` string — The repository (project) ID
    - `scanId` string — The scan ID that was retried
    - `configId` string — The autoscan config ID
    - `branch` string — The branch for the scan, if applicable
    - `taskId` string — The Celery task ID for the retry request
    - `managedScanId` string — The new managed scan ID created for the retry
  - `errors` ProtosScanV2RetryScansError[] — One error per scan that could not be retried
    - `repoId` string — The repository ID when the error is repo-scoped
    - `scanId` string — The scan ID that could not be retried
    - `message` string — Human-readable error message

---

[API](https://skmtc.net/semgrep/apis/semgrep-web-app.md) · [All operations](https://skmtc.net/semgrep/apis/semgrep-web-app/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/semgrep/semgrep-web-app/versions/6483eeecd582/schema)
