Developer Documentation

Everything you need to integrate with DeveloperLabs.email services

Quick Start

1. Get Your API Key

Sign up for an account and get your API key from the dashboard.

curl -X POST https://api.developerlabs.email/v1/auth \
-H "Content-Type: application/json" \
-d '{"email":"[email protected]","password":"yourpassword"}'

2. Send Your First Email

Use this simple API call to send an email:

const response = await fetch('https://api.developerlabs.email/v1/send', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY'
  },
  body: JSON.stringify({
    to: '[email protected]',
    from: '[email protected]',
    subject: 'Hello from DeveloperLabs',
    text: 'This is a test email sent via API'
  })
});

Documentation Sections

API Reference

Complete reference for our REST API endpoints including authentication, sending emails, and tracking.

View API Docs

SMTP Configuration

Detailed guides for setting up SMTP with various languages and frameworks.

View SMTP Docs

Email Parsing

Guide to processing inbound emails with our parsing API and webhooks.

View Parsing Docs

SDKs & Libraries

Official libraries for popular programming languages to simplify integration.

View SDKs

API Reference

Authentication

All API requests require an API key sent in the Authorization header.

Authorization: Bearer YOUR_API_KEY

Get your API key from the dashboard after signing up.

Sending Emails

Send emails via our REST API with this endpoint:

POST https://api.developerlabs.email/v1/send

Request Body

Parameter Type Required Description
to String/Array Yes Recipient email address(es)
from String Yes Sender email address
subject String Yes Email subject line
text String No* Plain text version (required if no html)
html String No* HTML version (required if no text)

Example Request

fetch('https://api.developerlabs.email/v1/send', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY'
  },
  body: JSON.stringify({
    to: '[email protected]',
    from: '[email protected]',
    subject: 'Your Order Confirmation',
    html: '<h1>Thank you for your order!</h1><p>Your order #12345 has been received.</p>'
  })
})
.then(response => response.json())
.then(data => console.log(data));

Webhooks

Receive real-time notifications about email events by configuring webhooks in your dashboard.

Supported Events

Event Description
delivered Email successfully delivered to recipient's mail server
opened Recipient opened the email (if tracking enabled)
clicked Recipient clicked a link (if tracking enabled)
bounced Email could not be delivered

Webhook Payload Example

{
  "event": "delivered",
  "message_id": "abc123",
  "timestamp": 1689876543,
  "recipient": "[email protected]",
  "metadata": {
    "custom_id": "order_123"
  }
}

SMTP Configuration

SMTP Credentials

Use these SMTP settings to send emails through our servers:

Server smtp.developerlabs.email
Port 587 (STARTTLS) or 465 (SSL/TLS)
Username Your API key
Password Any non-empty string (ignored)

Language Examples

Node.js

const nodemailer = require('nodemailer');

let transporter = nodemailer.createTransport({
  host: 'smtp.developerlabs.email',
  port: 587,
  secure: false, // true for 465, false for other ports
  auth: {
    user: 'YOUR_API_KEY',
    pass: 'any-string' // ignored, but required
  }
});

let info = await transporter.sendMail({
  from: '"Sender" <[email protected]>',
  to: '[email protected]',
  subject: 'Hello from Node.js',
  text: 'Plain text version',
  html: '<b>HTML version</b>'
});

Python

import smtplib
from email.mime.text import MIMEText

msg = MIMEText('Email body here')
msg['Subject'] = 'Python SMTP Test'
msg['From'] = '[email protected]'
msg['To'] = '[email protected]'

with smtplib.SMTP('smtp.developerlabs.email', 587) as server:
    server.starttls()
    server.login('YOUR_API_KEY', 'any-string')  # password ignored
    server.send_message(msg)

SDKs & Libraries

JavaScript/Node.js

Official Node.js library for the DeveloperLabs.email API

Installation

npm install @developerlabs/email

Usage Example

const { DeveloperLabsEmail } = require('@developerlabs/email');
const client = new DeveloperLabsEmail('YOUR_API_KEY');

client.send({
  to: '[email protected]',
  from: '[email protected]',
  subject: 'Welcome!',
  text: 'Thanks for signing up'
})
.then(response => console.log(response))
.catch(error => console.error(error));
View Documentation

Python

Official Python client for the DeveloperLabs.email API

Installation

pip install developerlabs-email

Usage Example

from developerlabs_email import EmailClient

client = EmailClient(api_key="YOUR_API_KEY")

response = client.send_email(
    to="[email protected]",
    from_email="[email protected]",
    subject="Welcome!",
    text="Thanks for signing up"
)

print(response)
View Documentation