> 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.

Once you have access to the eCommerce platform, define the categories your products belong to. Categories should be the first object type you import into your account.

## Create a category

To create a category, see [eCommerce > Create/Update a category](/reference/create-update-category) in the API reference. Below is an example of body parameters used to create or update a category.

**cURL Request**

```curl
curl --request POST \
     --url https://api.brevo.com/v3/categories \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
     "id": "CAT123",
     "name": "Electronics",
     "url": "http://mydomain.com/category/electronics"
     "updateEnabled": false
}
```

The cURL request shows the parameters used to create a category. Default values for each parameter are shown below.

**Body parameters**

| Attribute       | Type    | Description                                                                   | Value                                      |
| :-------------- | :------ | :---------------------------------------------------------------------------- | :----------------------------------------- |
| `id`            | String  | Unique Category ID as saved in the shop                                       | `CAT23`                                    |
| `name`          | String  | Category name                                                                 | `Electronics`                              |
| `url`           | String  | URL to the category                                                           | `http://mydomain.com/category/electronics` |
| `updateEnabled` | Boolean | Allows updating the existing category in the same request. `true` or `false`. | `false`                                    |

## Update a category

Update a category by setting `updateEnabled` to `true` in the create request.

```json
{
     "updateEnabled": true
}
```

| Attribute       | Datatype | Description                                                                   | Value  |
| :-------------- | :------- | :---------------------------------------------------------------------------- | :----- |
| `updateEnabled` | Boolean  | Allows updating the existing category in the same request. `true` or `false`. | `true` |

You can then change the category's name and URL and run the request to update it.

## Response codes

| Response code | Message               | Description                                                                                                                                                                                      |
| :------------ | :-------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `201`         | Category Created      | On success, you receive a `201` response code with the category ID in the response body.                                                                                                         |
| `204`         | Category updated      | On a successful update, you receive a `204` response code with no body, indicating the category has been updated.                                                                                |
| `401`         | Unauthorized response | - Your `api-key` may be incorrect.  - You haven't activated access to the API. [See this article for details.](/docs/add-the-ecommerce-app)  - The format for `name` and `url` may be incorrect. |

## Retrieving all categories

Retrieve the categories you added by calling the [eCommerce > Return all your categories](/reference/get-categories) API endpoint. The attributes used to return all your categories are below.

**cURL Request**

```curl
curl --request GET \
     --url 'https://api.brevo.com/v3/categories?limit=20&offset=0&sort=desc&ids=CAT123&ids=CAT234' \
     --header 'accept: application/json'
```

Parameters to retrieve all categories:

| Attribute | Datatype         | Description                                                            | Value    |
| :-------- | :--------------- | :--------------------------------------------------------------------- | :------- |
| `limit`   | int64            | Number of category items per page                                      | `50`     |
| `offset`  | int64            | Index of the first item in the page                                    | `0`      |
| `sort`    | String           | Sort the results in the ascending/descending order of record creation. | `desc`   |
| `ids`     | Array of strings | Filter by category ids                                                 | `CAT123` |

## Retrieving a category's details

Get a category's details by passing its ID to the [get a category details](/reference/get-category-info) endpoint.

```curl
curl --request GET \
     --url https://api.brevo.com/v3/categories/CAT123 \
     --header 'accept: application/json' \
     --header 'api-key: '
```

This endpoint has only one attribute:

| Attribute | Datatype | Description | Value    |
| :-------- | :------- | :---------- | :------- |
| `id`      | String   | Category ID | `CAT123` |

## Creating categories in a batch

Send your product categories in batches instead of adding each one individually. A cURL request for creating categories in a batch is below.

```curl
curl --request POST \
     --url https://api.brevo.com/v3/categories/batch \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
     "updateEnabled": true
}
```

Use the cURL request to call the batch endpoint for categories. The boolean attribute `updateEnabled` enables or disables updates for all categories being imported.

| Attribute       | Datatype         | Description                                             | Value           |
| :-------------- | :--------------- | :------------------------------------------------------ | :-------------- |
| `categories`    | Array of objects | Array of category objects                               | `id, name, url` |
| `updateEnabled` | Boolean          | Allows updating existing categories in the same request | `false`         |

\


`categories` is an array of objects. Its sub-attributes are:

| Attribute | Datatype | Description                                                                    | Value                                      |
| :-------- | :------- | :----------------------------------------------------------------------------- | :----------------------------------------- |
| `id`      | String   | Unique Category ID as saved in the shop.                                       | `CAT123`                                   |
| `name`    | String   | Mandatory in case of creation. Name of the Category, as displayed in the shop. | `Electronics`                              |
| `url`     | String   | URL to the category.                                                           | `http://mydomain.com/category/electronics` |

**JSON Payload**

```json
{"categories":[{
    "id": "CAT123",
    "name": "Example Category 1",
    "url": "http://shop.com/category/example1"
},
{
    "id": "CAT234",
    "name": "Example Category 2",
    "url": "http://shop.com/category/example2"
},
{
    "id": "CAT345",
    "name": "Example Category 3",
    "url": "http://shop.com/category/example3"
    }
],
"updateEnabled": true
}
```

#### Good practices for importing category batches

* You can create up to **100 categories per call**. The sub-attributes for categories match the attributes in **create a category** above.
* Add the correct category URL to the JSON payload.
* All attributes are of type string.