Skip to main content

API Reference

Welcome to the Xem API reference. This is your complete guide to integrating with our email automation and analytics platform.

Quick Start

The Xem API is RESTful and follows standard HTTP conventions. All requests should be made to https://api.xem.email and include proper authentication headers.

Authentication

Most API endpoints require authentication. You can authenticate using:
  • Bearer Token: Include your API key in the Authorization header
  • JWT Token: For user-specific operations

Base URL

API Versioning

The API is versioned using the URL path. Currently, we support:
  • v1: Current stable version (recommended)

Response Format

All API responses are returned in JSON format with the following structure:

Error Handling

Errors follow a consistent format:

Rate Limiting

Most endpoints allow 100 requests per minute per IP address. Sign-in, registration and password-reset endpoints are stricter. See Rate limiting for every limit and for retry advice. Rate limit headers are included in all responses:

API Endpoints

Authentication

User Management

Email Operations

  • Send Email - Send transactional emails
  • Email Templates - Manage email templates
  • Campaigns - Create and manage email campaigns

Analytics

File Management

Subscriptions & Billing

Email Tracking

SDKs & Libraries

Xem has two official SDKs:
  • Node.js and TypeScript: npm install @xem.email/sdk (example)
  • Go: go get github.com/mailxem/mail/sdk-go
From any other language, call the REST API with the X-API-Key header.

Webhooks

Configure webhooks to receive real-time notifications:
  • Email Events: Opens, clicks, bounces, complaints
  • Campaign Events: Started, completed, paused
  • Subscription Events: Created, updated, cancelled

Support

Need help integrating with our API?

Changelog

Stay updated with our API changelog for the latest features, improvements, and breaking changes.
Ready to get started? Check out our quickstart guide or dive into the authentication docs.