> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.wbudget.app/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.wbudget.app/_mcp/server.

# Listar clientes

GET https://wbudget.app/api/v1/api/v1/clients

Lista os clientes acessíveis ao usuário autenticado.

**Autenticação:** Bearer Token da API WBudget. O acesso aos dados respeita as permissões do usuário.

Informações de contato também podem estar agrupadas em config. Use GET /clients/\{id} para consultar contatos e o histórico comercial do cliente.

### Resposta

HTTP **200**. Os exemplos usam dados fictícios e mostram os campos principais; outros campos podem acompanhar a resposta. Campos sem valor podem ser nulos.

Campos principais de `data` (cada elemento da lista):

| Campo         | Tipo            | Descrição                                      |
| ------------- | --------------- | ---------------------------------------------- |
| `id`          | integer         | ID do cliente.                                 |
| `name`        | string          | Nome.                                          |
| `email`       | string          | E-mail.                                        |
| `phone`       | string          | Telefone.                                      |
| `national_id` | string          | Documento.                                     |
| `sponsor`     | string          | Contato principal.                             |
| `address`     | object          | Endereço.                                      |
| `status`      | string          | Situação do cadastro.                          |
| `metadata`    | object ou array | Valores personalizados, conforme configuração. |

```json
{
  "data": [
    {
      "id": 101,
      "name": "Empresa Exemplo",
      "sponsor": "Ana Silva",
      "email": "contato@example.com",
      "phone": "+5511999990000",
      "national_id": "11222333000181"
    }
  ]
}
```

Consulte a introdução da collection para o formato de erros e a configuração das variáveis.

Reference: https://developers.wbudget.app/w-budget/clientes/listar-clientes

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Response

### 200

OK

- `data` (list of object, required)
  - `id` (integer, required)
  - `name` (string, required)
  - `sponsor` (string, required)
  - `email` (string, required)
  - `phone` (string, required)
  - `national_id` (string, required)

## Examples

**Response**

```json
{
  "data": [
    {
      "id": 101,
      "name": "Empresa Exemplo",
      "sponsor": "Ana Silva",
      "email": "contato@example.com",
      "phone": "+5511999990000",
      "national_id": "11222333000181"
    }
  ]
}
```

**SDK Code**

```python Clientes_Listar clientes_example
import requests

url = "https://wbudget.app/api/v1/api/v1/clients"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Clientes_Listar clientes_example
const url = 'https://wbudget.app/api/v1/api/v1/clients';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Clientes_Listar clientes_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://wbudget.app/api/v1/api/v1/clients"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Clientes_Listar clientes_example
require 'uri'
require 'net/http'

url = URI("https://wbudget.app/api/v1/api/v1/clients")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Clientes_Listar clientes_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://wbudget.app/api/v1/api/v1/clients")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Clientes_Listar clientes_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://wbudget.app/api/v1/api/v1/clients', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Clientes_Listar clientes_example
using RestSharp;

var client = new RestClient("https://wbudget.app/api/v1/api/v1/clients");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Clientes_Listar clientes_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://wbudget.app/api/v1/api/v1/clients")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```