# API to Trigger a new Build by Project (preview) fails

**URL:** <https://discuss.circleci.com/t/api-to-trigger-a-new-build-by-project-preview-fails/24610>\
**Category:** Bug Reports\
**Tags:** api\
**Created:** [August 24, 2018, 2:00am UTC](https://discuss.circleci.com/t/api-to-trigger-a-new-build-by-project-preview-fails/24610 "2018-08-24T02:00:50Z")\
**Posts on this page:** 1\
**Showing post:** 17

<div class="post-metadata">

**Author:** ![yellow](https://avatars.discourse-cdn.com/v4/letter/y/dfb087/32.png) [@yellow](https://discuss.circleci.com/u/yellow)\
**Post date:** [March 6, 2019, 1:13am UTC](https://discuss.circleci.com/t/api-to-trigger-a-new-build-by-project-preview-fails/24610/17 "2019-03-06T01:13:32Z")

</div>

`curl -X POST --header "Content-Type: appliation/json" -d '{"branch":":branch"}' -d 'build_parameters[CIRCLE_JOB]=build' https://circleci.com/api/v1.1/project/github/:username/:repo/tree/:branch?circle-token=:token`

```auto
Configuration errors: 2 errors occurred:

* Configuration version 2.1 requires the "Enable Build Processing" project setting. Enable Build Processing under Project Settings -> Advanced Settings. In order to retrigger build processing, you must push a new commit.
* Cannot find a job named `build` to run in the `jobs:` section of your configuration file.
If you expected a workflow to run, check your config contains a top-level key called 'workflows:'

```

- `version: 2.1` is set.
- “Enable Build Processing” is enabled.
- `build` exists under `jobs:`.
- If I give a workflow name it errors just the same. (including still talking about `build` job rather than the workflow name)

---

_[View the full topic](https://discuss.circleci.com/t/api-to-trigger-a-new-build-by-project-preview-fails/24610)._
