---
updatedAt: 2025-06-08T15:28:25.000Z
agentTools:
  projectIndex: https://es-developers.kommo.com/llms.txt
---

# Lista de leads entrantes

Este método permite obtener una lista de los leads entrantes en la cuenta.

**Limitaciones**\
El método está disponible de acuerdo con los permisos del usuario.

**Tipo de autorización**\
OAuth 2.0 con Token de acceso/ Token de larga duración.

**Encabezado de tipo de datos cuando la solicitud es exitosa**\
Content-Type: application/hal+json.

**Encabezado de tipo de datos en caso de un error**\
Content-Type: application/problem+json.

### Un ejemplo de la solicitud

En el siguiente ejemplo, obtendremos una lista de un solo lead entrante.

```json
https://example.kommo.com/api/v4/leads/unsorted?filter[uid]=5af9dedb6f2c6a29eaac6ee37fc75ffbb66e139e4603bdd0e14e39d4b319
```

### Parámetros de respuesta

| Parámetro              | Tipo de dato | Descripción                                                                                                                                                   |
| :--------------------- | :----------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| uid                    | string       | UID del lead entrante.                                                                                                                                        |
| source\_uid            | string       | UID de la fuente del lead entrante. Generado por la integración.                                                                                              |
| source\_name           | string       | Nombre de la fuente del lead entrante.                                                                                                                        |
| category               | string       | Categoría del lead entrante: sip, correo, chats, formularios.                                                                                                 |
| pipeline\_id           | int          | ID del pipeline en el que se encuentra el lead entrante.                                                                                                      |
| created\_at            | int          | La fecha y hora en que se creó el lead en formato Unix Timestamp.                                                                                             |
| metadata               | object       | [Metadatos](https://es-developers.kommo.com/reference/descripci%C3%B3n-de-los-objetos-de-metadatos) de lead entrante. Cada tipo tiene sus propios parámetros. |
| account\_id            | int          | ID de cuenta en la que se encuentra el cliente potencial entrante.                                                                                            |
| \_embedded             | object       | Datos de entidades asociadas.                                                                                                                                 |
| \_embedded\[contacts]  | array        | Datos asociados al contacto del  lead entrante. Siempre consta de **un** objeto.                                                                              |
| \_embedded\[0]         | object       | Modelo de contacto.                                                                                                                                           |
| \_embedded\[0]\[id]    | int          | ID del contacto.                                                                                                                                              |
| \_embedded\[companies] | array        | Datos asociados a la compañía del lead entrante. Siempre consta de **un** objeto.                                                                             |
| \_embedded\[0]         | object       | Modelo de compañía                                                                                                                                            |
| \_embedded\[0]\[id]    | int          | ID de la compañía                                                                                                                                             |
| \_embedded\[leads]     | array        | Datos asociados con el lead al que está conectado el cliente potencial entrante. Siempre consta de **un** objeto.                                             |
| \_embedded\[0]         | object       | Modelo de lead.                                                                                                                                               |
| \_embedded\[0]\[id]    | int          | ID del lead.                                                                                                                                                  |

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "kommo-api",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://{subdominio}.kommo.com",
      "variables": {
        "subdominio": {
          "default": "subdominio"
        }
      }
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "oauth2",
        "flows": {}
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/api/v4/leads/unsorted": {
      "get": {
        "summary": "Lista de leads entrantes",
        "description": "Este método permite obtener una lista de los leads entrantes en la cuenta.",
        "operationId": "lista-de-leads-entrantes",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Número de página",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "El número de entidades retornadas en la respuesta a una solicitud (límite: 250)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "filter[uid]",
            "in": "query",
            "description": "Filtrar por el UID del lead entrante. Se puede pasar un único UID o un arreglo de UIDs",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "filter[category]",
            "in": "query",
            "description": "Filtrar por las categorías de los leads entrantes (sip, correo, formularios, chats)",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "filter[pipeline_id]",
            "in": "query",
            "description": "Filtrar por el ID del pipeline",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "order[created_at]",
            "in": "query",
            "description": "Ordenar los resultados. Los valores disponibles para ordenar son: asc, desc",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Solicitud exitosa": {
                    "value": "{\n    \"_page\": 1,\n    \"_links\": {\n        \"self\": {\n            \"href\": \"https://devteam.kommo.com/api/v4/leads/unsorted\"\n        }\n    },\n    \"_embedded\": {\n        \"unsorted\": [\n            {\n                \"uid\": \"5af9dedb6f2c6a29eaac6ee37fc75ffbb66e139e4603bdd0e14e39d4b319\",\n                \"source_uid\": null,\n                \"source_name\": null,\n                \"category\": \"forms\",\n                \"pipeline_id\": 6950551,\n                \"created_at\": 1686819152,\n                \"metadata\": {\n                    \"form_id\": \"1115559\",\n                    \"form_name\": \"Formulario #1686818993\",\n                    \"form_page\": \"Solicitud de sitio #1115559 del formulario «Formulario #1686818993»\",\n                    \"ip\": \"212.46.197.210\",\n                    \"form_sent_at\": \"1686819152\",\n                    \"referer\": \"https://devteam.kommo.com/\",\n                    \"visitor_uid\": null\n                },\n                \"account_id\": 31361463,\n                \"_links\": {\n                    \"self\": {\n                        \"href\": \"ENLACE\"\n                    }\n                },\n                \"_embedded\": {\n                    \"contacts\": [\n                        {\n                            \"id\": 583338,\n                            \"_links\": {\n                                \"self\": {\n                                    \"href\": \"https://devteam.kommo.com/api/v4/contacts/583338\"\n                                }\n                            }\n                        }\n                    ],\n                    \"leads\": [\n                        {\n                            \"id\": 236768,\n                            \"_links\": {\n                                \"self\": {\n                                    \"href\": \"https://devteam.kommo.com/api/v4/leads/236768\"\n                                }\n                            }\n                        }\n                    ],\n                    \"companies\": []\n                }\n            },\n            {\n                \"uid\": \"9ca097816a45770002e406db35e2a1945364d570b765332cef7a57289fc0\",\n                \"source_uid\": \"amojo:onlinechat:b4b939f3-5a25-4cab-a4e8-57140f7c72fa\",\n                \"source_name\": \"onlinechat:1494984c-db73-4ceb-b980-a20a5de569f2\",\n                \"category\": \"chats\",\n                \"pipeline_id\": 6950551,\n                \"created_at\": 1686818940,\n                \"metadata\": {\n                    \"from\": \"\",\n                    \"to\": \"1494984c-db73-4ceb-b980-a20a5de569f2\",\n                    \"received_at\": 1686818940,\n                    \"service\": \"chatenlínea\",\n                    \"client\": {\n                        \"name\": null,\n                        \"avatar\": null\n                    },\n                    \"origin\": {\n                        \"chat_id\": \"b4b939f3-5a25-4cab-a4e8-57140f7c72fa\",\n                        \"ref\": null,\n                        \"visitor_uid\": \"b2aa4364-7790-4dca-8acc-ab90554f97f8\"\n                    },\n                    \"last_message_text\": 1686818940,\n                    \"source_name\": \"Chat en línea\"\n                },\n                \"account_id\": 31361463,\n                \"_links\": {\n                    \"self\": {\n                        \"href\": \"ENLACE\"\n                    }\n                },\n                \"_embedded\": {\n                    \"contacts\": [\n                        {\n                            \"id\": 583308,\n                            \"_links\": {\n                                \"self\": {\n                                    \"href\": \"https://devteam.kommo.com/api/v4/contacts/583308\"\n                                }\n                            }\n                        }\n                    ],\n                    \"leads\": [\n                        {\n                            \"id\": 236738,\n                            \"_links\": {\n                                \"self\": {\n                                    \"href\": \"https://devteam.kommo.com/api/v4/leads/236738\"\n                                }\n                            }\n                        }\n                    ],\n                    \"companies\": []\n                }\n            },\n            {\n                \"uid\": \"400c5eb65b9fa7bbfa813cf593b49d4942f325c7c3fbbcf3acf3bee79b63\",\n                \"source_uid\": \"a1fee7c0fc436088e64ba2e8822ba2b3\",\n                \"source_name\": \"Acme Co.\",\n                \"category\": \"sip\",\n                \"pipeline_id\": 6950551,\n                \"created_at\": 1510261200,\n                \"metadata\": {\n                    \"from\": \"onlinePBX\",\n                    \"phone\": \"14155551234\",\n                    \"called_at\": 1510261200,\n                    \"duration\": \"54\",\n                    \"link\": \"https://example.com\",\n                    \"service_code\": \"CkAvbEwPam6sad\"\n                },\n                \"account_id\": 31361463,\n                \"_links\": {\n                    \"self\": {\n                        \"href\": \"LINK\"\n                    }\n                },\n                \"_embedded\": {\n                    \"contacts\": [\n                        {\n                            \"id\": 583294,\n                            \"_links\": {\n                                \"self\": {\n                                    \"href\": \"https://devteam.kommo.com/api/v4/contacts/583294\"\n                                }\n                            }\n                        }\n                    ],\n                    \"leads\": [\n                        {\n                            \"id\": 236724,\n                            \"_links\": {\n                                \"self\": {\n                                    \"href\": \"https://devteam.kommo.com/api/v4/leads/236724\"\n                                }\n                            }\n                        }\n                    ],\n                    \"companies\": [\n                        {\n                            \"id\": 583292,\n                            \"_links\": {\n                                \"self\": {\n                                    \"href\": \"https://devteam.kommo.com/api/v4/companies/583292\"\n                                }\n                            }\n                        }\n                    ]\n                }\n            }\n        ]\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "_page": {
                      "type": "integer",
                      "example": 1,
                      "default": 0
                    },
                    "_links": {
                      "type": "object",
                      "properties": {
                        "self": {
                          "type": "object",
                          "properties": {
                            "href": {
                              "type": "string",
                              "example": "https://devteam.kommo.com/api/v4/leads/unsorted"
                            }
                          }
                        }
                      }
                    },
                    "_embedded": {
                      "type": "object",
                      "properties": {
                        "unsorted": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "uid": {
                                "type": "string",
                                "example": "5af9dedb6f2c6a29eaac6ee37fc75ffbb66e139e4603bdd0e14e39d4b319"
                              },
                              "source_uid": {},
                              "source_name": {},
                              "category": {
                                "type": "string",
                                "example": "forms"
                              },
                              "pipeline_id": {
                                "type": "integer",
                                "example": 6950551,
                                "default": 0
                              },
                              "created_at": {
                                "type": "integer",
                                "example": 1686819152,
                                "default": 0
                              },
                              "metadata": {
                                "type": "object",
                                "properties": {
                                  "form_id": {
                                    "type": "string",
                                    "example": "1115559"
                                  },
                                  "form_name": {
                                    "type": "string",
                                    "example": "Formulario #1686818993"
                                  },
                                  "form_page": {
                                    "type": "string",
                                    "example": "Solicitud de sitio #1115559 del formulario «Formulario #1686818993»"
                                  },
                                  "ip": {
                                    "type": "string",
                                    "example": "212.46.197.210"
                                  },
                                  "form_sent_at": {
                                    "type": "string",
                                    "example": "1686819152"
                                  },
                                  "referer": {
                                    "type": "string",
                                    "example": "https://devteam.kommo.com/"
                                  },
                                  "visitor_uid": {}
                                }
                              },
                              "account_id": {
                                "type": "integer",
                                "example": 31361463,
                                "default": 0
                              },
                              "_links": {
                                "type": "object",
                                "properties": {
                                  "self": {
                                    "type": "object",
                                    "properties": {
                                      "href": {
                                        "type": "string",
                                        "example": "ENLACE"
                                      }
                                    }
                                  }
                                }
                              },
                              "_embedded": {
                                "type": "object",
                                "properties": {
                                  "contacts": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "integer",
                                          "example": 583338,
                                          "default": 0
                                        },
                                        "_links": {
                                          "type": "object",
                                          "properties": {
                                            "self": {
                                              "type": "object",
                                              "properties": {
                                                "href": {
                                                  "type": "string",
                                                  "example": "https://devteam.kommo.com/api/v4/contacts/583338"
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "leads": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "integer",
                                          "example": 236768,
                                          "default": 0
                                        },
                                        "_links": {
                                          "type": "object",
                                          "properties": {
                                            "self": {
                                              "type": "object",
                                              "properties": {
                                                "href": {
                                                  "type": "string",
                                                  "example": "https://devteam.kommo.com/api/v4/leads/236768"
                                                }
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  },
                                  "companies": {
                                    "type": "array"
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "El usuario no está autorizado": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "Content-Type",
        "value": "application/json"
      }
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```