RoofKit
Developer docsPartner API
API keys

Export leads

Exports formula-safe CSV using the same filters as list leads. Exports are capped at 10,000 matching leads per response; use the returned X-Export-Next-Cursor when X-Export-Truncated is true.

Bearer API key · Scope: leads.export

Endpoint

GET/api/v1/leads/export
Query parameters9 parameters
  • source
    string

  • medium
    string

  • campaign
    string

  • from
    string:date-time

    Inclusive updated_at lower bound for incremental sync.

  • to
    string:date-time

    Inclusive updated_at upper bound for incremental sync.

  • status_stage_id
    string

  • search
    string

  • cursor
    string

    Opaque cursor returned by list/export responses. Send it back unchanged; malformed cursors return 400.

  • limit
    integer

Responses

200CSV export.

Headers

  • X-RateLimit-LimitMaximum requests allowed in the current window.
  • X-RateLimit-RemainingRequests remaining in the current window.
  • X-RateLimit-ResetISO timestamp when the current rate-limit window resets.
  • Content-DispositionDocumented response header
  • X-Export-Truncatedtrue when additional matching rows remain after the CSV cap.
  • X-Export-Next-CursorCursor to pass back to `/api/v1/leads/export` for the next export segment when truncated.
text/csv
string
400Request payload, query, or required header is invalid.
application/json
ErrorResponse
401Missing, malformed, revoked, deleted, or unknown API key.

Headers

  • WWW-AuthenticateDocumented response header
application/json
ErrorResponse
403API key lacks the required scope or the workspace is not active.
application/json
ErrorResponse
429Rate limit exceeded for this key and endpoint or invalid-auth bucket.

Headers

  • X-RateLimit-LimitMaximum requests allowed in the current window.
  • X-RateLimit-RemainingRequests remaining in the current window.
  • X-RateLimit-ResetISO timestamp when the current rate-limit window resets.
  • Retry-AfterSeconds until the caller should retry.
application/json
ErrorResponse
500Internal authentication or server error.
application/json
ErrorResponse
Try it out
Query parameters