This guide gets you making API calls to Docmailer in under 5 minutes. No SDK required — just HTTP requests.
Authentication
All requests require a Bearer token in the Authorization header:
Authorization: Bearer YOUR_API_TOKEN
Get your token from the Dashboard under Settings.
Base URL
https://docmailer.org/api
Core Endpoints
Create Inbox
POST/inbox
curl -X POST https://docmailer.org/api/inbox \
-H "Authorization: Bearer YOUR_TOKEN"
# Response
{
"inbox": {
"id": "abc123",
"email": "test-a7f3bc@docmailer.org",
"created_at": 1706745600000
}
}
List Inboxes
GET/inbox
curl https://docmailer.org/api/inbox \
-H "Authorization: Bearer YOUR_TOKEN"
# Response
{
"inboxes": [
{ "id": "abc123", "email": "test-a7f3bc@docmailer.org", ... }
]
}
List Emails
GET/inbox/:id/emails
curl https://docmailer.org/api/inbox/abc123/emails \
-H "Authorization: Bearer YOUR_TOKEN"
# Response
{
"emails": [
{
"id": "email456",
"from": "noreply@app.com",
"subject": "Verify your email",
"received_at": 1706745700000
}
]
}
Read Email
GET/inbox/:id/email/:emailId
curl https://docmailer.org/api/inbox/abc123/email/email456 \
-H "Authorization: Bearer YOUR_TOKEN"
# Response
{
"email": {
"id": "email456",
"from": "noreply@app.com",
"subject": "Verify your email",
"text": "Click here to verify...",
"html": "<html>...</html>"
}
}
Delete Email
DELETE/inbox/:id/email/:emailId
curl -X DELETE https://docmailer.org/api/inbox/abc123/email/email456 \
-H "Authorization: Bearer YOUR_TOKEN"
Quick Example: Node.js
const DOCMAILER = 'https://docmailer.org/api';
const TOKEN = 'your_token_here';
async function testSignupFlow() {
// Create inbox
const inboxRes = await fetch(`${DOCMAILER}/inbox`, {
method: 'POST',
headers: { 'Authorization': `Bearer ${TOKEN}` }
});
const { inbox } = await inboxRes.json();
console.log(`Test email: ${inbox.email}`);
// ... trigger your signup flow with inbox.email ...
// Check for emails
await new Promise(r => setTimeout(r, 3000)); // wait 3s
const emailsRes = await fetch(`${DOCMAILER}/inbox/${inbox.id}/emails`, {
headers: { 'Authorization': `Bearer ${TOKEN}` }
});
const { emails } = await emailsRes.json();
console.log(`Received ${emails.length} email(s)`);
}
testSignupFlow();