New:Socket for Asana Is Now Available.Learn more
Get Started

@postbag/sdk

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@postbag/sdk

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

@postbag/sdk

Typed TypeScript client for the Postbag API. Generated from the server's /openapi.json (the truth — see api/openapi.yaml), so it is always in sync with what apps/server actually serves.

import { createClient, submit } from "@postbag/sdk"

// Management API (/v1/*) — cookie session (dashboard) or an API key (agents, scripts).
const client = createClient({ baseUrl: "https://api.postbag.dev", apiKey: "pb_live_…" })
const { data, error } = await client.GET("/v1/forms")

// Public submit endpoint (/s/{formId}) — no auth, works from a browser or a server.
await submit("https://api.postbag.dev/s/fm_8f3kq2", { email: "you@example.com" })

Every operation is also keyed by its stable operationId (see docs/AGENT-NATIVE.md §6 — these are the same names the postbag CLI and @postbag/mcp tools use):

import type { operations } from "@postbag/sdk"

type FormsCreateBody = operations["forms_create"]["requestBody"]["content"]["application/json"]

Regenerating

pnpm --filter @postbag/sdk generate

Regenerates src/schema.d.ts from the committed api/openapi.yaml (itself generated by pnpm openapi:export from the Zod route definitions in apps/server — no running server needed for either step). schema.d.ts is committed so consumers don't need to run anything to typecheck.

FAQs

Package last updated on 21 Aug 2026

Related posts