API Playground

Test SparkMailr's email API with our interactive playground. Try different endpoints, see real responses, and explore our capabilities.

View Documentation

Request

Headers

Request Body

Response

Status: Ready to send request

Response Headers

No response yet

Response Body

Send a request to see the response here

Sample Requests

Try these common API operations to get started with SparkMailr

Send Email

Send a simple transactional email

POST /v1/emails

Send Template

Send email using a template

POST /v1/emails/template

Get Status

Check email delivery status

GET /v1/emails/{id}/status

List Emails

Get list of sent emails

GET /v1/emails

Create Template

Create a new email template

POST /v1/templates

Test Webhook

Test webhook configuration

POST /v1/webhooks/test

API Reference

Quick reference for SparkMailr API endpoints and parameters

POST /v1/emails Send an email

Parameters:

  • to (string, required) - Recipient email address
  • subject (string, required) - Email subject
  • html (string, optional) - HTML content
  • text (string, optional) - Plain text content
  • from (string, required) - Sender email address
GET /v1/emails List sent emails

Query Parameters:

  • limit (integer, optional) - Number of results (default: 50)
  • offset (integer, optional) - Offset for pagination
  • status (string, optional) - Filter by status
GET /v1/emails/{id} Get email details

Path Parameters:

  • id (string, required) - Email ID

API Key Authentication

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

Authorization: Bearer YOUR_API_KEY

Getting Your API Key

  1. Sign up for a SparkMailr account
  2. Go to your dashboard
  3. Navigate to API Keys section
  4. Generate a new API key
  5. Copy and store it securely

Rate Limits

API requests are rate limited based on your plan:

  • Free: 100 requests/hour
  • Pro: 1,000 requests/hour
  • Business: 10,000 requests/hour
  • Enterprise: Custom limits
400

Bad Request

Invalid request parameters or malformed JSON

401

Unauthorized

Invalid or missing API key

403

Forbidden

API key doesn't have permission for this action

429

Rate Limited

Too many requests. Check rate limit headers

500

Internal Server Error

Something went wrong on our end

Webhook Events

SparkMailr can send webhook notifications for various email events:

email.sent

Email was successfully sent

email.delivered

Email was delivered to recipient

email.opened

Recipient opened the email

email.clicked

Recipient clicked a link in the email

email.bounced

Email bounced back

email.complained

Recipient marked email as spam