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.
npm
View package versions, release information, and installation details.
Source Code
View the source code, contribute, and explore the repository.
Install the SDK using your preferred package manager.
npm install @paperful/sdkCreate 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_..."
});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.
| Runtime | Support |
|---|---|
| Node.js | Supported |
| Bun | Supported |
| TypeScript | Supported |
| Serverless | Supported |
| Browser | Not recommended |
The SDK must be used from backend or server-side environments.