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. The recipient field is toEmail (a single address — comma lists are rejected). Attachments are inline base64 in attachmentsJson[] (filename, contentBase64, contentType), or send actual files with POST /api/dialogs/compose-multipart instead.
Provide exactly one sender binding: accountId (a fixed relay) or accountListId (a virtual-relay pool). With a pool, the live relay is chosen from the pool at send time — skipping suspended, paused, over-limit or provider-blocked accounts — and stays fixed to that relay for the rest of the thread. If no relay is available the message is rescheduled, not dropped.
curl -s -X POST "https://api.live-direct-marketing.online/api/dialogs/compose" \
-H "Authorization: Bearer $LDM_KEY" -H "Content-Type: application/json" \
-d '{
"toEmail":"prospect@example.com","accountId":"$ACCOUNT_ID",
"subject":"Quick intro","bodyHtml":"<p>Hi — short pitch attached.</p>",
"attachmentsJson":[{"filename":"pitch.pdf","contentBase64":"$BASE64_CONTENT","contentType":"application/pdf"}]
}'Send via a virtual-relay pool instead of a fixed account:
curl -s -X POST "https://api.live-direct-marketing.online/api/dialogs/compose" \
-H "Authorization: Bearer $LDM_KEY" -H "Content-Type: application/json" \
-d '{
"toEmail":"prospect@example.com","accountListId":"$RELAY_POOL_ID",
"subject":"Quick intro","bodyHtml":"<p>Hi</p>"
}'