---
title: "Create and run a new pipeline for build or deploy"
method: POST
path: "/pipelines"
tags: ["pipelines"]
---

# Create and run a new pipeline for build or deploy

`POST /pipelines`

## Request

- Base URL: `https://pmp-demo.mxplatform.net/pipelineservice/v2`
- URL: `https://pmp-demo.mxplatform.net/pipelineservice/v2/pipelines`
- Auth: one of:
  - none
  - HTTP basic
  - API key in header `Authorization`

Create a pipeline for build or deployment. This API is only available when Build Utility is "Kubernetes".

## Request body

- PipelineCreationRequestBody: Request body for creating and running a new pipeline
  - `pipelineType` string: Type of the pipeline, Build or Deploy
  - `appId` string: Build or Deploy the package of the app with the specified appId
  - `branchName` string: The branch name of the app code to build, only required for Build pipeline
  - `revisionId` string: The revision ID of the app code to build, only required for Build pipeline
  - `majorVersion` integer: The major version of the app code to build, only required for Build pipeline
  - `minorVersion` integer: The minor version of the app code to build, only required for Build pipeline
  - `patchVersion` integer: The patch version of the app code to build, only required for Build pipeline
  - `packageName` string: The name of the app package to deploy, only required for Deploy pipeline
  - `envInternalName` string: The environment with specified internal name for deploy the app package, only required for Deploy pipeline

## Response `202`

Example response

- object
  - `pipelineId` integer

## Other responses

- `401`: Authentication information is missing or invalid

---

[API](https://skmtc.dev/mendix/apis/pipeline-service-v2.md) - [All operations](https://skmtc.dev/mendix/apis/pipeline-service-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/mendix/apis/pipeline-service-v2/revisions/718c1ba1e15f?raw)
