Authentication
API Key Authentication
Section titled “API Key Authentication”All Venmail API requests require an API key passed via the X-Server-API-Key header.
curl -X POST https://m.venmail.io/api/v1/send/message \ -H "X-Server-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ ... }'Getting your API key
Section titled “Getting your API key”- Log in to the Venmail dashboard
- Go to Settings > API Keys
- Click Create API Key
- Copy the key immediately — it’s only shown once
Key types
Section titled “Key types”| Type | Purpose |
|---|---|
| API | REST API access for sending messages, managing domains, etc. |
| SMTP | SMTP relay authentication for sending via SMTP protocol |
Security best practices
Section titled “Security best practices”- Store keys in environment variables, never in source code
- Rotate keys regularly using the regenerate endpoint
- Use separate keys for development and production
- Revoke unused keys promptly
Master key
Section titled “Master key”Some administrative endpoints (server creation, IP pool management) require the X-Master-Key header instead. This key is configured at the server level and grants full access.
curl -X POST https://m.venmail.io/api/v1/server/create \ -H "X-Master-Key: YOUR_MASTER_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "production", "mode": "Live" }'