# Announcing the Dub API General Availability (GA)

We're excited to announce that the Dub API is now generally available, with native SDKs in the languages you love.

- Published: July 9, 2024
- Last updated: January 22, 2025
- Authors: [Kiran Krishnan](https://dub.co/authors/kiran), [Steven Tey](https://dub.co/authors/steven)
- Category: [Engineering](https://dub.co/blog/category/engineering)
- Source: https://dub.co/blog/announcing-dub-api

Ever since we soft launched [our API](https://dub.co/docs/api-reference/introduction) a few months ago, we've been working hard to improve its stability & developer experience. Some of the improvements include:

1. [**Workspace API keys**](https://dub.co/blog/workspace-api-keys): We simplified our API DX by moving keys to the workspace-level.
2. [**Restricted scopes**](https://dub.co/blog/workspace-api-keys#1-restricted-scopes): You can now set fine-grained permission scopes for your API keys.
3. [**Machine users**](https://dub.co/blog/workspace-api-keys#2-machine-users): You can also create machine users to associate API keys with.

Our API infrastructure has been production-ready for months now, but we chose to keep the "beta" label as we iterated our API syntax and functionality.

In fact, companies like [Raycast](https://dub.co/customers/raycast), [Opensauced](https://dub.co/customers/opensauced), [Midday](https://dub.co/customers/midday), and [Whop](http://whop.com/) have already been leveraging our API in production to shorten links programmatically. Some of our most active API users are currently generating over _thousands_ of links per day.

Today, we're confident in our ability to support any production-level link management use case. Whether you're running a SMS campaign with _millions_ of short links or an ad campaign with _billions_ of clicks, we've got you covered.

> Dub's link infrastructure & [analytics](https://dub.co/analytics) has helped us gain
> valuable insights into the link-sharing use case of Ray.so. And all of it with
> just a few lines of code.
>
> Thomas Paul Mann, CEO & Co-Founder, Raycast

## Native SDKs in 4 languages

With the GA launch, we're also excited to unveil native SDKs in 4 different languages:

This makes it much easier for developers to integrate Dub's link infrastructure into their applications, without needing to reach for different fetch libraries in their respective environments.

We've also created [quickstart guides](https://dub.co/docs/quickstart/typescript) for each of these languages, as well as [code examples](https://github.com/dubinc/examples) to get you started. For example, here's how you can create a link in TypeScript, Python, Ruby, and Go:

**TypeScript**

```ts
import { Dub } from "dub"

const dub = new Dub({ token: "DUB_API_KEY" })

const { shortLink } = await dub.links.create({ url: "https://dub.co" })
```

**Python**

```python
from dub import Dub

d = Dub(
    token="DUB_API_KEY"
)

d.links.create(request={
    "url": "https://google.com"
})`
```

**Ruby**

```ruby
require "dub"

s = ::OpenApiSDK::Dub.new
s.config_security(
  ::OpenApiSDK::Shared::Security.new(
    token: "DUB_API_KEY",
  )
)

s.links.create(
  ::OpenApiSDK::Operations::CreateLinkRequest.new(
    request_body: ::OpenApiSDK::Operations::CreateLinkRequestBody.new(
      url: "https://google.com"
    )
  )
)
```

**Go**

```go
s := dub.New(
  dub.WithSecurity("DUB_API_KEY")
)

var request *operations.CreateLinkRequestBody = &operations.CreateLinkRequestBody{
  URL:        "https://google.com",
}

ctx := context.Background()
res, err := s.Links.Create(ctx, request)
```

## Example applications

To show you the potential of Dub, we've also created a collection of [open-source examples](https://dub.co/docs/examples).

For example, we recently built [OSS Gallery](https://oss.gallery), which shows how you can generate short links on the fly and display real-time click analytics for those links directly inside your application:

[https://github.com/dubinc/oss-gallery](https://github.com/dubinc/oss-gallery)

[Raycast](https://dub.co/customers/raycast) also recently open-sourced [Ray.so](https://ray.so), where they use Dub to generate short links for easy sharing & analytics:

[https://github.com/raycast/ray-so/blob/main/app/api/shorten-url/route.ts](https://github.com/raycast/ray-so/blob/main/app/api/shorten-url/route.ts)

## What's next?

We're incredibly excited for you to try out the new [Dub API](https://dub.co/docs/api-reference/introduction) and [SDKs](https://dub.co/docs/sdks/overview).

This is just the beginning. Here are some of the features we're working on next:

- **OAuth Flow**: We're currently working on an OAuth flow for you to easily build integrations with Dub – instead of manually creating API keys and entering them into your application, users can "Sign in with Dub" in 1-click.
- **Integrations Marketplace**: Once you've built your integration, you can submit it to the Dub Integrations Marketplace to share it with the Dub community.

We're looking forward to hearing your feedback – feel free to [send us an email](mailto:support@dub.co?subject=Feedback%20for%20Dub%20API%20General%20Availability) or [tweet at us](https://twitter.com/dubdotco)!

## Related articles

- [Introducing Workspace API Keys](https://dub.co/blog/workspace-api-keys.md)
- [Using Zod to validate Next.js API Route Handlers](https://dub.co/blog/zod-api-validation.md)

See [all blog posts](https://dub.co/blog.md).
