> ## 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 & payloads

> Learn about the event and payload specifications for webhooks.

## Example event response

Below is an example of a webhook event response for a campaign update. Common fields for all events are:

* `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

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

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.

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

Triggered when a campaign is updated. To see the full specification of the payload, see the [Campaign Update](/en/api-reference/campaign-api/update-campaign-by-id) API response.

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

Triggered when a campaign is deleted.

```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"
  }
}
```
