SDK clients
Choose a published client, authenticate with your team API key, and call /api/v1 with envelope handling where the SDK supports it.
Integrators should use a published client for /api/v1 instead of hand-rolling HTTP. Each client is generated from the same OpenAPI spec as this API reference and targets https://api.emailguard.co.
Current client version: 1.2.0 (all published packages share this semver). The public API exposes 20 operations — listed below and in the sidebar.
See API key scopes for scope names. Keys use Authorization: Bearer gsk_live_... or X-API-Key.
| Client | Guide |
|---|---|
| TypeScript (npm) | TypeScript SDK |
| Go module | Go SDK |
| Python (PyPI) | Python SDK |
| PHP (Composer) | PHP SDK |
| Ruby (RubyGems) | Ruby SDK |
| MCP (AI assistants) | MCP integration |
Language-specific guides include install commands, quickstart code pulled from the same generator as API reference tabs, and links to every route.
Most clients accept the same runtime credentials:
| Variable | Required | Description |
|---|---|---|
EMAILGUARD_API_KEY | Yes | Team-scoped live key (egsk_live_...) |
API_KEY is accepted as an alias in most clients.
Successful JSON responses look like:
{
"code": "SUCCESS",
"data": { "..." : "..." },
"message": "OK"
}The TypeScript SDK and MCP server unwrap data for you. Go, Python, PHP, and Ruby generators return raw HTTP bodies — read data when code is SUCCESS. Each SDK guide explains the pattern for that language.
Endpoints grouped by OpenAPI tag (each links to interactive docs with SDK samples):
Custom tool routes (/api/v1/tools/*) appear when your deployment registers them in the public spec.
The detect call your SDKs wrap is GET /api/v1/emails/detect. A successful body always includes confidence (high, medium, or low) and evidence. Optional matched_rules entries are {id, label, signal} only.
Set a client timeout of at least 2 seconds. Live DNS on the server can take that long. If the SDK throws on timeout, connection failure, 429, or 5xx, fail open for ordinary signups: allow the account, log the skip, recheck later. A 2xx body with disposable: true is a classification result. Block it.
TypeScript unwraps data for you, so catch SDK errors for outages and read fields on the returned object for verdicts. Go, Python, PHP, and Ruby still give you the envelope. Check code before data, and treat transport exceptions as fail-open.
Details: Confidence, evidence, and fail-open. Overlay exceptions: Team email policy.
All clients share the same per-minute limits and monthly API quota. See API rate limiting for 429 handling, Retry-After, and quota headers.
Use the sidebar for every route, request body, and schema. On each endpoint page, switch language tabs (TypeScript, Python, Go, or Other for PHP/Ruby/cURL) for copy-paste samples generated from your deployment’s OpenAPI document.