Linkly Webhooks API
Real-time push: subscribe an HTTPS endpoint to receive a POST for every click (and link.created / link.updated / link.deleted events).
Real-time push: subscribe an HTTPS endpoint to receive a POST for every click (and link.created / link.updated / link.deleted events).
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/linklyhq-com:linklyhq-com-webhooks-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Linkly URL Shortener Webhooks API
version: '1.3'
description: 'The Linkly URL shortener API (also known as a link shortener API) lets you create and manage short links, track clicks, configure custom domains, and subscribe to webhooks — all programmatically.
> **You don''t need to read this documentation to use the API.** The Linkly interface shows the exact API request inline whenever you create a link or pull analytics — just copy and paste it directly into your code or terminal.
Looking for step-by-step guides, tutorials, and FAQs? The Linkly API documentation covers a broader range of topics. This page is the complete endpoint reference.
## Authentication
All API requests require an API key. You can find your API key in your Linkly workspace settings.
The recommended way is to pass it as a Bearer token in the `Authorization` header:
```
Authorization: Bearer YOUR_API_KEY
```
You can also use HTTP Basic Auth, with your API key as the username and an empty password:
```
Authorization: Basic base64(YOUR_API_KEY:)
```
Or, for quick testing, pass it as the `api_key` query parameter. Prefer the header in production — query-string keys can leak into server logs, browser history, and `Referer` headers:
```
GET https://api.linklyhq.com/api/v1/workspaces?api_key=YOUR_API_KEY
```
A request with a missing or invalid API key returns `401`; a request for a workspace your key cannot access returns `404` (workspaces you don''t belong to are not distinguished from ones that don''t exist); plan- or permission-related failures return `403`. All errors share the JSON shape documented under **Errors** below.
## Base URL
```
https://api.linklyhq.com/api/v1
```
## Workspaces
Most endpoints are scoped to a **workspace**. Use `GET /workspaces` to list your available workspaces and retrieve their IDs.
## Rate Limits
API requests are rate-limited per API key. When you exceed the limit, the API returns `429 Too Many Requests`. Check the response body for your current usage and limit.
## Errors
Errors return the appropriate HTTP status code and a JSON body with a human-readable `error` message and a stable, machine-readable `code` you can branch on:
```json
{ "error": "Not authorized", "code": "unauthorized" }
```
| Status | `code` | Meaning |
| --- | --- | --- |
| `400` | `bad_request` | Missing or malformed parameters. |
| `401` | `unauthorized` | Missing or invalid API key. |
| `403` | `forbidden` | Your plan or permissions don''t allow this action. |
| `404` | `not_found` | The resource doesn''t exist, or your key can''t access it. |
| `429` | `rate_limit_exceeded` | You''ve exceeded a rate or usage limit. |
| `500` | `internal_error` | Something went wrong on our side. |
Validation failures return `400` and may include field-level details (e.g. `{ "slug": ["is invalid"] }`) in place of the envelope above.'
termsOfService: https://linklyhq.com/support/terms
contact:
name: Linkly Ltd
email: support@linklyhq.com
url: https://linklyhq.com/support
license:
name: Proprietary (Linkly Ltd)
url: https://linklyhq.com/support/terms
x-logo:
url: https://linklyhq.com/brand/linkly-logo.svg
altText: Linkly
backgroundColor: '#FFFFFF'
servers:
- url: https://api.linklyhq.com
description: Production
security:
- bearerAuth: []
- basicAuth: []
- apiKey: []
tags:
- name: Webhooks
description: 'Real-time push: subscribe an HTTPS endpoint to receive a POST for every click (and link.created / link.updated / link.deleted events).'
paths:
/api/v1/link/{link_id}/webhooks:
get:
callbacks: {}
deprecated: false
description: Get all webhook subscriptions for a specific link.
operationId: listLinkWebhooks
parameters:
- description: The ID of the link
example: 12345
in: path
name: link_id
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
description: List of webhook subscriptions
items:
properties:
id:
description: The webhook URL
example: https://hooks.zapier.com/hooks/catch/123456/abcdef/
type: string
type: object
title: WebhooksListResponse
type: array
example:
- id: https://hooks.example.com/linkly/clicks
description: Webhook list
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
description: Forbidden
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
description: Not found
security:
- apiKey: []
summary: List webhooks on a link
tags:
- Webhooks
x-linkly-docs: https://linklyhq.com/support/short-link-creation-api
post:
callbacks:
clickEvent:
'{$request.body#/url}':
post:
summary: Click / link event delivered to your endpoint
description: Linkly POSTs a JSON body to the subscribed URL for every click (event = "click"), and for link.created / link.updated / link.deleted. Respond 2xx within 10 seconds; non-2xx responses are retried with backoff.
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
event:
type: string
enum:
- click
- link.created
- link.updated
- link.deleted
link_id:
type: integer
workspace_id:
type: integer
link_url:
type: string
url:
type: string
timestamp:
type: string
format: date-time
country:
type: string
city:
type: string
browser:
type: string
platform:
type: string
device:
type: string
referer:
type: string
isp:
type: string
bot:
type: boolean
unique:
type: boolean
user_agent:
type: string
ip:
type: string
example:
event: click
link_id: 41657524
link_url: https://go.yourcompany.com/promo
url: https://www.example.com/summer
workspace_id: 42
timestamp: '2026-09-13T10:30:00Z'
country: GB
city: London
browser: Chrome
platform: iOS
device: mobile
referer: https://t.co/
isp: EE Limited
bot: false
unique: true
user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 19_0 like Mac OS X) ...
ip: 203.0.113.42
responses:
'200':
description: Acknowledged
deprecated: false
description: Subscribe a webhook URL to receive events for a specific link. The endpoint receives a `POST` for each `click`, plus `link.updated` and `link.deleted` for this link. Branch on the JSON `event` field; see the Webhooks section for payload shapes.
operationId: subscribeWebhookToLink
parameters:
- description: The ID of the link to subscribe to
example: 12345
in: path
name: link_id
required: true
schema:
type: integer
requestBody:
content:
application/json:
schema:
description: Request body for subscribing a webhook
properties:
url:
description: The webhook URL to receive click notifications
example: https://www.example.com/summer
format: uri
type: string
required:
- url
title: WebhookSubscribeRequest
type: object
example:
url: https://hooks.example.com/linkly/clicks
description: Webhook subscription
required: true
responses:
'200':
content:
application/json:
schema:
description: Response after subscribing a webhook
properties:
id:
description: The webhook URL (used as the hook ID for unsubscribing)
example: https://hooks.zapier.com/hooks/catch/123456/abcdef/
type: string
title: WebhookSubscribeResponse
type: object
example:
id: https://hooks.example.com/linkly/clicks
description: Webhook subscribed
'400':
content:
application/json:
schema:
description: Error response
properties:
error:
example: Missing or invalid parameters
type: string
title: WebhookErrorResponse
type: object
description: Bad request
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
description: Forbidden
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
description: Not found
security:
- apiKey: []
summary: Subscribe a webhook to one link
tags:
- Webhooks
x-linkly-docs: https://linklyhq.com/support/short-link-creation-api
/api/v1/link/{link_id}/webhooks/{hook_id}:
delete:
callbacks: {}
deprecated: false
description: Remove a webhook subscription from a link. The hook_id is the URL-encoded webhook URL.
operationId: unsubscribeWebhookFromLink
parameters:
- description: The ID of the link
example: 12345
in: path
name: link_id
required: true
schema:
type: integer
- description: The webhook URL (URL-encoded)
example: https%3A%2F%2Fhooks.example.com%2Fabc123
in: path
name: hook_id
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
type: string
example: Webhook unsubscribed.
description: Webhook unsubscribed
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
description: Forbidden
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
description: Not found
security:
- apiKey: []
summary: Unsubscribe a link webhook
tags:
- Webhooks
x-linkly-docs: https://linklyhq.com/support/short-link-creation-api
/api/v1/workspace/{workspace_id}/webhooks:
get:
callbacks: {}
deprecated: false
description: Get all webhook subscriptions for a specific workspace.
operationId: listWorkspaceWebhooks
parameters:
- description: The ID of the workspace
example: 42
in: path
name: workspace_id
required: true
schema:
type: integer
responses:
'200':
content:
application/json:
schema:
description: List of webhook subscriptions
items:
properties:
id:
description: The webhook URL
example: https://hooks.zapier.com/hooks/catch/123456/abcdef/
type: string
type: object
title: WebhooksListResponse
type: array
example:
- id: https://hooks.example.com/linkly/clicks
description: Webhook list
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
description: Forbidden
security:
- apiKey: []
summary: List workspace webhooks
tags:
- Webhooks
x-linkly-docs: https://linklyhq.com/support/short-link-creation-api
post:
callbacks:
clickEvent:
'{$request.body#/url}':
post:
summary: Click / link event delivered to your endpoint
description: Linkly POSTs a JSON body to the subscribed URL for every click (event = "click"), and for link.created / link.updated / link.deleted. Respond 2xx within 10 seconds; non-2xx responses are retried with backoff.
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
event:
type: string
enum:
- click
- link.created
- link.updated
- link.deleted
link_id:
type: integer
workspace_id:
type: integer
link_url:
type: string
url:
type: string
timestamp:
type: string
format: date-time
country:
type: string
city:
type: string
browser:
type: string
platform:
type: string
device:
type: string
referer:
type: string
isp:
type: string
bot:
type: boolean
unique:
type: boolean
user_agent:
type: string
ip:
type: string
example:
event: click
link_id: 41657524
link_url: https://go.yourcompany.com/promo
url: https://www.example.com/summer
workspace_id: 42
timestamp: '2026-09-13T10:30:00Z'
country: GB
city: London
browser: Chrome
platform: iOS
device: mobile
referer: https://t.co/
isp: EE Limited
bot: false
unique: true
user_agent: Mozilla/5.0 (iPhone; CPU iPhone OS 19_0 like Mac OS X) ...
ip: 203.0.113.42
responses:
'200':
description: Acknowledged
deprecated: false
description: Subscribe a webhook URL to receive events for every link in the workspace. The endpoint receives a `POST` for each `click`, `link.created`, `link.updated`, and `link.deleted`. Branch on the JSON `event` field; see the Webhooks section for payload shapes.
operationId: subscribeWebhookToWorkspace
parameters:
- description: The ID of the workspace to subscribe to
example: 42
in: path
name: workspace_id
required: true
schema:
type: integer
requestBody:
content:
application/json:
schema:
description: Request body for subscribing a webhook
properties:
url:
description: The webhook URL to receive click notifications
example: https://www.example.com/summer
format: uri
type: string
required:
- url
title: WebhookSubscribeRequest
type: object
example:
url: https://hooks.example.com/linkly/clicks
description: Webhook subscription
required: true
responses:
'200':
content:
application/json:
schema:
description: Response after subscribing a webhook
properties:
id:
description: The webhook URL (used as the hook ID for unsubscribing)
example: https://hooks.zapier.com/hooks/catch/123456/abcdef/
type: string
title: WebhookSubscribeResponse
type: object
example:
id: https://hooks.example.com/linkly/clicks
description: Webhook subscribed
'400':
content:
application/json:
schema:
description: Error response
properties:
error:
example: Missing or invalid parameters
type: string
title: WebhookErrorResponse
type: object
description: Bad request
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
description: Forbidden
security:
- apiKey: []
summary: Subscribe a webhook to all clicks in a workspace
tags:
- Webhooks
x-linkly-docs: https://linklyhq.com/support/short-link-creation-api
/api/v1/workspace/{workspace_id}/webhooks/{hook_id}:
delete:
callbacks: {}
deprecated: false
description: Remove a webhook subscription from a workspace. The hook_id is the URL-encoded webhook URL.
operationId: unsubscribeWebhookFromWorkspace
parameters:
- description: The ID of the workspace
example: 42
in: path
name: workspace_id
required: true
schema:
type: integer
- description: The webhook URL (URL-encoded)
example: https%3A%2F%2Fhooks.example.com%2Fabc123
in: path
name: hook_id
required: true
schema:
type: string
responses:
'200':
content:
application/json:
schema:
type: string
example: Webhook unsubscribed.
description: Webhook unsubscribed
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
description: Forbidden
security:
- apiKey: []
summary: Unsubscribe a workspace webhook
tags:
- Webhooks
x-linkly-docs: https://linklyhq.com/support/short-link-creation-api
components:
schemas:
ApiError:
description: Response schema for API error
example:
error: Something went wrong
properties:
error:
type: string
title: ApiError
type: object
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: 'Authorization: Bearer <API key>. Find the key under Workspace settings > API in app.linklyhq.com.'
x-linkly-preferred: true
basicAuth:
type: http
scheme: basic
description: API key as the username, empty password.
apiKey:
type: apiKey
in: query
name: api_key
description: Query-string fallback for quick tests only.
externalDocs:
description: Linkly API guides and tutorials
url: https://linklyhq.com/support/short-link-creation-api
x-tagGroups:
- name: Links & Domains
tags:
- Links
- Domains
- Workspaces
- name: Webhooks
tags:
- Webhooks
- name: Reports
tags:
- Clicks
x-ipaas:
vendor: Linkly Ltd
website: https://linklyhq.com
support: support@linklyhq.com
brandColor: '#009EFF'
logoSvg: https://linklyhq.com/brand/linkly-logo.svg
iconSvg: https://linklyhq.com/brand/linkly-icon.svg
iconPng512: https://linklyhq.com/brand/linkly-icon.png
authTest: GET /api/v1/workspaces (200 with a JSON array proves the key)
existingIntegrations:
- Zapier
- Make
- Pipedream
- n8n
- Microsoft Power Automate (independent publisher, in review)
- MCP server
- Claude and ChatGPT connectors
suggestedTriggers:
- name: New Click
type: webhook
subscribe: POST /api/v1/workspace/{workspace_id}/webhooks
unsubscribe: DELETE /api/v1/workspace/{workspace_id}/webhooks/{hook_id}
filter: event == "click"
- name: New Click on Link
type: webhook
subscribe: POST /api/v1/link/{link_id}/webhooks
unsubscribe: DELETE /api/v1/link/{link_id}/webhooks/{hook_id}
filter: event == "click"
- name: New Link
type: webhook
subscribe: POST /api/v1/workspace/{workspace_id}/webhooks
filter: event == "link.created"
- name: New Link (polling)
type: polling
endpoint: GET /api/v1/workspace/{workspace_id}/list_links?sort_by=id&sort_dir=desc&page_size=50
dedupe: links[].id
suggestedActions:
- createOrUpdateLink
- getWorkspaceLink
- listLinks
- deleteLink
- getClicks
- getClickCounters
- listDomains
- createConversion
- listWorkspaces