50% off all paid plans: use code BLACKFRIDAY at checkout, until November 30. Get the deal

Documentation

Build with Pigeonify

How every feature works, step by step, and the full API, MCP and SMTP reference.

Quick start guide

API integration

Send emails programmatically using our RESTful API.

View API docs

SMTP setup

Configure SMTP to send emails from your application.

SMTP guide

Audience, campaign & automation APIs

Contacts, lists, segments, suppressions, campaigns and A/B tests, automations, events and webhooks.

API reference

MCP server

Let Claude, Cursor and other AI assistants work with your account.

Connect an assistant

Billing & plans

Compare plans and manage your subscription.

View pricing

Guides

What each feature does, how to use it, and the limits and rules behind it.

Audience

Send your first email

One HTTPS call, or standard SMTP if you already have a mail layer. Pick your language, paste it in, and swap the sending address for a domain you've verified.

curl -X POST https://www.pigeonify.com/api/v1/send \
  -H "X-API-Key: $PIGEONIFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "You <hello@yourdomain.com>",
    "to": "recipient@example.com",
    "subject": "Hello from Pigeonify",
    "html": "<strong>It works!</strong>"
  }'

Every example reads your key from PIGEONIFY_API_KEY rather than hardcoding it — an API key committed to a repository is a key you have to rotate. Create one under Dashboard → API Keys.

API documentation

One REST API for sending and for everything behind it: your contacts, lists, segments, suppressions, campaigns and A/B tests, automations, events and webhooks. The same API powers the MCP server for AI assistants.

Authentication

All API requests require an API key, created in the dashboard under API Keys. Each key carries only the scopes it was created with — give a key that only sends mail the send scope and nothing else.

Send it in either header:

X-API-Key: pgn_your_api_key_here
Authorization: Bearer pgn_your_api_key_here

Send email

POST/api/v1/send

Send a single email through the Pigeonify API.

Request headers:

Content-Type: application/json
X-API-Key: pgn_your_api_key_here

Request body:

{
  "from": "noreply@yourdomain.com",
  "to": "recipient@example.com",
  "subject": "Hello from Pigeonify",
  "html": "<h1>Hello!</h1><p>This is a test email.</p>",
  "text": "Hello! This is a test email.",
  "reply_to": "support@yourdomain.com",
  "track_opens": false,
  "track_clicks": false
}
Required fields: from, to (one address, or a list of up to 50), subject, html
Optional fields: text, reply_to, track_opens, track_clicks

Tracking is off unless you ask for it. Set track_opens to add an open pixel and track_clicks to route links through our click tracker. Leave both off for password resets and sign-in links. Tracked opens and clicks arrive as webhooks, each marked with whether a person or a machine made it.

Example request (cURL):

curl --location 'https://pigeonify.com/api/v1/send' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: pgn_your_api_key_here' \
--data-raw '{
  "from": "noreply@yourdomain.com",
  "to": "recipient@example.com",
  "subject": "Hello from Pigeonify",
  "html": "<h1>Hello!</h1><p>This is a test email.</p>",
  "text": "Hello! This is a test email."
}'

Success response (200):

{
  "success": true,
  "message": "Email sent successfully",
  "sent": 2,
  "suppressed": ["unsubscribed@example.com"],
  "emails": [
    { "id": "a41d…", "to": "recipient@example.com" },
    { "id": "b72e…", "to": "second@example.com" }
  ]
}

Keep each id: it is the email_id on every webhook about that message.

Recipients that have unsubscribed, hard bounced, or reported spam are skipped automatically and returned in suppressed. The rest of the batch is still delivered, and sent counts what actually went out. Manage the list under Suppressions in the dashboard.

Error responses:

401 Unauthorized
{
  "error": "Missing X-API-Key header",
  "code": "missing_api_key"
}
400 Bad Request
{
  "error": "Missing required fields: from, to, subject, html",
  "code": "validation_error"
}

