Reference
Update branch
Protects a branch, or stops protecting it.
PATCH
Protecting answers once the API writes allowed before have ended; if they run for over two minutes it answers 503, and the branch stays protected. Store credentials minted before keep their access until they expire (900 seconds by default), so protection reaches them only then.
bearerheader
AuthorizationBearer <token>namespace*stringA namespace of your organization, such as prod/app, or <org>:<namespace> for a public namespace of another one. Encode / as %2F.
branch*stringA branch, such as main or agents/fix-1. Encode / as %2F.
application/json- body
protected*booleanA protected branch changes only by merge, and cannot be deleted.
Done.
curl -X PATCH 'https://example.com/v1/namespaces/string/branches/string' \ -H 'Content-Type: application/json' \ -d '{ "protected": true}'Example Response
Empty