This guide walks you through cloning the Datamailer repository, installing dependencies, running the development server, and making your first authenticated API call — all against a local SQLite database with no AWS account required. The full SQS and SES send path can be exercised later through LocalStack once you’re comfortable with the basics.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/DataTalksClub/datamailer/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, ensure you have the following installed:- Python 3.12 or later — Datamailer’s
pyproject.tomlsetsrequires-python = ">=3.12". - uv — the package manager used to install dependencies and run management commands. Install it with
curl -LsSf https://astral.sh/uv/install.sh | shor see the uv docs for your platform. - Docker (optional) — only needed if you want to run LocalStack to emulate AWS SQS and SES locally. The quickstart below does not require it.
Setup Steps
Run make setup
The Under the hood this runs:The default
setup target copies the example environment file, installs Python dependencies with uv sync, and runs database migrations in one step:.env configures a local SQLite database and the Django console email backend, so no external services are needed at this stage.Seed demo data
Populate your local database with organisations, audiences, clients, contacts, campaigns, transactional message history, and engagement events:The command is idempotent — run it again after future migrations to refresh the demo data without duplicating records. It does not enqueue any SQS work or call SES.
seed_demo_data requires DEBUG=True and will refuse to run in a production environment where DEBUG=False.Start the development server
uv run python manage.py runserver. The server starts on http://localhost:8000 by default.Log in to the operator UI
Open
The product UI uses Django staff authentication, so unauthenticated users are redirected to
http://localhost:8000/admin/login/ in your browser and sign in with the demo admin credentials:| Field | Value |
|---|---|
| Username | admin |
| Password | admin |
/admin/login/ automatically. Once logged in you can browse audiences, contacts, campaigns, and client/API key management.Explore the interactive API reference
Navigate to
http://localhost:8000/api-docs/ to open the interactive OpenAPI reference. It includes copy-pasteable local curl examples, request/response bodies, common errors, and the full endpoint listing. The raw OpenAPI JSON is also available at /api-docs/openapi.json.Demo API Keys
Theseed_demo_data command creates three stable API keys that map to the seeded client applications. Use these keys in local curl examples or when exploring the API docs:
| Client | Integration Name | API Key |
|---|---|---|
dtc-courses | Course platform transactional | dm_dtccourses_demo_transactional_email_key |
dtc-newsletter | Newsletter import/export | dm_dtcnews_demo_newsletter_import_export_key |
asl-platform | ASL platform transactional | dm_aslplatform_demo_transactional_email_key |
/api/... require a Bearer token in the Authorization header. Datamailer stores only a hash of each key and displays its safe dm_<prefix> identifier for support and audit trails.
These keys are seeded for local development only. In production you create named API keys from the client detail page in the operator UI. The raw key is shown once on creation and must be stored by the client application immediately.
Your First API Call
The/api/contacts/status endpoint is a good starting point — it returns a contact’s subscription, verification, validation, suppression, and sendability state for a given audience and client scope, and it requires no write permissions.
alex.verified@example.com:
/api-docs/ once your server is running.