# Click Statistics

Retrieve a list of all click events and details about them - message and contact IDs, timestamp, URL and click delay.

> Note: If no query parameters are used, will return events with FromTS equal to the current day at 00:00 UTC.

Endpoint: GET /v3/REST/clickstatistics
Version: 1.0.0
Security: basicAuth

## Query parameters:

  - `CampaignID` (integer)
    Retrieves only click events linked to the specified campaign ID.

  - `ContactsList` (integer)
    Retrieves only click events linked to contacts from this contact list ID.

  - `CustomCampaign` (string)
    Retrieves only click event details for the campaign with the specified custom value.

  - `EventFromTs` (string)
    Retrieves information only about click events that happened after the specified timestamp (ClickedAt >= EventFromTs). Can be used only if CampaignID query parameter is specified as well. Both Unix timestamp (e.g. 1514764800) and RFC3339 (2018-01-01T00:00:00) formats are accepted.

  - `EventToTs` (string)
    Retrieves information only about click events that happened before the specified timestamp (ClickedAt <= EventFromTs). Can be used only if CampaignID query parameter is specified as well. Both Unix timestamp (e.g. 1514764800) and RFC3339 (2018-01-01T00:00:00) formats are accepted.

  - `FromTS` (string)
    Retrieves information only about click events linked to campaigns sent after the specified timestamp. Both Unix timestamp (e.g. 1514764800) and RFC3339 (2018-01-01T00:00:00) formats are accepted.

  - `From` (string)
    Retrieves click event details only for the campaigns, which used the specified sender email address.

  - `FromDomain` (string)
    Retrieves click event details only for the campaigns, which used the specified sender email domain.

  - `FromID` (integer)
    Retrieves click event details only for the campaign, which used the specified sender ID.

  - `FromType` (integer)
    Retrieves click event details only for messages of the specified type:

- 1 - Transactional
- 2 - Marketing
- 3 - Unknown

  - `IsDeleted` (boolean)
    When true, only click event details for deleted campaigns will be returned. When false, deleted campaigns will be excluded from the response.

  - `IsNewsletterTool` (boolean)
    When true, will return only click event details for campaigns created by the Newsletter tool (legacy template builder). When false, newsletter campaigns will be excluded.

  - `MessageID` (integer)
    Retrieves only click events linked to this message ID.

  - `MessageStatus` (integer)
    Retrieves only click events linked to messages with the specified status:

- 0 (Processed)
- 1 (Queued)
- 2 (Sent)
- 3 (Opened)
- 4 (Clicked)
- 5 (Bounce)
- 6 (Spam)
- 7 (Unsub)
- 8 (Blocked)
- 9 (SoftBounce)
- 10 (HardBounce)
- 11 (Deferred)

  - `Period` (string)
    Retrieves only information about click events registered between the start of the selected period and the current timestamp.

- Day - since the start of the current day
- Week - since the start of the current week
- Month - since the start of the current month
- Year - since the start of the current year

  - `ToTS` (string)
    Retrieves only information about click events linked to campaigns sent before the specified timestamp. Both Unix timestamp (e.g. 1514764800) and RFC3339 (2018-01-01T00:00:00) formats are accepted.

## Response 200 fields (application/json):

  - `Count` (integer)
    Indicates the number of objects in the Data array.

  - `Data` (array)
    A JSON array containing a list of objects returned by this endpoint.

  - `Data.ClickedAt` (string)
    Timestamp indicating when the click event occurred.

  - `Data.ClickedDelay` (integer)
    Delay (in seconds) between the message being opened and the URL link being clicked.

  - `Data.ContactID` (integer)
    Unique numeric ID of the contact this click event is linked to.

  - `Data.ID` (integer)
    Unique numeric ID for this click event.

  - `Data.MessageID` (integer)
    Unique numeric ID of the message this click event is linked to.

  - `Data.Url` (string)
    The URL that generated this click event.

  - `Data.UserAgentID` (integer)
    Unique numeric ID for the user agent (browser) used for this click event.

  - `Total` (integer)
    Indicates the number of objects in the Data array.


## Response 400 fields

## Response 401 fields

## Response 403 fields

## Response 404 fields

## Response 429 fields

## Response 500 fields
