AdHub App icon

AdHub App

Manage AdHub leads, activities, sources, statuses, tags, and custom fields

Lead → List

AI-generated

Summary

Retrieve a list of leads from AdHub with optional filtering, sorting, pagination, and search capabilities.

Inputs

  • Body Type — Choose whether to send list parameters as a JSON body or as form fields.
  • Body (JSON) — JSON-formatted request body to specify pagination, filtering, sorting, and search parameters, used if Body Type is 'JSON'.
  • Per Page — Number of leads to return per page; set 0 to omit (used if Body Type is 'Form').
  • Cursor — Opaque cursor string to fetch the next page of leads; omit to start from the first page (used if Body Type is 'Form').
  • Page — Page number to retrieve; set 0 to omit (used if Body Type is 'Form').
  • Search — Search term to filter leads by name or other indexed fields (used if Body Type is 'Form').
  • Sort By — Field name to sort the results by (used if Body Type is 'Form').
  • Sort Direction — Sort order direction: ascending or descending (used if Body Type is 'Form').
  • Filter Mode — Logic used to combine multiple filter rules: AND or OR (used if Body Type is 'Form').
  • Filter Rules — One or more filter rules to restrict the list of leads based on various lead fields, general fields, custom fields, tasks, and operators (used if Body Type is 'Form').

Output shape

a list of lead records matching the filter criteria, including pagination metadata when applicable

The output shape depends on the filtering and pagination parameters. Pagination can be controlled via cursor or page number. Filters and sorting are optional. Errors may be returned if input parameters are invalid or the API request fails.

Examples

Example 1: List first 50 leads sorted by creation date descending

Set 'Body Type' to 'JSON' and provide {"per_page":50,"sort_by":"created_at","sort_dir":"desc"} in 'Body (JSON)'.

Example 2: List leads with status 'New' using form parameters

Set 'Body Type' to 'Form', set 'Per Page' to desired number, add a filter rule with category 'leads', field 'lead.status', operator 'Equals To', and value 'New'.

Links

Discussion