latestOpenAPI 3.1.02026-08-193894215.9 MB

23dfbe1a0d1f

Leads

List leads

Returns a paginated list of leads for a company, with optional filtering by product and creation date.

Required permissions:

  • lead:basic:read
  • member:email:read
  • access_pass:basic:read
  • member:basic:read
get/leads

Query parameters

afterstring

Returns the elements in the list that come after the specified cursor.

beforestring

Returns the elements in the list that come before the specified cursor.

firstinteger

Returns the first n elements from the list.

Example:42
lastinteger

Returns the last n elements from the list.

Example:42
company_idstring required

The unique identifier of the company to list leads for.

Example:biz_xxxxxxxxxxxxxx
created_afterstring date-time

Only return leads created after this timestamp.

Example:2023-12-01T05:00:00.401Z
created_beforestring date-time

Only return leads created before this timestamp.

Example:2023-12-01T05:00:00.401Z
product_idsstring[]

Filter leads to only those associated with these specific product identifiers.

Response

A successful response

Example response

{
  "data": [
    {
      "created_at": "2023-12-01T05:00:00.401Z",
      "id": "lead_xxxxxxxxxxxxx",
      "product": {
        "id": "prod_xxxxxxxxxxxxx",
        "title": "Pickaxe Analytics"
      },
      "referrer": "https://twitter.com/whabormarket",
      "updated_at": "2023-12-01T05:00:00.401Z",
      "user": {
        "email": "john.doe@example.com",
        "id": "user_xxxxxxxxxxxxx",
        "name": "John Doe",
        "username": "johndoe42"
      }
    }
  ]
}