API Documentation

Integrate LandinEmail's powerful email marketing features into your applications with our REST API.

API Version 1.0 Stable

API Overview

The LandinEmail API is a RESTful API that allows you to programmatically manage your email campaigns, contacts, and analytics. All API requests must be authenticated using your API key.

Base URL

https://api.landinemail.com/v1

Secure Authentication

API key-based authentication with HTTPS encryption

Rate Limited

1000 requests per hour to ensure fair usage

JSON Response

All responses are in JSON format for easy parsing

Webhooks

Real-time notifications for campaign events

Authentication

All API requests must include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Your API key can be found in your account dashboard under Settings > API Keys.

API Endpoints

Campaigns

POST /campaigns Create a new email campaign
Request Body:
{
  "name": "Welcome Campaign",
  "subject": "Welcome to our newsletter!",
  "from_email": "hello@yourcompany.com",
  "from_name": "Your Company",
  "template_id": "template_123",
  "recipients": ["user@example.com"]
}
GET /campaigns List all campaigns
GET /campaigns/{id} Get campaign details
GET /campaigns/{id}/analytics Get campaign analytics

Contacts

POST /contacts Create a new contact
Request Body:
{
  "email": "user@example.com",
  "first_name": "John",
  "last_name": "Doe",
  "tags": ["newsletter", "customer"]
}
GET /contacts List all contacts
PUT /contacts/{id} Update a contact
DELETE /contacts/{id} Delete a contact

Templates

GET /templates List all email templates
POST /templates Create a new template
GET /templates/{id} Get template details

Webhooks

Webhooks allow you to receive real-time notifications when events occur in your LandinEmail account.

Available Events

  • campaign.sent - Campaign has been sent
  • email.opened - Email has been opened
  • email.clicked - Link in email has been clicked
  • email.bounced - Email has bounced
  • contact.subscribed - New contact subscribed
  • contact.unsubscribed - Contact unsubscribed

Webhook Payload Example

{
  "event": "email.opened",
  "timestamp": "2024-01-15T10:30:00Z",
  "data": {
    "campaign_id": "camp_123",
    "contact_id": "cont_456",
    "email": "user@example.com"
  }
}

Error Codes

Code
Message
Description
400
Bad Request
Invalid request format or parameters
401
Unauthorized
Invalid or missing API key
403
Forbidden
Access denied to resource
404
Not Found
Resource not found
429
Rate Limited
Too many requests, slow down
500
Server Error
Internal server error

Ready to Get Started?

Sign up for a free account and get your API key to start integrating with LandinEmail.