# code-scanning-alert-set-state

From **GitHub v3 REST API**.

Sets the state of the code scanning alert. Can be one of `open` or `dismissed`. You must provide `dismissed_reason` when you set the state to `dismissed`.

- Type: `string`
- Allowed values: `"open"`, `"dismissed"`

## JSON Schema

```json
{"description":"Sets the state of the code scanning alert. Can be one of `open` or `dismissed`. You must provide `dismissed_reason` when you set the state to `dismissed`.","enum":["open","dismissed"],"type":"string"}
```
