v56

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-011,4581,08113.3 MB
enterprise-admin

Enable or disable a security feature

[!WARNING] Closing down notice: The ability to enable or disable a security feature for an enterprise is closing down. Please use code security configurations instead. For more information, see the changelog.

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

The authenticated user must be an administrator of the enterprise to use this endpoint.

OAuth app tokens and personal access tokens (classic) need the admin:enterprise scope to use this endpoint.

post/enterprises/{enterprise}/{security_product}/{enablement}

Path parameters

enterprisestring required

The slug version of the enterprise name.

security_product'advanced_security' | 'advanced_security_user_namespace' | 'dependabot_alerts' | 'secret_scanning' | 'secret_scanning_push_protection' | 'secret_scanning_non_provider_patterns' required

The security feature to enable or disable.

enablement'enable_all' | 'disable_all' required

The action to take.

enable_all means to enable the specified security feature for all repositories in the enterprise. disable_all means to disable the specified security feature for all repositories in the enterprise.

Response

Action started