List Leads

This endpoint returns the company's Cortex leads, with or without an AgendaPro client record.

Important Notes

  • Requires leads:read scope.
  • Served by Cortex, AgendaPro's conversational agent. Phones are returned exactly as stored (e.g. +521… for numbers that came from WhatsApp in Mexico); they are not normalized.
  • meta_ad_id and meta_source_type in null are a legitimate absence (the campaign is not a Meta ad, it is a Meta post, or no conversation matches), never a failure: when the campaign source cannot be resolved, the request answers 502 and you retry it.
  • The bookings of a lead are read with GET /v3/bookings?client_id=<client_id of the lead> and their creative_source.

Errors Dictionary

StatusErrorDetailDescription
400invalid_formatlimitlimit is not an integer.
400invalid_rangelimitlimit is out of the allowed range.
400invalid_formatcursorcursor is not a cursor returned by this list.
400invalid_paramsparamsAnother parameter is invalid.
401unauthorizedinvalid_api_keyMissing or invalid Bearer token.
401unauthorizedapi_config_inactiveAPI access is inactive for this company.
403forbiddenscope_deniedAPI key lacks leads:read scope.
403forbiddencompany_not_enabledThe company is not enabled to read Cortex data through this API. Contact AgendaPro to enable it; retrying does not help.
429rate_limitedburst_limit_exceededPer-minute request limit exceeded.
429rate_limiteddaily_quota_exceededDaily request quota exceeded.
502upstream_unavailableThe upstream service is unavailable.
502upstream_unavailableupstream_misconfiguredAgendaPro's internal connection to Cortex is misconfigured. It is not a problem with your API key; retry later or contact support.
502upstream_unavailableupstream_errorCortex answered an error, for example because it could not resolve the source of a campaign in the response (AgendaPro's channels broker failed, answered an error or did not answer in time). The whole page fails; retry the same request.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string

Filter by pipeline stage key.

string

Filter by lead source (e.g. whatsapp, instagram).

string

Filter by campaign token (campaign_id of the lead).

string

Opaque cursor from pagination.next_cursor of the previous page. Omit it for the first page.

integer
1 to 200

Records per page (max 200).

Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json