Skip to content

getrupt/sendook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sendook

Sendook

sendook.com | npm package

License: MIT TypeScript MongoDB npm

What is Sendook?

Sendook (Arabic for "box" - صندوق) is the easiest way to start sending AND receiving emails at scale.

Why Sendook?

  • Setting up email sending at scale is still cumbersome—we had to do it at Rupt
  • The ability to configure and check custom domains is still harder than it should be
  • We use this extensively at Rupt to have our internal agents handle inbound emails, payments, prioritizations, etc.

Quick Start

Quick Start

Using the API endpoints

Create an inbox:

curl -X POST https://api.sendook.com/v1/inboxes \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "rupt",
    "email": "rupt@sendook.com"
  }'

Send a message:

curl -X POST https://api.sendook.com/v1/inboxes/{inbox_id}/messages/send \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "to": ["rupt@sendook.com"],
    "subject": "Welcome!",
    "text": "Thanks for signing up.",
    "html": "<p>Thanks for signing up.</p>"
  }'

Create a webhook for receiving emails:

curl -X POST https://api.sendook.com/v1/webhooks \
  -H "Authorization: Bearer your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-app.com/webhooks/email",
    "events": ["message.received"]
  }'

Using the TypeScript SDK

import { Sendook } from "@sendook/node";

// Initialize client with API key
const client = new Sendook("your_api_key");

// Create an inbox
const inbox = await client.inboxes.create({
  name: "rupt",
  email: "rupt@sendook.com", // or use your custom domain
});

// Send an email
await client.messages.send({
  inboxId: inbox.id,
  from: "rupt@sendook.com",
  to: ["rupt@sendook.com"],
  subject: "Welcome!",
  text: "Thanks for signing up.",
  html: "<p>Thanks for signing up.</p>",
});

// Receive emails via webhook
await client.webhook.create({
  url: "https://your-app.com/webhooks/email",
  events: ["message.received"],
});

Steps:

  1. Get client keys
  2. Create inbox
    • If using xxxxx@sendook.com, no verification needed
    • If using a custom domain, DNS verifications required:
      • MX records (SES)
      • CNAME records (DKIM)
      • [Optional] SPF, DMARC
  3. Start sending & receiving emails

Self-hosting & Running Locally

API

# Using Docker
docker build -t sendook-api ./api
docker run -p 8006:8006 \
  -e MONGO_URI="your_mongodb_uri" \
  # optional Rupt secret key for fake accounts & account takeover
  -e RUPT_SECRET_KEY="your_secret_key" \
  -e DEFAULT_EMAIL_DOMAIN="sendook.com" \
  -e AWS_ACCESS_KEY_ID="your_aws_key" \
  -e AWS_SECRET_ACCESS_KEY="your_aws_secret" \
  sendook-api

Environment variables:

  • MONGO_URI
  • RUPT_SECRET_KEY (optional for fake accounts & account takeover)
  • DEFAULT_EMAIL_DOMAIN
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY

Development:

cd api
bun install
bun dev

Production:

bun install
bun start

App

cd app
bun install
bun dev  # Development
bun build && bun start  # Production

Environment variable:

  • API_URL (default: http://localhost:8006)

Landing

cd landing
bun install
bun dev  # Development
bun run build && bun start  # Production

No environment variables required.

Repository Structure

This monorepo contains:

  • api/ - Backend API server (Node.js + MongoDB)
  • app/ - Dashboard application
  • landing/ - Landing website (Nuxt 3 + Nuxt UI)
  • node-sdk/ - Official Node.js SDK

Features

Inboxes (/inbox)

  • Create inbox
    • sendook.com domain
    • Custom domain
  • List inboxes
  • Retrieve inbox
  • Delete inbox
    • Deletes inbox and all messages

Messages (/messages)

  • Send message
    • To[], From, CC
      • Labels
      • Attachments
      • BCC
    • Threads
    • Replies
    • Rate-limit respecting (~1000/min & 50K/day)
  • Retrieve messages
    • Attachments
  • Search (find messages within inbox)
    • Query
      • Regex
        • To, From, CC, subject, body
      • Semantic search Vector DB (Chroma)

Webhooks (/webhooks)

  • Create webhook
  • Execution
    • Receive
      • Parsed emails
    • delivered, bounced, rejected, sent

Threads (/threads)

  • Messages auto-create or use a thread
  • Retrieve threads

Domains (/domains)

  • Create domain
  • List domains
  • Retrieve domain
  • Delete domain
  • Verify domain
  • Get domain DNS records

Tests

  • Full API coverage

SDKs

  • Node
  • Python
  • Contributions welcome for additional SDKs

License

Sendook is open source software licensed under the MIT license.


Built with ❤️, maintained by the Rupt team.

About

Email infrastructure for AI agents at scale

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published