# DX Improvements

We've made a few DX improvements to our API.

- Published: May 12, 2024
- Authors: [Steven Tey](https://dub.co/authors/steven)
- Source: https://dub.co/changelog/dx-improvements

We've made a few DX (Developer Experience) improvements to our [API](https://dub.co/docs/api-reference/introduction):

**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](https://dub.co/blog/product-discovery-platform#part-2-programmatically-creating-and-editing-links) 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](https://dub.co/docs/api-reference/endpoint/retrieve-analytics) and [SDK](https://dub.co/docs/sdks/typescript/analytics/retrieve) 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.

Check out the [API](https://dub.co/docs/api-reference/endpoint/upsert-a-link) and [SDK](https://dub.co/docs/sdks/typescript/links/upsert) docs to learn more.

See [the full changelog](https://dub.co/changelog.md).
