EmailGuard
  • Pricing
Log inRegister
DocumentationAPI ReferenceKnowledge Base

API reference

Download spec

API reference

Guides and endpoint docs

Guides
  • SDK clients
  • TypeScript SDK
  • Go SDK
  • Python SDK
  • PHP SDK
  • Ruby SDK
  • MCP client
Account
  • getGet team
  • patchUpdate team
Team
Members
  • getList team members
  • deleteRemove a team member
  • patchUpdate a team member role
Invites
  • deleteCancel a pending invite
  • postInvite a team member
  • getList pending team invites
Billing
  • getGet billing usage
Notifications
Channels
  • postCreate notification channel
  • deleteDelete notification channel
  • getList notification channels
  • postTest notification channel
  • putUpdate notification channel
Events
  • getList notification events
Rules
  • postCreate notification rule
  • deleteDelete notification rule
  • getList notification rules
  • putUpdate notification rule
email
  • getDetect email characteristics

SDK clients

Choose a published client, authenticate with your team API key, and call /api/v1 with envelope handling where the SDK supports it.

On this page

  • Prerequisites
  • Choose a client
  • Shared credentials
  • Response envelope
  • Operations overview
    • Billing
    • Channels
    • email
    • Events
    • Invites
    • Members
    • Rules
    • Teams
  • Detect, confidence, and fail-open
  • Rate limits and quotas
  • API reference
TypeScript SDK

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.

Prerequisites

  1. Create a team-scoped API key in Team → API keys with the scopes you need.

See API key scopes for scope names. Keys use Authorization: Bearer gsk_live_... or X-API-Key.

Choose a client

ClientGuide
TypeScript (npm)TypeScript SDK
Go moduleGo 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.

Shared credentials

Most clients accept the same runtime credentials:

VariableRequiredDescription
EMAILGUARD_API_KEYYesTeam-scoped live key (egsk_live_...)

API_KEY is accepted as an alias in most clients.

Response envelope

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.

Operations overview

Endpoints grouped by OpenAPI tag (each links to interactive docs with SDK samples):

Billing

  • Get billing usage

Channels

  • Create notification channel
  • Delete notification channel
  • List notification channels
  • Test notification channel
  • Update notification channel

email

  • Detect email characteristics

Events

  • List notification events

Invites

  • Cancel a pending invite
  • Invite a team member
  • List pending team invites

Members

  • List team members
  • Remove a team member
  • Update a team member role

Rules

  • Create notification rule
  • Delete notification rule
  • List notification rules
  • Update notification rule

Teams

  • Get team
  • Update team

Custom tool routes (/api/v1/tools/*) appear when your deployment registers them in the public spec.

Detect, confidence, and fail-open

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.

Rate limits and quotas

All clients share the same per-minute limits and monthly API quota. See API rate limiting for 429 handling, Retry-After, and quota headers.

API reference

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.