> 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 campos customizados

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

Lista as definições de campos personalizados da conta.

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

A definição dos campos varia por conta. Consulte os identificadores e tipos retornados antes de enviar metadata nas operações de escrita. O exemplo é ilustrativo.

### 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 da definição.                   |
| `entity`  | string  | Entidade que recebe o campo.       |
| `header`  | string  | Rótulo exibido.                    |
| `type`    | string  | Tipo do campo, por exemplo string. |
| `meta_id` | string  | Identificador do campo.            |
| `binding` | string  | Vínculo do campo na entidade.      |
| `visible` | boolean | Indica visibilidade.               |
| `order`   | integer | Ordem de exibição.                 |

```json
{
  "data": [
    {
      "id": 1,
      "entity": "budget",
      "header": "Referência externa",
      "type": "string",
      "meta_id": "referencia_externa",
      "visible": true,
      "order": 1
    }
  ]
}
```

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/campos-customizados/listar-campos-customizados

## 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)
  - `entity` (string, required)
  - `header` (string, required)
  - `type` (string, required)
  - `meta_id` (string, required)
  - `visible` (boolean, required)
  - `order` (integer, required)

## Examples

**Response**

```json
{
  "data": [
    {
      "id": 1,
      "entity": "budget",
      "header": "Referência externa",
      "type": "string",
      "meta_id": "referencia_externa",
      "visible": true,
      "order": 1
    }
  ]
}
```

**SDK Code**

```python Campos customizados_Listar campos customizados_example
import requests

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

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

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

print(response.json())
```

```javascript Campos customizados_Listar campos customizados_example
const url = 'https://wbudget.app/api/v1/api/v1/metadata';
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 Campos customizados_Listar campos customizados_example
package main

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

func main() {

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

	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 Campos customizados_Listar campos customizados_example
require 'uri'
require 'net/http'

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

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 Campos customizados_Listar campos customizados_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/metadata")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Campos customizados_Listar campos customizados_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

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

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

```csharp Campos customizados_Listar campos customizados_example
using RestSharp;

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

```swift Campos customizados_Listar campos customizados_example
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://wbudget.app/api/v1/api/v1/metadata")! 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()
```