---
title: Brand Events
description: Documentation for brand-related webhook events
sidebar:
  label: Brand Events
---

This section covers all webhook events related to brands, including brand creation, updates, and deletions.

## Event Types

The following brand-related events are available:

- `brands.upsert` - Triggered when a brand is created or updated
- `brands.delete` - Triggered when a brand is deleted

## Brand Upsert Event

The `brands.upsert` event is triggered when a brand is created or updated.

### Event Structure

```json
{
  "event_type": "brands.upsert",
  "payload": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Premium Fashion",
    "slug": "premium-fashion",
    "description": "High-quality fashion brand",
    "logo_url": "https://example.com/logos/premium-fashion.png",
    "cover_url": "https://example.com/covers/premium-fashion.jpg",
    "series": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174001",
        "name": "Summer Collection",
        "slug": "summer-collection",
        "description": "Light and breezy summer styles",
        "logo_url": "https://example.com/series/summer.png",
        "cover_url": "https://example.com/series/summer-cover.jpg",
        "created_at": "2024-02-12T12:00:00Z",
        "updated_at": "2024-02-12T12:00:00Z"
      }
    ],
    "created_at": "2024-02-12T12:00:00Z",
    "updated_at": "2024-02-12T12:00:00Z"
  }
}
```

### Field Descriptions

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Unique identifier for the brand |
| `name` | string | Display name of the brand |
| `slug` | string | URL-friendly identifier |
| `description` | string | Optional description of the brand |
| `logo_url` | string | Optional URL to the brand logo |
| `cover_url` | string | Optional URL to the brand cover image |
| `series` | array | Associated product series for the brand |
| `created_at` | string | Creation timestamp |
| `updated_at` | string | Last update timestamp |

## Brand Delete Event

The `brands.delete` event is triggered when a brand is removed from the system.

### Event Structure

```json
{
  "event_type": "brands.delete",
  "payload": {
    "id": "123e4567-e89b-12d3-a456-426614174000"
  }
}
```

### Field Descriptions

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Unique identifier of the deleted brand |
