---
title: "Enable or disable a security feature"
method: POST
path: "/enterprises/{enterprise}/{security_product}/{enablement}"
tags: ["enterprise-admin"]
---

# Enable or disable a security feature

`POST /enterprises/{enterprise}/{security_product}/{enablement}`

Enables or disables the specified security feature for all repositories in an enterprise.

To use this endpoint, you must be an administrator of the enterprise, and you must use an access token with the `admin:enterprise` scope.

## Path parameters

- `enterprise` string, required
- `security_product` 'advanced_security' | 'secret_scanning' | 'secret_scanning_push_protection', required
- `enablement` 'enable_all' | 'disable_all', required

## Response `204`

Action started

## Other responses

- `404` — Resource not found
- `422` — The action could not be taken due to an in progress enablement, or a policy is preventing enablement

---

[API](https://skmtc.dev/github/apis/enterprise-server.md) · [All operations](https://skmtc.dev/github/apis/enterprise-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/github/enterprise-server/revisions/4ad3e94264bd/schema)
