---
title: "Trigger a new pipeline"
method: POST
path: "/project/{project-slug}/pipeline"
tags: ["Pipeline"]
---

# Trigger a new pipeline

`POST /project/{project-slug}/pipeline`

## Request

- Base URL: `https://circleci.com/api/v2`
- URL: `https://circleci.com/api/v2/project/{project-slug}/pipeline`
- Auth: one of:
  - API key in header `Circle-Token`
  - HTTP bearer
  - HTTP basic
  - API key in query parameter `circle-token`

**[This endpoint is superseded by the [new Trigger Pipeline API](#tag/Pipeline/operation/triggerPipelineRun), which supports all organization and pipeline types except GitLab.]** Triggers a new pipeline on the project. Does not support triggering pipelines integrated with GitLab or GitHub App.

## Path parameters

- `project-slug` string, required

## Request body

- object: The information you can supply when triggering a pipeline.
  - `branch` string: The branch where the pipeline ran. The HEAD commit on this branch was used for the pipeline. Note that `branch` and `tag` are mutually exclusive. To trigger a pipeline for a PR by number use `pull/<number>/head` for the PR ref or `pull/<number>/merge` for the merge ref (GitHub only).
  - `tag` string: The tag used by the pipeline. The commit that this tag points to was used for the pipeline. Note that `branch` and `tag` are mutually exclusive.
  - `parameters` object: An object containing pipeline parameters and their values. Pipeline parameters have the following size limits: 100 max entries, 128 maximum key length, 512 maximum value length.

## Response `201`

The created pipeline.

- object: A pipeline creation response.
  - `id` string, uuid, required: The unique ID of the pipeline.
  - `state` 'created' | 'errored' | 'setup-pending' | 'setup' | 'pending', required: The current state of the pipeline.
  - `number` integer, required: The number of the pipeline.
  - `created_at` string, date-time, required: The date and time the pipeline was created.

## Other responses

- `default`: Error response.

---

[API](https://skmtc.dev/circleci/apis/circleci-api.md) - [All operations](https://skmtc.dev/circleci/apis/circleci-api/llms.txt) - [OpenAPI document](https://skmtc.dev/circleci/apis/circleci-api/revisions/b9c0e0c24058?raw)
