---
title: "Abort build"
method: POST
path: "/v2/actor-builds/{buildId}/abort"
tags: ["Actor builds"]
---

# Abort build

`POST /v2/actor-builds/{buildId}/abort`

Aborts an Actor build and returns an object that contains all the details
about the build.

Only builds that are starting or running are aborted. For builds with status
`FINISHED`, `FAILED`, `ABORTING` and `TIMED-OUT` this call does nothing.

## Path parameters

- `buildId` string, required

## Response `200`

- BuildResponse — Response containing Actor build data.
  - `data` Build, required
    - `id` string, required
    - `actId` string, required
    - `userId` string, required
    - `startedAt` string, date-time, required
    - `finishedAt` string, date-time, nullable
    - `status` 'READY' | 'RUNNING' | 'SUCCEEDED' | 'FAILED' | 'TIMING-OUT' | 'TIMED-OUT' | 'ABORTING' | 'ABORTED', required — Status of an Actor job (run or build).
    - `meta` BuildsMeta, required
      - `origin` 'DEVELOPMENT' | 'WEB' | 'API' | 'SCHEDULER' | 'TEST' | 'WEBHOOK' | 'ACTOR' | 'CLI' | 'CI' | 'STANDBY' | 'MCP', required
      - `clientIp` string — IP address of the client that started the build.
      - `userAgent` string — User agent of the client that started the build.
    - `stats` BuildStats
      - `durationMillis` integer
      - `runTimeSecs` number
      - `computeUnits` number
      - `imageSizeBytes` integer, nullable
    - `options` BuildOptions
      - `useCache` boolean, nullable
      - `betaPackages` boolean, nullable
      - `memoryMbytes` integer, nullable
      - `diskMbytes` integer, nullable
    - `usage` BuildUsage
      - `ACTOR_COMPUTE_UNITS` number, nullable
    - `usageTotalUsd` number, nullable — Total cost in USD for this build. Requires authentication token to access.
    - `usageUsd` BuildUsage
      - `ACTOR_COMPUTE_UNITS` number, nullable
    - `inputSchema` string, nullable
    - `readme` string, nullable
    - `buildNumber` string, required
    - `actVersion` object — Snapshot of the Actor version that this build was created from.
      - `sourceType` 'SOURCE_FILES' | 'GIT_REPO' | 'TARBALL' | 'GITHUB_GIST' | 'SOURCE_CODE'
      - `buildTag` string
      - `versionNumber` string
      - `gitRepoUrl` string — URL of the git repository, present when sourceType is GIT_REPO.
      - `sourceFiles` SourceCodeFile[] — Inline source files, present when sourceType is SOURCE_FILES.
        - `format` 'BASE64' | 'TEXT'
        - `content` string — The contents of the file. Interpreted based on the value of `format`.
        - `name` string, required — The path of the file relative to the Actor's root directory.
    - `actorDefinition` ActorDefinition — The definition of the Actor, the full specification of this field can be found in [Apify docs](https://docs.apify.com/platform/actors/development/actor-definition/actor-json)
      - `actorSpecification` 1 — The Actor specification version that this Actor follows. This property must be set to 1.
      - `name` string — The name of the Actor.
      - `version` string — The version of the Actor, typically a dot-separated sequence of numbers (e.g., `0.1`, `1.0`, or `0.0.1`).
      - `buildTag` string — The tag name to be applied to a successful build of the Actor. Defaults to 'latest' if not specified.
      - `environmentVariables` object — A map of environment variables to be used during local development and deployment.
      - `dockerfile` string — The path to the Dockerfile used for building the Actor on the platform.
      - `dockerContextDir` string — The path to the directory used as the Docker context when building the Actor.
      - `readme` string — The path to the README file for the Actor.
      - `input` object — The input schema object, the full specification can be found in [Apify docs](https://docs.apify.com/platform/actors/development/actor-definition/input-schema)
      - `changelog` string — The path to the CHANGELOG file displayed in the Actor's information tab.
      - `storages` object
        - `dataset` object — Defines the schema of items in your dataset, the full specification can be found in [Apify docs](https://docs.apify.com/platform/actors/development/actor-definition/dataset-schema)
      - `defaultMemoryMbytes` union — Specifies the default amount of memory in megabytes to be used when the Actor is started. Can be an integer or a [dynamic memory expression](/actors/development/actor-definition/dynamic-actor-memory).
        - string
        - integer
      - `minMemoryMbytes` integer — Specifies the minimum amount of memory in megabytes required by the Actor.
      - `maxMemoryMbytes` integer — Specifies the maximum amount of memory in megabytes required by the Actor.
      - `usesStandbyMode` boolean — Specifies whether Standby mode is enabled for the Actor.

## Other responses

- `400` — Bad request - invalid input parameters or request body.
- `401` — Unauthorized - authentication required or invalid token.
- `403` — Forbidden - insufficient permissions to perform this action.
- `404` — Not found - the requested resource does not exist.
- `405` — Method not allowed.
- `429` — Too many requests - rate limit exceeded.

---

[API](https://skmtc.net/apify/apis/apify-api.md) · [All operations](https://skmtc.net/apify/apis/apify-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/apify/apify-api/versions/01a71794279b/schema)
