# Activities — comments and history

> **TL;DR for agents:** `POST /api/activities {type:"NOTE", leadId|contactId|companyId, description}`. Read: `GET /api/activities?leadId=…`. Lead-dossier (`/api/leads/:id/dossier`) aggregates the timeline.

## Add a comment to a lead

Scope: `activities:write`. `type` ∈ {NOTE, CALL, MEETING, EMAIL, TASK}. Provide exactly one of `leadId | contactId | companyId`.

```bash
curl -s -X POST "https://api.live-direct-marketing.online/api/activities" \
  -H "Authorization: Bearer $LDM_KEY" -H "Content-Type: application/json" \
  -d '{"type":"NOTE","leadId":"$LEAD_ID","description":"Spoke with CTO — follow-up next Tue"}'
```

## List timeline for a lead

```bash
curl -s "https://api.live-direct-marketing.online/api/activities?leadId=$LEAD_ID&pageSize=50" \
  -H "Authorization: Bearer $LDM_KEY"
```

## Lead dossier — aggregated profile

Scope: `leads:read`. Returns the lead + linked company + contact + last 50 activities + linked dialogs + tags — one shot.

```bash
curl -s "https://api.live-direct-marketing.online/api/leads/$LEAD_ID/dossier" \
  -H "Authorization: Bearer $LDM_KEY"
```
