Collect subscribers from your forms, organize contacts with tags, and send to segments — no external mailing list service needed.
Create contacts one at a time or bulk import up to 1,000 at once. Each contact can have a name, tags, and custom metadata.
import { Posthawk } from 'posthawk';const posthawk = new Posthawk('ck_live_...');// Add a contact from your signup formawait posthawk.contacts.create({ email: 'alice@example.com', name: 'Alice', tags: ['newsletter', 'beta-users'],});// Bulk import contactsawait posthawk.contacts.import([ { email: 'bob@example.com', tags: ['newsletter'] }, { email: 'carol@example.com', tags: ['beta-users'] },]);// 1. Pull every contact with this tagconst { contacts } = await posthawk.contacts.list({ tag: 'newsletter',});// 2. Fan out — the worker rate-limits to 14/sec// and skips any contact marked unsubscribed.await Promise.all( contacts.map((c) => posthawk.emails.send({ from: 'hello@yourapp.com', to: c.email, subject: 'Weekly Update', html: '<p>Here is your weekly update...</p>', }), ),);// Or use Broadcasts for a one-shot scheduled// send to every contact in a tag.Replace hardcoded recipient lists with tags. One API call sends to all contacts with that tag — unsubscribed contacts are automatically excluded.
Add a single API call to your newsletter signup, contact form, or registration flow. Contacts are created instantly with the tags you choose.
<!-- HTML form on your website --><form id="newsletter-form"> <input type="email" name="email" required /> <button type="submit">Subscribe</button></form><script>document.getElementById('newsletter-form') .addEventListener('submit', async (e) => { e.preventDefault(); const email = e.target.email.value; await fetch('https://api.posthawk.dev/v1/contacts', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-API-Key': 'ck_live_...', }, body: JSON.stringify({ email, tags: ['newsletter'], }), }); });</script>Create contacts via API, dashboard, or capture them from your website forms with a single POST request.
Tag contacts as "newsletter", "beta-users", or any custom label. Filter and manage your audience by tag.
Use Broadcasts to schedule a campaign to a tagged list, or pull contacts via the SDK and fan out individually.
Every contact belongs to a workspace. Isolated data, team access, and per-workspace audience management.
Organize contacts with tags like "newsletter", "beta-users", or "onboarding". One contact can have multiple tags.
Build a recipient list from a tag, then send via Broadcasts or fan out with the SDK. Unsubscribed contacts are skipped automatically.
Mark contacts as unsubscribed via API. Tag-based sends automatically skip unsubscribed contacts.
Stop maintaining a separate Mailchimp or SendGrid contact list. Posthawk contacts live alongside your email sending — one platform, one API.
Capture email addresses from your website footer or signup forms. Tag as "newsletter" and send updates.
Save every contact form submission as a contact with metadata. Track inquiries alongside your audience.
Tag new signups with "onboarding" and send welcome sequences to the entire cohort.
Add your first contact in seconds. Free tier includes up to 3,000 emails per month.
We use analytics cookies to understand how you use our site and improve your experience. Privacy Policy