Deploy previews setting via netlify API

As the article Dennis linked mentions, our open-api spec is not completely up to date, and thus following our UI’s methods closely is the way to go.

So - you shouldn’t need postman to test our UI as a start; you should be watching our UI as you set the “skip PR’s” flag, and using THAT call instead. For me it looks like this:

HTTP PUT https://api.netlify.com/api/v1/sites/YOUR_SITE_ID

with a body of:

{build_settings: {branch: "master", allowed_branches: [], skip_prs: true}}

This is an example of “master” being my production branch, and me allowing builds on all branches, but the data will vary if you limit builds to certain branches or use a different production branch :slight_smile:

2 Likes