# Start style artifact build

```http
POST /projects/{project_reference}/style-artifacts/current/builds
```

Start a background build of the compiled CSS artifact for a branch, environment or release unless one is ready or building; returns the style artifact record. Requires project.files.write.

## Parameters

| Name                | In   | Required | Description                                                |
| ------------------- | ---- | -------- | ---------------------------------------------------------- |
| `project_reference` | path | Yes      | Project slug, UUID, or domain that identifies the project. |

## Request body

| Field                | Type    | Required | Description                                                                                                                                                                                                                    |
| -------------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `style_profile_hash` | string  | Yes      | Style profile identifier used with the selector to find current metadata.                                                                                                                                                      |
| `branch`             | string  |          | Branch name. Exactly one of branch, environment\_name, or release\_id is required. Main may be implicit before its branch row exists; other branch and environment names must exist in the project or the request returns 404. |
| `environment_name`   | string  |          | Environment name. Exactly one selector is required.                                                                                                                                                                            |
| `release_id`         | string  |          | Release UUID. Exactly one selector is required.                                                                                                                                                                                |
| `force`              | boolean |          | Queue a new build even when current metadata is ready or building.                                                                                                                                                             |

## Responses

| Status | Description                                                                                                                                |
| ------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
| 200    | Current style artifact build state. A ready or building artifact is reused unless force is true; otherwise a background build is enqueued. |
| 400    | Bad request                                                                                                                                |
| 401    | Unauthorized                                                                                                                               |
| 403    | Forbidden                                                                                                                                  |
| 404    | Not found                                                                                                                                  |
| 500    | Server error                                                                                                                               |
