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
      • POSTCreate/Update a product
      • GETGet a product's details
      • POSTCreate products in batch
      • GETReturn all your products
      • POSTCreate a product alert for a contact
  • Loyalty
LogoLogo
Help CenterAPI KeysStatusSign In
EcommerceProducts

Create/Update a product

POST
https://api.brevo.com/v3/products
POST
/v3/products
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.createUpdateProduct({
8 id: "P11",
9 name: "Iphone 11",
10 });
11}
12main();
1{
2 "id": "21"
3}
Create a new ecommerce product or update an existing one, identified by the mandatory `id` field. When `updateEnabled` is `false` (the default), the endpoint inserts a new product and returns `201`; if the product ID already exists, a `400` error is returned. When `updateEnabled` is `true`, the endpoint performs an upsert, returning `201` for a new product or `204` for an update. The `name` field is mandatory for creation but optional for updates. Product images are downloaded, validated (max 5 MB, formats: jpeg, jpg, png, bmp, gif, webp), and re-hosted on S3. The `metaInfo` object supports up to 20 keys with a cumulative size limit of approximately 1000 KB.
Was this page helpful?
Previous

Get a product's details

Next
Built with

Create a new ecommerce product or update an existing one, identified by the mandatory id field. When updateEnabled is false (the default), the endpoint inserts a new product and returns 201; if the product ID already exists, a 400 error is returned. When updateEnabled is true, the endpoint performs an upsert, returning 201 for a new product or 204 for an update. The name field is mandatory for creation but optional for updates. Product images are downloaded, validated (max 5 MB, formats: jpeg, jpg, png, bmp, gif, webp), and re-hosted on S3. The metaInfo object supports up to 20 keys with a cumulative size limit of approximately 1000 KB.

Authentication

api-keystring

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

Request

Values to create/update a product

idstringRequiredformat: "string"
Product ID for which you requested the details
namestringRequired

Mandatory in case of creation. Name of the product, as displayed in the shop

brandstringOptional<=128 characters
Brand of the product
categorieslist of stringsOptional

Category ID-s of the product

deletedAtstringOptional

UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) of the product deleted from the shop’s database

descriptionstringOptional<=3000 characters
Description of the product
imageUrlstringOptionalformat: "string"
Absolute URL to the cover image of the product
isDeletedbooleanOptional
product deleted from the shop's database
metaInfomap from strings to strings or integersOptional

Meta data of product such as description, vendor, producer, stock level. The total characters of cumulative metaInfo shall not exceed 20000 characters.

parentIdstringOptionalformat: "string"
Parent product id of the product
pricedoubleOptional
Price of the product
alternativePricedoubleOptional
Alternative price of the product
skustringOptionalformat: "string"
Product identifier from the shop
stockdoubleOptional
Current stock value of the product from the shop's database
updateEnabledbooleanOptionalDefaults to false

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

urlstringOptionalformat: "string"
URL to the product

Response

Product created
idstring
ID of the product when a new product is created

Errors

400
Bad Request Error