Skip to main content
To call Box APIs from a Node project, install the Box Node SDK in one of two ways:
  • As part of the box npm package (recommended for new projects)
  • As the standalone box-node-sdk package (supported for existing integrations)

Learn more about Node SDK on GitHub

The box npm package installs the Box Node SDK and the Box CLI as direct dependencies, so you get both tools in a single command.

Prerequisites

Install Node.js 22 or later.

Install

npm install box

Import the SDK

import BoxSDK from 'box/sdk';  // ESM
const BoxSDK = require('box/sdk');  // CommonJS
TypeScript types are included. After installation, you can also run any CLI command with npx box <command> — no separate install is required. The box package works with npm, yarn, pnpm, and bun.
Existing box-node-sdk users: If box-node-sdk works for you, leave it. The box package is for developers — and their coding agents — starting fresh. Existing code is unaffected.

Install box-node-sdk directly

Use the standalone package for existing projects.

NPM installation

To install the Node SDK run the following command from your terminal window or command prompt using the Node Package Manager.
npm install box-node-sdk --save

Yarn installation

Similarly, the SDK can be installed using the Yarn package manager.
yarn add box-node-sdk