# Agent Card — LDM discovery

> **TL;DR for agents:** GET https://api.live-direct-marketing.online/.well-known/agent-card.json — describes auth scheme, signup endpoint, and delivery capabilities.

## Discovery

LDM publishes an Agent Card at the standard well-known URL. Any agent that supports A2A-style discovery can fetch capabilities and authentication requirements without prior knowledge of the API.

```bash
curl https://api.live-direct-marketing.online/.well-known/agent-card.json
```

## Live payload — fetch it

The card is generated dynamically from the running API and currently lists ~120 capabilities across CRM, dialogs, leads, mailing, exports, webhooks, AI, files, tracking and admin domains. Fetch it directly rather than relying on a static copy — the live source is always authoritative.

```bash
curl -s https://api.live-direct-marketing.online/.well-known/agent-card.json | jq '{ name, url, auth, scope_count: (.scopes | length), capability_count: (.capabilities | length) }'
```

Top-level shape (truncated):

```json
{
  "schema_version": "1.0.0",
  "name": "LDM.delivery",
  "description": "Email delivery API for AI agents. Pay only for delivered inbox messages.",
  "url": "https://api.live-direct-marketing.online",
  "provider": { "organization": "Live Direct Marketing", "url": "https://live-direct-marketing.online" },
  "auth": {
    "schemes": [
      { "type": "bearer", "header": "Authorization", "format": "ldm_pk_...", "obtain": "POST /v1/signup" }
    ]
  },
  "capabilities": [
    { "id": "messages.send",   "method": "POST", "path": "/v1/messages",      "scope": "email:send" },
    { "id": "companies.list",  "method": "GET",  "path": "/api/companies",    "scope": "crm:read" },
    { "id": "leads.kanban",    "method": "GET",  "path": "/api/leads/kanban/:pipelineId", "scope": "leads:read" },
    { "id": "dialogs.reply",   "method": "POST", "path": "/api/dialogs/:id/reply",        "scope": "dialogs:write" },
    { "id": "exports.create",  "method": "POST", "path": "/api/exports",      "scope": "exports:write" },
    { "id": "webhooks.list",   "method": "GET",  "path": "/api/webhooks",     "scope": "webhooks:read" }
    /* …~120 more — fetch live for the full set… */
  ],
  "scopes": ["email:send", "crm:read", "crm:write", "dialogs:read", "dialogs:write", "leads:read", "leads:write", "exports:read", "exports:write", "webhooks:read", "webhooks:write" /* …more… */ ],
  "signup": {
    "endpoint": "POST /v1/signup",
    "body": { "email": "string", "org": "string?", "use_case": "string?" },
    "issues": "sandbox key (moderation-gated delivery)",
    "quota_monthly": 500
  }
}
```

Each capability maps to a real controller path under `HybridAuthGuard`, so an agent presenting `Authorization: Bearer ldm_pk_*` with the listed `scope` reaches exactly the same handler the LDM web UI does.
