# Source: https://dub.co/docs/concepts/webhooks/event-types.md

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

# Event types

> List of available webhook events you can listen to along with their payload examples

Webhooks are a great way to get real-time notifications on events that happen in your Dub workspace. Webhooks on Dub follow the following format:

```json webhook-payload.json theme={null}
{
  "id": "evt_KleiO4HBwZFbO1vZLWIPZ2AtX", // The event ID
  "event": "link.created", // The event type
  "createdAt": "2024-08-26T16:41:52.346Z", // The timestamp of when the event was created
  "data": {
    // Event payload
  }
}
```

There are two types of webhook events you can listen to:

* [**Workspace-level events**](#workspace-level-events)
* [**Link-level events**](#link-level-events)

## Workspace-level events

These events are triggered in the context of your entire workspace:

* [`link.created`](#link-created)
* [`link.updated`](#link-updated)
* [`link.deleted`](#link-deleted)
* [`lead.created`](#lead-created)
* [`sale.created`](#sale-created)
* [`partner.application_submitted`](#partner-application-submitted)
* [`partner.enrolled`](#partner-enrolled)
* [`commission.created`](#commission-created)
* [`payout.confirmed`](#payout-confirmed)

### `link.created`

This event is triggered when a [new link is created](/api-reference/endpoint/create-a-link) in your Dub workspace. The event payload contains the created link's details.

Here's an example payload:

<Accordion title="Sample payload">
  ```json link.created theme={null}
  {
    "id": "evt_KleiO4HBwZFbO1vZLWIPZ2AtX",
    "event": "link.created",
    "createdAt": "2024-08-26T16:41:52.346Z",
    "data": {
      "id": "cm0b87844000dismqhkviju54",
      "domain": "dub.sh",
      "key": "sOvvXDT",
      "externalId": null,
      "url": "https://github.com/stack-auth/stack",
      "trackConversion": false,
      "archived": false,
      "expiresAt": null,
      "expiredUrl": null,
      "password": null,
      "proxy": false,
      "title": null,
      "description": null,
      "image": null,
      "video": null,
      "rewrite": false,
      "doIndex": false,
      "ios": null,
      "android": null,
      "geo": null,
      "publicStats": false,
      "tagId": null,
      "tags": [],
      "comments": null,
      "shortLink": "https://dub.sh/sOvvXDT",
      "qrCode": "https://api.dub.co/qr?url=https://dub.sh/sOvvXDT?qr=1",
      "utm_source": null,
      "utm_medium": null,
      "utm_campaign": null,
      "utm_term": null,
      "utm_content": null,
      "userId": "cm022rkcw0000ikt14mscg9sg",
      "workspaceId": "ws_cm022sis60003ikt1syy7kfhl",
      "clicks": 0,
      "lastClicked": null,
      "leads": 0,
      "sales": 0,
      "saleAmount": 0,
      "createdAt": "2024-08-26T16:41:52.084Z",
      "updatedAt": "2024-08-26T16:41:52.084Z",
      "testCompletedAt": null,
      "testStartedAt": null,
      "projectId": "cm022sis60003ikt1syy7kfhl"
    }
  }
  ```
</Accordion>

### `link.updated`

This event is triggered when a [link is updated](/api-reference/endpoint/update-a-link) in your Dub workspace. The event payload contains the updated link's details.

Here's an example payload:

<Accordion title="Sample payload">
  ```json link.updated theme={null}
  {
    "id": "event_KleiO4HBwZFbO1vZLWIPZ2AtX",
    "event": "link.updated",
    "createdAt": "2024-08-26T16:41:52.346Z",
    "data": {
      "id": "cm0b87844000dismqhkviju54",
      "domain": "dub.sh",
      "key": "sOvvXDT",
      "externalId": null,
      "url": "https://github.com/stack-auth/stack",
      "trackConversion": false,
      "archived": false,
      "expiresAt": null,
      "expiredUrl": null,
      "password": null,
      "proxy": false,
      "title": null,
      "description": null,
      "image": null,
      "video": null,
      "rewrite": false,
      "doIndex": false,
      "ios": null,
      "android": null,
      "geo": null,
      "publicStats": false,
      "tagId": null,
      "tags": [],
      "comments": null,
      "shortLink": "https://dub.sh/sOvvXDT",
      "qrCode": "https://api.dub.co/qr?url=https://dub.sh/sOvvXDT?qr=1",
      "utm_source": null,
      "utm_medium": null,
      "utm_campaign": null,
      "utm_term": null,
      "utm_content": null,
      "userId": "cm022rkcw0000ikt14mscg9sg",
      "workspaceId": "ws_cm022sis60003ikt1syy7kfhl",
      "clicks": 0,
      "lastClicked": null,
      "leads": 0,
      "sales": 0,
      "saleAmount": 0,
      "createdAt": "2024-08-26T16:41:52.084Z",
      "updatedAt": "2024-08-26T16:41:52.084Z",
      "testCompletedAt": null,
      "testStartedAt": null,
      "projectId": "cm022sis60003ikt1syy7kfhl"
    }
  }
  ```
</Accordion>

### `link.deleted`

This event is triggered when a [link is deleted](/api-reference/endpoint/delete-a-link) in your Dub workspace. The event payload contains the deleted link's details.

Here's an example payload:

<Accordion title="Sample payload">
  ```json link.deleted theme={null}
  {
    "id": "evt_KleiO4HBwZFbO1vZLWIPZ2AtX",
    "event": "link.deleted",
    "createdAt": "2024-08-26T16:41:52.346Z",
    "data": {
      "id": "cm0b87844000dismqhkviju54",
      "domain": "dub.sh",
      "key": "sOvvXDT",
      "externalId": null,
      "url": "https://github.com/stack-auth/stack",
      "trackConversion": false,
      "archived": false,
      "expiresAt": null,
      "expiredUrl": null,
      "password": null,
      "proxy": false,
      "title": null,
      "description": null,
      "image": null,
      "video": null,
      "rewrite": false,
      "doIndex": false,
      "ios": null,
      "android": null,
      "geo": null,
      "publicStats": false,
      "tagId": null,
      "tags": [],
      "comments": null,
      "shortLink": "https://dub.sh/sOvvXDT",
      "qrCode": "https://api.dub.co/qr?url=https://dub.sh/sOvvXDT?qr=1",
      "utm_source": null,
      "utm_medium": null,
      "utm_campaign": null,
      "utm_term": null,
      "utm_content": null,
      "userId": "cm022rkcw0000ikt14mscg9sg",
      "workspaceId": "ws_cm022sis60003ikt1syy7kfhl",
      "clicks": 0,
      "lastClicked": null,
      "leads": 0,
      "sales": 0,
      "saleAmount": 0,
      "createdAt": "2024-08-26T16:41:52.084Z",
      "updatedAt": "2024-08-26T16:41:52.084Z",
      "testCompletedAt": null,
      "testStartedAt": null,
      "projectId": "cm022sis60003ikt1syy7kfhl"
    }
  }
  ```
</Accordion>

### `lead.created`

This event is triggered when a [new lead is created](/api-reference/endpoint/track-lead) via [Dub Conversions](/conversions/quickstart). The event payload contains the following:

* `eventName`: The name of the event that was tracked.
* `customer`: Details about the customer that signed up.
* `click`: Details about the click event that led to the lead event.
* `link`: Details about the referral link that the lead event is associated with.
* `partner`: Details about the partner associated with the lead event (only present for partner links).
* `metadata`: Additional metadata associated with the lead event (optional).

Here's an example payload:

<Accordion title="Sample payload">
  ```json lead.created theme={null}
  {
    "id": "evt_P343bmyae40ALQYr5HT4vRXRd",
    "event": "lead.created",
    "createdAt": "2024-08-30T09:53:50.343Z",
    "data": {
      "eventName": "Sign up",
      "customer": {
        "id": "oU5P0SqI8fpwx5bxw1",
        "name": "John",
        "email": "john@example.com",
        "avatar": "https://example.com/john.jpeg"
      },
      "click": {
        "id": "d0UtZqE0BZuBPrJS",
        "url": "https://github.com/dubinc/dub",
        "ip": "63.141.57.109",
        "continent": "NA",
        "country": "US",
        "city": "San Francisco",
        "device": "Desktop",
        "browser": "Chrome",
        "os": "Mac OS",
        "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36",
        "bot": false,
        "qr": false,
        "referer": "(direct)"
      },
      "link": {
        "id": "cm0faqkyn0001txvfwjfeq7gl",
        "domain": "dub.sh",
        "key": "79ys3WA",
        "externalId": null,
        "url": "https://github.com/dubinc/dub",
        "trackConversion": true,
        "archived": false,
        "expiresAt": null,
        "expiredUrl": null,
        "password": null,
        "proxy": false,
        "title": null,
        "description": null,
        "image": null,
        "video": null,
        "rewrite": false,
        "doIndex": false,
        "ios": null,
        "android": null,
        "geo": null,
        "publicStats": false,
        "comments": null,
        "shortLink": "https://dub.sh/79ys3WA",
        "qrCode": "https://api.dub.co/qr?url=https://dub.sh/79ys3WA?qr=1",
        "utm_source": null,
        "utm_medium": null,
        "utm_campaign": null,
        "utm_term": null,
        "utm_content": null,
        "userId": "cm022rkcw0000ikt14mscg9sg",
        "workspaceId": "ws_cm022sis60003ikt1syy7kfhl",
        "clicks": 10,
        "lastClicked": "2024-08-30T07:45:09.000Z",
        "leads": 5,
        "sales": 0,
        "saleAmount": 0,
        "createdAt": "2024-08-29T13:03:59.098Z",
        "updatedAt": "2024-08-30T09:53:49.505Z",
        "testCompletedAt": null,
        "testStartedAt": null
      },
      "partner": {
        "id": "pn_1JRB6678XHGBZE95R5PH5QVGS",
        "name": "John Smith",
        "email": "john@partner.com",
        "image": "https://example.com/avatar.jpg",
        "payoutsEnabledAt": null,
        "country": "US",
        "groupId": "grp_1K6K3HD0QE7XTX5HSVR77AK5B",
        "totalClicks": 150,
        "totalLeads": 25,
        "totalConversions": 15,
        "totalSales": 10,
        "totalSaleAmount": 50000,
        "totalCommissions": 5000
      },
      "metadata": null
    }
  }
  ```
</Accordion>

### `sale.created`

This event is triggered when a [new sale is tracked](/api-reference/endpoint/track-sale) via [Dub Conversions](/conversions/quickstart). The event payload contains the following:

* `eventName`: The name of the event that was tracked.
* `customer`: Details about the customer that made the purchase.
* `click`: Details about the click event that led to the sale event.
* `link`: Details about the referral link that the sale event is associated with.
* `partner`: Details about the partner associated with the sale event (only present for partner links).
* `sale`: Details about the recorded sale event.
* `metadata`: Additional metadata associated with the sale event (optional).

Here's an example payload:

<Accordion title="Sample payload">
  ```json sale.created theme={null}
  {
    "id": "evt_WHjyHhqsfYOrlJOOVJSoHXysD",
    "event": "sale.created",
    "createdAt": "2024-08-30T09:57:51.245Z",
    "data": {
      "eventName": "Purchased",
      "customer": {
        "id": "cm0gjdvr20001dkbha2n9gt2b",
        "name": "John",
        "email": "john@example.com",
        "avatar": "https://example.com/john.jpeg"
      },
      "click": {
        "id": "d0UtZqE0BZuBPrJS",
        "url": "https://github.com/dubinc/dub",
        "ip": "63.141.57.109",
        "continent": "NA",
        "country": "US",
        "city": "San Francisco",
        "device": "Desktop",
        "browser": "Chrome",
        "os": "Mac OS",
        "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36",
        "bot": false,
        "qr": false,
        "referer": "(direct)"
      },
      "link": {
        "id": "cm0faqkyn0001txvfwjfeq7gl",
        "domain": "dub.sh",
        "key": "79ys3WA",
        "externalId": null,
        "url": "https://github.com/dubinc/dub",
        "trackConversion": true,
        "archived": false,
        "expiresAt": null,
        "expiredUrl": null,
        "password": null,
        "proxy": false,
        "title": null,
        "description": null,
        "image": null,
        "video": null,
        "rewrite": false,
        "doIndex": false,
        "ios": null,
        "android": null,
        "geo": null,
        "publicStats": false,
        "comments": null,
        "shortLink": "https://dub.sh/79ys3WA",
        "qrCode": "https://api.dub.co/qr?url=https://dub.sh/79ys3WA?qr=1",
        "utm_source": null,
        "utm_medium": null,
        "utm_campaign": null,
        "utm_term": null,
        "utm_content": null,
        "userId": "cm022rkcw0000ikt14mscg9sg",
        "workspaceId": "ws_cm022sis60003ikt1syy7kfhl",
        "clicks": 10,
        "lastClicked": "2024-08-30T07:45:09.000Z",
        "leads": 5,
        "sales": 1,
        "saleAmount": 20000,
        "createdAt": "2024-08-29T13:03:59.098Z",
        "updatedAt": "2024-08-30T09:57:50.891Z",
        "testCompletedAt": null,
        "testStartedAt": null
      },
      "partner": {
        "id": "pn_1JRB6678XHGBZE95R5PH5QVGS",
        "name": "Sarah Johnson",
        "email": "sarah@partner.com",
        "image": "https://example.com/sarah-avatar.jpg",
        "payoutsEnabledAt": null,
        "country": "US",
        "groupId": "grp_1K6K3HD0QE7XTX5HSVR77AK5B",
        "totalClicks": 200,
        "totalLeads": 30,
        "totalConversions": 20,
        "totalSales": 15,
        "totalSaleAmount": 75000,
        "totalCommissions": 7500
      },
      "sale": {
        "amount": 4500,
        "currency": "usd",
        "paymentProcessor": "stripe",
        "invoiceId": null
      },
      "metadata": null
    }
  }
  ```
</Accordion>

### `partner.application_submitted`

This event is triggered when a partner submits an application to join your partner program. The event payload contains the following:

* `id`: The application ID.
* `createdAt`: The timestamp when the application was submitted.
* `partner`: Details about the partner who submitted the application, including their enrollment status and contact information.
* `applicationFormData`: An array of form fields submitted by the partner, with labels and values.

Here's an example payload:

<Accordion title="Sample payload">
  ```json partner.application_submitted theme={null}
  {
    "id": "evt_KleiO4HBwZFbO1vZLWIPZ2AtX",
    "event": "partner.application_submitted",
    "createdAt": "2025-11-06T11:25:59.264Z",
    "data": {
      "id": "pga_1K9CEN4JWYACNHS4DR3PWNR2F",
      "createdAt": "2025-11-06T11:25:59.264Z",
      "partner": {
        "id": "pn_1K9BZE1K285BSTX4W6MPKXJFZ",
        "name": "Matthew Hayden",
        "email": "matthew@example.com",
        "companyName": null,
        "image": null,
        "description": "I'm a content creator who works with brands to grow their business.",
        "country": "US",
        "groupId": "grp_1K9BZE1K2RWYAWB2K1YN5TY7F",
        "status": "pending",
        "website": null,
        "youtube": null,
        "twitter": null,
        "linkedin": null,
        "instagram": null,
        "tiktok": null
      },
      "applicationFormData": [
        {
          "label": "Website",
          "value": "https://example.com/"
        },
        {
          "label": "How do you plan to promote Acme?",
          "value": "I'll promote Acme by sharing it on my social platforms and writing a blog post."
        },
        {
          "label": "Any additional questions or comments?",
          "value": null
        }
      ]
    }
  }
  ```
</Accordion>

### `partner.enrolled`

This event is triggered when a [new partner is enrolled](/api-reference/endpoint/create-a-partner) in your partner program. The event payload contains the following:

* `partner`: Details about the partner that was enrolled.
* `links`: An array of the partner's referral links.

Here's an example payload:

<Accordion title="Sample payload">
  ```json partner.enrolled theme={null}
  {
    "id": "evt_ovabfqva8oqZzmLPN1JnwIfdt",
    "event": "partner.enrolled",
    "createdAt": "2025-04-08T17:11:56.492Z",
    "data": {
      "id": "pn_1JRB6678XHGBZE95R5PH5QVGS",
      "name": "Asleep Pink Mammal",
      "email": "chosen.blush.barracuda@dub-internal-test.com",
      "image": "https://api.dub.co/og/avatar?seed=Asleep Pink Mammal",
      "description": null,
      "country": "US",
      "payoutsEnabledAt": null,
      "paypalEmail": null,
      "stripeConnectId": null,
      "createdAt": "2025-04-08T17:11:56.446Z",
      "status": "approved",
      "programId": "prog_CYCu7IMAapjkRpTnr8F1azjN",
      "tenantId": null,
      "clicks": 0,
      "leads": 0,
      "sales": 0,
      "saleAmount": 0,
      "earnings": 0,
      "applicationId": null,
      "website": "https://example.com",
      "youtube": null,
      "twitter": null,
      "linkedin": null,
      "instagram": null,
      "tiktok": null,
      "links": [
        {
          "id": "link_1JRB6677YXQB49RC1HKH7TPJE",
          "domain": "getacme.link",
          "key": "uvYO5pMIpctKdUVJlL3jIL4o",
          "shortLink": "https://getacme.link/uvYO5pMIpctKdUVJlL3jIL4o",
          "url": "https://acme.com",
          "clicks": 0,
          "leads": 0,
          "sales": 0,
          "saleAmount": 0
        }
      ]
    }
  }
  ```
</Accordion>

### `commission.created`

This event is triggered whenever a new commission is generated in your partner program — either automatically through a tracked conversion or manually via your dashboard.

The event payload contains the following:

* `partner`: Details about the partner that earned the commission.
* `customer`: Details about the customer that made the purchase.
* `userId`: The ID of the user who created the manual commission. You can use this field to distinguish manual commissions from other types of commissions.

Here's an example payload:

<Accordion title="Sample payload">
  ```json commission.created theme={null}
  {
    "id": "evt_64dv6vxYVgltzJBKc9ujJ1ghL",
    "event": "commission.created",
    "createdAt": "2025-07-16T10:48:15.468Z",
    "data": {
      "id": "cm_1K09DJTBCRT24P6BRD515CK29",
      "type": "sale",
      "amount": 50000,
      "earnings": 10000,
      "currency": "usd",
      "status": "pending",
      "invoiceId": null,
      "description": null,
      "quantity": 1,
      "userId": "cludszk1h0000wmd2e0ea2b0p",
      "createdAt": "2025-07-16T10:48:14.722Z",
      "updatedAt": "2025-07-16T10:48:14.960Z",
      "partner": {
        "id": "pn_1K06X6FX2GRB31NCM2VVCGJ72",
        "name": "Matthew Hayden",
        "email": "matthew@example.com",
        "image": null,
        "payoutsEnabledAt": null,
        "country": "US",
        "groupId": "grp_1K6K3HD0QE7XTX5HSVR77AK5B",
        "totalClicks": 50,
        "totalLeads": 15,
        "totalConversions": 10,
        "totalSales": 10,
        "totalSaleAmount": 100000,
        "totalCommissions": 50000
      },
      "customer": {
        "id": "cus_1K09DJDEACR47NPYC93RM43WF",
        "externalId": "TaMD05AnuyqeI",
        "name": "David",
        "email": "david@example.com",
        "avatar": null,
        "country": "US",
        "sales": 1,
        "saleAmount": 50000,
        "createdAt": "2025-07-16T10:48:01.739Z"
      }
    }
  }
  ```
</Accordion>

### `payout.confirmed`

This event is triggered when a payout is confirmed and ready to be processed externally. This event is only sent for programs configured with **external** or **hybrid** payout modes.

The event payload contains the following:

* `amount`: The payout amount in cents
* `currency`: The currency code
* `status`: The payout status (typically "processing" for external payouts)
* `description`: A description of the payout
* `periodStart` / `periodEnd`: The commission period this payout covers
* `mode`: The payout mode ("external" for external payouts)
* `partner`: Details about the partner receiving the payout, including their `tenantId`

Here's an example payload:

<Accordion title="Sample payload">
  ```json payout.confirmed theme={null}
  {
    "id": "evt_b9ywgxWqai2glUpCQjclB17kM",
    "event": "payout.confirmed",
    "createdAt": "2025-10-22T15:50:13.661Z",
    "data": {
      "id": "po_1K869T6CWEH4NB78NS3QYHDJE",
      "invoiceId": "inv_1K94KX5ZWHTWFG07NP96AY90F",
      "amount": 5000,
      "currency": "USD",
      "status": "processing",
      "description": "Dub Partners payout (Acme)",
      "periodStart": "2025-10-22T15:49:33.343Z",
      "periodEnd": "2025-10-31T18:29:59.999Z",
      "createdAt": "2025-10-22T15:50:13.661Z",
      "paidAt": null,
      "mode": "external",
      "partner": {
        "id": "cm6v2l38p000zubyl5fly3i7w",
        "name": "Matthew Hayden",
        "email": "matthew@example.com",
        "image": null,
        "country": "US",
        "tenantId": "64dc9a8c-5cf9-4446-b53b-cdc15199fafc",
        "status": "approved"
      }
    }
  }
  ```
</Accordion>

<Note>
  Learn more about external payouts in the [External payouts
  guide](/partners/external-payouts).
</Note>

## Link-level events

Due to the high volume nature of these events, these events are scoped to a specific link.

This means that you need to specify the link when creating a webhook – though you can select multiple links for the same webhook if you'd like.

### `link.clicked`

This event is triggered when a user clicks on a link. The event payload contains all the details about the click event.

Here's an example payload:

<Accordion title="Sample payload">
  ```json link.clicked theme={null}
  {
    "id": "evt_b9ywgxWqai2glUpCQjclB17kM",
    "event": "link.clicked",
    "createdAt": "2024-08-30T10:16:13.149Z",
    "data": {
      "click": {
        "id": "d0UtZqE0BZuBPrJS",
        "timestamp": "2024-08-30T10:16:12.124Z",
        "url": "https://github.com/dubinc/dub",
        "ip": "63.141.57.109",
        "continent": "NA",
        "country": "US",
        "city": "San Francisco",
        "device": "Desktop",
        "browser": "Chrome",
        "os": "Mac OS",
        "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36",
        "bot": false,
        "qr": false,
        "referer": "(direct)"
      },
      "link": {
        "id": "cm0faqkyn0001txvfwjfeq7gl",
        "domain": "dub.sh",
        "key": "79ys3WA",
        "externalId": null,
        "url": "https://github.com/dubinc/dub",
        "trackConversion": true,
        "archived": false,
        "expiresAt": null,
        "expiredUrl": null,
        "password": null,
        "proxy": false,
        "title": null,
        "description": null,
        "image": null,
        "video": null,
        "rewrite": false,
        "doIndex": false,
        "ios": null,
        "android": null,
        "geo": null,
        "publicStats": false,
        "comments": null,
        "shortLink": "https://dub.sh/79ys3WA",
        "qrCode": "https://api.dub.co/qr?url=https://dub.sh/79ys3WA?qr=1",
        "utm_source": null,
        "utm_medium": null,
        "utm_campaign": null,
        "utm_term": null,
        "utm_content": null,
        "userId": "cm022rkcw0000ikt14mscg9sg",
        "workspaceId": "ws_cm022sis60003ikt1syy7kfhl",
        "clicks": 11,
        "lastClicked": "2024-08-30T07:45:09.000Z",
        "leads": 6,
        "sales": 10,
        "saleAmount": 200000,
        "createdAt": "2024-08-29T13:03:59.098Z",
        "updatedAt": "2024-08-30T10:16:12.126Z",
        "testCompletedAt": null,
        "testStartedAt": null
      }
    }
  }
  ```
</Accordion>