How to get your API key

  1. Log in to your Pigeonify dashboard
  2. Navigate to Dashboard → API Keys
  3. Click "Create API Key"
  4. Give your key a name (e.g., "Production API")
  5. Copy the generated key (it starts with pgn_)
  6. Store it securely — you won't be able to see it again!

Scopes

Each key carries only the scopes it was created with, and each endpoint names the one it needs. A write scope includes reading the same thing. A key without the scope gets 403 insufficient_scope, naming the scope it lacks. Keys created before scopes existed can send and nothing else.

sendSend email through /v1/send
contacts:readLook up contacts
contacts:writeCreate, update and delete contacts
lists:readRead lists and who is on them
lists:writeCreate lists and change who is on them
segments:readRead segments, their members and counts
segments:writeCreate, change and delete segments
events:writeRecord events, which can start automations. Creates the contact if needed
webhooks:manageCreate and change delivery webhooks
suppressions:readRead the suppression list
suppressions:writeAdd addresses to the suppression list, and remove ones added by hand or by the API
automations:readRead automations and how many people are in each
automations:writeCreate, change, switch on and delete automations, which send email to your contacts
campaigns:readRead campaigns, their stats and A/B test results
campaigns:writeCreate, change, delete and send campaigns, which email your contacts

Conventions

  • Send the key as X-API-Key: pgn_… or Authorization: Bearer pgn_….
  • Lists come back as { "data": [...], "next_cursor": "...", "has_more": true }. Pass ?cursor= to get the next page. Cursors are opaque; do not build them.
  • Another account's id is answered with 404, never 403, so ids cannot be probed.
  • The management endpoints allow 300 requests a minute per account; a 429 carries Retry-After.
  • Errors are JSON with a stable code to branch on and an error sentence that may be reworded.
missing_api_key401
invalid_api_key401
insufficient_scope403
validation_error400
not_found404
conflict409
domain_not_verified403
plan_limit_reached429
rate_limited429
quota_exhausted429
sending_disabled503
content_rejected403
sandbox_recipient_not_authorised403
sandbox_daily_limit429
internal_error500

Contacts

A contact is identified by its id or its email address, wherever a path takes {contact}. URL-encode the @ if your HTTP client does not.

Without consent.attested a contact is created as no_consent: it exists and can receive events, but nothing is ever mailed to it and it appears in no segment. With it, the contact is attested — or pending, if double opt-in is on, until they confirm. What you write in consent.description is recorded, along with which API key asserted it.

Consent cannot be restored by the sender. Setting subscribed to true on somebody who opted out, re-asserting consent for them, or upserting them is refused with 409.

Unknown fields and undefined custom fields are refused by name rather than dropped. Define custom fields under Contacts → Custom fields first.

GET/api/v1/contactscontacts:read

List contacts, newest first.

  • ?limit=1–200 (default 50)
  • ?cursor= from the previous page's next_cursor
  • ?email= exact match
  • ?list_id= only members of that list

Response

{ "data": [ …contacts ], "next_cursor": "MjAyNi0…", "has_more": true }
POST/api/v1/contactscontacts:write

Create a contact. 409 if the address exists — unless ?upsert=true, which updates it and answers 200.

Body

{
  "email": "ada@example.com",
  "fields": { "first_name": "Ada" },
  "custom": { "plan": "pro" },
  "lists": ["<list id>"],
  "consent": { "attested": true, "description": "Signed up at app.example.com" }
}

Response

{
  "id": "1f0c…",
  "email": "ada@example.com",
  "fields": { "first_name": "Ada", "last_name": null, "phone": null, "city": null, … },
  "custom": { "plan": "pro" },
  "subscribed": true,
  "mailable": true,
  "consent": { "status": "attested", "source": "api", "recorded_at": "2026-11-10T09:00:00.000Z" },
  "created_at": "2026-11-10T09:00:00.000Z",
  "updated_at": "2026-11-10T09:00:00.000Z",
  "lists": [{ "id": "8a2e…", "name": "Customers" }]
}
GET/api/v1/contacts/{contact}contacts:read

