API calls returning error message *Branch not found*

We used the API to make POST requests to /project/:vcs-type/:username/:project to trigger new builds before, and it stopped working yesterday. After debugging, I noticed there was an error response coming from the API which stated Branch not found. I thought it was an API change which I wasn’t aware of, and updated our API call to POST to /project/:vcs-type/:username/:project/tree/:branch. Before, the API assumed the default branch was master, but not anymore.

After the issue was fixed on our side, I went ahead to setup a new project on CircleCI, and on the project setup page, after I click “Start building”, it says Failed. After checking the network requests with the developer tools, I notice the same Branch not found error was happening there as well. So, I think that this is a bug on the API, which breaks the old trigger endpoint, and other endpoints used internally from CircleCI as well.

We use BitBucket.

1 Like

Happening here as well, we have a new repository on BitBucket unable to start builds. I am surprised more people have not encountered this issue.

If you don’t want to wait for a fix, I was able to get the project started using the API with the correct endpoint.