Skip to main content
Skip to content

REST API endpoints for enterprise access verification

Use the REST API to manage enterprise access verification configuration in your GitHub enterprise.

Disable access restrictions for an enterprise

Disable access restriction by proxy header using the network proxy owned by the enterprise.

Fine-grained access tokens for "Disable access restrictions for an enterprise"

This endpoint works with the following fine-grained token types:

The fine-grained token must have the following permission set:

  • "Enterprise access restrictions" enterprise permissions (write)

Parameters for "Disable access restrictions for an enterprise"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
enterprise string Required

The slug version of the enterprise name.

HTTP response status codes for "Disable access restrictions for an enterprise"

Status codeDescription
200

OK

400

Forbidden

404

Resource not found

500

Internal Error

Code samples for "Disable access restrictions for an enterprise"

If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.

Request example

post/enterprises/{enterprise}/access-restrictions/disable
curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/enterprises/ENTERPRISE/access-restrictions/disable

Response

Status: 200
{ "message": "Enterprise access restrictions successfully disabled.", "header_name": "sec-GitHub-allowed-enterprise", "header_value": "12345" }

Enable access restrictions for an enterprise

Enable access restriction by proxy header using the network proxy owned by the enterprise.

Fine-grained access tokens for "Enable access restrictions for an enterprise"

This endpoint works with the following fine-grained token types:

The fine-grained token must have the following permission set:

  • "Enterprise access restrictions" enterprise permissions (write)

Parameters for "Enable access restrictions for an enterprise"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
enterprise string Required

The slug version of the enterprise name.

HTTP response status codes for "Enable access restrictions for an enterprise"

Status codeDescription
200

OK

400

Forbidden

404

Resource not found

500

Internal Error

Code samples for "Enable access restrictions for an enterprise"

If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.

Request example

post/enterprises/{enterprise}/access-restrictions/enable
curl -L \ -X POST \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/enterprises/ENTERPRISE/access-restrictions/enable

Response

Status: 200
{ "message": "Enterprise access restrictions successfully enabled.", "header_name": "sec-GitHub-allowed-enterprise", "header_value": "12345" }