One contact, with the lists it is on.

PATCH/api/v1/contacts/{contact}contacts:write

Change fields, custom fields or consent, or opt them out. Only what you send changes.

  • Custom fields merge; null removes one.
  • subscribed: false opts them out exactly as the unsubscribe link does.
  • The email address cannot be changed.

Body

{
  "fields": { "city": "London" },
  "custom": { "plan": "scale", "trial_ends": null },
  "subscribed": false
}
DELETE/api/v1/contacts/{contact}contacts:write

Delete the contact and their list memberships. If they had opted out, the suppression stays.

Lists

A list is who you put on it. Membership changes need lists:write; reading the people on a list needs contacts:read, because what comes back is people.

GET/api/v1/listslists:read

Every list, with how many contacts are on it.

POST/api/v1/listslists:write

Create a list.

Body

{ "name": "Customers", "description": "Paying accounts" }
GET/api/v1/lists/{id}lists:read

One list.

PATCH/api/v1/lists/{id}lists:write

Rename it or change its description.

DELETE/api/v1/lists/{id}lists:write

Delete the list. Its contacts are not deleted.

GET/api/v1/lists/{id}/contactscontacts:read

The people on the list, paged like /contacts.

POST/api/v1/lists/{id}/contactslists:write

Add existing contacts, by id or address, up to 1,000 a call. Nobody is created.

Body

{ "contacts": ["1f0c…", "ada@example.com"] }

Response

{ "added": 1, "already_members": 1, "not_found": [] }
DELETE/api/v1/lists/{id}/contacts/{contact}lists:write

Take one contact off the list. Leaving a list is not unsubscribing.

Segments

A segment is who matches a rule, worked out when you ask. It only ever contains people who may be mailed — the same people a campaign to it would reach.

A definition is the object the dashboard's builder saves: match all or any of up to 20 conditions. Condition types: field, custom_field, list, consent, engagement (opened / clicked / sent — counting people, not scanners, unless humanOnly is false), link, transactional, created, and event.

GET/api/v1/segmentssegments:read

Every segment. Add ?count=true for how many each matches now.

POST/api/v1/segmentssegments:write

Create a segment.

Body

{
  "name": "Engaged trial users",
  "definition": {
    "match": "all",
    "conditions": [
      { "type": "event", "op": "did", "name": "trial_started", "days": 14 },
      { "type": "engagement", "event": "clicked", "op": "did", "days": 30, "humanOnly": true }
    ]
  }
}
POST/api/v1/segments/countsegments:read

How many a definition matches, without saving it.

Body

{ "definition": { … } }

Response

{ "count": 412, "summary": "did \"trial_started\" in the last 14 days and …" }
GET/api/v1/segments/{id}segments:read

One segment, with its current count.

PATCH/api/v1/segments/{id}segments:write

Change its name, description or definition.

DELETE/api/v1/segments/{id}segments:write

Delete it. Refused with 409 while an automation is triggered by it — it would go on looking switched on and enrol nobody. Add ?force=true to delete anyway.

GET/api/v1/segments/{id}/contactscontacts:read

Who matches right now, paged like /contacts.

Events

An event is something a person did in your product. It can start an automation (picked up within a minute) and be a segment condition.

An address we have not seen becomes a contact, so a signup needs one call. Whether that contact can be mailed is decided by consent, exactly as on POST /contacts.

Send an idempotency_key. A retry after a timeout then returns the event already recorded, with 200 instead of 201, rather than recording it — and mailing on it — twice.

Names are 1–100 letters, digits and _ . : - , and are case-sensitive. occurred_at may be in the past; a time more than five minutes in the future is refused.

An automation started by an event can use its properties in subjects and content: {{event.plan}}, with a fallback after a pipe, {{event.plan|your plan}}. They come from the event that started that person's run.

POST/api/v1/eventsevents:write

