v1

latestOpenAPI 3.1.02026-07-241630614.2 KB

Get leads

This method allows getting a list of leads in the account

get/api/v4/leads

Query parameters

withstring

This parameter accepts a string which may consist of several values (look at the table above) separated by commas.

pageinteger

Page of leads list

limitstring

The number of entities returned per request (limit – 250)

querystring

Search query (Searches through the filled fields of the entity)

order[created_at]'asc' | 'desc'

Sorting the results

order[updated_at]'asc' | 'desc'

Sorting the results

order[id]'asc' | 'desc'

Sorting the results

filter[id][]integer[]

Filter by lead ID

filter[name][]string[]

Filter by lead name

filter[price]integer
filter[created_by][]integer[]

Filter by ID of the user who created the entity.

filter[updated_by][]integer[]

Filter by ID of the user who changed the entity last

filter[responsible_user_id][]integer[]

Filter by ID of the entity responsible user

filter[created_at][from]integer

Filter by the creation date of the lead. Date in Unix Timestamp format

filter[created_at][to]integer

Filter by the creation date of the lead. Date in Unix Timestamp format

filter[updated_at][from]integer

Filter by the last update date of the lead. Date in Unix Timestamp format.

filter[updated_at][to]integer

Filter by the last update date of the lead. Date in Unix Timestamp format.

filter[closed_at][from]integer

Filter by the lead closing date. Date in Unix Timestamp format.

filter[closed_at][to]integer

Filter by the lead closing date. Date in Unix Timestamp format.

filter[closest_task_at][from]integer

Filter leads by the date of the task closest to completion. Date in Unix Timestamp format.

filter[closest_task_at][to]integer

Date in Unix Timestamp format. Date in Unix Timestamp format.

filter[pipeline_id][]integer[]

Filter by pipeline ID

filter[statuses][0][pipeline_id]integer

Should be used with filter[statuses][0][status_id]. The filter allows you to filter leads based on their specific stages.

filter[statuses][0][status_id]integer

Should be used with filter[statuses][0][pipeline_id]. The filter allows you to filter leads based on their specific stages.

Response

200

_pageinteger

Example response

{
  "_page": 1,
  "_links": {
    "self": {
      "href": "LINK"
    }
  },
  "_embedded": {
    "leads": [
      {
        "id": 152462,
        "name": "Example Lead 1",
        "price": 15000,
        "responsible_user_id": 8375357,
        "status_id": 58141807,
        "pipeline_id": 6950551,
        "created_by": 8375357,
        "created_at": 1686673336,
        "updated_at": 1686747000,
        "closest_task_at": 1686850200,
        "custom_fields_values": [
          {
            "field_id": 184994,
            "field_name": "Sale",
            "field_type": "checkbox",
            "values": [
              {
                "value": true
              }
            ]
          }
        ],
        "account_id": 31361463,
        "source_id": 20692839,
        "is_price_modified_by_robot": true,
        "_links": {
          "self": {
            "href": "LINK"
          }
        }
      }
    ]
  }
}