API Documentation

Welcome to the QuickMailTo API documentation. This guide will help you integrate our email sending service into your application.

Authentication

All API requests require authentication using an API key. Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

You can find your API key in the dashboard after signing in.

Base URL

All API endpoints are relative to the base URL:

https://api.quickmailto.com

Rate Limits

API requests are rate limited to protect the service. Current limits:

Rate limit headers are included in every response:

Send Message

Send an email message to one or more recipients.

POST /v1/messages

Request Body

ParameterTypeRequiredDescription
fromstringYesSender email address
toarrayYesArray of recipient email addresses
ccarrayNoArray of CC recipients
bccarrayNoArray of BCC recipients
reply_tostringNoReply-to email address
subjectstringYesEmail subject line
textstringNo*Plain text body
htmlstringNo*HTML body
template_idstringNo*Template ID to use
variablesobjectNoTemplate variables
tagsarrayNoTags for categorization
metadataobjectNoCustom metadata

* At least one of text, html, or template_id is required.

Example Request

cURL
Go
Python
Node.js
curl -X POST https://api.quickmailto.com/v1/messages \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "sender@example.com",
    "to": ["user@example.com"],
    "subject": "Hello from QuickMailTo",
    "text": "This is a test email.",
    "html": "<h1>Hello!</h1><p>This is a test email.</p>"
  }'
package main

import (
    "bytes"
    "encoding/json"
    "net/http"
)

func sendEmail() {
    payload := map[string]interface{}{
        "from":    "sender@example.com",
        "to":      []string{"user@example.com"},
        "subject": "Hello from QuickMailTo",
        "text":    "This is a test email.",
    }

    body, _ := json.Marshal(payload)
    req, _ := http.NewRequest("POST",
        "https://api.quickmailto.com/v1/messages",
        bytes.NewBuffer(body))

    req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
    req.Header.Set("Content-Type", "application/json")

    client := &http.Client{}
    resp, _ := client.Do(req)
    defer resp.Body.Close()
}
import requests

response = requests.post(
    "https://api.quickmailto.com/v1/messages",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
    },
    json={
        "from": "sender@example.com",
        "to": ["user@example.com"],
        "subject": "Hello from QuickMailTo",
        "text": "This is a test email."
    }
)

print(response.json())
const response = await fetch('https://api.quickmailto.com/v1/messages', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    from: 'sender@example.com',
    to: ['user@example.com'],
    subject: 'Hello from QuickMailTo',
    text: 'This is a test email.'
  })
});

const data = await response.json();
console.log(data);

Response

201 Created
{
  "success": true,
  "data": {
    "id": "msg_abc123",
    "message_id": "<abc123@quickmailto.com>",
    "status": "queued"
  }
}

List Messages

Retrieve a paginated list of sent messages.

GET /v1/messages

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number
per_pageinteger20Items per page (max 100)

Get Message

Retrieve details of a specific message.

GET /v1/messages/:id

Create Template

Create a reusable email template with variable placeholders.

POST /v1/templates

Request Body

ParameterTypeRequiredDescription
namestringYesTemplate name
descriptionstringNoTemplate description
subjectstringYesEmail subject (supports variables)
text_bodystringNoPlain text body
html_bodystringNoHTML body
variablesarrayNoList of variable names

List Templates

GET /v1/templates

Get Template

GET /v1/templates/:id

Update Template

PATCH /v1/templates/:id

Delete Template

DELETE /v1/templates/:id

Create Webhook

Register a webhook endpoint to receive email events.

POST /v1/webhooks

Request Body

ParameterTypeRequiredDescription
urlstringYesWebhook endpoint URL (must be HTTPS)
eventsarrayYesEvent types to subscribe to

List Webhooks

GET /v1/webhooks

Get Webhook

GET /v1/webhooks/:id

Update Webhook

PATCH /v1/webhooks/:id

Delete Webhook

DELETE /v1/webhooks/:id

List Events

Retrieve a list of email events.

GET /v1/events

Query Parameters

ParameterTypeDescription
typestringFilter by event type
pageintegerPage number
per_pageintegerItems per page

Get Message Events

Retrieve all events for a specific message.

GET /v1/messages/:id/events

Error Codes

The API uses standard HTTP status codes and returns errors in a consistent format.

CodeNameDescription
400Bad RequestInvalid request parameters
401UnauthorizedMissing or invalid API key
403ForbiddenAccess denied (inactive account, etc.)
404Not FoundResource not found
409ConflictResource already exists
429Too Many RequestsRate limit or quota exceeded
500Internal ErrorServer error

Error Response Format

{
  "success": false,
  "error": {
    "code": "BAD_REQUEST",
    "message": "Invalid email address format",
    "details": { ... }
  }
}

Event Types

The following event types can be tracked and delivered via webhooks:

EventDescription
createdEmail message was created
queuedEmail was added to the send queue
sentEmail was sent to the mail server
deliveredEmail was delivered to recipient
bouncedEmail bounced (hard or soft)
complainedRecipient marked as spam
openedRecipient opened the email
clickedRecipient clicked a link
failedEmail delivery failed