For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Help CenterAPI KeysStatusSign In
GuidesAPI ReferenceChangelog
GuidesAPI ReferenceChangelog
  • Introduction
    • Getting started
  • Email API
  • Transactional SMS
  • Transactional WhatsApp
  • Marketing Campaigns
  • Contact Management
  • Events
    • GETGet events
    • POSTCreate an event
    • POSTCreate events in batch
  • Object Management
  • Accounts and Settings
  • Sales CRM
  • Conversations
  • Ecommerce
      • GETReturn all your categories
      • POSTCreate/Update a category
      • GETGet a category details
      • POSTCreate categories in batch
  • Loyalty
LogoLogo
Help CenterAPI KeysStatusSign In
EcommerceCategories

Create categories in batch

POST
https://api.brevo.com/v3/categories/batch
POST
/v3/categories/batch
1import { BrevoClient } from "@getbrevo/brevo";
2
3async function main() {
4 const client = new BrevoClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.ecommerce.createUpdateBatchCategory({
8 categories: [
9 {
10 id: "CAT123",
11 },
12 ],
13 });
14}
15main();
1{
2 "createdCount": 2,
3 "updatedCount": 7
4}
Create or update multiple ecommerce categories in a single request. The `categories` array accepts up to 100 category objects, each requiring a unique `id`. When `updateEnabled` is `false` (the default), all categories are inserted as new; if any ID already exists, a `400` error is returned. When `updateEnabled` is `true`, existing categories are updated and new ones are created via upsert. Duplicate IDs within the same request payload are rejected. The response returns the count of created and updated categories.
Was this page helpful?
Previous

Get detailed attribution metrics for a single Brevo campaign or workflow

Next
Built with

Create or update multiple ecommerce categories in a single request. The categories array accepts up to 100 category objects, each requiring a unique id. When updateEnabled is false (the default), all categories are inserted as new; if any ID already exists, a 400 error is returned. When updateEnabled is true, existing categories are updated and new ones are created via upsert. Duplicate IDs within the same request payload are rejected. The response returns the count of created and updated categories.

Authentication

api-keystring

The API key should be passed in the request headers as api-key for authentication.

Request

Values to create a batch of categories
categorieslist of objectsRequired
array of categories objects
updateEnabledbooleanOptional

Facilitate to update the existing categories in the same request (updateEnabled = true)

Response

Category created and updated
createdCountlong
Number of the new created categories
updatedCountlong
Number of the existing categories updated

Errors

400
Bad Request Error