Authentication & API Usage

To send events securely from your backend, you’ll need to generate an API secret. This secret is unique to your website and must never be exposed on the client-side. It should only be used on trusted backend servers.

Generating Your Secret

The secret key can be found on the Website Settings page in your LinkBridge dashboard.

  1. Log into the LinkBridge dashboard.
  2. Navigate to Website Settings.
  3. Find your secret key on the settings page (or click Generate Secret for first time use, or Reset Secret if needed).
  4. Store the secret securely (e.g., environment variable).

API Config - Sales Events

Sales events (win_...) should always be sent from your backend. Use the secure API endpoint below.

POST https://app.linkbridge.click/api/secure/events
Headers: {
  "Authorization": "Bearer YOUR_SECRET_KEY",
  "Content-Type": "application/json"
}

Request Body:
{
  "eventType": "win_sale", // e.g. win_sale, win_purchase, win_order
  "websiteId": "68ab108c4a215929683ad3b9",
  "visitorId": "extract from the __visitorId cookie",
  "sessionId": "extract from the __sessionId cookie",
  "data": {
    "saleAmount": 100,
    "saleId": "123456",
    "saleCurrency": "USD"
  }
}

API Config - Custom Events

Custom events (custom_...) allow you to track specific user actions such as logins, checkout steps, or interactions. These can be sent from either backend or frontend, but make sure to pass the required identifiers.

POST https://app.linkbridge.click/api/secure/events
Headers: {
  "Authorization": "Bearer YOUR_SECRET_KEY",
  "Content-Type": "application/json"
}

Request Body:
{
  "eventType": "custom_login", // e.g. custom_login, custom_payment_intent
  "visitorId": "<extract from __visitorId cookie>",
  "sessionId": "<extract from __sessionId cookie>",
  "websiteId": "68ab108c4a215929683ad3b9",
  "data": {}
}

Copyright © 2026 - All rights reserved