Documentation

SDKs and compatibility

Use SendHog with familiar tools from the email provider you already know.

An SDK is a ready-made code library that helps your application use SendHog. We provide SDKs with the same sending methods and response formats as Amazon SES, Postmark, Resend and SendGrid for the operations we support.

Authentication is specific to SendHog: use a SendHog API key, not a key from your previous provider. The API reference lists the supported operations and their limits.

Starting fresh? Choose the SendHog SDK. Moving an existing application? Choose your current provider’s style to keep supported sending code familiar. Libraries are available for JavaScript, TypeScript and Python.

Install and send

JavaScript and TypeScript share @sendhog/sdk on npm. Install with npm install @sendhog/sdk; Node.js 22 or newer is required. Provider compatibility clients are included in the same package, not separate installations.

Python requires version 3.11 or newer. Install sendhog-sdk from PyPI with python -m pip install sendhog-sdk. No local SendHog checkout or Git installation is needed. The public source is available at SendHog/sdk-python.

Use SENDHOG_API_KEY to provide the full API key on your server. Keep it out of browser code. The getting started guide walks through creating a key and verifying your domain.

Send email
Provider
import { SendHog } from '@sendhog/sdk';

const client = new SendHog(process.env.SENDHOG_API_KEY ?? '');

const { id } = await client.send({
  "from": "sender@example.com",
  "to": "recipient@example.net",
  "subject": "Hello from SendHog",
  "text": "Hello from your application."
});
console.log(id);
From the SendHog repository · not yet publishednpm install @sendhog/sdk

Supported sending methods

A method is the action your application calls to send an email. These names match the supported provider style; requests go to SendHog, not to your previous provider.

StyleJavaScript / TypeScriptPython
SendHogSendHog.sendSendHog.send
Amazon SESSESv2Client.sendSESv2Client.send_email
PostmarkServerClient.sendEmailServerClient.outbound.send
ResendResend.emails.sendResend.Emails.send
SendGridSendGridClient.sendSendGridAPIClient.send

The SendHog SDK uses client.send(message). It returns a message ID and creation time; read result.id in JavaScript or result['id'] in Python. See sending and message events for fields, limits and delivery states.

What changes when you switch

Replace the provider package, client setup and API key with SendHog’s equivalents. Keep the sending methods and response fields listed here. Changing only your old provider’s server address will not work.

Compatibility covers the documented sending methods, not every feature in the original provider. Original provider-template IDs, attachments, scheduled sends, tracking and provider-specific settings are not supported. SendHog’s own published templates use its native template reference. Unsupported options produce an error rather than being silently ignored.

You can also read stored messages with messages.list and messages.get. These are SendHog features, not copies of another provider’s receiving service.

Response details by provider

  • Amazon SES: JavaScript uses SendEmailCommand and returns MessageId. Python uses send_email and includes ResponseMetadata. Only SES v2 Simple text/HTML messages are supported; AWS credentials and signatures are not used.
  • Postmark: JavaScript uses sendEmail and the usual capitalized field names. Python uses the current async outbound.send method. Only the outbound transactional stream is supported, not broadcast streams or older community Python clients.
  • Resend: JavaScript uses emails.send and returns data, error and headers. Python uses Emails.send and returns a dictionary containing the ID.
  • SendGrid: JavaScript uses send with a plain message object and returns a response/body pair. Python accepts a dictionary with one personalization and returns status_code, headers and body. SendGrid Mail helper objects and callback overloads are not supported.

Only the listed response fields are covered, not every helper on a provider’s response object. Request errors use SendHog’s error codes; they do not reproduce every error from the original provider. The SendHog SDK throws on failure. Resend-style JavaScript returns HTTP errors in its error field; local input-validation errors still throw.

Technical reference files

For tools that read API definitions, download OpenAPI 3.1, JSON Schema or the SDK method list. These describe the same requests and responses used in the examples.