# Reopen a security alert

> Open a dismissed alert again.

<div class="g1t-endpoint"><span class="g1t-method" data-method="post">POST</span><code>/repos/{owner}/{name}/security/alerts/{id}/reopen</code></div>

A reopened secret stops pushes that carry it again. The same roles as dismissing: Admin for a secret, Write for a dependency. Returns the alert as it is now.

The alert is `open` again, and a reopened secret stops pushes that carry it. The same roles as dismissing: Admin for a secret, Write for a dependency.

- **Authentication:** Required. Send an [access token](/reference/api/#authentication) as `Authorization: Bearer`.
- **MCP tool:** [`repository`](/reference/mcp/#repository) with `action` `reopen_alert`, and the same inputs
- **Scope:** An access token needs [`repo:admin`](/guides/authentication/#scopes).

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `owner` | string | Yes | The workspace that owns the repository. |
| `name` | string | Yes | The repository's name. |
| `id` | string | Yes | The alert's id, from [`list_security_alerts`](/reference/api/security/list-security-alerts/): sec_… for a secret, vul_… for a dependency. |

## Example request

```sh
curl -X POST https://api.g1t.sh/repos/flagon-io/hello/security/alerts/sec_01kp4a7b2c3d4e5f6g7h8j9k0m/reopen \
  -H "Authorization: Bearer $G1T_TOKEN"
```

## Example response

A successful request answers `200` with:

```json
{
  "kind": "secret",
  "id": "sec_01kp4a7b2c3d4e5f6g7h8j9k0m",
  "state": "open",
  "secret_type": "aws_access_key",
  "label": "an AWS access key",
  "path": "test/fixtures/aws.env",
  "line": 3,
  "commit": "9f2c1e04b7d3a8e6f5c2b1a0d9e8f7c6b5a4d3e2",
  "preview": "AKIA…MPLE",
  "status": "open",
  "source": "history",
  "test_value": "the documented example key",
  "found_by": null,
  "found_at": "2026-10-01T12:00:00.000Z",
  "dismissed_reason": null,
  "dismissed_comment": null,
  "dismissed_by": null,
  "dismissed_at": null
}
```

## Errors

A failed request answers with one of these statuses and a body like `{"error": {"code": "not_found", "message": "Repository not found."}}`. See [errors](/reference/api/#errors).

| Status | Code | When |
| --- | --- | --- |
| 401 | `unauthenticated` | A token is required, or the one sent is not valid. |
| 403 | `forbidden` | The token is valid but not allowed to do this, such as a member-only change or an agent token outside its repository. |
| 404 | `not_found` | It does not exist, or you cannot see it. |
| 409 | `conflict` | The request conflicts with the current state. |
| 422 | `invalid` | The input is not valid. `message` says which field and why. |
