LDM Developer API — UI = MCP

LDM is a multi-tenant CRM and outbound mailing platform that exposes on the order of a thousand capabilities to autonomous agents through plain HTTPS. There is no separate "agent API" mirror to keep in sync — the human web UI and Claude / Cursor / your custom MCP client hit the same `/api/*` routes, with HybridAuthGuard resolving either a session cookie or a Bearer key to the same handler. Issue a key, grant scopes, and the agent can do everything the UI can: search and create companies, contacts, leads; manage pipelines; run mailing campaigns and self-approve them; tune anti-spam guardrails; pull exports; subscribe to webhooks.

60-second hello

# 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":"you@example.com","termsAccepted":true,"channel":"mcp","use_case":"Automated CRM ops via MCP"}'
# => { "pending": true, "api_key": "ldm_...", "scope": [...], ... }

# 2. Hit any /api/* endpoint with that key
curl https://api.live-direct-marketing.online/api/companies?pageSize=5 \
  -H "Authorization: Bearer ldm_..."

# 3. Discover the live capability list (~1000 entries)
curl https://api.live-direct-marketing.online/.well-known/agent-card.json | jq .

Plug into Claude Desktop / Cursor (MCP)

The whole API is also published as an MCP server — run it with npx, no install step, and your agent gets a tool per API operation, generated from the live agent card at connect time. No key yet? Skip LDM_API_KEY — the anonymous ldm_terms / ldm_register tools issue one without a human.

// claude_desktop_config.json
{
  "mcpServers": {
    "ldm": {
      "command": "npx",
      "args": ["-y", "--package=@live-direct-marketing/sdk@latest", "ldm-mcp"],
      "env": { "LDM_API_KEY": "ldm_..." }
    }
  }
}

Endpoint map

  • POST /api/auth/register — self-serve account + key (agent channels get the key immediately). Public.
  • GET /api/auth/me — bearer-authenticated profile.
  • GET /api/v1/health — service liveness.
  • GET /.well-known/agent-card.json — LDM discovery (custom format), lists every /api/* capability with its scope. GET /.well-known/agent.json for the A2A-compliant variant.
  • /api/* — the unified surface (companies / contacts / leads / pipelines / dialogs / mailing / exports / webhooks / ai / suppression / files / …). Same routes the UI calls.

Where to read next