Dialogs — read inbox, reply, compose, search
List + filter dialogs
Scope: dialogs:read. Useful query params: direction=IN|OUT, unread=1, attention=1, accountId=…, companyId=…, leadId=…, search=…, pageSize, page.
curl -s "https://api.live-direct-marketing.online/api/dialogs?direction=IN&unread=1&pageSize=20" \
-H "Authorization: Bearer $LDM_KEY"Search by query (subject / body / from / to)
curl -s "https://api.live-direct-marketing.online/api/dialogs?search=demo&pageSize=5" \
-H "Authorization: Bearer $LDM_KEY"Stats — placement (inbox / spam / unchecked) + attention
Scope: dialogs:read. Returns counts the dashboard uses: total, attention (needs reply), drafts (failed sends), pendingSend, byChannel, marking, placement.{inbox,spam,unchecked} for outbound deliverability tracking.
curl -s "https://api.live-direct-marketing.online/api/dialogs/stats" \
-H "Authorization: Bearer $LDM_KEY"Read a thread (whole conversation)
curl -s "https://api.live-direct-marketing.online/api/dialogs/thread/$THREAD_ID" \
-H "Authorization: Bearer $LDM_KEY"Reply to a dialog
Scope: dialogs:write. Pass bodyHtml (HTML allowed). The thread is auto-resolved from the parent dialog.
curl -s -X POST "https://api.live-direct-marketing.online/api/dialogs/$DIALOG_ID/reply" \
-H "Authorization: Bearer $LDM_KEY" -H "Content-Type: application/json" \
-d '{"bodyHtml":"<p>Thanks — booking a slot now.</p>","sendSmtp":true}'Compose a brand-new outbound (with attachment)
Scope: dialogs:write. Upload the file via /api/files/upload first to get fileId, then pass it in attachments[].
curl -s -X POST "https://api.live-direct-marketing.online/api/dialogs/compose" \
-H "Authorization: Bearer $LDM_KEY" -H "Content-Type: application/json" \
-d '{
"to":"prospect@example.com","accountId":"$ACCOUNT_ID",
"subject":"Quick intro","bodyHtml":"<p>Hi — short pitch attached.</p>",
"attachments":[{"fileId":"$FILE_ID"}]
}'