HappierleadsDocs
MCP server

export_leads_csv

Queue a CSV export of a website's leads whose last visit falls in the date range.

Export leads to CSV · Changes data · Acts outside your account

Queue a CSV export of a website's leads whose last visit falls in the date range. The file is built in the background: the user gets an email with the download link and it is listed under Downloads in the dashboard for 30 days; this tool does not return the file itself. Each finished export uses one of the plan's CSV downloads; it fails when the plan has no CSV downloads or none are left. websiteId from list_websites. For leads you want to read in the conversation, use get_leads. Returns status 'queued' and job (id, status, stage, progress, rowCount, fileName, expiresAt).

ConnectionAccount URL, team member URL or OAuth

Parameters

ParameterTypeRequiredDescription
websiteIdstringYesWebsite id (24 hex characters) from list_websites.
dateFromstringYesStart of the range (last visit date). Accepts YYYY-MM-DD, MM/DD/YYYY, ISO 8601 or epoch milliseconds.
dateTostringYesEnd of the range, inclusive. Same formats as dateFrom.

Tool definition

What your assistant receives from tools/list:

{
  "name": "export_leads_csv",
  "title": "Export leads to CSV",
  "annotations": {
    "title": "Export leads to CSV",
    "readOnlyHint": false,
    "destructiveHint": false,
    "idempotentHint": false,
    "openWorldHint": true
  },
  "inputSchema": {
    "type": "object",
    "properties": {
      "websiteId": {
        "type": "string",
        "description": "Website id (24 hex characters) from list_websites."
      },
      "dateFrom": {
        "type": "string",
        "description": "Start of the range (last visit date). Accepts YYYY-MM-DD, MM/DD/YYYY, ISO 8601 or epoch milliseconds."
      },
      "dateTo": {
        "type": "string",
        "description": "End of the range, inclusive. Same formats as dateFrom."
      }
    },
    "required": [
      "websiteId",
      "dateFrom",
      "dateTo"
    ]
  }
}

On this page