Update OG After Sharing
Before you start
- Have your link ID (from dashboard or API response)
- Prepare new image, title, or description
- Your
OGLI_API_KEY
ready
1) Update the link metadata
# cURL - Update title and image
curl -X PATCH https://api.ogli.sh/link/YOUR_LINK_ID \
-H "Authorization: Bearer $OGLI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "New Amazing Title",
"ogImage": "https://cdn.example.com/new-image.jpg?v=2"
}'
// Node.js
const response = await fetch(`https://api.ogli.sh/link/${linkId}`, {
method: "PATCH",
headers: {
"Authorization": `Bearer ${process.env.OGLI_API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
title: "New Amazing Title",
description: "Updated description that converts better",
ogImage: "https://cdn.example.com/new-image.jpg?v=2",
ogImageAlt: "Updated image description"
})
});
const updatedLink = await response.json();
2) Force cache refresh (important!)
Social platforms cache previews. Use these techniques:
Change the image URL
# Add version parameter to bust cache
Old: https://cdn.example.com/image.jpg
New: https://cdn.example.com/image.jpg?v=2
Use platform debug tools
- Facebook: Facebook Debugger
- Twitter/X: Card Validator
- LinkedIn: Post Inspector
3) Re-share to see changes
- Share your ogli.sh link again in a new post
- Existing posts will keep the old preview
- New shares will show the updated preview
What you can update
- ✅
title
- Social media title - ✅
description
- Preview description - ✅
ogImage
- Preview image URL - ✅
ogImageAlt
- Image alt text - ✅
twitterCard
- Twitter card type - ✅
targetUrl
- Where the link redirects - ✅
isActive
- Enable/disable the link
Pro tips
- A/B testing: Update image to test what converts better
- Seasonal updates: Change for holidays or events
- Fix typos: Correct mistakes without losing shares
- Version images: Always use
?v=X
for cache busting