Record an event.

  • Send email or contact_id, not both. A contact_id must already exist.
  • contact is applied before the event is recorded, so an automation it starts sees those fields.
  • If the contact cannot be mailed — opted out, no consent, unconfirmed — the event is still recorded and the response carries warnings saying so.

Body

{
  "email": "ada@example.com",
  "name": "trial_started",
  "properties": { "plan": "pro" },
  "occurred_at": "2026-11-10T09:00:00Z",
  "idempotency_key": "trial-ada-2026-11-10",
  "contact": { "fields": { "first_name": "Ada" }, "custom": { "plan": "pro" } },
  "consent": { "attested": true, "description": "Accepted the terms at signup" }
}

Response

{
  "id": "6d1e…",
  "name": "trial_started",
  "contact_id": "1f0c…",
  "properties": { "plan": "pro" },
  "occurred_at": "2026-11-10T09:00:00.000Z",
  "received_at": "2026-11-10T09:00:01.000Z",
  "duplicate": false,
  "contact_created": true
}

Suppressions

The addresses this account will not email: unsubscribes, hard bounces, spam complaints, failed validation, and addresses you blocked. Every send path checks this list, so an address here is never mailed by a campaign, an automation or /v1/send.

An API key can add to the list, and can remove only what was added by hand or through the API. An unsubscribe, a bounce or a complaint cannot be removed through the API: that would be opting somebody back in for them. Each record's removable says which it is; the dashboard can still remove any of them.

An address can also be blocked for every sender, because it does not exist or its owner complained. That list is not exposed, and /v1/send reports such recipients as suppressed all the same.

GET/api/v1/suppressionssuppressions:read

Newest first. ?email= checks one address; ?source= filters by unsubscribe_link, bounce, complaint, manual, validation or api.

Response

{ "data": [{ "id": "c0a1…", "email": "ada@example.com", "source": "unsubscribe_link", "reason": null, "created_at": "2026-11-10T09:00:00.000Z", "removable": false }], "next_cursor": null, "has_more": false }
POST/api/v1/suppressionssuppressions:write

Block an address. 201 when added; 200 with the existing record when it was already there.

Body

{ "email": "ada@example.com", "reason": "Asked by phone" }
GET/api/v1/suppressions/{id or email}suppressions:read

One record.

DELETE/api/v1/suppressions/{id or email}suppressions:write

Remove one you added. Anything the recipient caused answers 409 conflict.

Automations

An automation is a trigger and a sequence of waits and emails. Triggers: contact_created, list_added (with list_id), segment_entry (with segment_id) and event (with event_name).

Created as a draft. Nothing is sent until you activate it. Activating enrols people who match from then on; those who match already are skipped unless you pass backfill: true.

Every email goes through the same checks as a campaign: verified domain, consent, suppression, plan limits and the content screen. An automation whose sender is refused pauses itself.

GET/api/v1/automationsautomations:read

Every automation.

POST/api/v1/automationsautomations:write

Create one, as a draft. A name already in use answers 409.

Body

{
  "name": "Trial welcome",
  "trigger": { "type": "event", "event_name": "trial_started" },
  "from_email": "hello@yourdomain.com",
  "from_name": "Acme",
  "allow_reentry": false,
  "steps": [
    { "type": "send", "subject": "Welcome to your {{event.plan|}} trial", "html": "<p>Hi {{first_name|there}}</p>" },
    { "type": "wait", "seconds": 259200 },
    { "type": "send", "subject": "How is it going?", "html": "<p>…</p>" }
  ]
}
GET/api/v1/automations/{id}automations:read

One automation, with runs: how many people are running, completed, cancelled or skipped.

PATCH/api/v1/automations/{id}automations:write

Change any field. steps and trigger are replaced whole when given. Editing an active automation changes what people still in it will receive.

POST/api/v1/automations/{id}/activateautomations:write

Switch it on. enrolled in the response is how many backfill started.

Body

{ "backfill": false }
POST/api/v1/automations/{id}/pauseautomations:write

