# Link

## Clicked

`com.twilio.daptbt.link-shortening.link-clicked`

Link Clicked events are compatible with Webhook and Kinesis sinks. To learn more, you can get started with the [Webhook](/docs/events/webhook-quickstart) or [Kinesis](/docs/events/eventstreams-quickstart) quickstarts and refer to the [product documentation](/docs/messaging/features/link-shortening).

**Examples**

```json
{
  "specversion" : "1.0",
  "type" : "com.twilio.daptbt.link-shortening.link-clicked",
  "source" : "AB00000000000000000000000001",
  "id" : "NO00000000000000000000000001",
  "dataschema" : "https://events-schemas.twilio.com/DapTbt.LinkClicked/3",
  "datacontenttype" : "2025-10-08T07:17:02.363Z",
  "data" : {
    "message_sid" : "SM0000000000000000000000000000001",
    "account_sid" : "AC0000000000000000000000000000001",
    "messaging_service_sid" : "MG0000000000000000000000000000001",
    "to" : "+11234567890",
    "from" : "+12345678901",
    "link" : "https://mycompany.com/my-very-long-endpoint?withSomeQuery=values",
    "shortened_link" : "https://mycompany.com/0000000001",
    "link_create_time" : "2025-01-01T00:00:00.000Z",
    "click_time" : "2025-01-01T00:10:00.000Z",
    "user_agent" : "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 Google-PageRenderer Google (+https://developers.google.com/+/web/snippet/)"
  }
}
```

**Versions**

#### v3 (latest)

> \[!NOTE]
>
> v3 only contains updates to the schema metadata. In other words, there are no new fields between v2 and v3.

* `string` **message\_sid**. Id of the message that contains the short link.
* `string` **account\_sid**. Id of the account that sends the message.
* `string` **messaging\_service\_sid**. Id of the messaging service used to send the message.
* `string` **to**. Destination number to which the message with short url is sent.
* `string` **from**. Source number from which the message is sent.
* `string` **link**. The long url that is part of the message body.
* `string` **shortened\_link**. The short url generated by the tbt-url-shortener service.
* `string` **link\_create\_time**. CreatedAt time of the link.
* `string` **click\_time**. Time at which the short link is clicked.
* `string` **user\_agent**. User agent from which the link is clicked.
* `object` **customer\_tags**. Customer-defined tags associated with the message.

The full specification for version 3 is also available as a [JSON schema](https://events-schemas.twilio.com/DapTbt.LinkClicked/3).

#### v2

* `string` **message\_sid**. Id of the message that contains the short link.
* `string` **account\_sid**. Id of the account that sends the message.
* `string` **messaging\_service\_sid**. Id of the messaging service used to send the message.
* `string` **to**. Destination number to which the message with short url is sent.
* `string` **from**. Source number from which the message is sent.
* `string` **link**. The long url that is part of the message body.
* `string` **shortened\_link**. The short url generated by the tbt-url-shortener service.
* `string` **link\_create\_time**. CreatedAt time of the link.
* `string` **click\_time**. Time at which the short link is clicked.
* `string` **user\_agent**. User agent from which the link is clicked.
* `object` **customer\_tags**. \[NEW] Customer-defined tags associated with the message.

The full specification for version 2 is also available as a [JSON schema](https://events-schemas.twilio.com/DapTbt.LinkClicked/2).

#### v1

* `string` **message\_sid**. Id of the message that contains the short link.
* `string` **account\_sid**. Id of the account that sends the message.
* `string` **messaging\_service\_sid**. Id of the messaging service used to send the message.
* `string` **to**. Destination number to which the message with short url is sent.
* `string` **from**. Source number from which the message is sent.
* `string` **link**. The long url that is part of the message body.
* `string` **shortened\_link**. The short url generated by the tbt-url-shortener service.
* `string` **link\_create\_time**. CreatedAt time of the link.
* `string` **click\_time**. Time at which the short link is clicked.
* `string` **user\_agent**. User agent from which the link is clicked.

The full specification for version 1 is also available as a [JSON schema](https://events-schemas.twilio.com/DapTbt.LinkClicked/1).

## Shortened

`com.twilio.daptbt.link-shortening.link-shortened`

Link Shortened events are compatible with Webhook and Kinesis sinks. To learn more, you can get started with the [Webhook](/docs/events/webhook-quickstart) or [Kinesis](/docs/events/eventstreams-quickstart) quickstarts and refer to the [product documentation](/docs/messaging/features/link-shortening).

**Versions**

#### v1 (latest)

* `string` **message\_sid**. Id of the message that contains the short link.
* `string` **account\_sid**. Id of the account that sends the message.
* `string` **messaging\_service\_sid**. Id of the messaging service used to send the message.
* `string` **to**. Destination number to which the message with short url is sent.
* `string` **from**. Source number from which the message is sent.
* `string` **link**. The long url that is part of the message body.
* `string` **shortened\_link**. The short url generated by the tbt-url-shortener service.
* `string` **link\_create\_time**. CreatedAt time of the link.

The full specification for version 1 is also available as a [JSON schema](https://events-schemas.twilio.com/DapTbt.LinkShortened/1).
