Links
Links are the core resource in Brevr. Each link has a short URL that redirects to a destination, with optional tracking, expiration, and customization settings.
POST /api/v1/links — Create a new short link with full customization options.
GET /api/v1/links — Retrieve a paginated, filterable list of links.
GET /api/v1/links/:id — Fetch full details for a single link.
PATCH /api/v1/links/:id — Partially update a link. Null clears a field.
DELETE /api/v1/links/:id — Permanently remove a link.
POST /api/v1/links/bulk — Create multiple links in a single request.
The Link Object
{
"id": "clx1abc2def3ghi4",
"shortCode": "my-campaign",
"url": "https://example.com/landing-page",
"title": "Summer Campaign",
"domain": "go.mycompany.com",
"linkType": "URL",
"isActive": true,
"clickCount": 1842,
"createdAt": "2024-06-01T10:00:00.000Z",
"tags": [
{
"tag": {
"id": "tag_123",
"name": "summer",
"color": "#3b82f6"
}
}
],
"qrCode": null
}Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the link |
shortCode | string | The slug portion of the short URL |
url | string | The destination URL |
title | string | null | Display name for the link |
domain | string | Domain used for the short URL |
linkType | string | One of URL, MAILTO, TEL, SMS |
isActive | boolean | Whether the link is accepting clicks |
clickCount | number | Total number of clicks recorded |
createdAt | string | ISO 8601 timestamp |
tags | array | Tags attached to this link |
qrCode | object | null | Associated QR code summary, if any |
The Link Detail Object
Returned by Get Link and Create Link. Extends the base link object with:
| Field | Type | Description |
|---|---|---|
description | string | null | Meta description for social previews |
image | string | null | OG image URL |
password | string | null | Password protecting the link (hashed — not returned in plaintext) |
expiresAt | string | null | ISO 8601 expiry timestamp |
maxClicks | number | null | Maximum clicks before the link deactivates |
cloaked | boolean | Whether the destination URL is hidden |
redirectType | string | HTTP redirect type: PERMANENT_301 or TEMPORARY_302 |
workspaceId | string | ID of the owning workspace |
updatedAt | string | ISO 8601 last-updated timestamp |
createdBy | object | { id, name, email } of the creator |
rules | array | Smart routing rules attached to this link |
metaPixelId | string | null | Facebook/Meta Pixel ID |
googleTagId | string | null | Google Analytics measurement ID |
gtmContainerId | string | null | Google Tag Manager container ID |
headTags | string | null | Custom HTML injected into <head> |
bodyTags | string | null | Custom HTML injected before </body> |
forwardParameters | boolean | Whether query params from the short URL are appended to the destination |
blockBots | boolean | Whether bot traffic is blocked |
skipSocialCrawlerTracking | boolean | Whether social media crawler visits count as clicks |
hideReferrer | boolean | Whether the referring URL is hidden from the destination |
webhookUrls | string | null | Comma-separated webhook URLs to notify on click |
Last updated on