---
title: "Update Actor version build on push"
method: PUT
path: "/v2/actors/{actorId}/versions/{versionNumber}/build-on-push"
tags: ["Actors/Actor versions"]
---

# Update Actor version build on push

`PUT /v2/actors/{actorId}/versions/{versionNumber}/build-on-push`

## Request

- Base URL: `https://api.apify.com`
- URL: `https://api.apify.com/v2/actors/{actorId}/versions/{versionNumber}/build-on-push`
- Auth: one of:
  - HTTP bearer
  - API key in query parameter `token`

Turns automatic builds on push on or off for an Actor version whose source is a git repository.

Enabling registers a push webhook on the repository through the connected git account given by `providerId`, so
that every push to the repository builds the version. Disabling turns the webhook off on GitHub, or removes it
on GitLab and Bitbucket.

You need write access to the Actor. The version must have its source type set to a git repository, and the
connected account must have permission to manage the repository's webhooks.

## Path parameters

- `actorId` string, required
- `versionNumber` string, required

## Request body

- UpdateBuildOnPushRequest
  - `providerId` string, required: The connected git account to register the push webhook through: `github-app` for the GitHub App, or the ID of a connected GitLab or Bitbucket integration, as returned by the [Get git provider integrations](/api/v2/integrations-git-get) endpoint.
  - `enabled` boolean, required: `true` registers the push webhook so that pushes to the repository build the version; `false` turns it off.

## Response `204`

No content

## 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.
- `413`: Payload too large - the request body exceeds the size limit.
- `415`: Unsupported media type - the Content-Encoding of the request is not supported.
- `429`: Too many requests - rate limit exceeded.

## Changes

> 25 revisions in range; 1 not diffed.

- **2026-10-27** `ec76185eb934`: 8 info
  - added the optional property `error/data` to the response with the `400` status
  - added the optional property `error/data` to the response with the `401` status
  - added the optional property `error/data` to the response with the `403` status
  - added the optional property `error/data` to the response with the `404` status
  - …4 more
- **2026-10-27** `e52dd2239cee`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/apify/apis/apify-api/changes/v2/actors/:actorId/versions/:versionNumber/build-on-push/put.md)

---

[API](https://skmtc.dev/apify/apis/apify-api.md) - [All operations](https://skmtc.dev/apify/apis/apify-api/llms.txt) - [OpenAPI document](https://skmtc.dev/apify/apis/apify-api/revisions/68d2d102e6a2?raw)
