---
title: "Deploy package or apply change for a specified environmen"
method: POST
path: "/apps/{appId}/environments/{environmentId}/request"
tags: ["apps"]
---

# Deploy package or apply change for a specified environmen

`POST /apps/{appId}/environments/{environmentId}/request`

## Request

- Base URL: `https://pmp-demo.privateplatform.mendix.com/deployservice/v1`
- URL: `https://pmp-demo.privateplatform.mendix.com/deployservice/v1/apps/{appId}/environments/{environmentId}/request`
- Auth: one of:
  - HTTP basic
  - API key in header `Authorization`

Deploy package or apply change or start/stop/restart a specified environmen for specified app.

## Path parameters

- `appId` string, required
- `environmentId` string, required

## Query parameters

- `action` 'ApplyConfig' | 'Deploy' | 'Start' | 'Stop' | 'Restart'
- `packageId` string

## Response `202`

Response for async  operations include create environment, deploy, apply config, start, stop and restart app.

- AsyncOperationResponse: Response for async operations include create environment, deploy, apply config, start, stop and restart app.
  - `environmentId` string: Environment id
  - `pipelineId` integer: Deploy pipeline id
  - `message` string: operations message

## Other responses

- `400`: Invalid input parameter or request body
- `401`: Authentication information is missing or invalid
- `403`: User has no permission for this operation
- `404`: Resource not found

---

[API](https://skmtc.dev/mendix/apis/deploy-service-v1.md) - [All operations](https://skmtc.dev/mendix/apis/deploy-service-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/mendix/apis/deploy-service-v1/revisions/375e6f7be385?raw)
