Update a link
PUT/api/links/{id}
Replaces every field of one of the app's links, so appId must be the link's app. fullUrl, shortUrl and customShortCode follow the same rules as when creating a link. A link of another app answers 403. A sandbox key changes only sandbox links, so a live link answers 404 to it.
Request
Send your app’s API key in the Api-Key header. See Authentication.
Path parameters
idintegerrequired
The link’s id.
Body
appIdintegerrequired
The link’s app. It must be the app of the API key you send.
fullUrlstringrequired
Where the link leads inside your app: a path such as /products/1234, or a URL on your app’s link host or on one of its custom domains. The path and query are kept, and the host becomes {app}.dev.thedbl.ink.
at least 1 character
titlestringrequired
The title of the link’s preview page and social cards. Required, but may be empty.
descriptionstringrequired
The description on the preview page and social cards. Required, but may be empty.
imageUrlstringrequired
An http(s) image for the preview page and social cards. Required, but may be empty.
fallbackUrlstringrequired
Where the preview page sends desktop browsers, and phones whose platform has no store listing for your app. Required, but may be empty.
customShortCodestring or nulloptional
Your own short code: 1 to 64 characters without spaces or any of / ? # % \. Leave it out for a generated 8-character code. A code already in use answers 400.
Response
200 with this body. For errors, see Errors.
appIdinteger or null
The app the link belongs to.
fullUrlstring or null
The link’s full URL: https://{app}.dev.thedbl.ink plus the path and query you sent.
titlestring or null
As sent.
descriptionstring or null
As sent.
imageUrlstring or null
As sent.
fallbackUrlstring or null
As sent.
customShortCodestring or null
Always null in responses. The code is the last path segment of shortUrl.
idinteger
The link’s id.
shortUrlstring or null
The short URL to share: https://{app}.dev.thedbl.ink/{code}, or on your custom domain when fullUrl used it.
iosBundleIdstring or null
Your app’s iOS bundle ID.
androidPackageNamestring or null
Your app’s Android package name.
isSandboxboolean
true for a sandbox link. Live links’ responses leave the field out.
{
"appId": 42,
"fullUrl": "https://demo.dev.thedbl.ink/products/1234",
"title": "Spring sale",
"description": "Up to 50% off this week only.",
"imageUrl": "https://example.com/images/spring-sale.png",
"fallbackUrl": "https://example.com/spring-sale",
"customShortCode": null,
"id": 1001,
"shortUrl": "https://demo.dev.thedbl.ink/Xy3kP9aQ",
"iosBundleId": "com.example.demo",
"androidPackageName": "com.example.demo"
}Example
curl -X PUT 'https://dev.thedbl.ink/api/links/1001' \
-H 'Api-Key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"appId": 42,
"fullUrl": "/products/1234",
"title": "Spring sale, extended",
"description": "Up to 50% off this week only.",
"imageUrl": "https://example.com/images/spring-sale.png",
"fallbackUrl": "https://example.com/spring-sale"
}'Try it
Sends a real request to https://dev.thedbl.ink from your browser. Use your app’s sandbox API key, which starts with sandbox_, while you try things out. It replaces every field of the link.
https://dev.thedbl.ink/api/links/%7Bid%7D