---
title: "Update a build command"
method: PATCH
path: "/projects/{project_id}/build_commands/{id}"
tags: ["Build Commands"]
---

# Update a build command

`PATCH /projects/{project_id}/build_commands/{id}`

## Request

- Base URL: `https://sg.deployhq.com`
- URL: `https://sg.deployhq.com/projects/{project_id}/build_commands/{id}`
- Auth: HTTP basic

Updates an existing build command's properties such as the command string, description, or error handling behavior.

## Path parameters

- `project_id` string, required
- `id` string, required

## Request body

- BuildCommandObject2
  - `build_command` object, required
    - `description` string
    - `command` string, required
    - `template_name` string
    - `halt_on_error` boolean
    - `enabled` boolean
    - `watch_files` string

## Response `200`

Success

- BuildCommand
  - `id` integer
  - `project_id` integer, nullable
  - `description` string
  - `command` string
  - `halt_on_error` boolean
  - `position` integer
  - `created_at` string
  - `updated_at` string
  - `identifier` string
  - `parent_type` string
  - `parent_id` integer
  - `template_name` string
  - `enabled` boolean
  - `watch_files` string
  - `source` string

## Other responses

- `401`: You are not authorized to access this resource. You need to authenticate yourself first.
- `403`: You are not allowed to access this resource. You do not have the necessary permissions.
- `404`: The requested resource could not be found.
- `422`: The server could not process the request due to semantic errors. Please check your input and try again.
- `500`: Internal Server Error

---

[API](https://skmtc.dev/deployhq/apis/deployhq-api-interactive-documentation.md) · [All operations](https://skmtc.dev/deployhq/apis/deployhq-api-interactive-documentation/llms.txt) · [OpenAPI document](https://skmtc.dev/deployhq/apis/deployhq-api-interactive-documentation/revisions/830264ae58be?raw)
