We've made a few DX (Developer Experience) improvements to our API:
1. New externalId
prop for simplified link management
You can now set an externalId
prop when creating a short link to associate it with a link in your database. This lets you use your own link ID to retrieve or update the link, which eliminates the need to store the Dub-generated ID in your database.
Read this blog post to see it in action.
2. Arbitrary start
and end
parameters for analytics endpoints
All our analytics endpoints now support passing arbitrary start
and end
query parameters for retrieving analytics data within a specific time range. We will be adding support for this in our dashboard soon, but you can start using it now with the API.
Check out the API and SDK docs to learn more.
3. New upsert
method for efficient link creation
We added a new dub.links.upsert
method for you to create or update a link in one API call. With upsert
, you can shorten a URL once and all subsequent calls with that URL will return the same short link. This helps you optimize your links usage by not creating duplicate short links.