Stop it. People in it wait where they are until it is activated again.

DELETE/api/v1/automations/{id}automations:write

Delete it. Anyone part-way through stops.

Campaigns and A/B tests

A campaign is one email to an audience: one of list_ids, a segment_id, or send_to_all. Created as a draft; nothing is sent until you call /send, so writing a campaign and mailing people are never one step.

An A/B test sends up to two variants beside the original (each with its own subject, and optionally its own preview text and html) to a test group of 10–50% of the audience, split evenly. After wait_minutes (60 to 4320) the variant with the best rate of clicks by people wins, then opens by people, then the original, and the rest of the audience gets it. Machine opens and clicks from image proxies and link scanners are not counted.

Campaigns go through the same checks as in the dashboard: verified sending domain, consent, suppression, plan limits and the content screen, every variant included. topic_id tags the campaign with a preference-centre topic.

GET/api/v1/campaignscampaigns:read

Campaigns, newest first, with stats. ?status=draft|scheduled|sending|sent|paused|failed. Content is left out of the list.

POST/api/v1/campaignscampaigns:write

Create one, as a draft. The audience is counted now and again when it is sent.

Body

{
  "name": "November newsletter",
  "subject": "What's new in November",
  "preview_text": "Three things we shipped",
  "from_email": "news@yourdomain.com",
  "from_name": "Acme",
  "html": "<p>Hi {{first_name|there}}</p>",
  "audience": { "list_ids": ["lst_…"] },
  "topic_id": null,
  "ab_test": {
    "percent": 20,
    "wait_minutes": 240,
    "variants": [{ "subject": "November: three new things" }]
  }
}
GET/api/v1/campaigns/{id}campaigns:read

One campaign with content, audience and stats. For an A/B test: the phase (testing, waiting, decided), the winner, and per variant the messages sent and opens and clicks by people.

PATCH/api/v1/campaigns/{id}campaigns:write

Change a draft or scheduled campaign. Omitted fields keep their values; audience and ab_test are replaced whole, and "ab_test": null removes the test. A scheduled campaign goes back to draft.

POST/api/v1/campaigns/{id}/sendcampaigns:write

Send a draft now, or schedule it with scheduled_at. An empty audience answers 400 and nothing is sent; a campaign already sending or sent answers 409.

Body

{ "scheduled_at": "2026-12-01T09:00:00Z" }
DELETE/api/v1/campaigns/{id}campaigns:write

Delete a draft or scheduled campaign. Sent campaigns are the record of who was mailed and cannot be deleted through the API.

Webhooks

We POST to your endpoint when something happens to mail you sent. The URL must be https and reachable from the internet; redirects are not followed. Respond with any 2xx within ten seconds.

Failed deliveries are retried after 1 minute, 5 minutes, 30 minutes, 2, 6, 12 and 24 hours — eight attempts in about two days. An endpoint that has failed 50 times in a row and not succeeded for three days is switched off, with the reason.

Delivery is at least once. Deduplicate on the event id, which is also in the Pigeonify-Event-Id header. Every email event carries email_id — the id /v1/send returns — so you can match it to the send.

Opens and clicks carry machine and proxy: whether a person did it, and if not, which scanner or image proxy. Clicks are sent about 15 seconds late, so that a scanner following every link is recognised before we tell you who clicked.

GET/api/v1/webhookswebhooks:manage

Every endpoint. Secrets are never listed.

POST/api/v1/webhookswebhooks:manage

Add an endpoint. The response includes its signing secret — shown once.

Body

{ "url": "https://example.com/hooks/pigeonify", "events": ["email.bounced", "email.complained"], "description": "Production" }
GET/api/v1/webhooks/{id}webhooks:manage

One endpoint.

PATCH/api/v1/webhooks/{id}webhooks:manage

Change url, events or description, or switch it on and off. Switching on resets its failure count.

DELETE/api/v1/webhooks/{id}webhooks:manage

Delete it, and any deliveries still pending.

