Hi
Product
Features
Security
Difference
Limits
FAQ
Pricing
Doc & Api
Get started free
NEXT-GEN LINK INFRASTRUCTURE

Stop guessing.
Start improving.

Deploy custom domains, ISO country routing, A/B split testing, PathLock™ PIN gates, and deterministic revenue attribution in under two minutes.

Get startedAccess our plans
Platform
  • Country & Device Routing
  • Weighted A/B Testing
  • Revenue Attribution (EPC)
  • Dynamic QR Studio
Security & Access
  • PathLock™ PIN Protection
  • Branded URL Masking
  • Click Limits & Expiration
  • Custom OpenGraph Cards
Developers
  • REST API & SDK Quickstart
  • Real-Time Click Telemetry
  • Signed Webhooks & Events
  • Full Documentation Hub
Legal & Trust
  • Privacy Policy (GDPR)
  • Terms of Service
  • No-Refund Policy
  • Dashboard Overview
LShorter Logo
LShorter© 2026 LShorter Inc.
Built on Cloudflare Edge Network
All 310+ Cloudflare Edge PoPs Operational
Privacy•Terms•Refunds
LShorter Logo
LShorter
HiHiProductProductFeaturesFeaturesSecuritySecurityDifferenceDifferenceLimitsLimitsFAQFAQPricingPricing
Doc & ApiDoc & Api
SDK & API Reference
Endpoints REST, clés Bearer et SDK TypeScript
Routage intelligent & Géo
Ciblage pays, OS mobile et redirection Edge
PathLock™ & Sécurité
Protection par code PIN, expiration et masquage
Télémétrie & Analytics
Flux de clics en direct, attribution et webhooks
RESSOURCESDocumentation

Documentation

Get started
LShorter Logo
LShorter
All guides & documentation

Social Sharing & Dynamic Open Graph API

Customize how your links appear when shared on WhatsApp, Twitter/X, LinkedIn, Telegram, and Facebook.

3 min read•Official Edge Documentation
Social Sharing & Dynamic Open Graph API

Overview & Architecture

When a shortened link is shared across messaging apps or social networks (WhatsApp, LinkedIn, Twitter/X, Discord, Slack), web crawlers scrape Open Graph tags to render a rich link preview card.

LShorter dynamically serves custom Open Graph metadata on the fly from Cloudflare's Edge network, guaranteeing immediate, crisp previews across all distribution channels.

Key Principles

Core architectural pillars ensuring high performance, isolation, and security.

01Custom Banners and Titles
Set catchy titles, tailored descriptions, and HD 1200x630px images for your campaign.
02Twitter Cards & Instant Messengers
Native summary_large_image support for Twitter/X, WhatsApp, and Telegram.
03High-Speed CDN Hosting
Upload banner assets directly to our globally distributed CDN with edge caching.
SDK Integration

Implementation & SDK Examples

Ready-to-use TypeScript code snippets and configuration examples for your integrations.

1. Creating a Link with Open Graph Metadata

Specify metaTitle, ogDescription, and ogImage properties during link creation:

create-og-link.ts
typescript
12345678910111213
import { lshorter } from "@/lib/lshorter";
const link = await lshorter.links.create({
url: "https://my-product.com/special-deal",
slug: "discover-2026",
metaTitle: "Discover Our 2026 Collection — Limited Edition",
ogDescription: "Get 20% off your first order today with promo code WELCOME.",
ogImage: "https://my-product.com/images/og-banner-1200x630.jpg",
tags: ["social-media", "og-campaign"],
});
console.log("Social-optimized short link created:", link.shortUrl);
// Output: https://lsho.cc/discover-2026
REST API Specification

API Endpoints & Reference

Direct HTTP request methods, parameters schema, authentication, and responses.

PATCH

Update Open Graph Social Metadata

Bearer <API_KEY>60 to 1,400 req/min (by plan)
https://lsho.cc/api/v1/links/:id/opengraph

Updates the Open Graph title, description, and preview banner image for social crawlers.

Path Parameters

ParameterTypeRequiredDescriptionExample
idstringRequiredShort link slug or ID.discover-2026

Request Body Parameters

ParameterTypeRequiredDescriptionExample
metaTitlestringOptionalSocial card title (max 70 chars).Discover Our 2026 Collection — Limited Edition
ogDescriptionstringOptionalSocial card description (max 200 chars).Get 20% off your first order today with promo code WELCOME.
ogImagestring (url)OptionalDirect image URL with 1.91:1 aspect ratio (recommended 1200x630px).https://my-product.com/images/og-banner.jpg
twitterCardstring (summary | summary_large_image)OptionalTwitter card layout format.Default: summary_large_imagesummary_large_image

Request Examples

bash
123456789
curl -X PATCH "https://lsho.cc/api/v1/links/discover-2026/opengraph" \
-H "Authorization: Bearer $LSHORTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"metaTitle": "Discover Our 2026 Collection — Limited Edition",
"ogDescription": "Get 20% off your first order today with promo code WELCOME.",
"ogImage": "https://my-product.com/images/og-banner.jpg",
"twitterCard": "summary_large_image"
}'

Response Payload

200 OKOpen Graph metadata updated and edge cached.
response-200.json
json
123456789
{
"id": "link_og_481902",
"slug": "discover-2026",
"metaTitle": "Discover Our 2026 Collection — Limited Edition",
"ogDescription": "Get 20% off your first order today with promo code WELCOME.",
"ogImage": "https://my-product.com/images/og-banner.jpg",
"twitterCard": "summary_large_image",
"status": "active"
}

Open Graph Metadata Structure

Enriched tags served to social media preview crawlers:

response.json
json
1234567891011
{
"id": "link_og_481902",
"slug": "discover-2026",
"shortUrl": "https://lsho.cc/discover-2026",
"targetUrl": "https://my-product.com/special-deal",
"metaTitle": "Discover Our 2026 Collection — Limited Edition",
"ogDescription": "Get 20% off your first order today with promo code WELCOME.",
"ogImage": "https://my-product.com/images/og-banner-1200x630.jpg",
"twitterCard": "summary_large_image",
"status": "active"
}

Recommended Best Practices

Expert tips to maximize performance, resilience, and link security.

Recommendation 01

Use 1200 x 630 pixel images with a 1.91:1 aspect ratio for optimal sharpness across Facebook, LinkedIn, and Twitter.

Recommendation 02

Keep Open Graph titles under 60 characters to prevent truncation on mobile screens.

Recommendation 03

Validate previews with official debugging tools (Twitter Card Validator, LinkedIn Post Inspector) prior to publishing.

Previous guidePercentage Routing & A/B Testing APINext guidePathLock™ Restricted Browsing & Funnel Isolation

Related Guides & APIs

Quickstart & REST API Reference
Quickstart & REST API Reference
Integrate intelligent edge link shortening, real-time analytics, and conversion tracking with our high-performance REST API and TypeScript SDK.
Read guide & API
Dynamic Routing & Edge Geolocation
Dynamic Routing & Edge Geolocation
Redirect visitors to contextual URLs based on their origin country or continent with ultra-low latency.
Read guide & API