/api/v1/linksCreate a link
Create a new short link in your workspace. Returns the full link detail object.
Bearer token. Format: Bearer YOUR_API_KEY
The destination URL that the short link redirects to.
Domain for the short URL. Must be a domain verified in your workspace (e.g. go.mycompany.com).
Custom slug for the short URL (e.g. my-campaign). Auto-generated if omitted.
Display name for the link shown in your dashboard.
Meta description used for social link previews.
OG image URL used for social link previews.
HTTP redirect type. Defaults to TEMPORARY_302.
Type of link. Defaults to URL.
Hide the destination URL from the browser address bar. Defaults to false.
Protect the link with a password. Visitors must enter it before being redirected.
Timestamp after which the link stops redirecting.
Maximum number of clicks before the link is automatically deactivated.
Array of tag IDs to attach to the link.
Append query parameters from the short URL to the destination URL. Defaults to false.
Block known bot and crawler traffic. Defaults to false.
UTM source parameter appended to the destination URL.
UTM medium parameter appended to the destination URL.
UTM campaign parameter appended to the destination URL.
UTM term parameter appended to the destination URL.
UTM content parameter appended to the destination URL.
Facebook/Meta Pixel ID for retargeting.
Google Analytics measurement ID.
Comma-separated webhook URLs called on each click.
curl -X POST https://app.brevr.io/api/v1/links \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/landing-page",
"domain": "go.mycompany.com",
"customSlug": "summer-sale",
"title": "Summer Sale",
"utmSource": "email",
"utmMedium": "cpc",
"utmCampaign": "summer-2024"
}'{
"link": {
"id": "clx1abc2def3ghi4",
"shortCode": "summer-sale",
"url": "https://example.com/landing-page?utm_source=email&utm_medium=cpc&utm_campaign=summer-2024",
"title": "Summer Sale",
"domain": "go.mycompany.com",
"linkType": "URL",
"isActive": true,
"clickCount": 0,
"createdAt": "2024-06-01T10:00:00.000Z",
"updatedAt": "2024-06-01T10:00:00.000Z",
"cloaked": false,
"redirectType": "TEMPORARY_302",
"workspaceId": "ws_abc123",
"tags": [],
"qrCode": null,
"createdBy": {
"id": "user_abc",
"name": "Jane Smith",
"email": "jane@mycompany.com"
},
"rules": []
}
}