POST/api/v1/webhooks/{id}/testwebhooks:manage

Send a signed webhook.test now and return what your server answered.

Response

{ "delivered": true, "status": 200, "error": null, "event_id": "evt_…" }
POST/api/v1/webhooks/{id}/rotate-secretwebhooks:manage

Replace the signing secret. Effective immediately, for retries too.

GET/api/v1/webhooks/{id}/deliverieswebhooks:manage

Recent deliveries: what was sent, how many attempts, and what your server last answered.

Event types

email.deliveredThe receiving mail server accepted the message. That is delivery to the server, not to the inbox: its own spam filtering happens afterwards.
email.bouncedThe message was refused, permanently or for now. bounce.type says which.
email.complainedThe recipient reported it as spam, through a feedback loop.
email.openedThe first open of a campaign or automation message, or of API mail sent with track_opens. machine says whether a person did it.
email.clickedA tracked link was followed. Every click, each flagged machine or not.
email.unsubscribedThe recipient used the unsubscribe link.

Opens and clicks exist for campaign and automation mail, and for /v1/send mail sent with track_opens or track_clicks. Untracked API mail produces delivered, bounced, complained and unsubscribed only.

A delivery

POST /hooks/pigeonify
Pigeonify-Signature: t=1794300000,v1=5f2b…
Pigeonify-Event-Id: evt_3c9a…
Pigeonify-Event-Type: email.clicked

{
  "id": "evt_3c9a…",
  "type": "email.clicked",
  "created_at": "2026-11-10T09:00:15.000Z",
  "data": {
    "email_id": "a41d…",
    "message_id": "…@mail.pigeonify.com",
    "to": "ada@example.com",
    "from": "news@yourdomain.com",
    "subject": "Your trial ends Friday",
    "contact_id": "1f0c…",
    "campaign_id": null,
    "automation_id": "77b0…",
    "url": "https://yourdomain.com/upgrade",
    "machine": false,
    "proxy": null
  }
}

Verifying the signature

The signature is an HMAC-SHA256 of <t>.<raw body> with your endpoint's secret. The timestamp is inside what is signed, so check its age too — that is what stops a captured request being replayed later.

import crypto from "node:crypto"

// Use the RAW body, exactly as received -- not a re-serialised object.
function verify(rawBody, header, secret) {
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")))
  const age = Math.abs(Date.now() / 1000 - Number(parts.t))
  if (!parts.t || !parts.v1 || age > 300) return false   // reject replays

  const expected = crypto
    .createHmac("sha256", secret)
    .update(`${parts.t}.${rawBody}`)
    .digest("hex")
  const a = Buffer.from(expected, "hex")
  const b = Buffer.from(parts.v1, "hex")
  // timingSafeEqual throws on different lengths; a malformed header is a no.
  return a.length === b.length && crypto.timingSafeEqual(a, b)
}

MCP server

Connect an AI assistant that speaks the Model Context Protocol, such as Claude or Cursor, to your account. It can then look up and add contacts, manage lists, suppressions and automations, record events and send email for you.

Every tool is a call to this API with your key, so the assistant can do exactly what the key's scopes allow and nothing more, and only the tools the key can use are offered to it. Create a key just for the assistant, with the scopes you want it to have.

The server is at https://pigeonify.com/mcp (Streamable HTTP).

Claude and other apps that sign in

In Claude, open Settings → Connectors → Add custom connector and enter https://pigeonify.com/mcp. You are sent to Pigeonify to sign in and choose what the assistant may do; only read permissions are ticked to begin with. The connection then appears under API Keys as a connected app, and revoking it there disconnects it.

Clients that take a key

Send an API key as Authorization: Bearer pgn_…. In Claude Code:

claude mcp add --transport http pigeonify https://pigeonify.com/mcp \
  --header "Authorization: Bearer pgn_…"

For a client configured by file:

{
  "mcpServers": {
    "pigeonify": {
      "type": "http",
      "url": "https://pigeonify.com/mcp",
      "headers": { "Authorization": "Bearer pgn_…" }
    }
  }
}

