---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../../modules.md) / [operations/mrt](../index.md) / uploadBundleScapi

# Function: uploadBundleScapi()

> **uploadBundleScapi**(`conn`, `params`): `Promise`\<[`UploadBundleScapiResult`](../interfaces/UploadBundleScapiResult.md)\>

Defined in: [packages/b2c-tooling-sdk/src/operations/mrt/push.ts:848](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/d2e58e4f1db44e0a640eb7f21c14a77b6380b451/packages/b2c-tooling-sdk/src/operations/mrt/push.ts#L848)

Uploads a pre-built v2 bundle archive to a storefront via the SCAPI MRT
Deployments API as multipart/form-data.

The multipart payload mirrors the legacy [uploadBundleV2](uploadBundleV2.md) exactly (same
`bundle`/`message`/`rootDir`/`configPath`/`matchMode` fields), so a bundle
built with [createBundleV2](createBundleV2.md) uploads identically on either backend. As
with the legacy path, openapi-fetch passes the `FormData` body through
unchanged and lets fetch set the multipart Content-Type + boundary.

## Parameters

### conn

[`ScapiMrtConnection`](../interfaces/ScapiMrtConnection.md)

### params

#### bundle

[`BundleV2`](../interfaces/BundleV2.md)

#### storefrontId

`string`

## Returns

`Promise`\<[`UploadBundleScapiResult`](../interfaces/UploadBundleScapiResult.md)\>

## Throws

carrying the HTTP status on a non-2xx response.
