---
title: Cancel build
url: https://developers.wpengine.com/docs/headless-platform/reference/api/endpoints/operations/apps_cancelbuild/
image: https://developers.wpengine.com/og/docs/headless-platform/reference/api/endpoints/operations/apps_cancelbuild.png
---

# Cancel build

POST

/v1/accounts/{account}/apps/{app}/environments/{environment}/builds/{build}:cancel

Select code sample

```sh
curl --request POST \
  --url https://js.wpengineapi.com/v1/accounts/example/apps/example/environments/example/builds/example:cancel \
  --header 'Authorization: Basic <credentials>' \
  --header 'Content-Type: application/json' \
  --data '{}'
```

-

## Authorizations

- **[basicAuth](https://developers.wpengine.com/docs/headless-platform/reference/api/endpoints/#basicauth)**

## Parameters

### Path Parameters

**account**

required

string

Name of your WP Engine Headless Platform account

**app**

required

string

Name of your Headless Platform application

**environment**

required

string

ID of your environment

**build**

required

string

ID of your build

## Request Body

Media typeapplication/json

Request to cancel build.

object

### Example generated

```json
{}
```

## Responses

### 200

A successful response.

Media typeapplication/json

This resource represents a long-running operation that is the result of a network API call

object

**done**

Information if the operation is done or still in progress

boolean

**metadata**

Long running operation metadata

object

**@type**

A URL/resource name that uniquely identifies the type of the serialized protocol buffer message

string

**build**

Build name in the format of: accounts/{account}/apps/{app}/environments/{environment}/builds/{build}

string

**envID**

Environment ID

string

**name**

Operation name in the format of: accounts/{account}/apps/{app}/environments/{environment}/operations/{operation}

string

#### Example generated

```json
{
  "done": true,
  "metadata": {
    "@type": "example",
    "build": "example",
    "envID": "example"
  },
  "name": "example"
}
```

## Was this helpful?

Thanks for the feedback!

```json
{"@context":"https://schema.org","@graph":[{"@type":"WebSite","@id":"https://developers.wpengine.com/#website","name":"WP Engine Product Documentation","url":"https://developers.wpengine.com/","description":"Resources for developing, deploying, and scaling on WP Engine.","inLanguage":"en-US","keywords":["API documentation","product documentation","headless WordPress","managed WordPress hosting"],"publisher":{"@id":"https://wpengine.com/#organization"}}]}
```