Tools that send email, delete something or switch an automation on are marked as such, so a client that asks before acting will ask you first.

SMTP configuration

SMTP settings

Use your personal SMTP credentials to send emails from your verified domains. Generate your credentials in the Settings → SMTP section.

Host:
smtp.pigeonify.com
Port (STARTTLS):
587
Port (implicit TLS):
465
Username:
Your SMTP username (from Settings)
Password:
Your SMTP password (from Settings)
Max message size:
25 MB

TLS is required. Authentication is refused on an unencrypted connection, so your credentials are never sent in clear. On port 587 your client must issue STARTTLS before logging in — most do automatically, but set requireTLS or the equivalent if yours allows plaintext fallback. Port 465 is encrypted from the first byte.

Send only from verified domains. The address in your From header must be on a domain you have verified under Domains, or the message is refused with a 550.

Node.js example (Nodemailer):

const nodemailer = require('nodemailer');

const transporter = nodemailer.createTransport({
  host: 'smtp.pigeonify.com',
  port: 587,
  secure: false,      // STARTTLS on 587
  requireTLS: true,   // refuse to send if the upgrade fails
  auth: {
    user: 'smtp-12345678',      // Your SMTP username
    pass: 'your-smtp-password'  // Your SMTP password
  }
});

// Or, for implicit TLS:
//   port: 465, secure: true   (requireTLS is unnecessary)

await transporter.sendMail({
  from: 'sender@yourdomain.com', // Must be a verified domain
  to: 'recipient@example.com',
  subject: 'Hello from Pigeonify',
  html: '<h1>Hello World</h1>'
});

Python example (smtplib):

import smtplib
from email.message import EmailMessage

msg = EmailMessage()
msg['Subject'] = 'Hello from Pigeonify'
msg['From'] = 'sender@yourdomain.com'   # Must be a verified domain
msg['To'] = 'recipient@example.com'
msg.set_content('Hello World')
msg.add_alternative('<h1>Hello World</h1>', subtype='html')

# STARTTLS on 587
with smtplib.SMTP('smtp.pigeonify.com', 587) as server:
    server.starttls()
    server.login('smtp-12345678', 'your-smtp-password')
    server.send_message(msg)

# Implicit TLS on 465
# with smtplib.SMTP_SSL('smtp.pigeonify.com', 465) as server:
#     server.login('smtp-12345678', 'your-smtp-password')
#     server.send_message(msg)

What we add to your messages

Every message is signed with DKIM for your domain, and an unsubscribe link and the List-Unsubscribe headers are added automatically. Gmail and Yahoo require those headers from bulk senders, and we cannot tell a newsletter from a receipt over SMTP, so they are applied to everything.

Reply codes

A 5xx means the message will never be accepted as sent: an unverified sending domain, a recipient who has unsubscribed or is known undeliverable, or content our checks refused. Do not retry these.

A 4xx is temporary — a rate limit, a plan limit, or a problem at our end. Retry with backoff. Sending is limited to 100 messages per minute per account, with a per-second ceiling on top, so a client that paces itself will not see these.

Getting started:

  1. Go to Settings → SMTP in your dashboard
  2. Click "Generate SMTP Credentials" to create your credentials
  3. Copy your SMTP username and password (password shown only once)
  4. Verify a domain in the Domains section
  5. Use the credentials in your application to send emails

Domain setup

Verify your domain

To send emails from your domain, you need to verify it by adding DNS records:

  1. Go to Dashboard > Domains and add your domain
  2. Copy the provided DNS records (TXT, SPF, DKIM, DMARC)
  3. Add these records to your domain's DNS settings
  4. Click "Verify" to confirm the setup

Note: DNS changes can take up to 48 hours to propagate, but usually complete within a few hours.

Every record explained, and what to do when verification fails: the domains guide.

Need help?

Can't find what you're looking for? Our support team is here to help.

Contact support