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

# List all attributes

GET https://api.brevo.com/v3/contacts/attributes

Retrieve all contact attributes defined in your Brevo account, grouped by category (normal, transactional, category, calculated, global). Each attribute includes its name, type, and category, along with enumeration values for category-type attributes and options for multiple-choice-type attributes.

Reference: https://developers.brevo.com/reference/get-attributes

## Authentication

- `api-key` header (required) — The API key should be passed in the request headers as `api-key` for authentication.

## Response

### 200

Attributes listed

- `attributes` (list of object, required) — Listing of available contact attributes in your account
  - `category` (enum, required) — Category of the attribute
    - Allowed values: `normal`, `transactional`, `category`, `calculated`, `global`
  - `name` (string, required) — Name of the attribute
  - `calculatedValue` (string, optional) — Calculated value formula
  - `enumeration` (list of object, optional) — Parameter only available for "category" type attributes.
    - `label` (string, required) — Label of the "category" type attribute
    - `value` (long, required) — Numeric ID of the "category" type attribute value. Set to 0 when the raw value cannot be converted to an integer (for example non-numeric values such as "en" or "fr"). Refer to `valueStr` for the original string representation.
    - `valueStr` (string, required) — String representation of the "category" type attribute value. Always contains the original value as stored. Use this field when the attribute value is non-numeric (e.g. "en", "fr") or when you need the exact string form alongside the numeric `value`.
  - `multiCategoryOptions` (list of string, optional) — Parameter only available for "multiple-choice" type attributes.
  - `type` (enum, optional) — Type of the attribute
    - Allowed values: `text`, `date`, `float`, `id`, `boolean`, `multiple-choice`, `user`

## Examples

**Response**

```json
{
  "attributes": [
    {
      "category": "normal",
      "name": "LASTNAME",
      "type": "text"
    },
    {
      "category": "normal",
      "name": "FIRSTNAME",
      "type": "text"
    },
    {
      "category": "normal",
      "name": "DOB",
      "type": "date"
    },
    {
      "category": "category",
      "name": "GENDER",
      "enumeration": [
        {
          "label": "Men",
          "value": 1,
          "valueStr": "1"
        },
        {
          "label": "Women",
          "value": 2,
          "valueStr": "2"
        },
        {
          "label": "Kid",
          "value": 3,
          "valueStr": "3"
        }
      ],
      "type": "text"
    },
    {
      "category": "category",
      "name": "LANGUAGE",
      "enumeration": [
        {
          "label": "English",
          "value": 0,
          "valueStr": "en"
        },
        {
          "label": "French",
          "value": 0,
          "valueStr": "fr"
        }
      ],
      "type": "text"
    },
    {
      "category": "normal",
      "name": "BDO",
      "type": "user"
    },
    {
      "category": "normal",
      "name": "COUNTRY",
      "multiCategoryOptions": [
        "USA",
        "India",
        "France"
      ],
      "type": "multiple-choice"
    }
  ]
}
```

**SDK Code**

```typescript response
import { BrevoClient } from "@getbrevo/brevo";

async function main() {
    const client = new BrevoClient({
        apiKey: "YOUR_API_KEY_HERE",
    });
    await client.contacts.getAttributes();
}
main();

```

```python response
from brevo import Brevo

client = Brevo(
    api_key="YOUR_API_KEY_HERE",
)

client.contacts.get_attributes()

```

```php response
<?php

namespace Example;

use Brevo\Brevo;

$client = new Brevo(
    apiKey: 'YOUR_API_KEY_HERE',
);
$client->contacts->getAttributes();

```

```go response
package main

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

func main() {

	url := "https://api.brevo.com/v3/contacts/attributes"

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

	req.Header.Add("api-key", "<apiKey>")

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

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

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

}
```

```ruby response
require 'uri'
require 'net/http'

url = URI("https://api.brevo.com/v3/contacts/attributes")

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

request = Net::HTTP::Get.new(url)
request["api-key"] = '<apiKey>'

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

```java response
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.brevo.com/v3/contacts/attributes")
  .header("api-key", "<apiKey>")
  .asString();
```

```csharp response
using RestSharp;

var client = new RestClient("https://api.brevo.com/v3/contacts/attributes");
var request = new RestRequest(Method.GET);
request.AddHeader("api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift response
import Foundation

let headers = ["api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.brevo.com/v3/contacts/attributes")! 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()
```