Paperfuldocs

JavaScript

The Paperful JavaScript SDK provides a typed interface for interacting with the Paperful API from JavaScript and TypeScript applications.

It works with modern server runtimes including Node.js and Bun.

Installation

The Paperful JavaScript SDK is available on npm.

Install the SDK using your preferred package manager.

npm install @paperful/sdk

Create a client

Initialize the SDK with your API key:

import { Paperful } from "@paperful/sdk";

const paperful = new Paperful({
  // optional: provide your API key here if not using environment variables
  apiKey: "pf_..."
});
Keep your API key on the server. Do not expose it in client-side applications or commit it to source control.

TypeScript

The JavaScript SDK includes TypeScript definitions out of the box.

import type { Paper, PaperNode } from "@paperful/sdk";

Responses are fully typed, giving you autocomplete and compile-time validation throughout your application.

Runtime support

The SDK is designed for modern server-side JavaScript runtimes.

RuntimeSupport
Node.jsSupported
BunSupported
TypeScriptSupported
ServerlessSupported
BrowserNot recommended

The SDK must be used from backend or server-side environments.

On this page