API Reference
Complete reference for every PushMail API endpoint. Base URL https://pushmail.dev/api/v1
All requests require authentication via Authorization: Bearer pm_live_... header or session cookie.
Authentication
/auth/signupCreate account (org + user + session)
/auth/loginLogin and receive session cookie
/auth/logoutDestroy session
/auth/meGet current user and organization
/auth/forgot-passwordSend password reset email
/auth/reset-passwordReset password with token
API Keys
/api-keysList all API keys for your org
/api-keysCreate a new API key
/api-keys/:idRevoke an API key
Sites
/sitesList all sites
/sitesCreate a new site
/sites/:idGet site details
/sites/:idUpdate a site (name, domain, autoBcc, sendFrequencyCapDays, companyName, physicalAddress)
/sites/:idDelete a site (fails if site has sends)
Contacts
/contacts?siteId=XList contacts with search, filter, pagination
/contactsCreate a contact (with optional tags and lists)
/contacts/:idGet contact details
/contacts/:idUpdate contact fields
/contacts/:idDelete a contact
/contacts/bulkBulk create/update up to 100 contacts (note: uses siteId not siteId in body)
/contacts/export?siteId=XExport contacts as CSV or JSON (filter by list, tag, status, or segment)
Lists
/lists?siteId=XList all lists for a site
/listsCreate a list
/lists/:idGet list details
/lists/:idUpdate a list
/lists/:idDelete a list
/lists/:id/contactsSearch contacts to add to a list (requires ?q= param)
/lists/:id/contactsAdd a contact to a list
/lists/:id/contactsRemove a contact from a list
Tags
/tags?siteId=XList all tags for a site
/tagsCreate a tag
/tags/:idDelete a tag
Segments
/segments?siteId=XList all segments for a site
/segmentsCreate a segment with rules
/segments/:idGet segment details with live contact count
/segments/:idUpdate segment name, description, or rules
/segments/:idDelete a segment
/segments/:id/contactsList contacts matching segment rules (paginated)
/segments/:id/countPreview contact count for rules
/segments/preview-countPreview contact count without creating a segment
Template Folders
/template-foldersList all template folders
/template-foldersCreate a folder (name)
/template-folders/:idRename a folder (name)
/template-folders/:idDelete a folder (templates moved to unfiled)
Templates
/templatesList all templates (includes folderId)
/templatesCreate a template (optional folderId)
/templates/:idGet template details
/templates/:idUpdate a template (name, subject, html, designJson, folderId)
/templates/:idDelete a template
/templates/:id/renderPreview rendered HTML with sample variables
Sequences
/sequences?siteId=XList sequences
/sequencesCreate a sequence. Optional sendingConfigId to use a specific sending config for all emails in the sequence.
/sequences/:idGet sequence details
/sequences/:idUpdate a sequence (name, status, triggerType, sendingConfigId, autoBcc)
/sequences/:idDelete a sequence
/sequences/:id/detailGet sequence with steps, enrollments, and stats
/sequences/:id/enrollEnroll contacts into the sequence. Optional startAtStep to begin at a specific step position.
/sequences/:id/enrollmentsList enrollments for a sequence
/sequences/:id/enrollmentsCreate an enrollment
/sequences/:id/enrollmentsCancel an enrollment
Sequence Steps
/sequences/:id/stepsList steps in a sequence
/sequences/:id/stepsAdd steps to a sequence. Supports email, delay, and condition types. Condition steps accept conditionConfig (JSON), trueBranchStepOrder, and falseBranchStepOrder for workflow branching.
/sequences/:id/steps/:stepIdUpdate a step (type, templateId, delayMinutes, conditionConfig, trueBranchStepOrder, falseBranchStepOrder)
/sequences/:id/steps/:stepIdRemove a step
Sequence Playbooks
/sequences/playbooksList pre-built sequence playbooks (no auth required)
/sequences/playbooks/:playbookId/createCreate a sequence from a playbook template (creates sequence + templates + steps)
Holiday Emails
/holidays?siteId=XList holiday emails for a site
/holidaysSchedule a holiday email injection into active sequences
/holidays/:idGet holiday details and send stats
/holidays/:idUpdate a holiday (name, date, templateId, status). Set status to 'cancelled' to stop sending.
/holidays/:idDelete a holiday and its send records
Campaigns
/campaigns?siteId=XList campaigns
/campaignsCreate a campaign. Optional sendingConfigId to use a specific sending config.
/campaigns/:idGet campaign details, stats, and sendingConfigLabel
/campaigns/:idUpdate a campaign (name, templateId, listId, tagId, sendingConfigId, A/B test settings). Only draft or scheduled campaigns can be updated.
/campaigns/:idDelete a campaign
/campaigns/:id/scheduleSchedule a campaign for future delivery
/campaigns/:id/sendSend a campaign immediately. Requires sendingConfigId on the campaign. Supports A/B test variant splitting.
Campaign A/B Testing
/campaigns/:id/variantsList all variants for a campaign
/campaigns/:id/variantsCreate a variant (subject, template, or HTML override)
/campaigns/:id/variants/:variantIdGet variant details with open/click rates
/campaigns/:id/variants/:variantIdUpdate a variant
/campaigns/:id/variants/:variantIdDelete a variant (deleting all disables A/B testing)
Forms
/forms?siteId=XList all forms (optionally filter by siteId)
/formsCreate a form (siteId, name, designJson, sequenceId, listId, tags, doubleOptIn)
/forms/:idGet form details
/forms/:idUpdate a form (name, designJson, status, sequenceId, listId, tags, doubleOptIn)
/forms/:idDelete a form (cascades to submissions)
/forms/:id/submissionsList form submissions (paginated)
/forms/:id/submitPublic form submission endpoint (no auth, rate limited by IP, CORS enabled)
Lead Scoring
/scoring/rulesList scoring rules (optionally filter by siteId)
/scoring/rulesCreate a scoring rule
/scoring/rules/:idGet scoring rule details
/scoring/rules/:idUpdate a scoring rule
/scoring/rules/:idDelete a scoring rule
/contacts/:id/scoreGet a contact's lead score and scoring log
/contacts/:id/scoreManually adjust a contact's lead score
Sends & Events
/sends?siteId=XList sent emails with status and cost
/sends/:idGet a single send by ID, including its full event history (delivered, open, click, bounce, etc.)
/events?siteId=XList email events (delivered, open, click, bounce, etc.)
Custom Events
/events/customRecord a custom event for a contact
/events/customList custom events (filterable by contactId, eventName)
/events/custom/namesList all distinct custom event names in your org
Transactional Email
/sendSend a single transactional email. Pass fromEmail/fromName directly or use sendingConfigId. Requires templateId or html+subject. Pass secure: true for encrypted delivery.
/send/batchSend up to 1000 emails in one call. Supports fromEmail/fromName or sendingConfigId, with per-recipient variables and tracking.
/validateValidate an email address (syntax, MX, disposable check)
Suppressions
/suppressionsList suppressions (paginated, filterable by reason)
/suppressionsAdd a manual suppression
/suppressions/:emailRemove an email from the suppression list
/suppressions/check/:emailCheck if an email is suppressed
/suppressions/importBulk import suppressions from CSV or JSON
/suppressions/exportExport suppressions as CSV or JSON
Secure Messages
/secure-messagesList all secure messages for your org (with pagination)
/secure-messages/:idGet secure message details (status, view count, expiry)
/secure-messages/:id/revokeRevoke a secure message (deletes encrypted blob, marks as revoked)
Reports
/reports/multi-sequence?siteId=XList contacts actively enrolled in multiple sequences for a site
/reports/stalled-enrollments?siteId=XList active enrollments that haven't progressed in 24+ hours
/reports/sequence-funnel?siteId=XEnrollment status breakdown per sequence (active, completed, cancelled, failed)
/reports/unengaged-contacts?siteId=XSubscribed contacts with 5+ sends who never opened or clicked
/reports/no-sequences?siteId=XSubscribed contacts not enrolled in any active sequence
/reports/schedulesList all scheduled reports for your org
/reports/schedulesCreate a scheduled report (daily, weekly, or monthly email delivery)
/reports/schedules/:idGet a scheduled report
/reports/schedules/:idUpdate a scheduled report (frequency, recipient, active)
/reports/schedules/:idDelete a scheduled report
Imports
/imports/uploadUpload CSV and start import
/importsList imports
/imports/:idGet import progress and stats
Providers
/providersList available email providers with their display names, capabilities (supportsWebhooks, supportsBatch), and config fields
Sending Config
/sending-configsList sending configurations (returns provider, fromEmail, fromName, isByok, verified)
/sending-configsAdd a sending config. Pass provider (sendgrid, ses, postmark, mailgun, sparkpost, brevo, mailjet, mandrill, resend, elastic-email) and credentials object with provider-specific fields (e.g. apiKey, region, domain). Defaults to sendgrid. Legacy apiKey field still accepted.
/sending-configs/:idUpdate a sending config
/sending-configs/:idRemove a sending config
/sending-configs/:id/verifyVerify the config by sending a test email
Domains
/domainsList all verified and pending domains
/domainsAdd a domain and start verification
/domains/:idGet domain details and DNS records
/domains/:idRemove a domain
Settings
/settingsGet current user settings and org info
/settings/passwordChange your password
/settings/orgUpdate organization name
MFA
/mfa/statusGet MFA status (TOTP and email OTP)
/mfa/totp/setupGenerate TOTP secret and QR code URI
/mfa/totp/verify-setupVerify TOTP code to complete setup
/mfa/totp/disableDisable TOTP authentication
/mfa/email-otp/enableEnable email-based OTP
/mfa/email-otp/disableDisable email-based OTP
/mfa/challengeRequest an MFA challenge (sends email OTP)
/mfa/verifyVerify MFA code to complete login
Dashboard & Analytics
/dashboard/overviewDashboard stats (contacts, sends, open rate)
/analytics/overviewAnalytics data for charts and trends
Deliverability Analytics
/analytics/deliverability?period=30dGet deliverability metrics. Query param period accepts 7d, 30d, or 90d (default 30d). Returns funnel (sent, delivered, opened, clicked, bounced, failed), bounceBreakdown (hard, soft, block, topReasons), complaintRate, dailyTrends (per-day sent/delivered/opened/clicked/bounced with rates), ispBreakdown (top 20 recipient domains with delivery and open rates), configPerformance (per sending config stats), and reputation (score: excellent/good/fair/poor, bounceRate, complaintRate, factors).
Plans
/plansList all available plans with features and pricing
/plans/currentGet your org's current plan, usage, and billing period
/plans/changePreview or confirm a plan upgrade/downgrade with proration
/plans/cancelCancel subscription (remains active until period end)
/plans/usageGet current period usage vs plan limits
Billing
/billing/usageGet current month usage and credit balance
/billing/subscriptionGet current plan, subscription details, and invoices
/billing/checkoutCreate Stripe Checkout session for plan subscription
/billing/creditsList available credit packages
/billing/creditsCreate Stripe Checkout session for credit purchase
/billing/portalCreate Stripe Customer Portal session
/billing/webhooksStripe webhook handler (called by Stripe, not by your app)
Organization Health
/org/healthGet sending health, trust level, and rate limits
Rate Limits
/rate-limitGet current rate limit usage for your org (general and send buckets)
Branding
/org/brandingGet branding discount status
/org/brandingEnable or disable branding footer (15% discount)
CAN-SPAM Compliance
/complianceGet compliance settings (physical address, unsubscribe URL, enabled)
/complianceUpdate compliance settings
/unsubscribe?token=TOKENRFC 8058 one-click unsubscribe (called by email clients)
/unsubscribe/:tokenBrowser-based unsubscribe confirmation page
/unsubscribe/:tokenProcess browser-based unsubscribe
Stock Photos
/stock-photos?q=&page=&per_page=&orientation=Search Pexels stock photos
/stock-photos/saveDownload a photo to R2 storage
Website Tracking (Public)
/tracking/script?siteId=XServe the JavaScript tracking snippet (Content-Type: application/javascript)
/tracking/eventRecord a page view or custom event (public, no auth)
/tracking/identifyLink an anonymous visitor to a known contact (public, no auth)
Webhooks
/webhooksList outgoing webhook endpoints
/webhooksCreate an outgoing webhook endpoint
/webhooks/:idGet webhook endpoint details
/webhooks/:idUpdate a webhook endpoint
/webhooks/:idDelete a webhook endpoint
/webhooks/sendgridReceive SendGrid event webhooks (inbound)
Inbound Provider Webhooks
/webhooks/sendgridSendGrid inbound events. Verifies ECDSA signature via x-twilio-email-event-webhook-signature header. Supports ?config_id= for per-config secrets.
/webhooks/sesAmazon SES inbound events via SNS. Auto-confirms SNS subscriptions. Supports ?config_id=&secret= query params for verification.
/webhooks/postmarkPostmark inbound events. Supports ?config_id=&secret= query params for verification.
/webhooks/mailgunMailgun inbound events. Verifies HMAC-SHA256 signature. Supports ?config_id= for per-config secrets.
/webhooks/sparkpostSparkPost inbound events. Supports ?config_id= for per-config secrets.
/webhooks/brevoBrevo (Sendinblue) inbound events. Supports ?config_id=&secret= query params for verification.
/webhooks/mailjetMailjet inbound events. Supports ?config_id=&secret= query params for verification.
/webhooks/mandrillMandrill (Mailchimp Transactional) inbound events. Verifies webhook signature. Supports ?config_id= for per-config secrets.
/webhooks/resendResend inbound events. Supports ?config_id=&secret= query params for verification.
/webhooks/elastic-emailElastic Email inbound events. Supports ?config_id=&secret= query params for verification.
Batch size limits
Endpoints that accept arrays enforce maximum sizes to prevent abuse and ensure reliable processing.
| Endpoint | Field | Max items |
|---|---|---|
POST /v1/contacts/bulk | contacts | 100 |
POST /v1/send/batch | recipients | 1,000 |
POST /v1/sequences/:id/steps | steps | 200 |
POST /v1/sequences/:id/enroll | contactIds | 100 |
Requests exceeding these limits are rejected with a 400 error.
Response format
All responses follow a consistent format:
{ "data": { ... } }{ "error": "Human-readable error message" }Rate limit headers
Every authenticated API response includes rate limit headers. See Rate Limits for details.
| Header | Description |
|---|---|
X-RateLimit-Limit | Max requests per window |
X-RateLimit-Remaining | Requests remaining |
X-RateLimit-Reset | Unix timestamp when window resets |