Quickstart
1. Register — get a PENDING account + read-capable key
curl -X POST https://api.live-direct-marketing.online/api/auth/register \
-H "Content-Type: application/json" \
-d '{"email":"agent@example.com","termsAccepted":true,"channel":"mcp"}'Response shape (trimmed):
{
"pending": true,
"status": "PENDING",
"channel": "mcp",
"api_key": "ldm_...",
"scope": ["crm:read", "..."],
"tenant": { "id": "...", "slug": "..." },
"nextSteps": ["..."]
}2. Prove the key works
curl https://api.live-direct-marketing.online/api/companies?pageSize=5 \
-H "Authorization: Bearer ldm_..."This is a read-only call — it works before the account is fully activated and needs no extra setup.
3. Send a message
There is no bare "send one email" endpoint that works out of the box — LDM routes outbound mail through a connected sending account (or a pool). Connect one first (see Dialogs for the compose contract and account setup), then:
curl -X POST https://api.live-direct-marketing.online/api/dialogs/compose \
-H "Authorization: Bearer ldm_..." \
-H "Content-Type: application/json" \
-d '{
"toEmail": "test@example.com",
"accountId": "<connected-account-uuid>",
"subject": "Hello from my agent",
"bodyText": "Plain-text or HTML body."
}'Python
import requests
API = "https://api.live-direct-marketing.online/api"
# 1. self-serve register
r = requests.post(f"{API}/auth/register", json={
"email": "agent@example.com",
"termsAccepted": True,
"channel": "mcp",
})
key = r.json()["api_key"]
headers = {"Authorization": f"Bearer {key}"}
# 2. prove it works
r = requests.get(f"{API}/companies", headers=headers, params={"pageSize": 5})
print(r.json())
# 3. send (once an account is connected — see /dialogs)
r = requests.post(
f"{API}/dialogs/compose",
headers=headers,
json={
"toEmail": "test@example.com",
"accountId": "<connected-account-uuid>",
"subject": "Hello",
"bodyText": "From my agent.",
},
)
print(r.json())