---
sourceType: api-reference
sourceTypeMatchedRule: openApis
slug: MA/openApis/partner/apis/deployMiniApp
title: Deploy mini app
---
Được sử dụng để deploy 1 phiên bản Mini App của bạn lên hệ thống.

### Parameters

| Property    | Type   | Required | Description                                    |
| ----------- | ------ | -------- | ---------------------------------------------- |
| miniAppId   | long   | true     | ID của Mini App tương ứng                      |
| file        | File   | true     | File build Mini App của bạn dưới định dạng zip |
| name        | String | false    | Tên phiên bản                                  |
| description | String | false    | Mô tả phiên bản được upload                    |

### Return Values

| Property   | Type   | Description                                                  |
| ---------- | ------ | ------------------------------------------------------------ |
| error      | int    | Mã lỗi của kết quả trả về, bằng 0 nếu request thành công     |
| message    | String | Lời nhắn chi tiết tương ứng với mã lỗi                       |
| versionId  | int    | ID của version vừa được deploy thành công                    |
| entrypoint | String | Đường dẫn để mở version vừa được deploy thành công trên Zalo |

#### Sample Code


### Code sample — Java

```js
import com.vng.zalo.miniapp.openapi.sdk.models.DeployMiniAppRequest;
import com.vng.zalo.miniapp.openapi.sdk.models.DeployMiniAppResponse;
import java.io.File;

DeployMiniAppRequest request = new DeployMiniAppRequest();
request.setMiniAppId({Your Mini App's Id});
request.setName("Mini App Name");
request.setDescription("Mini App Description");
File file = new File("/path/to/your/file"); // Please use compressed file and handle read file by yourself
request.setFile(file);
DeployMiniAppResponse response = client.deployMiniApp(request);
```

### Code sample — Node.js

```js
import { createReadStream } from "fs"; // You have to use createReadStream

const file = createReadStream("/path/to/your/file"); // Please use compressed file and handle read file by yourself

const { versionId, entrypoint, error, message } = await client.deployMiniApp({
  miniAppId: {Your Mini App's Id},
  file,
  name: "Mini App Name",
  description: "Mini App Description",
});
```
