Skip to main content
The Upstash Box TypeScript SDK provides a fully typed client for interacting with Upstash Box.

Installation

npm install @upstash/box

Quick Start

import { Box } from "@upstash/box"

const box = new Box({
  url: process.env.UPSTASH_BOX_REST_URL,
  token: process.env.UPSTASH_BOX_REST_TOKEN,
})

await box.upload("hello.txt", "Hello, World!")

const content = await box.get("hello.txt")

Configuration

OptionTypeDescription
urlstringYour Box REST URL from the Upstash Console
tokenstringYour Box REST token from the Upstash Console

Next Steps