---
title: "Create a deployment check"
method: POST
path: "/projects/{project_id}/deployment_checks"
tags: ["Deployment Checks"]
---

# Create a deployment check

`POST /projects/{project_id}/deployment_checks`

## Request

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

Creates a new deployment check on the project. A check has a stage (pre_build or post_deploy) and a check_type (ssh, http, or vulnerability_scan). SSH checks run on selected servers; HTTP checks run from the deployment worker against the configured URL; vulnerability_scan checks run a scanner (Trivy, TruffleHog, or a custom CLI emitting SARIF) on the build server against the checked-out source, and are pre-build only.

## Path parameters

- `project_id` string, required

## Request body

- DeploymentCheckObject
  - `deployment_check` object, required
    - `name` string, required
    - `description` string
    - `stage` string, required
    - `check_type` string, required
    - `enabled` boolean
    - `timeout_seconds` integer
    - `command` string
    - `servers` string[]
    - `http_method` string
    - `http_url` string
    - `http_expected_status` integer
    - `http_body_match` string
    - `scanner` string
    - `scan_target_kind` string
    - `scan_target` string
    - `severity_threshold` string
    - `fail_on_unfixed_only` boolean
    - `sarif_output_path` string
    - `integration_identifier` string
    - `window_minutes` integer
    - `match_by_release` boolean

## Response `201`

Success

- IdentifierNameStageObject
  - `identifier` string
  - `name` string
  - `stage` string
  - `check_type` string
  - `enabled` boolean
  - `position` integer
  - `command` string
  - `servers` string[]
  - `http_method` string
  - `http_url` string
  - `http_expected_status` integer
  - `http_body_match` string
  - `timeout_seconds` integer
  - `scanner` string
  - `scan_target_kind` string
  - `scan_target` string
  - `severity_threshold` string
  - `fail_on_unfixed_only` boolean
  - `sarif_output_path` string
  - `integration_identifier` string
  - `window_minutes` integer
  - `match_by_release` boolean

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