Skip to main content

Export sales-agent leads as CSV (with decrypted PII)

GET 

/api/v1/chatbots/:chatbotId/sales-agent/leads/export

Exports a chatbot's captured sales-agent leads as a CSV, over the requested window and filters. Unlike the metadata-only list, this DECRYPTS the captured contact fields (name/email/phone/company) server-side and includes the coarse geo columns. Cells are CSV-injection-hardened (a leading =+@-\t\r is escaped with a single quote). Each row carries a pii_decrypt_status (ok / failed / erased / none). Capped at 5000 rows after filters — a larger result returns 413 (narrow the window / filters). Owner/admin gated (bulk PII decrypt). Required scope: security:read.

Request

Responses

CSV of the leads slice with decrypted PII + per-row decrypt status.