Update vcs branch via api

I’d like to be able to update the branch we’re using for VCS for a number of workspaces via the Terraform API. I am able to run a GET to pull down the json file and when I edit just the branch name in the json and run a patch with the same file, I get this error. Does the GET produce too much information to be reuploaded with PATCH?

{"errors":[{"status":"400","title":"invalid document"}]}%

So are you just trying to change the branch name in the PATCH request, or are you sending everything? If you are wanting to replace you should be using POST instead of PATCH.