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

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

# Function: pushBundleV2()

> **pushBundleV2**(`options`, `auth`): `Promise`\<[`PushV2Result`](../interfaces/PushV2Result.md)\>

Defined in: [packages/b2c-tooling-sdk/src/operations/mrt/push.ts:294](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/1dedfc1ffefa01c3d5bff62c8f7e7e682a1a91cd/packages/b2c-tooling-sdk/src/operations/mrt/push.ts#L294)

Builds a v2-format archive from a build directory and uploads it to MRT.

This is upload-only: it does not deploy the bundle. Deploy separately with
[createDeployment](createDeployment.md) (or the `b2c mrt bundle deploy <bundleId>` command).

## Parameters

### options

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

v2 push configuration options

### auth

[`AuthStrategy`](../../../auth/interfaces/AuthStrategy.md)

Authentication strategy (ApiKeyStrategy)

## Returns

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

Result of the upload operation

## Throws

Error if the upload fails

## Example

```typescript
import { ApiKeyStrategy } from '@salesforce/b2c-tooling-sdk/auth';
import { pushBundleV2 } from '@salesforce/b2c-tooling-sdk/operations/mrt';

const auth = new ApiKeyStrategy(process.env.MRT_API_KEY!, 'Authorization');

const result = await pushBundleV2({
  projectSlug: 'my-storefront',
  ssrOnly: ['ssr.js'],
  ssrShared: ['static/**/*'],
  buildDirectory: './build',
  message: 'Release v1.0.0'
}, auth);

console.log(`Bundle ${result.bundleId} uploaded to ${result.projectSlug}`);
```
