> ## Documentation Index
> Fetch the complete documentation index at: https://docs.topsort.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhook Event and Payloads

export const LastUpdated = ({date, lang = "en"}) => {
  const translations = {
    en: "Last updated:",
    es: "Última actualización:",
    pt: "Última atualização:",
    fr: "Dernière mise à jour:",
    de: "Zuletzt aktualisiert:"
  };
  const label = translations[lang] || translations.en;
  return <>
<style>{`
.last-updated-component {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 10px 16px;
border-radius: 8px;
margin-top: 12px;
margin-bottom: 16px;
font-size: 14px;
background-color: rgba(0, 0, 0, 0.05);
border: 1px solid rgba(0, 0, 0, 0.12);
color: rgba(0, 0, 0, 0.75);
line-height: 1;
}

        .last-updated-component svg {
          flex-shrink: 0;
          vertical-align: middle;
        }

        .last-updated-component span {
          display: inline-flex !important;
          align-items: center !important;
          line-height: 1 !important;
        }

        [data-theme="dark"] .last-updated-component {
          background-color: #3a3a3a;
          border: 2px solid #888888;
          color: #ffffff;
        }

        [data-theme="dark"] .last-updated-component svg {
          stroke: #ffffff;
        }
      `}</style>
      <div className="last-updated-component">
        <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
          <circle cx="12" cy="12" r="10" />
          <polyline points="12 6 12 12 16 14" />
        </svg>
        <span>
          <strong style={{
    fontWeight: 600
  }}>{label}</strong> 
          <time dateTime={date}>{date}</time>
        </span>
      </div>
    </>;
};

<div style={{textAlign: 'justify', marginBottom: '1.5rem'}}>
  Below is an example of a webhook event response for a campaign update. Common fields for all events are:
</div>

<div style={{textAlign: 'justify', marginBottom: '1.5rem'}}>
  * `channel`: The type of the event that occurred
  * `timestamp`: When the event occurred
  * `id`: Unique id for the event which can be used for deduplication
  * `payload`: The payload contains the details of the event and will vary depending on the event, which is covered in detail below
</div>

```json theme={null}
{
  "channel": "campaign:update",
  "timestamp": "2024-10-31T14:42:55.759185Z",
  "id": "gUo",
  "payload": {
    "name": "My campaign",
    "campaign_id": "edac69a3-3ca2-41d6-af9e-08d3126099b4"
  }
}
```

## Campaign Creation

<div style={{textAlign: 'justify', marginBottom: '1.5rem'}}>
  Triggered when a campaign is created. To see the full specification of the payload, see the [Campaign Create](/en/api-reference/campaign-api/create-campaign) API response.
</div>

```json theme={null}
{
  "channel": "campaign:create",
  "timestamp": "2024-10-31T14:42:55.759185Z",
  "id": "gUo",
  "payload": {
    "name": "My campaign",
    "campaign_id": "edac69a3-3ca2-41d6-af9e-08d3126099b4"
  }
}
```

## [Campaign Update](/en/api-reference/examples/webhooks/event-payloads#campaign-update)

<div style={{textAlign: 'justify', marginBottom: '1.5rem'}}>
  Triggered when a campaign is updated. To see the full specification of the payload, see the [**Campaign Update by ID**](/en/api-reference/campaign-api/update-campaign-by-id) API response.
</div>

```json theme={null}
{
  "channel": "campaign:update",
  "timestamp": "2024-10-31T14:42:55.759185Z",
  "id": "gUo",
  "payload": {
    "name": "My new campaign name",
    "campaign_id": "edac69a3-3ca2-41d6-af9e-08d3126099b4"
  }
}
```

## Campaign Deletion

<div style={{textAlign: 'justify', marginBottom: '1.5rem'}}>
  Triggered when a campaign is deleted.
</div>

```json theme={null}
{
  "channel": "campaign:delete",
  "timestamp": "2024-10-31T14:42:55.759185Z",
  "id": "gUo",
  "payload": {
    "name": "My campaign",
    "ad_format": "listing",
    "vendor_id": "2355d342-222e-4dc9-af92-81c3865b3b66",
    "campaign_id": "edac69a3-3ca2-41d6-af9e-08d3126099b4",
    "campaign_type": "autobidding",
    "marketplace_id": "ad666c53-b174-497a-b52f-77354947456c"
  }
}
```

***

<LastUpdated date="2025-11-18" />
