Skip to content

Postman Client

@theholocron/postman-client is a typed wrapper around the Postman API for managing collections, environments, workspaces, and API specs.

Terminal window
pnpm add @theholocron/postman-client
import { createPostmanClient } from "@theholocron/postman-client";
const client = createPostmanClient({ token: process.env.POSTMAN_API_KEY });
const workspaces = await client.workspaces.list();
const collections = await client.collections.list({ workspaceId: "ws-123" });
await client.import.openapi({ workspaceId: "ws-123", spec: myOpenApiSpec });
Namespace Covers
collections Collections
environments Environments
import Importing an OpenAPI definition
me The authenticated user
specs API specs and their files
workspaces Workspaces

The full API reference is generated from the package’s TSDoc comments.