Everything your engineering, product, and IT teams need to connect and consume ENerve email services:
REST API sending, conversation threading, inbound webhooks, custom Resend key setup, mailbox registration, and SMTP/IMAP client configuration.
Outbound REST Endpoint
POST /api/emails/send
Resend Inbound Webhook
/api/emails/inbound
SMTP (Outbound)
Port 587 (TLS) / 465 (SSL)
IMAP (Inbound)
Port 993 (SSL/TLS)
When an administrator profiles your company domain in ENerve, you are provisioned with:
Client API Authorization Key: A cryptographically secure token prefixed with es_live_... (e.g. es_live_4f92a188c0374e50882e5b7218ef9182). Used in the Authorization: Bearer header for all REST calls.
Registered Mail Domain: Your verified sender domain (e.g. acme.com). All outbound emails must originate from this domain.
Forwarding Webhook URL: The HTTP(S) endpoint on your servers where ENerve delivers incoming emails in real-time.
Billing Rate & Wallet: Your pre-agreed rate per email (e.g. ₦0.05) deducted from your prepaid balance.
Need your credentials? Contact your ENerve administrator or ask them to click the Connect button in their Client Profiles dashboard to share your customized integration bundle.
ENerve enforces strict sender anti-spoofing protection. Once your domain has registered mailboxes in ENerve, any email sent via the REST API or Postfix SMTP must originate from a verified, registered mailbox.
If your request specifies from: "support@yourdomain.com" or from: "billing@yourdomain.com", but that address has not been registered in the Mailbox Manager, the system blocks the request with:
{
"error": "Sender email address 'support@yourdomain.com' is not registered for domain 'yourdomain.com'. Please register the mailbox first."
}
How to resolve: Register the mailbox (see question below) or ensure the from field in your payload matches an existing active mailbox.
There are two methods to register mailboxes:
Method 1: Via ENerve Dashboard (Administrator)
Open the Client Profiles table in the dashboard.
Click on your client row or click Manage Mailboxes in the Connect modal.
In the Client Mailboxes Manager, click Register New Mailbox.
Enter the email address (e.g. support@yourdomain.com), Display Name (e.g. Acme Support), and a strong password.
The password configured here is the exact credential your staff use to sign into Outlook, Apple Mail, or Thunderbird via IMAP/SMTP!
Send an HTTP POST to https://egobeke.com.ng/api/emails/send with your Bearer API key.
curl -X POST https://egobeke.com.ng/api/emails/send \
-H "Authorization: Bearer es_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "Acme Notifications <support@yourdomain.com>",
"to": "customer@example.com",
"subject": "Your Order Has Shipped!",
"bodyHtml": "<h1>Order Shipped</h1><p>Your package is on its way!</p>",
"bodyText": "Order Shipped: Your package is on its way!"
}'
const response = await fetch("https://egobeke.com.ng/api/emails/send", {
method: "POST",
headers: {
"Authorization": "Bearer es_live_YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
from: "Acme Support <support@yourdomain.com>",
to: "customer@example.com",
subject: "Welcome to Acme!",
bodyHtml: "<p>Thank you for creating an account with us.</p>",
bodyText: "Thank you for creating an account with us."
})
});
const result = await response.json();
console.log("Transmission Response:", result);
To send a reply within an existing conversation thread, include the inReplyTo parameter in your request body.
You can set inReplyTo to either:
The parent Email ID received in your inbound webhook payload (e.g. "48df02be-c16e-4f0f-aef5-fa526a570c96").
The standard RFC 2822 Message-ID of the email (e.g. "<CABcd123@mail.gmail.com>").
Threaded Reply Example
{
"from": "Acme Support <support@yourdomain.com>",
"to": "customer@gmail.com",
"inReplyTo": "<CABcd123@mail.gmail.com>",
"subject": "Re: Help with Order #1042",
"bodyHtml": "<p>Hi Sarah,</p><p>We have dispatched your order today! Tracking number is #TRK9981.</p>",
"bodyText": "Hi Sarah,\nWe have dispatched your order today! Tracking number is #TRK9981."
}
ENerve resolves the parent message, links the conversation threadId in the database, and injects the RFC-compliant In-Reply-To and References headers into the Resend transmission.
When an external sender sends an email to any address on your domain, ENerve parses the message, uploads any attachments to cloud storage (DigitalOcean Spaces), and performs an HTTP POST request with Content-Type: application/json to your configured Forwarding Webhook URL.
Webhook Payload
{
"emailId": "48df02be-c16e-4f0f-aef5-fa526a570c96",
"sender": "Sarah Connor <sarah.connor@gmail.com>",
"recipient": "support@yourdomain.com",
"subject": "Inquiry regarding my pending order #1042",
"bodyText": "Hello Support Team,\n\nCould you please check my order #1042?\n\nThank you,\nSarah",
"bodyHtml": "<div><p>Hello Support Team,</p><p>Could you please check my order #1042?</p></div>",
"direction": "inbound",
"receivedAt": "2026-09-02 02:35:12.842",
"messageId": "<CABc123_xyz456@mail.gmail.com>",
"inReplyTo": "",
"threadId": "<CABc123_xyz456@mail.gmail.com>",
"attachments": [
{
"id": 14,
"filename": "receipt.pdf",
"size": 245812,
"contentType": "application/pdf",
"downloadUrl": "https://email-storage.fra1.digitaloceanspaces.com/emails/48df02be-c16e-4f0f-aef5-fa526a570c96/attachments/receipt.pdf"
}
]
}
Webhook Response Requirement: Your server must respond with an HTTP status in the range 200 - 299 (e.g. 200 OK or 204 No Content) within 15 seconds. If delivery fails or times out, ENerve records the error in the database and queues automated retries.
ENerve fully supports clients using their own individual Resend account and API key (prefixed with re_...).
Step 1: Provide Your Resend Key
Provide your Resend API key to your ENerve administrator (or enter it during domain profiling). The system will route all your outbound requests through your personal Resend quota rather than the system default pool.
Step 2: Configure the Inbound Webhook in your Resend Dashboard
Because incoming emails arrive directly into your private Resend account, you must tell Resend to forward them to ENerve for parsing, storage in Dovecot IMAP, and delivery to your application webhook:
Incoming attachments are automatically uploaded to cloud storage (DigitalOcean Spaces). Your webhook receives the downloadUrl so your application can securely stream the file without receiving massive JSON blobs.
ENerve operates on an automated pay-as-you-go wallet metering engine. Each email transmitted or received deducts your agreed Rate per Email from your wallet balance.
Low Balance Alerts: When your balance drops below 5 emails worth of credit, ENerve automatically dispatches email warnings to your notification emails.
Zero Balance Behavior: Outbound emails sent via API receive an HTTP 202 Accepted with status: "pending_payment". The emails are safely queued in the database and automatically dispatched as soon as your account is refilled!
Status Code
Meaning
Cause & Resolution
200 OK
Sent Successfully
The email was accepted and dispatched to Resend.
202 Accepted
Pending Payment
Insufficient wallet balance. Queued until wallet is refilled.
400 Bad Request
Validation Failure
Missing to recipient or missing both bodyText and bodyHtml.
401 Unauthorized
Invalid Key
Missing or invalid Authorization: Bearer es_live_... header.
403 Forbidden
Unregistered Sender
Sender address not registered in the client's mailboxes table.
500 Server Error
Gateway Error
Temporary downstream failure. Safe to retry with exponential backoff.