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

# link.created

Occurs whenever a [link is created](/docs/api-reference/links/create).

## Response body parameters

All webhook payloads follow a consistent top-level structure with
event-specific data nested within the `data` object.

**id** `string`

The event ID.
**event** `string`

The event type that triggered the webhook (e.g., `link.created`).
**createdAt** `string`

ISO 8601 timestamp when the webhook event was created.
**data** `object`

Event-specific data containing detailed information about the event. The
data object for the `link.created` event contains the following
parameters:

**object parameters**

**id** `string`

Unique identifier for the link.

**domain** `string`

The short link domain (e.g. `dub.sh`).

**key** `string`

The short link path/slug.

**url** `string`

The destination URL.

**shortLink** `string`

Full short link URL.

**qrCode** `string`

URL to the QR code image for this link.

**userId** `string | null`

ID of the user who created the link.

**workspaceId** `string`

ID of the workspace the link belongs to.

**clicks** `number`

Total click count for the link.

**leads** `number`

Total lead count (when conversion tracking is enabled).

**conversions** `number`

Number of leads that converted to paying customers (when conversion
tracking is enabled).

**sales** `number`

Total sale count (when conversion tracking is enabled).

**saleAmount** `number`

Total sale amount in cents.

**createdAt** `string`

ISO 8601 timestamp when the link was created.

**updatedAt** `string`

ISO 8601 timestamp when the link was last updated.

```json Response theme={null}
{
  "id": "evt_KleiO4HBwZFbO1vZLWIPZ2AtX",
  "event": "link.created",
  "createdAt": "2024-08-26T16:41:52.346Z",
  "data": {
    "id": "cm0b87844000dismqhkviju54",
    "domain": "dub.sh",
    "key": "sOvvXDT",
    "url": "https://github.com/stack-auth/stack",
    "trackConversion": false,
    "externalId": null,
    "tenantId": null,
    "partnerId": null,
    "programId": null,
    "archived": false,
    "expiresAt": null,
    "expiredUrl": null,
    "disabledAt": 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,
    "folderId": null,
    "tagId": null,
    "tags": [],
    "webhookIds": [],
    "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,
    "conversions": 0,
    "sales": 0,
    "saleAmount": 0,
    "createdAt": "2024-08-26T16:41:52.084Z",
    "updatedAt": "2024-08-26T16:41:52.084Z",
    "projectId": "cm022sis60003ikt1syy7kfhl",
    "testVariants": null,
    "testCompletedAt": null,
    "testStartedAt": null
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.