Webhooks

Webhooks allow you to receive real-time notifications when your links are clicked. When a click occurs, Linkly sends a POST request to your specified URL(s) with detailed information about the click.

Use Cases

  • Automation Platforms: Trigger workflows in Make.com or Zapier when links are clicked
  • Custom Analytics: Send click data to your own analytics system
  • CRM Updates: Update customer records when they click links
  • Slack Notifications: Get notified in Slack when important links are clicked
  • Lead Tracking: Track when prospects engage with your links

Tip: For most automation use cases, our Make.com integration or Zapier integration are easier to set up than custom webhooks. They include instant click triggers powered by webhooks, with no coding required.

1
2
3

You can add multiple webhook URLs. All URLs will receive the same payload when the link is clicked.

4

Link-level webhooks only fire when that specific link is clicked.

How to Set Up Workspace-Level Webhooks

1

Go to Settings (gear icon in the sidebar).

2

Click Workspace Settings

3

Enter your webhook URL(s), one per line.

You can add multiple webhook URLs. All URLs will receive the same payload when any link in your workspace is clicked.

Enter your webhook URL(s), one per line.
Enter your webhook URL(s), one per line.
4

Click Save Settings.

Workspace-level webhooks fire for every click on any link in your workspace.

Note: If you configure webhooks at both levels, both will fire for clicks on that link.

Webhook Payload

When a click occurs, Linkly sends a POST request with the following JSON payload:

{
  "event": "click",
  "timestamp": "2025-01-15T10:30:00Z",
  "link": {
    "id": 12345,
    "name": "My Campaign Link",
    "url": "https://example.com/landing-page",
    "full_url": "https://yourdomain.com/abc123",
    "domain": "yourdomain.com",
    "slug": "/abc123",
    "destination": "https://example.com/landing-page",
    "workspace_id": 1,
    "enabled": true,
    "cloaking": false,
    "forward_params": true,
    "block_bots": true,
    "public_analytics": false,
    "utm_source": "newsletter",
    "utm_medium": "email",
    "utm_campaign": "spring-sale",
    "og_title": "Special Offer",
    "og_description": "Check out our spring sale!",
    "rules": [
      {
        "what": "country",
        "matches": "US",
        "url": "https://example.com/us-landing"
      }
    ]
  },
  "click": {
    "country": "US",
    "is_eu_country": false,
    "platform": "desktop",
    "browser_name": "Chrome",
    "referer": "https://twitter.com/",
    "isp": "Comcast",
    "bot_name": null,
    "destination": "https://example.com/landing-page",
    "params": {
      "utm_source": "twitter"
    }
  }
}

Payload Fields

Event Info

FieldDescription
eventAlways "click"
timestampISO 8601 timestamp of the click
FieldDescription
idUnique link identifier
nameLink nickname
urlOriginal destination URL
full_urlThe short link URL
domainCustom domain (if configured)
slugURL path/slug
destinationActual destination for this click (may differ from url if rules applied)
workspace_idWorkspace identifier
enabledWhether link is active
rulesArray of redirect rules (geo, device, rotator)
utm_*UTM parameters if configured
og_*Open Graph settings if configured

Click Object

FieldDescription
countryTwo-letter country code (e.g., "US", "GB")
is_eu_countryWhether click originated from EU
platformDevice platform (desktop, ios, android, etc.)
browser_nameBrowser name (Chrome, Safari, Firefox, etc.)
refererReferring URL (if available)
ispInternet Service Provider
bot_nameBot identifier (null for human clicks)
destinationFinal destination URL for this click
paramsQuery parameters passed to the link

Privacy Note: IP addresses are never included in webhook payloads.

Automation Platform Integrations

For easier setup without custom coding, use our native integrations:

Both integrations use webhooks under the hood but handle all the setup automatically.

Best Practices

Multiple Webhooks

You can add multiple webhook URLs (one per line). All URLs will receive the same payload when a click occurs.

Error Handling

  • Webhooks are fire-and-forget - Linkly does not retry failed deliveries
  • Webhook failures never affect the redirect - users always reach their destination
  • Ensure your webhook endpoint responds quickly (< 5 seconds recommended)

Security

  • Use HTTPS endpoints for webhook URLs
  • Validate incoming requests in your webhook handler
  • Consider adding a secret parameter to your webhook URL for verification

Testing

  1. 1Set up a webhook URL using a service like webhook.site or RequestBin
  2. 2Click your link
  3. 3Inspect the received payload
  4. 4Once verified, switch to your production webhook URL

API Access

You can also manage webhooks programmatically via the API:

POST   /api/v1/link/:link_id/webhooks
DELETE /api/v1/link/:link_id/webhooks/:hook_id
GET    /api/v1/link/:link_id/webhooks

POST   /api/v1/workspace/:workspace_id/webhooks
DELETE /api/v1/workspace/:workspace_id/webhooks/:hook_id
GET    /api/v1/workspace/:workspace_id/webhooks

See the API Documentation for details.

Webhooks FAQs

Why aren't my webhooks firing?

Check that your webhook URL is valid and accessible. Verify webhooks are saved on the link or workspace settings. Note that webhooks only fire when clicks are recorded - excluded IPs or skipped crawlers won't trigger webhooks.

Why are some fields null in the webhook payload?

Some fields may be null if the information wasn't available (e.g., no referer), privacy settings prevented collection, or the click was from a bot (in which case bot_name will be populated instead).

Does Linkly retry failed webhook deliveries?

No. Webhooks are fire-and-forget. Failed deliveries are not retried, and Linkly does not track webhook delivery status. Webhook requests timeout after 5 seconds.

Does Linkly support postbacks for conversion tracking?

No. Linkly webhooks are outbound-only and fire when clicks occur. We cannot receive postback data from affiliate networks or ad platforms. For conversion tracking, use the destination platform's native tracking, pass a click ID via query parameter forwarding, or use our BigQuery integration to join click data with your conversion data.

Should I use webhooks or Make.com/Zapier?

For most automation use cases, our Make.com or Zapier integrations are easier to set up. They use webhooks under the hood but handle all the configuration automatically. Use custom webhooks when you need to send data to your own systems or require more control over the integration.

Yes. If you configure webhooks at both levels, both will fire when that link is clicked. This is useful if you want workspace-wide logging plus specific actions for certain links.

Track 1000 monthly clicks with all features included.

No credit card required