---
title: "Link a global build command"
method: POST
path: "/projects/{project_id}/build_commands/link_global"
tags: ["Build Commands"]
---

# Link a global build command

`POST /projects/{project_id}/build_commands/link_global`

## Request

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

Links an account-level global build command to this project so it runs during the build pipeline.

## Path parameters

- `project_id` string, required

## Query parameters

- `build_command_id` string, required

## Response `201`

Created

- 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.
- `422`: Unprocessable Entity
- `500`: An unexpected error occurred on the server. The server was unable to process the request.

---

[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)
