---
updatedAt: 2026-10-23T12:38:05.000Z
agentTools:
  projectIndex: https://piperun-atendimentos.readme.io/llms.txt
---

# Listar clientes

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "versão-10",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://{subdominio}.cxm.pipe.run",
      "variables": {
        "subdominio": {
          "default": "subdominio"
        }
      }
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/api/customers": {
      "get": {
        "summary": "Listar clientes",
        "description": "",
        "operationId": "listar-clientes",
        "parameters": [
          {
            "name": "field_id",
            "in": "query",
            "description": "ID do campo de pesquisa.<br><b>Valores premitidos:</b><ul><li>id: ID do cliente</li><li>name: Nome</li><li>document_number: Número do documento</li><li>external_id: ID Externo</li><li>email: E-mail</li><li>telephone: Telefone</li><li>organization_name: Nome da organização</li></ul>",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "name",
                "document_number",
                "external_id",
                "email",
                "telephone",
                "organization_name"
              ]
            }
          },
          {
            "name": "search_field",
            "in": "query",
            "description": "Valor para pesquisar",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Accept",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          },
          {
            "name": "Content-Type",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "application/json"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"data\": [\n    {\n      \"id\": 4,\n      \"name\": \"JOAQUIM XAVIER\",\n      \"external_id\": \"987654321\",\n      \"document_number\": \"12312312387\",\n      \"wildcard_01\": null,\n      \"wildcard_02\": null,\n      \"wildcard_03\": null,\n      \"wildcard_04\": null,\n      \"wildcard_05\": null,\n      \"wildcard_06\": null,\n      \"wildcard_07\": null,\n      \"wildcard_08\": null,\n      \"wildcard_09\": null,\n      \"wildcard_10\": null,\n      \"created_at\": \"2020-05-18T22:00:39.000000Z\",\n      \"crmv_user_id\": 123,\n      \"main_sms\": null,\n      \"main_whatsapp\": {\n        \"id\": 10,\n        \"customer_id\": 4,\n        \"area_code\": \"51\",\n        \"number\": \"987654321\",\n        \"type\": \"m\",\n        \"level_id\": \"N\",\n        \"has_sms\": false,\n        \"has_whatsapp\": true,\n        \"has_whatsapp_api\": true,\n        \"wa_is_business\": false,\n        \"wa_is_enterprise\": false,\n        \"wa_contact_name\": \"\",\n        \"wa_pushname\": \"\",\n        \"wa_verified_level\": 0,\n        \"wa_verified_name\": \"\",\n        \"wa_profile_picture\": \"\",\n        \"session_expires_at\": null,\n        \"is_blocked\": false,\n        \"full_number\": \"51987654321\"\n      },\n      \"main_email\": {\n        \"id\": 3,\n        \"customer_id\": 4,\n        \"email\": \"joaquimxavier@teste.com\",\n        \"level_id\": \"C\",\n        \"is_blocked\": false\n      },\n      \"agent_id\": 13,\n      \"queue_id\": null,\n      \"customer_group_id\": null,\n      \"profile_picture_url\": null,\n      \"is_priority\": true,\n      \"last_base_api\": null,\n      \"emails\": [\n        {\n          \"id\": 3,\n          \"customer_id\": 4,\n          \"email\": \"joaquimxavier@teste.com\",\n          \"level_id\": \"C\",\n          \"is_blocked\": false,\n          \"email_level\": {\n            \"id\": \"C\",\n            \"description\": \"Correto\",\n            \"order\": 2\n          }\n        }\n      ],\n      \"telephones\": [\n        {\n          \"id\": 10,\n          \"customer_id\": 4,\n          \"area_code\": \"51\",\n          \"number\": \"987654321\",\n          \"type\": \"m\",\n          \"level_id\": \"N\",\n          \"has_sms\": false,\n          \"has_whatsapp\": true,\n          \"has_whatsapp_api\": true,\n          \"wa_is_business\": false,\n          \"wa_is_enterprise\": false,\n          \"wa_contact_name\": \"\",\n          \"wa_pushname\": \"\",\n          \"wa_verified_level\": 0,\n          \"wa_verified_name\": \"\",\n          \"wa_profile_picture\": \"\",\n          \"session_expires_at\": null,\n          \"is_blocked\": false,\n          \"full_number\": \"51987654321\",\n          \"telephone_level\": {\n            \"id\": \"N\",\n            \"description\": \"Não validado\",\n            \"order\": 4\n          }\n        }\n      ],\n      \"opened_talks\": []\n    }\n  ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "integer",
                            "example": 4,
                            "default": 0
                          },
                          "name": {
                            "type": "string",
                            "example": "JOAQUIM XAVIER"
                          },
                          "external_id": {
                            "type": "string",
                            "example": "987654321"
                          },
                          "document_number": {
                            "type": "string",
                            "example": "12312312387"
                          },
                          "wildcard_01": {},
                          "wildcard_02": {},
                          "wildcard_03": {},
                          "wildcard_04": {},
                          "wildcard_05": {},
                          "wildcard_06": {},
                          "wildcard_07": {},
                          "wildcard_08": {},
                          "wildcard_09": {},
                          "wildcard_10": {},
                          "created_at": {
                            "type": "string",
                            "example": "2020-05-18T22:00:39.000000Z"
                          },
                          "crmv_user_id": {
                            "type": "integer",
                            "example": 123,
                            "default": 0
                          },
                          "main_sms": {},
                          "main_whatsapp": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 10,
                                "default": 0
                              },
                              "customer_id": {
                                "type": "integer",
                                "example": 4,
                                "default": 0
                              },
                              "area_code": {
                                "type": "string",
                                "example": "51"
                              },
                              "number": {
                                "type": "string",
                                "example": "987654321"
                              },
                              "type": {
                                "type": "string",
                                "example": "m"
                              },
                              "level_id": {
                                "type": "string",
                                "example": "N"
                              },
                              "has_sms": {
                                "type": "boolean",
                                "example": false,
                                "default": true
                              },
                              "has_whatsapp": {
                                "type": "boolean",
                                "example": true,
                                "default": true
                              },
                              "has_whatsapp_api": {
                                "type": "boolean",
                                "example": true,
                                "default": true
                              },
                              "wa_is_business": {
                                "type": "boolean",
                                "example": false,
                                "default": true
                              },
                              "wa_is_enterprise": {
                                "type": "boolean",
                                "example": false,
                                "default": true
                              },
                              "wa_contact_name": {
                                "type": "string",
                                "example": ""
                              },
                              "wa_pushname": {
                                "type": "string",
                                "example": ""
                              },
                              "wa_verified_level": {
                                "type": "integer",
                                "example": 0,
                                "default": 0
                              },
                              "wa_verified_name": {
                                "type": "string",
                                "example": ""
                              },
                              "wa_profile_picture": {
                                "type": "string",
                                "example": ""
                              },
                              "session_expires_at": {},
                              "is_blocked": {
                                "type": "boolean",
                                "example": false,
                                "default": true
                              },
                              "full_number": {
                                "type": "string",
                                "example": "51987654321"
                              }
                            }
                          },
                          "main_email": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 3,
                                "default": 0
                              },
                              "customer_id": {
                                "type": "integer",
                                "example": 4,
                                "default": 0
                              },
                              "email": {
                                "type": "string",
                                "example": "joaquimxavier@teste.com"
                              },
                              "level_id": {
                                "type": "string",
                                "example": "C"
                              },
                              "is_blocked": {
                                "type": "boolean",
                                "example": false,
                                "default": true
                              }
                            }
                          },
                          "agent_id": {
                            "type": "integer",
                            "example": 13,
                            "default": 0
                          },
                          "queue_id": {},
                          "customer_group_id": {},
                          "profile_picture_url": {},
                          "is_priority": {
                            "type": "boolean",
                            "example": true,
                            "default": true
                          },
                          "last_base_api": {},
                          "emails": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 3,
                                  "default": 0
                                },
                                "customer_id": {
                                  "type": "integer",
                                  "example": 4,
                                  "default": 0
                                },
                                "email": {
                                  "type": "string",
                                  "example": "joaquimxavier@teste.com"
                                },
                                "level_id": {
                                  "type": "string",
                                  "example": "C"
                                },
                                "is_blocked": {
                                  "type": "boolean",
                                  "example": false,
                                  "default": true
                                },
                                "email_level": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "example": "C"
                                    },
                                    "description": {
                                      "type": "string",
                                      "example": "Correto"
                                    },
                                    "order": {
                                      "type": "integer",
                                      "example": 2,
                                      "default": 0
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "telephones": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "integer",
                                  "example": 10,
                                  "default": 0
                                },
                                "customer_id": {
                                  "type": "integer",
                                  "example": 4,
                                  "default": 0
                                },
                                "area_code": {
                                  "type": "string",
                                  "example": "51"
                                },
                                "number": {
                                  "type": "string",
                                  "example": "987654321"
                                },
                                "type": {
                                  "type": "string",
                                  "example": "m"
                                },
                                "level_id": {
                                  "type": "string",
                                  "example": "N"
                                },
                                "has_sms": {
                                  "type": "boolean",
                                  "example": false,
                                  "default": true
                                },
                                "has_whatsapp": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                },
                                "has_whatsapp_api": {
                                  "type": "boolean",
                                  "example": true,
                                  "default": true
                                },
                                "wa_is_business": {
                                  "type": "boolean",
                                  "example": false,
                                  "default": true
                                },
                                "wa_is_enterprise": {
                                  "type": "boolean",
                                  "example": false,
                                  "default": true
                                },
                                "wa_contact_name": {
                                  "type": "string",
                                  "example": ""
                                },
                                "wa_pushname": {
                                  "type": "string",
                                  "example": ""
                                },
                                "wa_verified_level": {
                                  "type": "integer",
                                  "example": 0,
                                  "default": 0
                                },
                                "wa_verified_name": {
                                  "type": "string",
                                  "example": ""
                                },
                                "wa_profile_picture": {
                                  "type": "string",
                                  "example": ""
                                },
                                "session_expires_at": {},
                                "is_blocked": {
                                  "type": "boolean",
                                  "example": false,
                                  "default": true
                                },
                                "full_number": {
                                  "type": "string",
                                  "example": "51987654321"
                                },
                                "telephone_level": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "example": "N"
                                    },
                                    "description": {
                                      "type": "string",
                                      "example": "Não validado"
                                    },
                                    "order": {
                                      "type": "integer",
                                      "example": 4,
                                      "default": 0
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "opened_talks": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {}
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\": \"Invalid token.\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Invalid token."
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "422",
            "content": {
              "application/json": {
                "examples": {
                  "Inconsistência nos dados enviados": {
                    "value": "{\n    \"message\": \"The given data was invalid.\",\n    \"errors\": {\n        \"field_id\": [\n            \"O campo ID do campo é obrigatório.\"\n        ],\n        \"search_fields\": [\n            \"O campo Campo da pesquisa é obrigatório.\"\n        ]\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "The given data was invalid."
                    },
                    "errors": {
                      "type": "object",
                      "properties": {
                        "field_id": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": "O campo ID do campo é obrigatório."
                          }
                        },
                        "search_fields": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "example": "O campo Campo da pesquisa é obrigatório."
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl --request GET \\\n     --url 'https://{subdominio}.cxm.pipe.run/api/customers?field_id=2&search_field=12312312387' \\\n     --header 'Accept: application/json' \\\n     --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxNCIsImp0aSI6Ijc4Yjc4YjJjMTY0MzRiNzllNWQ2MDhmYWU0ZjZkYjEyZGUxN2ZiNzc2NzQzOTMwYjU3YjI0ZmYxMmU1MWU4MTkwODA1Mjc4NzA4MGI2Y2FiIiwiaWF0IjoxNjcyNzU1NDA2LjcxOTI1OSwibmJmIjoxNjcyNzU1NDA2LjcxOTI2MywiZXhwIjoxNjcyODQxODA2LjY0NjE0MSwic3ViIjoiMjAiLCJzY29wZXMiOltdfQ.dsi59lzVPsf8Ysl-l1AbjCV1G0eoEKLyIg6H0k3lpxPdtWuGSOIzkAdxxISkukitg8XY72nMxl6lfaP2zsh9qomlBczSDm_gW0HpqFkfHCu_5YX6IiakYl_MLRWEauI1PUiiBbqhjWzJCIxnMfZK-SeZtdp8zRiUAf1M1R-6S1DdWydcBvTZ0MGzw2792LpJ7zFG6zs-lHA_fI256-j_SUjVtnDLOY4ElczlpZ8ldyJp-C47dgUjSed6CLSaZoRzQsGfFINu-VEbzf7suSFSTI7UJomrr8cRVM8e49W8jygX3Nadyn3UGTN7XbtrQ1DnI_3EvLHDDeAnhWlACaytHKx5SdWmW0IeFjRfjwXdohvKqNm4AZVDUjAL_vz1dmmPAbpkXMbI8iBx2B9CBoyE2JGo0jWLcNLBz3udqjIul0JFTtrBzNpTvdu1HBGmuzQVRiE1cT763D9MSOO8KnsLEdkRluR0eNbAdBtAIRI_aR8PxmZmy1o_PXNoCkhcEj8ZKVw9GPCuIZiLg6ij1HCXHwNQcaMjKS-gaTdous_4LGc11XLIVcsecgNc1xWfqyg-_DnGKPK_uUWbGz9BpJAINhwL18d2j75Bobx05TE3hXyn466oq1T9LvRlqMXGrLOn8h3qM6D6uLqrtw0EAyeP0NAJUUT-zhRQOjlPEPuBcQ8' \\\n     --header 'Content-Type: application/json'",
              "name": "200 - OK"
            }
          ],
          "samples-languages": [
            "curl"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "Accept",
        "value": "application/json"
      },
      {
        "key": "Content-Type",
        "value": "application/json"
      }
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```