Integration
Connect your application to DevvMail
API Credentials
Endpoint
—
API Key
—
Auth Header
x-api-key: <your-key>
Method
POST
Request Body JSON
{
"from": "you@yourdomain.com", // required — must be a registered domain
"to": "recipient@example.com", // required
"type": "default", // optional — "default", "transactional", or "bulk"
"subject": "Hello", // optional
"html": "<h1>Hi!</h1>", // html or text required
"text": "Hi!", // plain-text fallback
"cc": "cc@example.com", // optional
"bcc": "bcc@example.com" // optional
}
Quick Start
curl -X POST https://mail.devv.be/api/send \ -H "Content-Type: application/json" \ -H "x-api-key: YOUR_API_KEY" \ -d '{ "from": "you@yourdomain.com", "to": "recipient@example.com", "type": "default", "subject": "Hello from DevvMail", "html": "<h1>It works!</h1>" }'
Response
200 OK
{ "success": true, "emailId": 5, "messageId": "abc...@devv.be" }
400 / 401
{ "error": "\"from\" is required" }
Email Type Optional
You can include an optional type field to classify the email. This determines whether
List-Unsubscribe headers (RFC 8058) are injected. If omitted, defaults to default.
| Type | When to use | Unsubscribe headers |
|---|---|---|
default |
General-purpose — use when you’re unsure or don’t want to classify | Injected |
transactional |
Password resets, order confirmations, OTPs, invoices — emails triggered by a specific user action | Not injected |
bulk |
Newsletters, promotions, announcements — emails sent to a list of recipients | Injected |
Abuse Policy: If a user is found sending bulk email classified as “transactional”,
their account will be flagged. Once flagged, all future emails will have unsubscribe headers
injected regardless of the type specified.