---
title: "Create a deployment trigger"
method: POST
path: "/v1/deployment-triggers"
tags: ["Deployment Triggers"]
---

# Create a deployment trigger

`POST /v1/deployment-triggers`

Creates a deployment trigger that runs a check (or check group) whenever the linked GitHub repository reports a successful deployment. Set `useEnvironmentUrl` to run against the deployment’s `environment_url`, and `environmentRegexFilter` to restrict which environments trigger a run. Idempotent per check/group: a trigger that already exists for the same target is returned unchanged.

## Headers

- `x-checkly-account` string — Your Checkly account ID, you can find it at https://app.checklyhq.com/settings/account/general

## Request body

- CreateDeploymentTrigger
  - `checkId` string, nullable — The ID of the check to run on deploy.
  - `groupId` number, nullable — The ID of the check group to run on deploy.
  - `repoId` union, required — The provider-side repository ID, e.g. GitHub’s numeric `id`.
    - number
    - string
  - `repoName` string, required — The repository name, e.g. `acme/storefront`.
  - `repoLink` string — A link to the repository.
  - `useEnvironmentUrl` boolean — Run the check against the deployment’s `environment_url` instead of its own target. API and URL checks get their host swapped; browser and multi-step checks receive it as the `ENVIRONMENT_URL` environment variable.
  - `includeScreenshots` boolean — Attach screenshots to the check run posted back to the commit.
  - `provider` 'GITHUB' — The deployment provider. Only `GITHUB` is supported.
  - `runLocation` 'us-east-1' | 'us-east-2' | 'us-west-1' | 'us-west-2' | 'ca-central-1' | 'sa-east-1' | 'eu-west-1' | 'eu-central-1' | 'eu-west-2' | 'eu-west-3' | 'eu-north-1' | 'eu-south-1' | 'me-south-1' | 'ap-southeast-1' | 'ap-northeast-1' | 'ap-east-1' | 'ap-southeast-2' | 'ap-southeast-3' | 'ap-northeast-2' | 'ap-northeast-3' | 'ap-south-1' | 'af-south-1' — The region the triggered run executes in.
  - `environmentRegexFilter` string, nullable — Only deployments whose environment name matches this regular expression trigger a run, e.g. `^(?:Preview|staging)$`.
  - `environmentUrlRegexFilter` string, nullable — Only deployments whose environment URL matches this regular expression trigger a run.

## Response `200`

Successful

- DeploymentTrigger
  - `id` number — The deployment trigger ID.
  - `checkId` string, nullable — The check this trigger runs.
  - `groupId` number, nullable — The check group this trigger runs.
  - `provider` string — The deployment provider. Always `GITHUB` for this endpoint.
  - `repoId` string — The provider-side repository ID.
  - `repoName` string — The repository name, e.g. `acme/storefront`.
  - `repoLink` string, nullable — A link to the repository.
  - `useEnvironmentUrl` boolean — Whether the deployment’s `environment_url` is injected into the run.
  - `includeScreenshots` boolean — Whether screenshots are attached to the posted check run.
  - `environmentRegexFilter` string, nullable — Only deployments whose environment name matches this regex trigger a run.
  - `environmentUrlRegexFilter` string, nullable — Only deployments whose environment URL matches this regex trigger a run.
  - `runLocation` string — The region the triggered run executes in.
  - `created_at` string, date
  - `updated_at` string, date, nullable

## Other responses

- `201` — Created
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found

---

[API](https://skmtc.net/checklyhq/apis/checkly-public-api.md) · [All operations](https://skmtc.net/checklyhq/apis/checkly-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/checklyhq/checkly-public-api/revisions/87d29dc7b4fe/schema)
