
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
exon-inbound
Advanced tools
Official TypeScript SDK for the Inbound Email API. Easily manage email domains, email addresses, and webhooks programmatically.
npm install exon-inbound
# or
yarn add exon-inbound
# or
pnpm add exon-inbound
# or
bun add exon-inbound
import { createInboundClient } from 'exon-inbound'
// Initialize the client
const inbound = createInboundClient({
apiKey: 'your_api_key_here',
baseUrl: 'https://your-domain.com/api/v1' // optional, defaults to production
})
// Create an email address
const email = await inbound.createEmail({
domain: 'example.com',
email: 'hello@example.com',
webhookId: 'webhook_123' // optional
})
console.log('Created email:', email.address)
import { InboundClient, createInboundClient } from 'exon-inbound'
// Option 1: Using factory function (recommended)
const inbound = createInboundClient({
apiKey: 'your_api_key',
baseUrl: 'https://api.inbound.email/api/v1' // optional
})
// Option 2: Direct instantiation
const inbound = new InboundClient({
apiKey: 'your_api_key',
baseUrl: 'https://api.inbound.email/api/v1' // optional
})
const domains = await inbound.listDomains()
// or
const domains = await inbound.getDomains()
console.log(domains)
// [
// {
// id: 'indm_abc123',
// domain: 'example.com',
// status: 'verified',
// canReceiveEmails: true,
// createdAt: '2024-01-01T00:00:00.000Z',
// updatedAt: '2024-01-01T00:00:00.000Z'
// }
// ]
// Method 1: Using createEmail
const email = await inbound.createEmail({
domain: 'example.com',
email: 'support@example.com',
webhookId: 'webhook_123' // optional
})
// Method 2: Using convenience method
const email = await inbound.addEmail(
'example.com',
'support@example.com',
'webhook_123' // optional
)
console.log(email)
// {
// id: 'email_abc123',
// address: 'support@example.com',
// domainId: 'indm_abc123',
// webhookId: 'webhook_123',
// isActive: true,
// createdAt: '2024-01-01T00:00:00.000Z'
// }
// Method 1: Get full response with domain info
const response = await inbound.listEmails('example.com')
console.log(response.domain) // 'example.com'
console.log(response.emails) // EmailAddress[]
// Method 2: Get just the emails array
const emails = await inbound.getEmails('example.com')
console.log(emails) // EmailAddress[]
// Method 1: Using removeEmail
const result = await inbound.removeEmail('example.com', 'support@example.com')
// Method 2: Using convenience method
const result = await inbound.deleteEmail('example.com', 'support@example.com')
console.log(result.message)
// 'Email address support@example.com removed from domain example.com'
// Method 1: Using createWebhook
const webhook = await inbound.createWebhook({
name: 'My Webhook',
endpoint: 'https://api.example.com/webhook',
description: 'Processes incoming emails', // optional
retry: 3, // optional, defaults to 3
timeout: 30 // optional, defaults to 30
})
// Method 2: Using convenience method
const webhook = await inbound.addWebhook(
'My Webhook',
'https://api.example.com/webhook',
{
description: 'Processes incoming emails',
retry: 3,
timeout: 30
}
)
console.log(webhook)
// {
// id: 'webhook_abc123',
// name: 'My Webhook',
// url: 'https://api.example.com/webhook',
// secret: 'webhook_secret_for_verification',
// description: 'Processes incoming emails',
// isActive: true,
// timeout: 30,
// retryAttempts: 3,
// createdAt: '2024-01-01T00:00:00.000Z'
// }
const webhooks = await inbound.listWebhooks()
// or
const webhooks = await inbound.getWebhooks()
console.log(webhooks)
// [
// {
// id: 'webhook_abc123',
// name: 'My Webhook',
// url: 'https://api.example.com/webhook',
// description: 'Processes incoming emails',
// isActive: true,
// timeout: 30,
// retryAttempts: 3,
// totalDeliveries: 150,
// successfulDeliveries: 145,
// failedDeliveries: 5,
// lastUsed: '2024-01-01T00:00:00.000Z',
// createdAt: '2024-01-01T00:00:00.000Z',
// updatedAt: '2024-01-01T00:00:00.000Z'
// }
// ]
// Method 1: Using removeWebhook
const result = await inbound.removeWebhook('My Webhook')
// Method 2: Using convenience method
const result = await inbound.deleteWebhook('My Webhook')
console.log(result.message)
// "Webhook 'My Webhook' has been removed"
The SDK throws InboundError
for API errors:
import { InboundError } from 'exon-inbound'
try {
const email = await inbound.createEmail({
domain: 'nonexistent.com',
email: 'test@nonexistent.com'
})
} catch (error) {
if (error instanceof InboundError) {
console.error('API Error:', error.message)
console.error('Status:', error.status)
console.error('Code:', error.code)
} else {
console.error('Unexpected error:', error)
}
}
import { createInboundClient, InboundError } from 'exon-inbound'
async function setupEmailInfrastructure() {
const inbound = createInboundClient({
apiKey: process.env.INBOUND_API_KEY!
})
try {
// 1. List existing domains
const domains = await inbound.getDomains()
console.log('Available domains:', domains.map(d => d.domain))
// 2. Create a webhook
const webhook = await inbound.addWebhook(
'Email Processor',
'https://api.myapp.com/process-email',
{
description: 'Processes all incoming emails',
timeout: 30,
retry: 3
}
)
console.log('Created webhook:', webhook.name)
console.log('Webhook secret:', webhook.secret)
// 3. Create email addresses
const emails = [
'support@example.com',
'hello@example.com',
'contact@example.com'
]
for (const emailAddress of emails) {
const email = await inbound.addEmail(
'example.com',
emailAddress,
webhook.id
)
console.log(`Created email: ${email.address}`)
}
// 4. List all emails for the domain
const domainEmails = await inbound.getEmails('example.com')
console.log(`Total emails for example.com: ${domainEmails.length}`)
// 5. List all webhooks
const allWebhooks = await inbound.getWebhooks()
console.log(`Total webhooks: ${allWebhooks.length}`)
} catch (error) {
if (error instanceof InboundError) {
console.error('Inbound API Error:', error.message)
if (error.status) {
console.error('HTTP Status:', error.status)
}
} else {
console.error('Unexpected error:', error)
}
}
}
setupEmailInfrastructure()
The SDK is written in TypeScript and provides full type safety:
import { Domain, EmailAddress, Webhook, InboundClient } from 'exon-inbound'
// All methods return properly typed responses
const domains: Domain[] = await inbound.getDomains()
const emails: EmailAddress[] = await inbound.getEmails('example.com')
const webhooks: Webhook[] = await inbound.getWebhooks()
// Type-safe configuration
const client: InboundClient = createInboundClient({
apiKey: 'your_key',
baseUrl: 'https://api.example.com/v1' // optional
})
For security, store your API key in environment variables:
# .env
INBOUND_API_KEY=your_api_key_here
const inbound = createInboundClient({
apiKey: process.env.INBOUND_API_KEY!
})
Method | Description | Returns |
---|---|---|
listDomains() / getDomains() | Get all domains | Domain[] |
createEmail(params) / addEmail(domain, email, webhookId?) | Create email address | EmailAddress |
listEmails(domain) | Get emails for domain | DomainEmailsResponse |
getEmails(domain) | Get emails array for domain | EmailAddress[] |
removeEmail(domain, email) / deleteEmail(domain, email) | Remove email address | {message: string} |
listWebhooks() / getWebhooks() | Get all webhooks | Webhook[] |
createWebhook(params) / addWebhook(name, endpoint, options?) | Create webhook | WebhookCreateResponse |
removeWebhook(name) / deleteWebhook(name) | Remove webhook | {message: string} |
MIT
For issues and questions:
FAQs
Official TypeScript SDK for the Inbound Email API
The npm package exon-inbound receives a total of 3 weekly downloads. As such, exon-inbound popularity was classified as not popular.
We found that exon-inbound demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.