Skip to main content

US Global Mail API

Everything you need to build on top of your US Global Mail mailbox — API access, official SDKs, and AI agent support via MCP.

Programmatic access to your US Global Mail mailbox — mail items, scans, shipments, folders, and more.

The USGM API lets you manage a US Global Mail mailbox from your own code: list and organize scanned mail, request scans, manage folders, view shipments, manage shipping and deposit addresses, and manage bank accounts for check deposits.

It's a REST API over HTTPS with predictable, resource-oriented URLs, JSON request and response bodies, and standard HTTP status codes.

Official client libraries for TypeScript, Python, PHP, and Go.

We publish official SDKs so you don't have to hand-roll HTTP calls, auth headers, pagination, retries, or error handling. Every SDK is generated from the same OpenAPI spec that powers our API reference, so it always matches the live API — and is fully typed.

Language

Install

Docs

TypeScript

npm install @usgm/sdk

Python

pip install usgm

PHP

composer require usgm/sdk

Go

go get github.com/usgm/usgm-go


What every SDK gives you

  1. Authentication — pass your API key once as token; the SDK sends it on every request.

  2. Typed models — resources and parameters are fully typed for editor autocomplete and safety.

  3. Cursor pagination — list methods return a page (data, next_cursor, total_count); pass next_cursor back to fetch the next page.

  4. Retries with backoff — transient 429/5xx responses are retried automatically.

  5. Typed errors — non-2xx responses raise a typed error carrying the HTTP status and the problem+json body (which includes code and request_id).


​Webhooks

Stay informed about key events in your mailbox — automatically.

Webhooks let you get notified in real time when things happen in your mailbox, so you can automate workflows and integrate with your CRM, applications, or other systems without polling the API.

Subscribe to events like:

  • new-mail — a new mail item has arrived

  • scan-update — a scan request has completed

  • open-update — an open (unpackaging) request has completed

  • shipment-update — a shipment's status has changed

Every payload is signed with an HMAC-SHA256 signature so you can verify it's genuinely from US Global Mail. You can manage webhooks from Settings → Developer → Webhooks, or create, update, and delete them via the API.

MCP Server

Let a coding agent manage a US Global Mail mailbox on your behalf.

The USGM MCP server lets an AI coding agent — Claude Code, Cursor, VS Code, Windsurf, Cline, and others — manage a mailbox for you: read and organize scanned mail, manage folders, request scans, manage shipping and deposit addresses and bank accounts, view shipment requests, and read the account profile and virtual mailing address.

It's a thin, stateless HTTP wrapper around the US Global Mail API gateway — every tool call is forwarded to the gateway with your API key, so the gateway enforces auth, rate limits, and audit exactly as it does for direct REST calls. Nothing new to trust.

Did this answer your question?