POST
/repos/{owner}/{repo}/secret-scanning/push-protection-bypassesCreate a push protection bypass
Creates a bypass for a previously push protected secret.
The authenticated user must be the original author of the committed secret.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.
reasonstringrequired
The reason for bypassing push protection.
placeholder_idstringrequired
The ID of the push protection bypass placeholder. This value is returned on any push protected routes.
200Response
reasonstringoptional
The reason for bypassing push protection.
expire_atstringoptional
The time that the bypass will expire in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.
token_typestringoptional
The token type this bypass is for.
403User does not have enough permissions to perform this action.
404Placeholder ID not found, or push protection is disabled on this repository.
422Bad request, input data missing or incorrect.
503Service unavailable
codestringoptional
messagestringoptional
documentation_urlstringoptional
Error handling
A 403 is returned: User does not have enough permissions to perform this action. A 404 is returned: Placeholder ID not found, or push protection is disabled on this repository. A 422 is returned: Bad request, input data missing or incorrect. A 503 is returned: Service unavailable.
Was this helpful?