---
title: "Create a new trigger matching criteria for this Pipeline."
method: POST
path: "/orgs/{orgId}/apps/{appId}/pipelines/{pipelineId}/criteria"
tags: ["public", "Pipelines"]
---

# Create a new trigger matching criteria for this Pipeline.

`POST /orgs/{orgId}/apps/{appId}/pipelines/{pipelineId}/criteria`

Create a new trigger matching criteria for this Pipeline. This must not conflict with an existing criteria for the same trigger on this or any other Pipeline that applies to this Application.

## Path parameters

- `orgId` string, required
- `appId` string, required
- `pipelineId` string, required

## Request body

- PipelineCriteriaCreateBody — The details required to create a new deployment request matching criteria for a Pipeline.
  - `trigger` string, required — The trigger to call
  - `env_type` string — The Environment Type that this criteria will match. If defined, this criteria will only apply to Environments that have this type.
  - `app_id` string — The id of the Application for which this criteria matches. If this Pipeline is defined in an Application, then this value can only be null or the id of the Application.
  - `env_id` string — The exact id of the Environment which this criteria will match.
  - `deployment_type` string — The type of deployment that this criteria will match. Valid values are "deploy" and "redeploy". "redeploy" applies only to deployment request to redeploy a previous deployment id while "deploy" will apply to all other requests that include a Delta or Deployment Set. If not defined, all deployment types will match.

## Response `201`

The criteria was successfully added.

- PipelineCriteria — A deployment request matching criteria for a Pipeline.
  - `trigger` string, required — The trigger to call
  - `id` string, required — The unique id of the criteria within this Pipeline.
  - `pipeline_id` string, required — The id of the Pipeline tied to this deployment request criteria.
  - `pipeline_name` string, required — The current display name of the Pipeline.
  - `env_type` string — The Environment Type that this criteria will match. If defined, this criteria will only apply to Environments that have this type.
  - `app_id` string — The id of the Application for which this criteria matches. If this Pipeline is defined in an Application, then this value can only be null or the id of the Application.
  - `env_id` string — The exact id of the Environment which this criteria will match.
  - `deployment_type` string — The type of deployment that this criteria will match. Valid values are "deploy" and "redeploy". "redeploy" applies only to deployment request to redeploy a previous deployment id while "deploy" will apply to all other requests that include a Delta or Deployment Set. If not defined, all deployment types will match.

## Other responses

- `400` — The request was invalid. More detail can be found in the error body.
- `404` — Either the resource or a related resource could not be found. More detail can be found in the error body.
- `409` — The request itself is valid however it could not be applied based on the current state of the resource. More detail can be found in the error body.

---

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