Skip to main content
PUT
Set main branch protection

Authorizations

Authorization
string
header
required

Personal access token, sent as Authorization: Bearer <token>.

Path Parameters

app_id
string
required

ID of the app whose main branch to protect or unprotect.

Body

application/json
protected
boolean
required

Whether the app's main branch is protected. While it is, changes to main have to go through a branch that you merge back.

Example:

true

Response

The main branch's protection after the change.

protected
boolean
required

Whether the app's main branch is protected. While it is, changes to main have to go through a branch that you merge back.

Example:

true