Documentation

Getting started

Get your API key, add a domain and send your first email.

1. Get your API key

Create an API key for your sending domain in the dashboard. Keep the full key private and use it on your server as SENDHOG_API_KEY.

Go to dashboard

An API key is the private credential your application uses to access SendHog. New account? Add your domain in the next step first, then create a key with send-email permission, called email.send. The full key is shown only when you create it.

2. Add your domain

Add the domain you want to send from, such as example.com. SendHog gives you DNS entries—settings that prove you own the domain. Add them at the company that manages your DNS, then return to SendHog and click Check DNS. Sending is automatically approved when your domain is verified.

Add your domain

Choose your DNS provider for specific instructions:

Using another provider? Follow the general DNS steps. Leave the records that deliver your existing incoming mail, called MX records, unchanged.

3. Send your first email

An SDK is a code library that connects your app to SendHog. Choose SendHog if you are starting fresh, or choose your current provider for familiar sending methods. Replace sender@example.com with an address on your verified domain and recipient@example.net with your own inbox.

Set SENDHOG_API_KEY on your server to the full key you saved. Install the SDK with the command in the code box, then save and run the example.

Send your first 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

Save as send.mjs and run node send.mjs.

JavaScript and TypeScript use npm install @sendhog/sdk (Node.js 22+). Python uses python -m pip install sendhog-sdk from PyPI (Python 3.11+). No local SendHog checkout is needed. See SDK installation for details.

4. Check your email

A successful send returns a message ID. Check your recipient inbox for the email, or find the message in your dashboard’s email log. An ID means the request was accepted, not that the email has arrived.

Open email log