Set Branch deploy via rest Api


Firstly happy new year to all.

I have requested PATCH for the<my site id> ,
data as

capabilities: {
                 branch_deploy: true

But my site Branch deploy is not changing to “All”.
Am I doing anything wrong is there another way to do so.

Thanks, shiva

Hey @shiva,
I believe branch_deploy is a boolean- maybe you’re looking for build settings? We don’t have a public API endpoint for that endpoint as far as I know, which means that we can’t promise it will always remain available, but for the time being you can watch the network requests that our UI makes. The request is a PUT and the payload is something like this for “allow all branches”:

    "branch": "your-prod-branch",
    "allowed_branches":[], <--- empty array means "allow all"

Let us know if that helps or if you have other questions!