Getting Started
Learn how to integrate Veil Mail into your application and send your first email with automatic PII protection.
Quick Start
1
2
Get your API key
Navigate to Settings → API Keys in your dashboard to create a new API key. You will get two types of keys:
- Test keys (veil_test_...) - Use for development, emails are not actually sent
- Live keys (veil_live_...) - Use for production, emails are sent to real recipients
3
Install the SDK (optional)
Install our official Node.js SDK for the best developer experience.
npm install @veilmail/sdkOr use our REST API directly from any language.
4
Send your first email
Use the SDK or make a direct API call to send an email.
send-email.ts
import { VeilMail } from '@veilmail/sdk';
const client = new VeilMail('veil_test_xxxxx');
const email = await client.emails.send({
from: 'hello@yourdomain.com',
to: 'user@example.com',
subject: 'Hello from Veil Mail!',
html: '<h1>Welcome!</h1><p>Your first email with PII protection.</p>',
});
console.log('Email sent:', email.id);Base URL
All API requests are made to the following base URL:
https://api.veilmail.comUsing the REST API
You can call the API directly using cURL or any HTTP client:
curl -X POST https://api.veilmail.com/v1/emails \
-H "Authorization: Bearer veil_test_xxxxx" \
-H "Content-Type: application/json" \
-d '{
"from": "hello@yourdomain.com",
"to": "user@example.com",
"subject": "Hello from Veil Mail!",
"html": "<h1>Welcome!</h1>"
}'Automatic PII Protection
Every email sent through Veil Mail is automatically scanned for Personally Identifiable Information (PII) before delivery. This includes:
- Social Security Numbers
- Credit Card Numbers
- Bank Account Numbers
- Phone Numbers
- Email Addresses
- Medical Records
Configure your PII scanning preferences in the dashboard under Settings → Security.