The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Move docs to separate repo
Steven Tey54e9b2e688f2
diff --git a/.gitignore b/.gitignoreindex ecd4e2d4e2..a232796ce0 100644--- a/.gitignore+++ b/.gitignore@@ -38,7 +38,6 @@ next-env.d.ts# miscellaneous/pages/api/scripts*-apps/docs/openapi.jsonpackages/stripe-app/.build/*.react-email.contentlayerdiff --git a/.prettierignore b/.prettierignoreindex dbb84aa39a..5203ec8c73 100644--- a/.prettierignore+++ b/.prettierignore@@ -2,5 +2,4 @@ node_modulespnpm-lock.yaml.next.turbo-dist-apps/docs/api-reference/endpoint/bulk-create-links.mdx\ No newline at end of file+dist\ No newline at end of filediff --git a/apps/docs/api-reference/endpoint/bulk-create-links.mdx b/apps/docs/api-reference/endpoint/bulk-create-links.mdxdeleted file mode 100644index 68c81e6cd7..0000000000--- a/apps/docs/api-reference/endpoint/bulk-create-links.mdx+++ /dev/null@@ -1,10 +0,0 @@-----openapi: post /links/bulk-og:title: 'Bulk create links with the Dub.co API - API Reference'------<Warning>- Bulk link creation does not support the following features: [Link- cloaking](https://dub.co/help/article/link-cloaking),- [Custom social media cards](https://dub.co/help/article/custom-social-media-cards)-</Warning>\ No newline at end of filediff --git a/apps/docs/api-reference/endpoint/bulk-update-links.mdx b/apps/docs/api-reference/endpoint/bulk-update-links.mdxdeleted file mode 100644index 034aeed762..0000000000--- a/apps/docs/api-reference/endpoint/bulk-update-links.mdx+++ /dev/null@@ -1,16 +0,0 @@-----openapi: patch /links/bulk-og:title: "Bulk update links with the Dub.co API - API Reference"------This endpoint lets you update up to 100 links **with the same data**.--Some potential use cases:--- Tagging multiple links at once-- Setting the same expiration date for multiple links-- Updating UTM parameters for multiple links--<Warning>- You cannot update the domain or key of a link with this endpoint.-</Warning>diff --git a/apps/docs/api-reference/endpoint/create-a-domain.mdx b/apps/docs/api-reference/endpoint/create-a-domain.mdxdeleted file mode 100644index e251faefee..0000000000--- a/apps/docs/api-reference/endpoint/create-a-domain.mdx+++ /dev/null@@ -1,4 +0,0 @@-----openapi: post /domains-og:title: "Create a domain for a workspace with the Dub.co API - API Reference"----diff --git a/apps/docs/api-reference/endpoint/create-a-new-link.mdx b/apps/docs/api-reference/endpoint/create-a-new-link.mdxdeleted file mode 100644index 3f0255623f..0000000000--- a/apps/docs/api-reference/endpoint/create-a-new-link.mdx+++ /dev/null@@ -1,4 +0,0 @@-----openapi: post /links-og:title: "Create a new link with the Dub.co API - API Reference"----diff --git a/apps/docs/api-reference/endpoint/create-a-new-tag.mdx b/apps/docs/api-reference/endpoint/create-a-new-tag.mdxdeleted file mode 100644index 73cb8f8707..0000000000--- a/apps/docs/api-reference/endpoint/create-a-new-tag.mdx+++ /dev/null@@ -1,4 +0,0 @@-----openapi: post /tags-og:title: "Create a new tag with the Dub.co API - API Reference"----diff --git a/apps/docs/api-reference/endpoint/delete-a-domain.mdx b/apps/docs/api-reference/endpoint/delete-a-domain.mdxdeleted file mode 100644index 6846f741c9..0000000000--- a/apps/docs/api-reference/endpoint/delete-a-domain.mdx+++ /dev/null@@ -1,4 +0,0 @@-----openapi: delete /domains/{slug}-og:title: "Delete a domain from the workspace with the Dub.co API - API Reference"----diff --git a/apps/docs/api-reference/endpoint/delete-a-link.mdx b/apps/docs/api-reference/endpoint/delete-a-link.mdxdeleted file mode 100644index 5a6a691221..0000000000--- a/apps/docs/api-reference/endpoint/delete-a-link.mdx+++ /dev/null@@ -1,4 +0,0 @@-----openapi: delete /links/{linkId}-og:title: "Delete a link with the Dub.co API - API Reference"----diff --git a/apps/docs/api-reference/endpoint/retrieve-a-link.mdx b/apps/docs/api-reference/endpoint/retrieve-a-link.mdxdeleted file mode 100644index 11a6db0972..0000000000--- a/apps/docs/api-reference/endpoint/retrieve-a-link.mdx+++ /dev/null@@ -1,10 +0,0 @@-----openapi: get /links/info-og:title: "Get link info with the Dub.co API - API Reference"------You can retrieve a link by providing one of the following as a query parameter:--- `domain` and `key`.-- `linkId`.-- `externalId`.diff --git a/apps/docs/api-reference/endpoint/retrieve-a-list-of-domains.mdx b/apps/docs/api-reference/endpoint/retrieve-a-list-of-domains.mdxdeleted file mode 100644index a0702727f4..0000000000--- a/apps/docs/api-reference/endpoint/retrieve-a-list-of-domains.mdx+++ /dev/null@@ -1,4 +0,0 @@-----openapi: get /domains-og:title: "Get list of domains associated with the workspace with the Dub.co API - API Reference"----diff --git a/apps/docs/api-reference/endpoint/retrieve-a-list-of-links.mdx b/apps/docs/api-reference/endpoint/retrieve-a-list-of-links.mdxdeleted file mode 100644index f2fc71f77f..0000000000--- a/apps/docs/api-reference/endpoint/retrieve-a-list-of-links.mdx+++ /dev/null@@ -1,4 +0,0 @@-----openapi: get /links-og:title: "Get list of links with the Dub.co API - API Reference"----diff --git a/apps/docs/api-reference/endpoint/retrieve-a-list-of-tags.mdx b/apps/docs/api-reference/endpoint/retrieve-a-list-of-tags.mdxdeleted file mode 100644index 6ed21dc937..0000000000--- a/apps/docs/api-reference/endpoint/retrieve-a-list-of-tags.mdx+++ /dev/null@@ -1,4 +0,0 @@-----openapi: get /tags-og:title: "Get list of tags with the Dub.co API - API Reference"----diff --git a/apps/docs/api-reference/endpoint/retrieve-a-qr-code.mdx b/apps/docs/api-reference/endpoint/retrieve-a-qr-code.mdxdeleted file mode 100644index d63888be56..0000000000--- a/apps/docs/api-reference/endpoint/retrieve-a-qr-code.mdx+++ /dev/null@@ -1,5 +0,0 @@-----title: Retrieve a QR code-og:title: "Get a QR code with the Dub.co API - API Reference"-openapi: get /qr----diff --git a/apps/docs/api-reference/endpoint/retrieve-a-workspace.mdx b/apps/docs/api-reference/endpoint/retrieve-a-workspace.mdxdeleted file mode 100644index baf169a94b..0000000000--- a/apps/docs/api-reference/endpoint/retrieve-a-workspace.mdx+++ /dev/null@@ -1,4 +0,0 @@-----openapi: get /workspaces/{idOrSlug}-og:title: "Get workspace info with the Dub.co API - API Reference"----diff --git a/apps/docs/api-reference/endpoint/retrieve-analytics.mdx b/apps/docs/api-reference/endpoint/retrieve-analytics.mdxdeleted file mode 100644index 4e3f88ac4f..0000000000--- a/apps/docs/api-reference/endpoint/retrieve-analytics.mdx+++ /dev/null@@ -1,10 +0,0 @@-----title: Retrieve analytics-og:title: "Retrieve analytics for a link, a domain, or the authenticated workspace. - API Reference"-openapi: get /analytics------<Note>- Analytics endpoints require a [Pro plan](https://d.to/pro) subscription or- higher.-</Note>diff --git a/apps/docs/api-reference/endpoint/retrieve-metatags.mdx b/apps/docs/api-reference/endpoint/retrieve-metatags.mdxdeleted file mode 100644index 0bc0651241..0000000000--- a/apps/docs/api-reference/endpoint/retrieve-metatags.mdx+++ /dev/null@@ -1,3 +0,0 @@-----openapi: get /metatags----diff --git a/apps/docs/api-reference/endpoint/retrieve-number-of-links.mdx b/apps/docs/api-reference/endpoint/retrieve-number-of-links.mdxdeleted file mode 100644index 6c2dc63e1e..0000000000--- a/apps/docs/api-reference/endpoint/retrieve-number-of-links.mdx+++ /dev/null@@ -1,5 +0,0 @@-----openapi: get /links/count-og:title: "Get the links count with the Dub.co API - API Reference"-description: "Retrieve the number of links for the authenticated workspace. The provided query parameters allow filtering the returned links."----diff --git a/apps/docs/api-reference/endpoint/track-customer.mdx b/apps/docs/api-reference/endpoint/track-customer.mdxdeleted file mode 100644index d20cfb0227..0000000000--- a/apps/docs/api-reference/endpoint/track-customer.mdx+++ /dev/null@@ -1,4 +0,0 @@-----openapi: post /track/customer-og:title: "Track a customer with the Dub.co API - API Reference"----diff --git a/apps/docs/api-reference/endpoint/track-lead.mdx b/apps/docs/api-reference/endpoint/track-lead.mdxdeleted file mode 100644index aeb4d3703c..0000000000--- a/apps/docs/api-reference/endpoint/track-lead.mdx+++ /dev/null@@ -1,4 +0,0 @@-----openapi: post /track/lead-og:title: "Track a lead with the Dub.co API - API Reference"----diff --git a/apps/docs/api-reference/endpoint/track-sale.mdx b/apps/docs/api-reference/endpoint/track-sale.mdxdeleted file mode 100644index 47c2af8870..0000000000--- a/apps/docs/api-reference/endpoint/track-sale.mdx+++ /dev/null@@ -1,4 +0,0 @@-----openapi: post /track/sale-og:title: "Track a sale with the Dub.co API - API Reference"----diff --git a/apps/docs/api-reference/endpoint/update-a-domain.mdx b/apps/docs/api-reference/endpoint/update-a-domain.mdxdeleted file mode 100644index fa783774be..0000000000--- a/apps/docs/api-reference/endpoint/update-a-domain.mdx+++ /dev/null@@ -1,4 +0,0 @@-----openapi: patch /domains/{slug}-og:title: "Update a domain with the Dub.co API - API Reference"----diff --git a/apps/docs/api-reference/endpoint/update-a-link.mdx b/apps/docs/api-reference/endpoint/update-a-link.mdxdeleted file mode 100644index 2b4d766cf7..0000000000--- a/apps/docs/api-reference/endpoint/update-a-link.mdx+++ /dev/null@@ -1,4 +0,0 @@-----openapi: patch /links/{linkId}-og:title: "Update a link with the Dub.co API - API Reference"----diff --git a/apps/docs/api-reference/endpoint/update-a-tag.mdx b/apps/docs/api-reference/endpoint/update-a-tag.mdxdeleted file mode 100644index fe06c27c40..0000000000--- a/apps/docs/api-reference/endpoint/update-a-tag.mdx+++ /dev/null@@ -1,4 +0,0 @@-----openapi: patch /tags/{id}-og:title: "Update a tag with the Dub.co API - API Reference"----diff --git a/apps/docs/api-reference/endpoint/update-a-workspace.mdx b/apps/docs/api-reference/endpoint/update-a-workspace.mdxdeleted file mode 100644index 864ad4d314..0000000000--- a/apps/docs/api-reference/endpoint/update-a-workspace.mdx+++ /dev/null@@ -1,4 +0,0 @@-----openapi: patch /workspaces/{idOrSlug}-og:title: "Update a workspace with the Dub.co API - API Reference"----diff --git a/apps/docs/api-reference/endpoint/upsert-a-link.mdx b/apps/docs/api-reference/endpoint/upsert-a-link.mdxdeleted file mode 100644index 703cf5ee1d..0000000000--- a/apps/docs/api-reference/endpoint/upsert-a-link.mdx+++ /dev/null@@ -1,4 +0,0 @@-----openapi: put /links/upsert-og:title: "Upsert a link with the Dub.co API - API Reference"----diff --git a/apps/docs/api-reference/errors.mdx b/apps/docs/api-reference/errors.mdxdeleted file mode 100644index f0008db9a2..0000000000--- a/apps/docs/api-reference/errors.mdx+++ /dev/null@@ -1,78 +0,0 @@-----title: "Errors"-"og:title": "Dub.co API returns machine readable error codes, human readable error messages and a link to the docs for more information"-description: "Troubleshoot problems with this comprehensive breakdown of all error codes."-icon: bug------Dub.co API returns machine readable error codes, human readable error messages and a link to the docs for more information.--Here is how an error response looks like:--```json-{- "error": {- "code": "not_found",- "message": "The requested resource was not found.",- "doc_url": "https://dub.co/docs/api-reference/errors#not-found"- }-}-```--## Error Codes--Here is a list of all error codes Dub.co API returns:--### `bad_request`--- **Status:** 400-- **Problem:** The request is malformed, either missing required fields, using wrong datatypes, or being syntactically incorrect.-- **Solution:** Check the request and make sure it is properly formatted.--### `unauthorized`--- **Status:** 401-- **Problem:** The request has not been applied because it lacks valid authentication credentials for the target resource.-- **Solution:** Make sure you are using the correct API key or access token.--### `forbidden`--- **Status:** 403-- **Problem:** The server understood the request, but is refusing to fulfill it because the client lacks proper permission.-- **Solution:** Make sure you have the necessary permissions to access the resource.--### `not_found`--- **Status:** 404-- **Problem:** The server has not found anything matching the request URI.-- **Solution:** Check the request and make sure the resource exists.--### `conflict`--- **Status:** 409-- **Problem:** Another resource already uses the same identifier. For example, workspace slug must be unique.-- **Solution:** Change the identifier to a unique value.--### `invite_expired`--- **Status:** 410-- **Problem:** The invite has expired.-- **Solution:** Generate a new invite.--### `unprocessable_entity`--- **Status:** 422-- **Problem:** The server was unable to process the request because it contains invalid data.-- **Solution:** Check the request and make sure input data is valid.--### `rate_limit_exceeded`--- **Status:** 429-- **Problem:** The request has been rate limited.-- **Solution:** Wait for a while and try again.--### `internal_server_error`--- **Status:** 500-- **Problem:** The server encountered an unexpected condition that prevented it from fulfilling the request.-- **Solution:** Try again later. If the problem persists, contact support.diff --git a/apps/docs/api-reference/introduction.mdx b/apps/docs/api-reference/introduction.mdxdeleted file mode 100644index a502081470..0000000000--- a/apps/docs/api-reference/introduction.mdx+++ /dev/null@@ -1,50 +0,0 @@-----title: "Introduction"-"og:title": "Dub.co API Reference - Introduction"-description: "Fundamental concepts of Dub.co's API."-icon: webhook------<Info>- Dub.co's API is currently in beta. If you have any questions or feedback,- please reach out to us at- [[email protected]](mailto:[email protected]?subject=Dub.co%20API%20Feedback).-</Info>--## Base URL--Dub.co's API is built on REST principles and is served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported.--The Base URL for all API endpoints is:--```bash Terminal-https://api.dub.co-```--## Authentication--Authentication to Dub.co's API is performed via the Authorization header with a Bearer token. To authenticate, you need to include the Authorization header with the word `Bearer` followed by your API key in your requests like so:--```bash Terminal-Authorization: Bearer <Your-Token>-```--Learn more about [how to get your API key](/api-reference/tokens).--## Response Codes--The API returns standard HTTP response codes to indicate the success or failure of an API request. Here are a few examples:--| Code | Description |-| ----- | ---------------------------------------------------------------------------------------------- |-| `200` | The request was successful. |-| `400` | The request was invalid or cannot be served. |-| `401` | The request requires user authentication. |-| `403` | The server understood the request, but refuses to authorize it. |-| `404` | The requested resource could not be found. |-| `429` | Too many requests. |-| `500` | The server encountered an unexpected condition which prevented it from fulfilling the request. |--## Caveats--- Dub's API is currently in public beta and is subject to change. However, we will do our best to keep breaking changes to a minimum.diff --git a/apps/docs/api-reference/rate-limits.mdx b/apps/docs/api-reference/rate-limits.mdxdeleted file mode 100644index b8022621ef..0000000000--- a/apps/docs/api-reference/rate-limits.mdx+++ /dev/null@@ -1,32 +0,0 @@-----title: "Rate limits"-"og:title": "What are Dub.co's API rate limits?"-description: "Learn about Dub's API rate limits."-icon: clock------Dub's API rate limiting is in conformance with the [IETF standard](https://datatracker.ietf.org/doc/html/draft-ietf-httpapi-ratelimit-headers):--| Header Name | Description |-| ----------------------- | ------------------------------------------------------------------------------- |-| `X-RateLimit-Limit` | The maximum number of requests that the consumer is permitted to make per hour. |-| `X-RateLimit-Remaining` | The number of requests remaining in the current rate limit window. |-| `X-RateLimit-Reset` | The time at which the current rate limit window resets in UTC epoch seconds. |-| `Retry-After` | The number of seconds to wait before retrying the request again. |--Dub's API is capped at **600 requests per minute** per key on the Free plan, with elevated limits for [Pro plan](https://dub.co/help/article/pro-plan) and above.--This is implemented to ensure a fair usage policy so that excessive use by a single user does not adversely affect the performance and usage of the API by others.--You'll receive a `429 Too Many Requests` response code if the rate limit is exceeded.--## Rate limits by plan--Depending on your Dub.co plan, you can expect the following rate limits:--| Plan | Rate limit |-| ----------------------------------------------------- | -------------------------------------------------------------------- |-| Free | 600 requests per minute |-| [Pro](https://dub.co/help/article/pro-plan) | 3,000 requests per minute |-| [Business](https://dub.co/help/article/business-plan) | 6,000 requests per minute |-| [Enterprise](https://dub.co/enterprise) | Custom – [reach out to sales](https://dub.co/enterprise) for details |diff --git a/apps/docs/api-reference/tokens.mdx b/apps/docs/api-reference/tokens.mdxdeleted file mode 100644index e0dc2ff994..0000000000--- a/apps/docs/api-reference/tokens.mdx+++ /dev/null@@ -1,115 +0,0 @@-----title: "API Keys"-"og:title": "How to get my Dub.co API key?"-description: "Learn how to get your Dub.co API key."-icon: key------API keys on Dub.co allow other apps to access your workspace programmatically. This is useful for integrating Dub with other tools and services.--Each API key is tied to a specific workspace – meaning you can use it to access that workspace's resources without having to worry about "leaking" access to other workspaces. You also no longer need to pass your [workspace ID](https://dub.co/help/article/how-to-get-workspace-id) in your API requests.--<Tip>Dub API keys are prefixed with `dub_` for easy identification.</Tip>--## API key permissions--You can create 3 types of API keys on Dub.co:--1. **All permissions** – This API key will have full access to all resources.-2. **Read only** – This API key will have read-only access to all resources.-3. **Restricted** – This API key will have restricted access to some resources:- - [Links](/data-model#links)- - [Analytics](/api-reference/endpoint/retrieve-analytics)- - [Workspaces](/data-model#workspace)- - [Domains](/data-model#domains)- - [Tags](/data-model#tags)- - API Keys--Depending on your use case, you might want to use one of these 3 options to limit the scope of the API key and improve security.--## Machine users--On Dub, you can create API keys that are associated with a "Machine user". This is particularly helpful when you don't want to associate the API key with a particular user in your workspace, to avoid security risks in involving turnover or changes in project ownership.--<Frame>- <img- src="/images/api-machine-users.png"- alt="Creating an API key associated with a machine user on Dub"- width="1528"- height="974"- />-</Frame>--These machine users will show up on your workspace's **People** tab, but will not contribute to your workspace's user count.--<Frame>- <img- src="/images/machine-user.png"- alt="Machine user on Dub"- width="1468"- height="249"- />-</Frame>--<Tip>- If you delete an API key associated with a machine user, the machine user will- be deleted. Vice versa, if you delete a machine user, their corresponding API- key will be deleted as well.-</Tip>--## How to create an API key--You can create an API key by following these steps:--<Steps>- <Step title="Go to your workspace">- Go to **Settings** > **API Keys** in your workspace.-- <Frame>- <img- src="/images/workspace-api-keys.png"- alt="Workspace API keys on Dub"- width="1468"- height="249"- />- </Frame>-- </Step>- <Step title="Create an API Key">- Click on the "Create" button and select permissions you want to grant to- the API key.-- Select between "You" and "Machine" to associate the API key with a user or a [machine user](#machine-users).-- - **You** – This API key is tied to your user and can make requests against the selected workspace.- - **Machine** – A machine user will be added to your workspace, and an API key will be created.-- <Frame>- <img- src="/images/add-new-api-key.png"- alt="Add new API key on Dub"- width="1468"- height="249"- />- </Frame>-- When making API calls, if your API Key have insufficient permissions, the error should tell you which permissions you need.-- Make sure to copy your API key and store it in a safe place. You won't be able to see it again.-- </Step>- <Step title="Use your API Key">- Now that you have your API key, you can use it to access your workspace's resources programmatically via SDKs or within any API request as a bearer token.-- ```- Authorization: Bearer dub_xxxx- ```-- </Step>-</Steps>--<Tip>- We recommend creating API keys with the least privilege necessary to perform- the required tasks. This helps to reduce the risk of unauthorized access to- your workspace.-</Tip>diff --git a/apps/docs/data-model.mdx b/apps/docs/data-model.mdxdeleted file mode 100644index 08a09e5e7e..0000000000--- a/apps/docs/data-model.mdx+++ /dev/null@@ -1,48 +0,0 @@-----title: Data model-description: "A quick overview of how Dub is structured."-icon: database------import WorkspaceResponse from "/snippets/workspace-response.mdx";-import LinkResponse from "/snippets/link-response.mdx";-import DomainResponse from "/snippets/domain-response.mdx";-import TagResponse from "/snippets/tag-response.mdx";--Whether you are using Dub's [API](/api-reference/introduction) or not, this page is a quick way to understand how Dub works.--Within Dub, all data belongs to a [**Workspace**](#workspace). Within a workspace, you have [Links](#links), [Domains](#domains), [Tags](#tags), and more.--## Workspace--[Workspaces](https://dub.co/help/article/what-is-a-workspace) is the defacto way of organizing your links and working with your team on Dub. You can think of a Dub workspace like a workspace on Slack or Discord – it's a shared space where you can [invite your team members](https://dub.co/help/article/how-to-invite-teammates) to collaborate on links.--When interacting with Dub's API, you'll also need to create a [workspace API key](/api-reference/tokens) to authenticate your requests.--<Accordion title="Workspace model">- <WorkspaceResponse />-</Accordion>--## Links--Links are the bread and butter of Dub. You can shorten any URL to a Dub link, which you can then share with your audience. Links can be [created](/api-reference/endpoint/create-a-new-link), [updated](/api-reference/endpoint/edit-a-link), and [deleted](/api-reference/endpoint/delete-a-link) via the [Dub API](/api-reference/introduction) or the [Dub dashboard](https://app.dub.co).--<Accordion title="Link model">- <LinkResponse />-</Accordion>--## Domains--On Dub, you can [add custom domains](https://dub.co/help/article/how-to-add-custom-domain) to create branded short links for better brand recognition. You can also [set a primary domain](https://dub.co/help/article/how-to-set-primary-domain) for it to be used as the default domain for new links (both via the API and the dashboard).--<Accordion title="Domain model">- <DomainResponse />-</Accordion>--## Tags--Tags are a way to organize your links. You can [add tags to your links](https://dub.co/help/article/how-to-use-tags) to categorize them and make them easier to find. You can also [filter analytics by tags](https://dub.co/blog/introducing-tags#filtering-analytics-by-tags) to get a better understanding of how your campaigns are performing.--<Accordion title="Tag model">- <TagResponse />-</Accordion>diff --git a/apps/docs/examples.mdx b/apps/docs/examples.mdxdeleted file mode 100644index 3ecb14b256..0000000000--- a/apps/docs/examples.mdx+++ /dev/null@@ -1,25 +0,0 @@-----title: "Examples"-"og:title": "Dub.co API Examples - Build with the Dub.co API"-description: "Explore ideas and examples of what you can build with the Dub.co API"-icon: github------<CardGroup cols={2}>- <Card- title="OSS Gallery"- icon="github"- href="https://github.com/dubinc/oss-gallery"- color="#333333"- >- Open-source gallery built with the Dub.co Typescript SDK- </Card>- <Card- title="Dublet"- icon="github"- href="https://github.com/dubinc/dublet"- color="#333333"- >- Mini link shortener built with the Dub.co Typescript SDK- </Card>-</CardGroup>diff --git a/apps/docs/images/add-new-api-key.png b/apps/docs/images/add-new-api-key.pngdeleted file mode 100644index 617f999d54..0000000000Binary files a/apps/docs/images/add-new-api-key.png and /dev/null differdiff --git a/apps/docs/images/api-machine-users.png b/apps/docs/images/api-machine-users.pngdeleted file mode 100644index 7de0ccbcf3..0000000000Binary files a/apps/docs/images/api-machine-users.png and /dev/null differdiff --git a/apps/docs/images/background.png b/apps/docs/images/background.pngdeleted file mode 100644index 0fbd7ef297..0000000000Binary files a/apps/docs/images/background.png and /dev/null differdiff --git a/apps/docs/images/cloudflare-r2-create-api-token.png b/apps/docs/images/cloudflare-r2-create-api-token.pngdeleted file mode 100644index cabeda6be2..0000000000Binary files a/apps/docs/images/cloudflare-r2-create-api-token.png and /dev/null differdiff --git a/apps/docs/images/cloudflare-r2-create-bucket.png b/apps/docs/images/cloudflare-r2-create-bucket.pngdeleted file mode 100644index 33a3125a3c..0000000000Binary files a/apps/docs/images/cloudflare-r2-create-bucket.png and /dev/null differdiff --git a/apps/docs/images/cloudflare-r2-manage-api-tokens.png b/apps/docs/images/cloudflare-r2-manage-api-tokens.pngdeleted file mode 100644index cdb80e4e3f..0000000000Binary files a/apps/docs/images/cloudflare-r2-manage-api-tokens.png and /dev/null differdiff --git a/apps/docs/images/cloudflare-r2-public-domain.png b/apps/docs/images/cloudflare-r2-public-domain.pngdeleted file mode 100644index c4a950301c..0000000000Binary files a/apps/docs/images/cloudflare-r2-public-domain.png and /dev/null differdiff --git a/apps/docs/images/dub-api-key.png b/apps/docs/images/dub-api-key.pngdeleted file mode 100644index e78bd5b85d..0000000000Binary files a/apps/docs/images/dub-api-key.png and /dev/null differdiff --git a/apps/docs/images/dub-workspace-id.png b/apps/docs/images/dub-workspace-id.pngdeleted file mode 100644index 931d6d5f5f..0000000000Binary files a/apps/docs/images/dub-workspace-id.png and /dev/null differdiff --git a/apps/docs/images/logo-background-gradient.png b/apps/docs/images/logo-background-gradient.pngdeleted file mode 100644index 20ba2a7a17..0000000000Binary files a/apps/docs/images/logo-background-gradient.png and /dev/null differdiff --git a/apps/docs/images/machine-user.png b/apps/docs/images/machine-user.pngdeleted file mode 100644index a05546cdf4..0000000000Binary files a/apps/docs/images/machine-user.png and /dev/null differdiff --git a/apps/docs/images/planetscale-add-credentials.png b/apps/docs/images/planetscale-add-credentials.pngdeleted file mode 100644index e9ce114359..0000000000Binary files a/apps/docs/images/planetscale-add-credentials.png and /dev/null differdiff --git a/apps/docs/images/planetscale-choose-framework.png b/apps/docs/images/planetscale-choose-framework.pngdeleted file mode 100644index 67d4577817..0000000000Binary files a/apps/docs/images/planetscale-choose-framework.png and /dev/null differdiff --git a/apps/docs/images/resend-api-key.png b/apps/docs/images/resend-api-key.pngdeleted file mode 100644index 3a45bbdeec..0000000000Binary files a/apps/docs/images/resend-api-key.png and /dev/null differdiff --git a/apps/docs/images/thumbnail.jpg b/apps/docs/images/thumbnail.jpgdeleted file mode 100644index ce555043ed..0000000000Binary files a/apps/docs/images/thumbnail.jpg and /dev/null differdiff --git a/apps/docs/images/upstash-create-db.png b/apps/docs/images/upstash-create-db.pngdeleted file mode 100644index 525401169c..0000000000Binary files a/apps/docs/images/upstash-create-db.png and /dev/null differdiff --git a/apps/docs/images/upstash-qstash-tokens.png b/apps/docs/images/upstash-qstash-tokens.pngdeleted file mode 100644index f865a356bd..0000000000Binary files a/apps/docs/images/upstash-qstash-tokens.png and /dev/null differdiff --git a/apps/docs/images/upstash-redis-tokens.png b/apps/docs/images/upstash-redis-tokens.pngdeleted file mode 100644index a9db45c37f..0000000000Binary files a/apps/docs/images/upstash-redis-tokens.png and /dev/null differdiff --git a/apps/docs/images/vercel-deploy-settings.png b/apps/docs/images/vercel-deploy-settings.pngdeleted file mode 100644index afe012e79a..0000000000Binary files a/apps/docs/images/vercel-deploy-settings.png and /dev/null differdiff --git a/apps/docs/images/vercel-framework-preset.png b/apps/docs/images/vercel-framework-preset.pngdeleted file mode 100644index 334c9e5964..0000000000Binary files a/apps/docs/images/vercel-framework-preset.png and /dev/null differdiff --git a/apps/docs/images/whitelabeled-login.png b/apps/docs/images/whitelabeled-login.pngdeleted file mode 100644index 3019385112..0000000000Binary files a/apps/docs/images/whitelabeled-login.png and /dev/null differdiff --git a/apps/docs/images/workspace-api-keys.png b/apps/docs/images/workspace-api-keys.pngdeleted file mode 100644index ed48f42dc2..0000000000Binary files a/apps/docs/images/workspace-api-keys.png and /dev/null differdiff --git a/apps/docs/integrations.mdx b/apps/docs/integrations.mdxdeleted file mode 100644index ea5b4d36df..0000000000--- a/apps/docs/integrations.mdx+++ /dev/null@@ -1,226 +0,0 @@-----title: "Integrations"-"og:title": "Dub.co Integrations: Connect Dub.co to tools and services"-description: "Integrate Dub.co with your favorite tools and services."-icon: object-union------## Active integrations--<CardGroup cols={2}>- <Card- title="Make.com"- icon={- <svg- xmlns="http://www.w3.org/2000/svg"- width="512"- height="512"- viewBox="0 0 512 512"- className="h-8 w-8"- >- <g id="Make-App-Icon-Circle" transform="translate(3757 -1767)">- <circle- id="Ellipse_10"- data-name="Ellipse 10"- cx="256"- cy="256"- r="256"- transform="translate(-3757 1767)"- fill="#6d00cc"- />- <path- id="Path_141560"- data-name="Path 141560"- d="M244.78,14.544a7.187,7.187,0,0,0-7.186,7.192V213.927a7.19,7.19,0,0,0,7.186,7.192h52.063a7.187,7.187,0,0,0,7.186-7.192V21.736a7.183,7.183,0,0,0-7.186-7.192ZM92.066,17.083,5.77,188.795a7.191,7.191,0,0,0,3.192,9.654l46.514,23.379a7.184,7.184,0,0,0,9.654-3.2l86.3-171.711a7.184,7.184,0,0,0-3.2-9.654L101.719,13.886a7.2,7.2,0,0,0-9.654,3.2m72.592.614L127.731,204.876a7.189,7.189,0,0,0,5.632,8.442l51.028,10.306a7.2,7.2,0,0,0,8.481-5.665L229.8,30.786a7.19,7.19,0,0,0-5.637-8.442L173.133,12.038a7.391,7.391,0,0,0-1.427-.144,7.194,7.194,0,0,0-7.048,5.8"- transform="translate(-3676.356 1905.425)"- fill="#fff"- />- </g>- </svg>- }- href="https://d.to/make"- >- Shorten links with Make.com- </Card>- <Card- title="Bubble"- icon={- <svg- width="256px"- height="276px"- viewBox="0 0 256 276"- version="1.1"- xmlns="http://www.w3.org/2000/svg"- preserveAspectRatio="xMidYMid"- className="h-8 w-8"- >- <title>Bubble</title>- <g>- <path- d="M156.687886,71.5306475 C131.928045,71.5306475 107.524298,82.1604077 88.8931172,103.059013 L88.8931172,0 L52.0240423,0 L52.0240423,173.506229 C52.0240423,173.510361 52.0240423,173.514494 52.0240423,173.519315 C52.0240423,229.845404 97.6852437,275.506605 154.012021,275.506605 C210.33811,275.506605 256,229.845404 256,173.519315 C256,117.193226 213.013974,71.5306475 156.687886,71.5306475 M154.012021,236.224775 C119.380066,236.224775 91.3051835,208.149893 91.3051835,173.518626 C91.3051835,138.886671 119.380066,110.811789 154.012021,110.811789 C188.643288,110.811789 216.71817,138.886671 216.71817,173.518626 C216.71817,208.150582 188.643288,236.224775 154.012021,236.224775"- fill="#262626"- ></path>- <path- d="M25.2199377,225.066041 C11.2909777,225.066041 1.0658141e-14,236.357707 1.0658141e-14,250.285979 C1.0658141e-14,264.21425 11.2909777,275.505916 25.2199377,275.505916 C39.1488977,275.505916 50.4398754,264.21425 50.4398754,250.285979 C50.4398754,236.357707 39.1488977,225.066041 25.2199377,225.066041"- fill="#0000FF"- ></path>- </g>- </svg>- }- href="https://d.to/bubble"- >- Shorten links with Bubble- </Card>- <Card- title="Raycast"- icon={- <svg- width="228"- height="228"- viewBox="0 0 228 228"- fill="none"- xmlns="http://www.w3.org/2000/svg"- className="h-8 w-8"- >- <g clipPath="url(#clip0_1218_28)">- <path- fillRule="evenodd"- clipRule="evenodd"- d="M227.987 113.987L216.097 125.89L170.987 80.7803V56.987L227.987 113.987ZM114.039 0L102.149 11.8901L147.246 56.987H171.039L114.039 0ZM88.5212 25.5177L76.6181 37.4208L96.1972 56.987H119.99L88.5212 25.5177ZM171.039 108.048V131.842L190.54 151.408L202.443 139.518L171.039 108.048ZM164.18 152.238L170.987 145.43H82.5177V56.987L75.7104 63.8073L62.9386 51.1003L51.0484 62.9905L63.8073 75.7623L56.987 82.5177V96.1454L37.4208 76.5662L25.5177 88.4693L56.987 119.939V147.168L11.8901 102.097L0 113.987L114.039 227.987L125.942 216.097L80.8321 170.987H108.061L139.531 202.469L151.434 190.566L131.855 170.987H145.482L152.29 164.18L165.061 176.939L176.952 165.048L164.18 152.238Z"- fill="#FF6363"- />- </g>- <defs>- <clipPath id="clip0_1218_28">- <rect width="228" height="228" fill="white" />- </clipPath>- </defs>- </svg>- }- href="https://d.to/ray"- >- Shorten links with Raycast- </Card>- <Card- title="Pipedream"- icon={- <svg- enableBackground="new 0 0 600 600"- version="1.1"- viewBox="0 0 600 600"- xmlSpace="preserve"- xmlns="http://www.w3.org/2000/svg"- className="h-8 w-8"- >- <path- d="m413 601h-412v-600h600v600h-188m-249.49-374.5c2.13e-4 93.651 0.035782 187.3-0.10211 280.95-0.007019 4.7677 1.1727 6.2025 6.0619 6.152 24.327-0.25134 48.657-0.10834 72.987-0.12824 1.7477-0.001465 3.4952-0.19446 5.0492-0.28687v-105.64c0.7103 0.038513 1.1189-0.064697 1.3299 0.09433 0.79394 0.59842 1.5523 1.252 2.2729 1.9386 10.855 10.343 23.482 17.235 38.202 20.536 13.754 3.0848 27.621 4.5111 41.654 3.8274 41.472-2.0209 73.697-19.744 94.556-56.379 11.256-19.769 17.778-41.175 21.464-63.506 4.8599-29.442 4.9199-59.068 2.7362-88.712-1.6924-22.973-5.3217-45.622-13.603-67.302-10.566-27.662-27.689-49.597-56.101-60.187-33.964-12.66-68.366-13.049-102.57-0.19016-14.517 5.4573-27.194 13.949-39.095 24.427-4.8366-8.7217-9.6348-17.075-14.102-25.601-1.47-2.8053-3.1826-3.6822-6.2601-3.4362-11.125 0.88915-22.271 1.5068-33.407 2.2732-6.9087 0.4755-13.812 1.0345-21.073 1.5829 0 43.313 0 85.947 1.38e-4 129.58z"- fill="#34D28B"- />- <path- d="m163.51 226c-7.7e-5 -43.134-7.7e-5 -85.767-7.7e-5 -129.08 7.2617-0.5484 14.165-1.1074 21.073-1.5829 11.135-0.76641 22.282-1.3841 33.407-2.2732 3.0774-0.24596 4.7901 0.63092 6.2601 3.4362 4.4677 8.5261 9.2659 16.879 14.102 25.601 11.901-10.479 24.579-18.97 39.095-24.427 34.204-12.859 68.606-12.47 102.57 0.19016 28.412 10.59 45.535 32.525 56.101 60.187 8.2808 21.681 11.91 44.329 13.603 67.302 2.1837 29.644 2.1236 59.27-2.7362 88.712-3.6861 22.331-10.208 43.737-21.464 63.506-20.859 36.635-53.084 54.358-94.556 56.379-14.033 0.68375-27.899-0.74255-41.654-3.8274-14.72-3.3014-27.347-10.193-38.202-20.536-0.72058-0.68655-1.4789-1.3402-2.2729-1.9386-0.211-0.15903-0.61964-0.055817-1.3299-0.09433v105.64c-1.554 0.092408-3.3015 0.2854-5.0492 0.28687-24.329 0.019897-48.66-0.12311-72.987 0.12824-4.8892 0.050537-6.0689-1.3843-6.0619-6.152 0.13789-93.651 0.10232-187.3 0.10205-281.45m116.41-57.756c-11.344 4.0749-21.357 10.208-28.822 19.795-1.7525 2.2504-2.9519 5.5924-2.9638 8.4383-0.18326 43.805-0.013077 87.611-0.26497 131.42-0.033584 5.8413 1.8959 10.108 5.549 14.271 16.857 19.213 38.371 23.786 62.562 20.29 18.379-2.6563 30.69-13.119 37.316-30.036 3.3137-8.4608 5.9928-17.341 7.5757-26.277 4.6788-26.412 4.1864-53.067 1.8481-79.672-1.0942-12.45-3.4579-24.725-8.878-36.174-5.7627-12.173-15.005-20.134-28.25-23.214-15.049-3.4998-30.019-3.3802-45.672 1.1632z"- fill="#fff"- />- <path- d="m280.3 168.15c15.266-4.4467 30.236-4.5663 45.285-1.0665 13.244 3.0802 22.487 11.041 28.25 23.214 5.4201 11.449 7.7837 23.724 8.878 36.174 2.3383 26.605 2.8307 53.26-1.8481 79.672-1.5829 8.9356-4.262 17.816-7.5757 26.277-6.6257 16.917-18.937 27.38-37.316 30.036-24.191 3.4964-45.705-1.077-62.562-20.29-3.6531-4.1637-5.5826-8.4301-5.549-14.271 0.25189-43.804 0.081711-87.61 0.26497-131.42 0.011917-2.8459 1.2114-6.1879 2.9638-8.4383 7.4656-9.5867 17.479-15.72 29.209-19.892z"- fill="#34D28B"- />- </svg>- }- href="https://d.to/pipedream"- >- Shorten links with Pipedream- </Card>- <Card- title="Dropshare"- icon={- <svg- enableBackground="new 0 0 192 192"- version="1.1"- viewBox="0 0 192 192"- xmlSpace="preserve"- xmlns="http://www.w3.org/2000/svg"- className="h-8 w-8"- >- <path d="m116.79 161.25c-7.8555 0.43628-15.084-0.36078-22.154-2.6081-27.018-8.5872-40.897-32.967-33.371-60.333 7.1198-25.887 21.645-47.383 41.904-64.919 6.9466-6.0129 10.529-6.2819 17.175-0.56768 23.003 19.778 39.283 43.9 44.622 74.2 3.9883 22.633-12.605 45.743-36.448 52.036-3.6866 0.97296-7.5013 1.4603-11.728 2.1916m-27.913-23.617c4.471 3.2535 8.9669 6.4465 14.888 6.2448 3.0063-0.10246 5.2491-1.4134 5.7613-4.4785 0.48747-2.9174-1.2853-4.9677-3.8861-5.6374-8.279-2.132-13.581-7.1151-16.461-15.184-1.1455-3.2089-4.1126-5.0832-7.6864-3.491-3.4384 1.5319-4.8823 4.209-3.4146 8.1668 2.0992 5.661 5.902 9.9739 10.799 14.379z" />- <path d="m69.528 52.549c7.0827-8.0213 14.148-15.547 22.636-22.382 0.50252 2.9362-1.2719 3.721-2.2755 4.8835-13.768 15.949-26.109 32.782-34.83 52.164-12.457 27.687-2.1361 51.367 18.137 67.354 1.4834 1.1697 3.6999 1.6931 4.1595 4.0898-2.3604 1.2021-4.244-0.30447-6.1145-1.0696-27.442-11.225-38.68-39.951-26.577-67.943 5.9541-13.771 14.856-25.598 24.865-37.097z" />- </svg>- }- href="https://d.to/dropshare"- >- Shorten your Dropshare links- </Card>- <Card- title="Shortshare"- icon={- <svg- width="85px"- height="45px"- viewBox="0 0 85 45"- version="1.1"- xmlns="http://www.w3.org/2000/svg"- className="h-8 w-8"- >- <g- id="Page-1"- stroke="none"- strokeWidth="1"- fill="none"- fillRule="evenodd"- >- <g- id="logo-white"- transform="translate(9.000000, 5.000000)"- fill="#000000"- fillRule="nonzero"- >- <path- d="M57.6097244,32.1946043 L49.8119122,23.5652379 L53.5118193,19.4200627 L67.5862069,35 L63.9246255,35 C61.5200013,35.0007178 59.2267988,33.9819624 57.6097244,32.1946043 Z"- id="Path"- ></path>- <path- d="M34.9290895,34.8902821 L17.6963401,34.8902821 C8.08232654,34.8902821 0.0952999167,27.2215366 0,17.6156725 C-0.0391754929,12.9622274 1.78340246,8.48541294 5.06383055,5.17890966 C8.34425864,1.87240639 12.8111401,0.00976830213 17.4729991,0.00442938709 L34.9261314,0.00442938709 C35.6366282,0.00443423288 36.313429,0.306790968 36.7868128,0.835677698 L46.2529184,11.3923836 L42.5596581,15.4984254 L33.5772113,5.52196924 L17.6549258,5.52196924 C11.0981686,5.52196924 5.62853447,10.7191168 5.52647802,17.2613215 C5.48137766,20.4541587 6.71945592,23.531968 8.96406106,25.8070052 C11.2086662,28.0820424 14.2727085,29.3646813 17.4715201,29.3683129 L33.5757322,29.3683129 L57.3889042,2.84219005 C59.0114655,1.03357429 61.3286169,0 63.7607765,0 L67.3667712,0 L36.7882918,34.0605103 C36.314758,34.5881564 35.6387601,34.8898579 34.9290895,34.8902821 L34.9290895,34.8902821 Z"- id="Path"- ></path>- </g>- </g>- </svg>- }- href="https://d.to/shortshare"- >- Use your Dub.co links on Shortshare- </Card>-</CardGroup>--## Building your own integrations--You can build your own integrations with Dub.co's link infrastructure using our [API](/api-reference/introduction).--1. Read the documentation on how to [create links](/api-reference/endpoint/create-a-new-link).-2. Integrate Dub.co with your product or service.-3. [Reach out to us](mailto:[email protected]?subject=New%20Dub.co%20Integration) to feature your integration on this page.--## Upcoming integrations--Here are some services we're working on integrating with Dub.co:--<Card href="https://zapier.com">- <b>Zapier</b>-</Card>-<Card href="https://www.airtable.com/">- <b>Airtable</b>-</Card>--## No-code Resources--If you're looking to integrate with Dub using no-code tools like Make.com and Smartsuite, here are some resources to help you get started:--<iframe- width="100%"- className="aspect-video"- src="https://www.youtube.com/embed/KQU3qqhuj3Q?si=riQPyNeRzDgP3VbC"- title="YouTube video player"- frameborder="0"- allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"- referrerpolicy="strict-origin-when-cross-origin"- allowfullscreen-/>diff --git a/apps/docs/introduction.mdx b/apps/docs/introduction.mdxdeleted file mode 100644index 9f907ed399..0000000000--- a/apps/docs/introduction.mdx+++ /dev/null@@ -1,72 +0,0 @@-----title: Introduction-"og:title": "Getting Started with Dub - Documentation"-description: "Dub is the link management platform for modern marketing teams."-icon: rocket------<Frame>- <img- className="rounded-lg border border-gray-100"- src="/images/thumbnail.jpg"- alt="Dub Thumbnail"- width="1200"- height="630"- />-</Frame>--Our mission is to reimagine the role of links – one of the most foundational pieces of the web – from being a simple **"resource locator"** (URL) to a full **attribution engine** – visualizing the user journey from the first click to the final conversion event.--## Features--Here are some of the features that Dub offers:--<AccordionGroup>- <Accordion title="Advanced Analytics" icon="chart-line">- Dub provides powerful analytics for your links, including geolocation,- device, browser, and referrer information. [Learn- more](https://dub.co/features/analytics)- </Accordion>- <Accordion title="Branded Links" icon="link">- Dub offers free custom domains on all plans for you to create branded links- that stand out. [Learn more](https://dub.co/features/branded-links)- </Accordion>- <Accordion title="QR Codes" icon="qrcode">- QR codes and short links are like peas in a pod. Dub offers free QR codes- for every short link you create – both via our dashboard and- [programmatically](/api-reference/endpoint/retrieve-a-qr-code). [Learn- more](https://dub.co/features/qr-codes)- </Accordion>- <Accordion title="Personalization" icon="user">- Customize your link's behavior with [device- targeting](https://dub.co/help/article/device-targeting), [geo- targeting](https://dub.co/help/article/geo-targeting), [link- expiration](https://dub.co/help/article/link-expiration), [link- cloaking](https://dub.co/help/article/link-cloaking), and more. [Learn- more](https://dub.co/features/personalization)- </Accordion>- <Accordion title="Team Collaboration" icon="users">- Invite your teammates to collaborate on your links. For enterprises, Dub- offers [SAML SSO](https://dub.co/help/category/saml-sso) for better- security. [Learn more](https://dub.co/features/collaboration)- </Accordion>-</AccordionGroup>--## Getting Started--To get started with Dub, you can do any of the following:--<CardGroup cols={2}>- <Card title="Quickstart Guide" icon="code" href="/quickstart">- Follow our quickstart guide to get started with Dub- </Card>- <Card title="Try our API" icon="code" href="/api-reference/introduction">- Learn how to use Dub's API to create and manage links programmatically- </Card>- <Card title="Self-host Dub" icon="building" href="/self-hosting/guide">- Learn how to self-host Dub for greater control and privacy- </Card>- <Card title="Integrate with Dub" icon="circle-nodes" href="/integrations">- Learn how to integrate Dub with your favorite tools- </Card>-</CardGroup>diff --git a/apps/docs/local-development.mdx b/apps/docs/local-development.mdxdeleted file mode 100644index 30fd7eeb0f..0000000000--- a/apps/docs/local-development.mdx+++ /dev/null@@ -1,362 +0,0 @@-----title: "Local Development"-"og:title": "How to setup Dub.co for Local Development (6 steps)"-description: "A guide on how to run Dub.co's codebase locally."-icon: code------<Frame>- <img- src="/images/logo-background-gradient.png"- alt="Dub.co Logo on a gradient background"- width="1200"- height="630"- />-</Frame>--## Introduction--Dub's codebase is set up in a monorepo (via [Turborepo](https://turbo.build/repo)) and is fully [open-source on GitHub](https://github.com/dubinc/dub).--Here's the monorepo structure:--```-apps-├── docs-├── web-packages-├── tailwind-config-├── tinybird-├── tsconfig-├── ui-├── utils-```--The `apps` directory contains the code for:--- `web`: The entirety of Dub's application ([app.dub.co](https://app.dub.co)) + our link redirect infrastructure.-- `docs`: Dub's documentation site ([dub.co/docs](https://dub.co/docs)) – including this page you're on right now!--The `packages` directory contains the code for:--- `tailwind-config`: The Tailwind CSS configuration for Dub's web app.-- `tinybird`: Dub's Tinybird configuration.-- `tsconfig`: The TypeScript configuration for Dub's web app.-- `ui`: Dub's UI component library.-- `utils`: A collection of utility functions and constants used across Dub's codebase.--## How `app.dub.co` works--Dub's web app is built with [Next.js](https://nextjs.org) and [TailwindCSS](https://tailwindcss.com).--It also utilizes code from the `packages` directory, specifically the `@dub/ui` and `@dub/utils` packages.--All of the code for the web app is located in here: [`main`/apps/web/app/app.dub.co](https://github.com/dubinc/dub/tree/main/apps/web/app/app.dub.co). This is using the Next.js [route group pattern](https://nextjs.org/docs/app/building-your-application/routing/route-groups).--There's also the API server, which is located in here: [`main`/apps/web/app/api](https://github.com/dubinc/dub/tree/main/apps/web/app/api)--When you run `pnpm dev` to start the development server, the app will be available at [http://localhost:8888](http://localhost:8888). The reason we use `localhost:8888` and not `app.localhost:8888` is because Google OAuth doesn't allow you to use localhost subdomains.--## How link redirects work on Dub--Link redirects on Dub are powered by [Next.js Middleware](https://nextjs.org/docs/app/building-your-application/routing/middleware).--To handle high traffic, we use Redis to cache every link's metadata when it's first created. This allows us to serve redirects without hitting our MySQL database.--Here's the code that powers link redirects:--- Link redirects: [`main`/apps/web/lib/middleware/link.ts](https://github.com/dubinc/dub/blob/main/apps/web/lib/middleware/link.ts).-- Root domain redirects: [`main`/apps/web/lib/middleware/root.ts](https://github.com/dubinc/dub/blob/main/apps/web/lib/middleware/root.ts).--## Running Dub locally--To run Dub.co locally, you'll need to set up the following:--- A [Tinybird](https://www.tinybird.co/) account-- An [Upstash](https://upstash.com/) account-- A [PlanetScale](https://planetscale.com/)-compatible MySQL database--## Step 1: Local setup--First, you'll need to clone the Dub.co repo and install the dependencies.--<Steps>-- <Step title="Clone the repo">--First, clone the [Dub.co repo](https://d.to/github) into a public GitHub repository.-- ```bash Terminal- git clone https://github.com/dubinc/dub.git- ```-- </Step>-- <Step title="Install dependencies">-- Run the following command to install the dependencies:-- ```bash Terminal- pnpm i- ```-- </Step>-- <Step title="Optional: Install Mintlify">-- If you're planning to make changes to [Dub.co's Docs](/docs), you'll need to install the [Mintlify CLI](https://mintlify.com/docs/development) to build the documentation site.-- ```bash Terminal- pnpm install -g mintlify- ```-- </Step>--</Steps>--## Step 2: Set up Tinybird Clickhouse database--Next, you'll need to set up the [Tinybird](https://tinybird.co) Clickhouse database. This will be used to store time-series click events data.--<Steps>-- <Step title="Create Tinybird Workspace">-- In your [Tinybird](https://tinybird.co/) account, create a new Workspace.-- Copy your `admin` [Auth Token](https://www.tinybird.co/docs/concepts/auth-tokens.html). Paste this token as the `TINYBIRD_API_KEY` environment variable in your `.env` file.-- </Step>-- <Step title="Install Tinybird CLI and authenticate">--In your newly-cloned Dub.co repo, navigate to the `packages/tinybird` directory.-- Install the Tinybird CLI with `pip install tinybird-cli` (requires Python >= 3.8).-- Run `tb auth` and paste your `admin` Auth Token.-- </Step>-- <Step title="Publish Tinybird datasource and endpoints">-- Run `tb push` to publish the datasource and endpoints in the `packages/tinybird` directory. You should see the following output (truncated for brevity):-- ```bash Terminal- $ tb push-- ** Processing ./datasources/click_events.datasource- ** Processing ./endpoints/clicks.pipe- ...- ** Building dependencies- ** Running 'click_events'- ** 'click_events' created- ** Running 'device'- ** => Test endpoint at https://api.us-east.tinybird.co/v0/pipes/device.json- ** Token device_endpoint_read_8888 not found, creating one- ** => Test endpoint with:- ** $ curl https://api.us-east.tinybird.co/v0/pipes/device.json?token=p.ey...NWeaoTLM- ** 'device' created- ...- ```-- </Step>-- <Step title="Set up Tinybird API base URL">-- You will then need to update your [Tinybird API base URL](https://www.tinybird.co/docs/api-reference/api-reference.html#regions-and-endpoints) to match the region of your database.-- From the previous step, take note of the **Test endpoint** URL. It should look something like this:-- ```bash Terminal- Test endpoint at https://api.us-east.tinybird.co/v0/pipes/device.json- ```-- Copy the base URL and paste it as the `TINYBIRD_API_URL` environment variable in your `.env` file.-- ```bash Terminal- TINYBIRD_API_URL=https://api.us-east.tinybird.co- ```-- </Step>--</Steps>--## Step 3: Set up Upstash Redis database--Next, you'll need to set up the [Upstash](https://upstash.com) Redis database. This will be used to cache link metadata and serve link redirects.--<Steps>-- <Step title="Create Upstash database">--In your [Upstash account](https://console.upstash.com/), create a new database.--For better performance & read times, we recommend setting up a global database with several read regions.--<Frame></Frame>-- </Step>-- <Step title="Set up Upstash Redis environment variables">--Once your database is created, copy the `UPSTASH_REDIS_REST_URL` and `UPSTASH_REDIS_REST_TOKEN` from the **REST API** section into your `.env` file.--<Frame></Frame>--Navigate to the [QStash tab](https://console.upstash.com/qstash) and copy the `QSTASH_TOKEN`, `QSTASH_CURRENT_SIGNING_KEY`, and `QSTASH_NEXT_SIGNING_KEY` from the **Request Builder** section into your `.env` file.--<Frame></Frame>-- </Step>-- <Step title="Optional: Set up Ngrok tunnel">-- If you're planning to run Qstash-powered background jobs locally, you'll need to set up an Ngrok tunnel to expose your local server to the internet.-- Follow [these steps](https://ngrok.com/docs/getting-started/) to setup `ngrok`, and then run the following command to start an Ngrok tunnel at port `8888`:-- ```bash Terminal- ngrok http 8888- ```-- Copy the `https` URL and paste it as the `NEXT_PUBLIC_NGROK_URL` environment variable in your `.env` file.-- </Step>--</Steps>--## Step 4: Set up PlanetScale MySQL database--Next, you'll need to set up a [PlanetScale](https://planetscale.com/)-compatible MySQL database. This will be used to store user data and link metadata. There are two options:--### Option 1: Local MySQL database with PlanetScale simulator (recommended)--You can use a local MySQL database with a PlanetScale simulator. This is the recommended option for local development since it's 100% free.--Prerequisites:--- [Docker](https://www.docker.com/products/docker-desktop)-- [Docker Compose](https://docs.docker.com/compose/install/)--<Steps>-- <Step title="Spin up the docker-compose stack">-- In the terminal, navigate to the `apps/web` directory and run the following command to start the Docker Compose stack:-- ```bash Terminal- docker-compose up- ```-- This will start two containers: one for the MySQL database and another for the PlanetScale simulator.-- </Step>-- <Step title="Set up database environment variables">-- Add the following credentials to your `.env` file:-- ```- PLANETSCALE_DATABASE_URL="http://root:unused@localhost:3900"- DATABASE_URL="mysql://root:@localhost:3306/planetscale"- ```-- Here, we are using the open-source [PlanetScale simulator](https://github.com/mattrobenolt/ps-http-sim) so the application can continue to use the `@planetscale/database` SDK.-- <Tip>- While we're using two different values in local development, in production or staging environments, you'll only need the `DATABASE_URL` value.- </Tip>-- </Step>-- <Step title="Generate Prisma client and create database tables">-- In the terminal, navigate to the `apps/web` directory and run the following command to generate the Prisma client:-- ```bash Terminal- npx prisma generate- ```-- Then, create the database tables with the following command:-- ```bash Terminal- npx prisma db push- ```-- </Step>--</Steps>--### Option 2: PlanetScale hosted database--<Note>- PlanetScale recently [removed their free- tier](https://planetscale.com/blog/planetscale-forever), so you'll need to pay- for this option. A cheaper alternative is to use a [MySQL database on- Railway](https://railway.app/template/mysql) ($5/month).-</Note>--<Steps>-- <Step title="Create PlanetScale database">-- In your [PlanetScale account](https://app.planetscale.com/), create a new database.-- Once your database is created, you'll be prompted to select your language or Framework. Select **Prisma**.-- <Frame>- - </Frame>-- </Step>-- <Step title="Set up PlanetScale environment variables">-- Then, you'll have to create a new password for your database. Once the password is created, scroll down to the **Add credentials to .env** section and copy the `DATABASE_URL` into your `.env` file.-- <Frame>- - </Frame>-- </Step>-- <Step title="Generate Prisma client and create database tables">-- In the terminal, navigate to the `apps/web` directory and run the following command to generate the Prisma client:-- ```bash Terminal- npx prisma generate- ```-- Then, create the database tables with the following command:-- ```bash Terminal- npx prisma db push- ```-- </Step>--</Steps>--## Step 5: Set up GitHub OAuth--Next, [create a new GitHub App](https://github.com/settings/applications/new). This will allow you to sign in to Dub.co with your GitHub account.--Don't forget to set the following Callback URL:--```-http://localhost:8888/api/auth/callback/github-```--Once your GitHub App is created, copy the `Client ID` and `Client Secret` into your `.env` file as the `GITHUB_CLIENT_ID` and `GITHUB_CLIENT_SECRET` environment variables.--## Step 6: Start the development server--Finally, you can start the development server. This will build the packages + start the app servers.--```bash Terminal-pnpm dev-```--The web app (`apps/web`) will be available at [localhost:8888](http://localhost:8888) and the docs (`apps/docs`) will be available at [localhost:3334](http://localhost:3334).diff --git a/apps/docs/logos/favicon.png b/apps/docs/logos/favicon.pngdeleted file mode 100644index 1653c4e3cd..0000000000Binary files a/apps/docs/logos/favicon.png and /dev/null differdiff --git a/apps/docs/logos/wordmark-dark.svg b/apps/docs/logos/wordmark-dark.svgdeleted file mode 100644index 4a460e5760..0000000000--- a/apps/docs/logos/wordmark-dark.svg+++ /dev/null@@ -1,3 +0,0 @@-<svg width="46" height="24" viewBox="0 0 46 24" fill="none" xmlns="http://www.w3.org/2000/svg">-<path fill-rule="evenodd" clip-rule="evenodd" d="M11 2H14V13.9332L14.0003 13.9731L14.0003 14C14.0003 14.0223 14.0002 14.0445 14 14.0668V21H11V19.7455C9.86619 20.5362 8.48733 21 7.00016 21C3.13408 21 0 17.866 0 14C0 10.134 3.13408 7 7.00016 7C8.48733 7 9.86619 7.46375 11 8.25452V2ZM7 17.9998C9.20914 17.9998 11 16.209 11 13.9999C11 11.7908 9.20914 10 7 10C4.79086 10 3 11.7908 3 13.9999C3 16.209 4.79086 17.9998 7 17.9998ZM32 2H35V8.25474C36.1339 7.46383 37.5128 7 39.0002 7C42.8662 7 46.0003 10.134 46.0003 14C46.0003 17.866 42.8662 21 39.0002 21C35.1341 21 32 17.866 32 14V2ZM39 17.9998C41.2091 17.9998 43 16.209 43 13.9999C43 11.7908 41.2091 10 39 10C36.7909 10 35 11.7908 35 13.9999C35 16.209 36.7909 17.9998 39 17.9998ZM19 7H16V14C16 14.9192 16.1811 15.8295 16.5329 16.6788C16.8846 17.5281 17.4003 18.2997 18.0503 18.9497C18.7003 19.5997 19.472 20.1154 20.3213 20.4671C21.1706 20.8189 22.0809 21 23.0002 21C23.9194 21 24.8297 20.8189 25.679 20.4671C26.5283 20.1154 27.3 19.5997 27.95 18.9497C28.6 18.2997 29.1157 17.5281 29.4675 16.6788C29.8192 15.8295 30.0003 14.9192 30.0003 14H30V7H27V14C27 15.0608 26.5785 16.0782 25.8284 16.8283C25.0783 17.5784 24.0609 17.9998 23 17.9998C21.9391 17.9998 20.9217 17.5784 20.1716 16.8283C19.4215 16.0782 19 15.0608 19 14V7Z" fill="white"/>-</svg>diff --git a/apps/docs/logos/wordmark.svg b/apps/docs/logos/wordmark.svgdeleted file mode 100644index 5ff48d4bb8..0000000000--- a/apps/docs/logos/wordmark.svg+++ /dev/null@@ -1,3 +0,0 @@-<svg width="46" height="24" viewBox="0 0 46 24" fill="none" xmlns="http://www.w3.org/2000/svg">-<path fill-rule="evenodd" clip-rule="evenodd" d="M11 2H14V13.9332L14.0003 13.9731L14.0003 14C14.0003 14.0223 14.0002 14.0445 14 14.0668V21H11V19.7455C9.86619 20.5362 8.48733 21 7.00016 21C3.13408 21 0 17.866 0 14C0 10.134 3.13408 7 7.00016 7C8.48733 7 9.86619 7.46375 11 8.25452V2ZM7 17.9998C9.20914 17.9998 11 16.209 11 13.9999C11 11.7908 9.20914 10 7 10C4.79086 10 3 11.7908 3 13.9999C3 16.209 4.79086 17.9998 7 17.9998ZM32 2H35V8.25474C36.1339 7.46383 37.5128 7 39.0002 7C42.8662 7 46.0003 10.134 46.0003 14C46.0003 17.866 42.8662 21 39.0002 21C35.1341 21 32 17.866 32 14V2ZM39 17.9998C41.2091 17.9998 43 16.209 43 13.9999C43 11.7908 41.2091 10 39 10C36.7909 10 35 11.7908 35 13.9999C35 16.209 36.7909 17.9998 39 17.9998ZM19 7H16V14C16 14.9192 16.1811 15.8295 16.5329 16.6788C16.8846 17.5281 17.4003 18.2997 18.0503 18.9497C18.7003 19.5997 19.472 20.1154 20.3213 20.4671C21.1706 20.8189 22.0809 21 23.0002 21C23.9194 21 24.8297 20.8189 25.679 20.4671C26.5283 20.1154 27.3 19.5997 27.95 18.9497C28.6 18.2997 29.1157 17.5281 29.4675 16.6788C29.8192 15.8295 30.0003 14.9192 30.0003 14H30V7H27V14C27 15.0608 26.5785 16.0782 25.8284 16.8283C25.0783 17.5784 24.0609 17.9998 23 17.9998C21.9391 17.9998 20.9217 17.5784 20.1716 16.8283C19.4215 16.0782 19 15.0608 19 14V7Z" fill="black"/>-</svg>diff --git a/apps/docs/mint.json b/apps/docs/mint.jsondeleted file mode 100644index 52e40291aa..0000000000--- a/apps/docs/mint.json+++ /dev/null@@ -1,367 +0,0 @@-{- "$schema": "https://mintlify.com/schema.json",- "name": "Dub.co Docs",- "logo": {- "dark": "/logos/wordmark-dark.svg",- "light": "/logos/wordmark.svg",- "href": "https://dub.co"- },- "favicon": "/logos/favicon.png",- "colors": {- "primary": "#9563FF",- "light": "#AE87FF",- "dark": "#0D001D",- "background": {- "dark": "#090014"- },- "anchors": {- "from": "#FF7F57",- "to": "#9563FF"- }- },- "backgroundImage": "/images/background.png",- "topbarLinks": [- {- "name": "Support",- "url": "mailto:[email protected]"- }- ],- "topbarCtaButton": {- "name": "Dashboard",- "url": "https://app.dub.co"- },- "openapi": "http://api.dub.co",- "tabs": [- {- "name": "API Reference",- "url": "api-reference"- },- {- "name": "SDKs",- "url": "sdks"- }- ],- "anchors": [- {- "name": "Help Center",- "icon": "question",- "url": "https://dub.co/help"- },- {- "name": "GitHub",- "icon": "github",- "url": "https://github.com/dubinc/dub"- }- ],- "navigation": [- {- "group": "Getting Started",- "pages": ["introduction", "data-model"]- },- {- "group": "Quickstart",- "pages": [- {- "group": "Typescript",- "icon": "js",- "pages": [- "quickstart/typescript",- "quickstart/nextjs",- "quickstart/remix",- "quickstart/nuxt",- "quickstart/express"- ]- },- {- "group": "Go",- "icon": "golang",- "pages": ["quickstart/go"]- },- {- "group": "Python",- "icon": "python",- "pages": [- "quickstart/python",- "quickstart/flask",- "quickstart/django"- ]- },- {- "group": "Ruby",- "icon": "gem",- "pages": ["quickstart/ruby", "quickstart/rails", "quickstart/sinatra"]- }- ]- },- {- "group": "Resources",- "pages": ["integrations", "examples"]- },- {- "group": "Open source",- "pages": ["local-development", "self-hosting"]- },- {- "group": "API Reference",- "pages": [- "api-reference/introduction",- "api-reference/tokens",- "api-reference/rate-limits",- "api-reference/errors"- ]- },- {- "group": "Links",- "pages": [- "api-reference/endpoint/create-a-new-link",- "api-reference/endpoint/retrieve-a-link",- "api-reference/endpoint/update-a-link",- "api-reference/endpoint/upsert-a-link",- "api-reference/endpoint/delete-a-link",- "api-reference/endpoint/retrieve-a-list-of-links",- "api-reference/endpoint/retrieve-number-of-links",- "api-reference/endpoint/bulk-create-links",- "api-reference/endpoint/bulk-update-links"- ]- },- {- "group": "Analytics",- "pages": ["api-reference/endpoint/retrieve-analytics"]- },- {- "group": "QR Codes",- "pages": ["api-reference/endpoint/retrieve-a-qr-code"]- },- {- "group": "Workspaces",- "pages": [- "api-reference/endpoint/retrieve-a-workspace",- "api-reference/endpoint/update-a-workspace"- ]- },- {- "group": "Domains",- "pages": [- "api-reference/endpoint/create-a-domain",- "api-reference/endpoint/update-a-domain",- "api-reference/endpoint/delete-a-domain",- "api-reference/endpoint/retrieve-a-list-of-domains"- ]- },- {- "group": "Tags",- "pages": [- "api-reference/endpoint/create-a-new-tag",- "api-reference/endpoint/retrieve-a-list-of-tags",- "api-reference/endpoint/update-a-tag"- ]- },- {- "group": "Metatags",- "pages": ["api-reference/endpoint/retrieve-metatags"]- },- {- "group": "Conversions [BETA]",- "pages": [- "api-reference/endpoint/track-lead",- "api-reference/endpoint/track-sale",- "api-reference/endpoint/track-customer"- ]- },- {- "group": "SDKs",- "pages": ["sdks/overview"]- },- {- "group": "TypeScript",- "pages": [- "sdks/typescript/overview",- {- "group": "Links",- "icon": "link",- "pages": [- "sdks/typescript/links/create",- "sdks/typescript/links/get",- "sdks/typescript/links/update",- "sdks/typescript/links/upsert",- "sdks/typescript/links/delete",- "sdks/typescript/links/list",- "sdks/typescript/links/count",- "sdks/typescript/links/create-many"- ]- },- {- "group": "Analytics",- "icon": "chart-line",- "pages": ["sdks/typescript/analytics/retrieve"]- },- {- "group": "Workspaces",- "icon": "folder",- "pages": [- "sdks/typescript/workspaces/get",- "sdks/typescript/workspaces/update"- ]- },- {- "group": "Domains",- "icon": "globe",- "pages": [- "sdks/typescript/domains/create",- "sdks/typescript/domains/update",- "sdks/typescript/domains/delete",- "sdks/typescript/domains/list"- ]- },- {- "group": "Tags",- "icon": "tag",- "pages": [- "sdks/typescript/tags/create",- "sdks/typescript/tags/list",- "sdks/typescript/tags/update"- ]- },- {- "group": "Metatags",- "icon": "image",- "pages": ["sdks/typescript/metatags/get"]- }- ]- }- ],- "api": {- "maintainOrder": true- },- "feedback": {- "thumbsRating": true- },- "footerSocials": {- "twitter": "https://twitter.com/dubdotco",- "github": "https://github.com/dubinc/dub",- "linkedin": "https://www.linkedin.com/company/dubinc",- "website": "https://dub.co"- },- "redirects": [- {- "source": "/sdks",- "destination": "/sdks/overview"- },- {- "source": "/integrations/:path*",- "destination": "/integrations"- },- {- "source": "/self-hosting/guide",- "destination": "/self-hosting"- },- {- "source": "/api-reference/endpoint/retrieve-a-project",- "destination": "/api-reference/endpoint/retrieve-a-workspace"- },- {- "source": "/api-reference/endpoint/retrieve-a-list-of-projects",- "destination": "/api-reference/endpoint/retrieve-a-list-of-workspaces"- },- {- "source": "/api-reference/endpoint/edit-a-link",- "destination": "/api-reference/endpoint/update-a-link"- },- {- "source": "/api-reference/endpoint/edit-a-domain",- "destination": "/api-reference/endpoint/update-a-domain"- },- {- "source": "/api-reference/endpoint/retrieve-browser",- "destination": "/api-reference/endpoint/retrieve-browsers-by-clicks"- },- {- "source": "/api-reference/endpoint/retrieve-city",- "destination": "/api-reference/endpoint/retrieve-cities-by-clicks"- },- {- "source": "/api-reference/endpoint/retrieve-clicks",- "destination": "/api-reference/endpoint/retrieve-clicks-count"- },- {- "source": "/api-reference/endpoint/retrieve-country",- "destination": "/api-reference/endpoint/retrieve-countries-by-clicks"- },- {- "source": "/api-reference/endpoint/retrieve-device",- "destination": "/api-reference/endpoint/retrieve-devices-by-clicks"- },- {- "source": "/api-reference/endpoint/retrieve-os",- "destination": "/api-reference/endpoint/retrieve-os-by-clicks"- },- {- "source": "/api-reference/endpoint/retrieve-referer",- "destination": "/api-reference/endpoint/retrieve-referers-by-clicks"- },- {- "source": "/api-reference/endpoint/retrieve-timeseries",- "destination": "/api-reference/endpoint/retrieve-timeseries-clicks"- },- {- "source": "/api-reference/endpoint/retrieve-top-links",- "destination": "/api-reference/endpoint/retrieve-top-links-by-clicks"- },- {- "source": "/api-reference/endpoint/retrieve-top-urls",- "destination": "/api-reference/endpoint/retrieve-top-urls-by-clicks"- },- {- "source": "/sdks/typescript/analytics/clicks",- "destination": "/sdks/typescript/analytics/clicks/count"- },- {- "source": "/sdks/typescript/analytics/timeseries",- "destination": "/sdks/typescript/analytics/clicks/timeseries"- },- {- "source": "/sdks/typescript/analytics/browsers",- "destination": "/sdks/typescript/analytics/clicks/browsers"- },- {- "source": "/sdks/typescript/analytics/cities",- "destination": "/sdks/typescript/analytics/clicks/cities"- },- {- "source": "/sdks/typescript/analytics/countries",- "destination": "/sdks/typescript/analytics/clicks/countries"- },- {- "source": "/sdks/typescript/analytics/devices",- "destination": "/sdks/typescript/analytics/clicks/devices"- },- {- "source": "/sdks/typescript/analytics/os",- "destination": "/sdks/typescript/analytics/clicks/os"- },- {- "source": "/sdks/typescript/analytics/referers",- "destination": "/sdks/typescript/analytics/clicks/referers"- },- {- "source": "/sdks/typescript/analytics/top-links",- "destination": "/sdks/typescript/analytics/clicks/top-links"- },- {- "source": "/sdks/typescript/analytics/top-urls",- "destination": "/sdks/typescript/analytics/clicks/top-urls"- },- {- "source": "/quickstart/nodejs",- "destination": "/quickstart/typescript"- },- {- "source": "/sdks/typescript/domains/add",- "destination": "/sdks/typescript/domains/create"- },- {- "source": "/api-reference/endpoint/add-a-domain",- "destination": "/api-reference/endpoint/create-a-domain"- }- ]-}diff --git a/apps/docs/package.json b/apps/docs/package.jsondeleted file mode 100644index ad1621b2c1..0000000000--- a/apps/docs/package.json+++ /dev/null@@ -1,7 +0,0 @@-{- "name": "docs",- "version": "0.1.0",- "scripts": {- "dev": "mintlify dev --port 3334"- }-}diff --git a/apps/docs/quickstart/django.mdx b/apps/docs/quickstart/django.mdxdeleted file mode 100644index 7e199242c9..0000000000--- a/apps/docs/quickstart/django.mdx+++ /dev/null@@ -1,165 +0,0 @@-----title: "Django"-description: "Learn how to create a short link using the Django and Dub Python SDK."------import Prerequisites from "/snippets/sdk-prerequisites.mdx";-import LinkArguments from "/snippets/link-arguments.mdx";--<Prerequisites />--## 2. Install and initialize the Dub Python SDK--<Steps titleSize="h3">--<Step title="Install">--To install the [Dub Python SDK](https://d.to/python), run the following command:--```bash pip-pip install dub-```--</Step>--<Step title="Initialize">--Initialize the Dub Python SDK by creating a new instance of the `Dub` class.--```python-import os-import dub-from dub.models import operations-from django.http import JsonResponse--d = dub.Dub(- token=os.environ['DUB_API_KEY'],-)-```--</Step>--</Steps>--## 3. Create link--Let's create a short link using the [Dub Python SDK](https://d.to/python).--```python views.py-def create_link(request):- res = d.links.create(request=operations.CreateLinkRequestBody(- url='https://google.com',- ))-- return JsonResponse({- 'short_link': res.link_schema.short_link- })-```--<Accordion title="Full list of available attributes for the Link model">- <LinkArguments />-</Accordion>--## 3a. Create link with `externalId`--Optionally, you can also pass an `externalId` field which is a unique identifier for the link in your own database to associate it with the link in Dub's system.--```python views.py-def create_link(request):- res = d.links.create(request=operations.CreateLinkRequestBody(- url='https://google.com',- external_id='12345',- ))-- return JsonResponse({- 'short_link': res.link_schema.short_link- })-```--## 4. Upsert link--Dub Python SDK provides a method to create or update a link so you don't have to worry about checking if the link already exists.--```python views.py-def upsert_link(request):- res = d.links.upsert(request=operations.UpsertLinkRequestBody(- url='https://google.com',- ))-- return JsonResponse({- 'short_link': res.link_schema.short_link- })-```--## 5. Update link--Let's update an existing link using the Dub Python SDK.--You can do that in two ways:--- Using the link's `linkId` in Dub's system.-- Using the link's `externalId` in your own database (prefixed with `ext_`).--```python views.py-# Update a link by its linkId-def update_link(request):- res = d.links.update(link_id="clx1gvi9o0005hf5momm6f7hj", request_body=operations.UpdateLinkRequestBody(- url='https://google.uk',- ))-- return JsonResponse({- 'short_link': res.link_schema.short_link- })--# Update a link by its externalId-def update_link_external(request):- res = d.links.update(external_id="ext_12345", request_body=operations.UpdateLinkRequestBody(- url='https://google.uk',- ))-- return JsonResponse({- 'short_link': res.link_schema.short_link- })-```--## 6. Retrieve analytics for link--Dub allows you to retrieve analytics for a link using the Dub Python SDK.--```python views.py-# Retrieve the timeseries analytics for the last 7 days for a link-def analytics(request):- res = d.analytics.retrieve(request=operations.RetrieveAnalyticsRequest(- link_id='clx1gvi9o0005hf5momm6f7hj',- interval='7d',- group_by='timeseries',- ))-- return JsonResponse(res)-```--Simliarly, you can retrieve analytics for a link using the `externalId` field.--```python views.py-# Retrieve the timeseries analytics for the last 7 days for a link-def analytics(request):- res = d.analytics.retrieve(request=operations.RetrieveAnalyticsRequest(- external_id='ext_12345',- interval='7d',- group_by='timeseries',- ))-- return JsonResponse(res)-```--## 7. Examples--<CardGroup cols={2}>- <Card- title="Python Example"- icon="arrow-up-right-from-square"- href="https://github.com/dubinc/examples/tree/main/python/django"- >- See the full example on GitHub.- </Card>-</CardGroup>diff --git a/apps/docs/quickstart/express.mdx b/apps/docs/quickstart/express.mdxdeleted file mode 100644index 7bd7e38062..0000000000--- a/apps/docs/quickstart/express.mdx+++ /dev/null@@ -1,151 +0,0 @@-----title: "Express"-description: "Learn how to create a short link using the Express and Dub TypeScript SDK."------import Prerequisites from "/snippets/sdk-prerequisites.mdx";-import InstallTypescript from "/snippets/sdk-install-ts.mdx";-import LinkArguments from "/snippets/link-arguments.mdx";--<Prerequisites />--<InstallTypescript />--## 3. Create link--Let's create a short link using the [Dub TypeScript SDK](/sdks/typescript/overview).--```typescript index.ts-app.get("/create-link", async (req: Request, res: Response) => {- try {- const result = await dub.links.create({- url: "https://www.google.com",- });-- res.status(200).json(result);- } catch (error: any) {- res.status(400).json(error);- }-});-```--<Accordion title="Full list of available attributes for the Link model">- <LinkArguments />-</Accordion>--## 3a. Create link with `externalId`--Optionally, you can also pass an `externalId` field which is a unique identifier for the link in your own database to associate it with the link in Dub's system.--```typescript index.ts-app.get("/create-link", async (req: Request, res: Response) => {- try {- const result = await dub.links.create({- url: "https://www.google.com",- externalId: "12345",- });-- res.status(200).json(result);- } catch (error: any) {- res.status(400).json(error);- }-});-```--## 4. Upsert link--Dub TypeScript SDK provides a method to create or update a link so you don't have to worry about checking if the link already exists.--```typescript index.ts-app.get("/upsert-link", async (req: Request, res: Response) => {- try {- // Update the link if same URL already exists or create a new link- const result = await dub.links.upsert({- url: "https://www.google.com",- });-- res.status(200).json(result);- } catch (error: any) {- res.status(400).json(error);- }-});-```--## 5. Update link--Let's update an existing link using the Dub TypeScript SDK.--You can do that in two ways:--- Using the link's `linkId` in Dub's system.-- Using the link's `externalId` in your own database (prefixed with `ext_`).--```typescript index.ts-app.get("/update-link", async (req: Request, res: Response) => {- try {- // Update a link by its linkId- const { shortLink } = await dub.links.update("clv3o9p9q000au1h0mc7r6l63", {- url: "https://www.google.uk", // new URL- });-- // Update a link by its externalId- const { shortLink } = await dub.links.update("ext_12345", {- url: "https://www.google.uk", // new URL- });-- res.status(200).json({ shortLink });- } catch (error: any) {- res.status(400).json(error);- }-});-```--## 6. Retrieve analytics for link--Dub allows you to retrieve analytics for a link using the Dub TypeScript SDK.--```typescript index.ts-import { ClicksTimeseries } from "dub/models/components";--app.get("/analytics", async (req: Request, res: Response) => {- try {- // Retrieve the timeseries analytics for the last 7 days for a link- const response = await dub.analytics.retrieve({- linkId: "clv3o9p9q000au1h0mc7r6l63",- interval: "7d",- groupBy: "timeseries",- });-- const timeseries = response as ClicksTimeseries[];-- res.status(200).json(timeseries);- } catch (error: any) {- res.status(400).json(error);- }-});-```--Simliarly, you can retrieve analytics for a link using the `externalId` field.--```typescript index.ts-// Retrieve the timeseries analytics for the last 7 days for a link-const response = await dub.analytics.retrieve({- externalId: "ext_12345",- interval: "7d",- groupBy: "timeseries",-});--const timeseries = response as ClicksTimeseries[];-```--## 7. Examples--<CardGroup cols={2}>- <Card- title="Express Example"- icon="arrow-up-right-from-square"- href="https://github.com/dubinc/examples/tree/main/typescript/express"- >- See the full example on GitHub.- </Card>-</CardGroup>diff --git a/apps/docs/quickstart/flask.mdx b/apps/docs/quickstart/flask.mdxdeleted file mode 100644index 2685494d14..0000000000--- a/apps/docs/quickstart/flask.mdx+++ /dev/null@@ -1,177 +0,0 @@-----title: "Flask"-description: "Learn how to create a short link using the Flask and Dub Python SDK."------import Prerequisites from "/snippets/sdk-prerequisites.mdx";-import LinkArguments from "/snippets/link-arguments.mdx";--<Prerequisites />--## 2. Install and initialize the Dub Python SDK--<Steps titleSize="h3">--<Step title="Install">--To install the [Dub Python SDK](https://d.to/python), run the following command:--```bash pip-pip install dub-```--</Step>--<Step title="Initialize">--Initialize the Dub Python SDK by creating a new instance of the `Dub` class.--```python-import os-import dub-from dub.models import operations--d = dub.Dub(- token=os.environ['DUB_API_KEY'],-)-```--</Step>--</Steps>--## 3. Create link--Let's create a short link using the [Dub Python SDK](https://d.to/python).--```python app.py[email protected]('/create-link')-def hello():- res = None-- try:- res = d.links.create(request=operations.CreateLinkRequestBody(- url='https://google.com',- ))- except Exception as e:- return str(e)-- if res.link_schema is not None:- return res.link_schema.short_link-```--<Accordion title="Full list of available attributes for the Link model">- <LinkArguments />-</Accordion>--## 3a. Create link with `externalId`--Optionally, you can also pass an `externalId` field which is a unique identifier for the link in your own database to associate it with the link in Dub's system.--```python app.py[email protected]('/create-link')-def hello():- res = None-- try:- res = d.links.create(request=operations.CreateLinkRequestBody(- url='https://google.com',- external_id='12345',- ))- except Exception as e:- return str(e)-- if res.link_schema is not None:- return res.link_schema.short_link-```--## 4. Upsert link--Dub Python SDK provides a method to create or update a link so you don't have to worry about checking if the link already exists.--```python app.py[email protected]('/upsert-link')-def upsert():- res = None-- try:- res = d.links.upsert(request=operations.UpsertLinkRequestBody(- url='https://google.com',- ))- except Exception as e:- return str(e)-- if res.link_schema is not None:- return res.link_schema.short_link-```--## 5. Update link--Let's update an existing link using the Dub Python SDK.--You can do that in two ways:--- Using the link's `linkId` in Dub's system.-- Using the link's `externalId` in your own database (prefixed with `ext_`).--```python app.py[email protected]('/update-link')-def update():- res = None-- try:- res = d.links.update(link_id="clx1gvi9o0005hf5momm6f7hj", request_body=operations.UpdateLinkRequestBody(- url='https://google.uk',- ))- except Exception as e:- return str(e)-- if res.link_schema is not None:- return res.link_schema.short_link-```--## 6. Retrieve analytics for link--Dub allows you to retrieve analytics for a link using the Dub Python SDK.--```python app.py[email protected]('/analytics')-def analytics():- res = None-- try:- # Retrieve the timeseries analytics for the last 7 days for a link- res = d.analytics.retrieve(request=operations.RetrieveAnalyticsRequest(- link_id='clx1gvi9o0005hf5momm6f7hj',- interval='7d',- group_by='timeseries',- ))- except Exception as e:- return str(e)-- if res.one_of is not None:- return res.one_of-```--Simliarly, you can retrieve analytics for a link using the `externalId` field.--```python app.py-# Retrieve the timeseries analytics for the last 7 days for a link-result = d.analytics.retrieve(request=operations.RetrieveAnalyticsRequest(- external_id='ext_12345',- interval='7d',- group_by='timeseries',-))-```--## 7. Examples--<CardGroup cols={2}>- <Card- title="Python Example"- icon="arrow-up-right-from-square"- href="https://github.com/dubinc/examples/tree/main/python/flask"- >- See the full example on GitHub.- </Card>-</CardGroup>diff --git a/apps/docs/quickstart/go.mdx b/apps/docs/quickstart/go.mdxdeleted file mode 100644index 2a1b93f1f5..0000000000--- a/apps/docs/quickstart/go.mdx+++ /dev/null@@ -1,178 +0,0 @@-----title: "Introduction"-description: "Learn how to create a short link using the Dub Go SDK."------import Prerequisites from "/snippets/sdk-prerequisites.mdx";-import LinkArguments from "/snippets/link-arguments.mdx";--<Prerequisites />--## 2. Install and initialize the Dub Go SDK--<Steps titleSize="h3">--<Step title="Install">--To install the [Dub Go SDK](https://d.to/go), run the following command:--```bash bash-go get github.com/dubinc/dub-go-```--</Step>--<Step title="Initialize">--Initialize the Dub Go SDK by creating a new instance of the `Dub` struct.--```go-package main--import (- "log"- "os"-- dub "github.com/dubinc/dub-go"-)--d := dub.New(- dub.WithSecurity(os.Getenv("DUB_API_KEY")),-)-```--</Step>--</Steps>--## 3. Create link--Let's create a short link using the [Dub Go SDK](https://d.to/go).--```go main.go-func main() {- request := &operations.CreateLinkRequestBody{- URL: "https://google.com",- }-- ctx := context.Background()- res, err := d.Links.Create(ctx, request)- if err != nil {- log.Fatal(err)- }- if res.LinkSchema != nil {- fmt.Println(res.LinkSchema.ShortLink)- }-}-```--<Accordion title="Full list of available attributes for the Link model">- <LinkArguments />-</Accordion>--## 3a. Create link with `externalId`--Optionally, you can also pass an `externalId` field which is a unique identifier for the link in your own database to associate it with the link in Dub's system.--```go main.go-func main() {- request := &operations.CreateLinkRequestBody{- URL: "https://google.com",- ExternalId: "12345"- }-- ctx := context.Background()- res, err := d.Links.Create(ctx, request)- if err != nil {- log.Fatal(err)- }- if res.LinkSchema != nil {- fmt.Println(res.LinkSchema.ShortLink)- }-}-```--## 4. Upsert link--Dub Go SDK provides a method to create or update a link so you don't have to worry about checking if the link already exists.--```go main.go-func main() {- // Update the link if same URL already exists or create a new link- request := &operations.UpsertLinkRequestBody{- URL: "https://google.com",- }-- ctx := context.Background()- res, err := d.Links.Upsert(ctx, request)- if err != nil {- log.Fatal(err)- }- if res.LinkSchema != nil {- fmt.Println(res.LinkSchema.ShortLink)- }-}-```--## 5. Update link--Let's update an existing link using the Dub Go SDK.--You can do that in two ways:--- Using the link's `linkId` in Dub's system.-- Using the link's `externalId` in your own database (prefixed with `ext_`).--```go main.go-func main() {- request := &operations.UpdateLinkRequestBody{- URL: "https://google.us",- }-- // Update a link by its linkId- ctx := context.Background()- res, err := d.Links.Update(ctx, "clv3o9p9q000au1h0mc7r6l63", request)- if err != nil {- log.Fatal(err)- }- if res.LinkSchema != nil {- fmt.Println(res.LinkSchema.ShortLink)- }-}-```--## 6. Retrieve analytics for link--Let's retrieve analytics for a link using the Dub Go SDK.--```go main.go-func main() {- // Retrieve the timeseries analytics for the last 7 days for a link- request := operations.RetrieveAnalyticsRequest{- LinkId: "clv3o9p9q000au1h0mc7r6l63",- Interval: "7d",- GroupBy: "timeseries"- }-- ctx := context.Background()- res, err := d.Analytics.Retrieve(ctx, request)- if err != nil {- log.Fatal(err)- }- if res.OneOf != nil {- // handle response- }-}-```--## 7. Examples--<CardGroup cols={2}>- <Card- title="Go Example"- icon="arrow-up-right-from-square"- href="https://github.com/dubinc/examples/tree/main/go"- >- See the full example on GitHub.- </Card>-</CardGroup>diff --git a/apps/docs/quickstart/nextjs.mdx b/apps/docs/quickstart/nextjs.mdxdeleted file mode 100644index 04f13aca83..0000000000--- a/apps/docs/quickstart/nextjs.mdx+++ /dev/null@@ -1,152 +0,0 @@-----title: "Next.js"-description: "Learn how to create a short link using the Next.js and Dub TypeScript SDK."------import Prerequisites from "/snippets/sdk-prerequisites.mdx";-import InstallTypescript from "/snippets/sdk-install-ts.mdx";-import LinkArguments from "/snippets/link-arguments.mdx";--<Prerequisites />--<InstallTypescript />--## 3. Create link--Let's create a short link using the [Dub TypeScript SDK](/sdks/typescript/overview).--```typescript app/api/links/route.ts-export async function POST() {- try {- const link = await dub.links.create({- url: "https://google.com",- });-- return Response.json(link);- } catch (error) {- return Response.json({ error }, { status: 500 });- }-}-```--<Accordion title="Full list of available attributes for the Link model">- <LinkArguments />-</Accordion>--## 3a. Create link with `externalId`--Optionally, you can also pass an `externalId` field which is a unique identifier for the link in your own database to associate it with the link in Dub's system.--```typescript app/api/links/route.ts-export async function POST() {- try {- const link = await dub.links.create({- url: "https://google.com",- externalId: "12345",- });-- return Response.json(link);- } catch (error) {- return Response.json({ error }, { status: 500 });- }-}-```--This will let you easily [update the link](#5-update-link) later on using the `externalId`, or [retrieve analytics](#6-retrieve-analytics-for-link) for it.--## 4. Upsert link--Dub TypeScript SDK provides a method to create or update a link so you don't have to worry about checking if the link already exists.--```typescript app/api/links/route.ts-export async function PATCH() {- try {- const { shortLink } = await dub.links.upsert({- url: "https://google.com",- });-- return Response.json({ shortLink }); // will always be the same short link- } catch (error) {- return Response.json({ error }, { status: 500 });- }-}-```--## 5. Update link--Let's update an existing link using the Dub TypeScript SDK.--You can do that in two ways:--- Using the link's `linkId` in Dub's system.-- Using the link's `externalId` in your own database (prefixed with `ext_`).--```typescript app/api/links/route.ts-export async function PATCH() {- try {- // Update a link by its linkId- const { shortLink } = await dub.links.update("clv3o9p9q000au1h0mc7r6l63", {- url: "https://www.google.uk", // new URL- });-- // Update a link by its externalId- const { shortLink } = await dub.links.update("ext_12345", {- url: "https://www.google.uk", // new URL- });-- return Response.json({ shortLink });- } catch (error) {- return Response.json({ error }, { status: 500 });- }-}-```--## 6. Retrieve analytics for link--Dub allows you to retrieve analytics for a link using the Dub TypeScript SDK.--```typescript app/api/analytics/route.ts-import { ClicksTimeseries } from "dub/models/components";--export async function GET() {- try {- // Retrieve the timeseries analytics for the last 7 days for a link- const response = await dub.analytics.retrieve({- linkId: "clv3o9p9q000au1h0mc7r6l63",- interval: "7d",- groupBy: "timeseries",- });-- const timeseries = response as ClicksTimeseries[];-- return Response.json(timeseries);- } catch (error) {- return Response.json({ error }, { status: 500 });- }-}-```--Simliarly, you can retrieve analytics for a link using the `externalId` field.--```typescript app/api/analytics/route.ts-// Retrieve the timeseries analytics for the last 7 days for a link-const response = await dub.analytics.retrieve({- externalId: "ext_12345",- interval: "7d",- groupBy: "timeseries",-});--const timeseries = response as ClicksTimeseries[];-```--## 7. Examples--<CardGroup cols={2}>- <Card- title="Next.js Example"- icon="arrow-up-right-from-square"- href="https://github.com/dubinc/examples"- >- See the full example on GitHub.- </Card>-</CardGroup>diff --git a/apps/docs/quickstart/nuxt.mdx b/apps/docs/quickstart/nuxt.mdxdeleted file mode 100644index 8bd18eeba8..0000000000--- a/apps/docs/quickstart/nuxt.mdx+++ /dev/null@@ -1,150 +0,0 @@-----title: "Nuxt"-description: "Learn how to create a short link using the Nuxt and Dub TypeScript SDK."------import Prerequisites from "/snippets/sdk-prerequisites.mdx";-import InstallTypescript from "/snippets/sdk-install-ts.mdx";--<Prerequisites />--<InstallTypescript />--## 3. Create link--Let's create a short link using the [Dub TypeScript SDK](/sdks/typescript/overview).--```typescript server/api/links.post.ts-export default defineEventHandler(async () => {- try {- const result = await dub.links.create({- url: "https://www.google.com",- });-- return result;- } catch (error) {- console.error(error);- return error;- }-});-```--## 3a. Create link with `externalId`--Optionally, you can also pass an `externalId` field which is a unique identifier for the link in your own database to associate it with the link in Dub's system.--```typescript server/api/links.post.ts-export default defineEventHandler(async () => {- try {- const result = await dub.links.create({- url: "https://www.google.com",- externalId: "12345",- });-- return result;- } catch (error) {- console.error(error);- return error;- }-});-```--## 4. Upsert link--Dub TypeScript SDK provides a method to create or update a link so you don't have to worry about checking if the link already exists.--```typescript server/api/links.put.ts-export default defineEventHandler(async () => {- try {- const result = await dub.links.upsert({- url: "https://www.google.com",- });-- return result;- } catch (error) {- console.error(error);- return error;- }-});-```--## 5. Update link--Let's update an existing link using the Dub TypeScript SDK.--You can do that in two ways:--- Using the link's `linkId` in Dub's system.-- Using the link's `externalId` in your own database (prefixed with `ext_`).--```typescript server/api/links.patch.ts-export default defineEventHandler(async () => {- try {- // Update a link by its linkId- const { shortLink } = await dub.links.update("clv3o9p9q000au1h0mc7r6l63", {- url: "https://www.google.uk", // new URL- });-- // Update a link by its externalId- const { shortLink } = await dub.links.update("ext_12345", {- url: "https://www.google.uk", // new URL- });-- return { shortLink };- } catch (error) {- console.error(error);- return error;- }-});-```--## 6. Retrieve analytics for link--Dub allows you to retrieve analytics for a link using the Dub TypeScript SDK.--```typescript server/api/analytics.get.ts-import { ClicksTimeseries } from "dub/models/components";--export default defineEventHandler(async () => {- try {- // Retrieve the timeseries analytics for the last 7 days for a link- const response = await dub.analytics.retrieve({- linkId: "clv3o9p9q000au1h0mc7r6l63",- interval: "7d",- groupBy: "timeseries",- });-- const timeseries = response as ClicksTimeseries[];-- return timeseries;- } catch (error) {- console.error(error);- return error;- }-});-```--Simliarly, you can retrieve analytics for a link using the `externalId` field.--```typescript server/api/analytics.get.ts-// Retrieve the timeseries analytics for the last 7 days for a link-const response = await dub.analytics.retrieve({- externalId: "ext_12345",- interval: "7d",- groupBy: "timeseries",-});--const timeseries = response as ClicksTimeseries[];-```--## 7. Examples--<CardGroup cols={2}>- <Card- title="Nuxt.js Example"- icon="arrow-up-right-from-square"- href="https://github.com/dubinc/examples/tree/main/typescript/nuxt"- >- See the full example on GitHub.- </Card>-</CardGroup>diff --git a/apps/docs/quickstart/python.mdx b/apps/docs/quickstart/python.mdxdeleted file mode 100644index bd046af6bf..0000000000--- a/apps/docs/quickstart/python.mdx+++ /dev/null@@ -1,143 +0,0 @@-----title: "Introduction"-description: "Learn how to create a short link using the Dub Python SDK."------import Prerequisites from "/snippets/sdk-prerequisites.mdx";-import LinkArguments from "/snippets/link-arguments.mdx";--<Prerequisites />--## 2. Install and initialize the Dub Python SDK--<Steps titleSize="h3">--<Step title="Install">--To install the [Dub Python SDK](https://d.to/python), run the following command:--```bash pip-pip install dub-```--</Step>--<Step title="Initialize">--Initialize the Dub Python SDK by creating a new instance of the `Dub` class.--```python-import os-import dub-from dub.models import operations--d = dub.Dub(- token=os.environ['DUB_API_KEY'],-)-```--</Step>--</Steps>--## 3. Create link--Let's create a short link using the [Dub Python SDK](https://d.to/python).--```python index.py-result = d.links.create(request=operations.CreateLinkRequestBody(- url='https://google.com',-))--print(result.link_schema.short_link)-```--<Accordion title="Full list of available attributes for the Link model">- <LinkArguments />-</Accordion>--## 3a. Create link with `externalId`--Optionally, you can also pass an `externalId` field which is a unique identifier for the link in your own database to associate it with the link in Dub's system.--```python index.py-result = d.links.create(request=operations.CreateLinkRequestBody(- url='https://google.com',- external_id='12345',-))--print(result.link_schema.short_link)-```--## 4. Upsert link--Dub Python SDK provides a method to create or update a link so you don't have to worry about checking if the link already exists.--```python index.py-result = d.links.upsert(request=operations.UpsertLinkRequestBody(- url='https://google.com',-))--print(result.link_schema.short_link)-```--## 5. Update link--Let's update an existing link using the Dub Python SDK.--You can do that in two ways:--- Using the link's `linkId` in Dub's system.-- Using the link's `externalId` in your own database (prefixed with `ext_`).--```python index.py-# Update a link by its linkId-result = d.links.update(link_id="clx1gvi9o0005hf5momm6f7hj", request_body=operations.UpdateLinkRequestBody(- url='https://google.uk',-))--# Update a link by its externalId-result = d.links.update(external_id="ext_12345", request_body=operations.UpdateLinkRequestBody(- url='https://google.uk',-))--print(result.link_schema.short_link)-```--## 6. Retrieve analytics for link--Dub allows you to retrieve analytics for a link using the Dub Python SDK.--```python index.py-# Retrieve the timeseries analytics for the last 7 days for a link-result = d.analytics.retrieve(request=operations.RetrieveAnalyticsRequest(- link_id='clx1gvi9o0005hf5momm6f7hj',- interval='7d',- group_by='timeseries',-))--print(result)-```--Simliarly, you can retrieve analytics for a link using the `externalId` field.--```python index.py-# Retrieve the timeseries analytics for the last 7 days for a link-result = d.analytics.retrieve(request=operations.RetrieveAnalyticsRequest(- external_id='ext_12345',- interval='7d',- group_by='timeseries',-))-```--## 7. Examples--<CardGroup cols={2}>- <Card- title="Python Example"- icon="arrow-up-right-from-square"- href="https://github.com/dubinc/examples/tree/main/python/flask"- >- See the full example on GitHub.- </Card>-</CardGroup>diff --git a/apps/docs/quickstart/rails.mdx b/apps/docs/quickstart/rails.mdxdeleted file mode 100644index 9c5d5d7dc2..0000000000--- a/apps/docs/quickstart/rails.mdx+++ /dev/null@@ -1,161 +0,0 @@-----title: "Ruby on Rails"-description: "Learn how to create a short link using Ruby on Rails and the Dub Ruby SDK."------import Prerequisites from "/snippets/sdk-prerequisites.mdx";-import LinkArguments from "/snippets/link-arguments.mdx";--<Prerequisites />--## 2. Install and initialize the Dub Ruby SDK--<Steps titleSize="h3">--<Step title="Install">--To install the [Dub Ruby SDK](https://d.to/ruby), run the following command:--```bash bash-gem install dub-```--</Step>--<Step title="Initialize">--Initialize the Dub Ruby SDK by creating a new instance of the `Dub` struct.--```ruby-class LinksController < ApplicationController- require 'dub'-- before_action :initialize_dub-- def initialize_dub- @dub = ::OpenApiSDK::Dub.new- @dub.config_security(- ::OpenApiSDK::Shared::Security.new(- token: ENV['DUB_API_KEY']- )- )- end-end-```--</Step>--</Steps>--## 3. Create link--Let's create a short link using the [Dub Ruby SDK](https://d.to/ruby).--```ruby links_controller.rb-def create- req = ::OpenApiSDK::Operations::CreateLinkRequest.new(- request_body: ::OpenApiSDK::Operations::CreateLinkRequestBody.new(- url: 'https://google.com'- )- )-- res = @dub.links.create(req)-- render json: res.raw_response.body-end-```--<Accordion title="Full list of available attributes for the Link model">- <LinkArguments />-</Accordion>--## 3a. Create link with `externalId`--Optionally, you can also pass an `externalId` field which is a unique identifier for the link in your own database to associate it with the link in Dub's system.--```ruby links_controller.rb-def create- req = ::OpenApiSDK::Operations::CreateLinkRequest.new(- request_body: ::OpenApiSDK::Operations::CreateLinkRequestBody.new(- url: 'https://google.com',- external_id: '12345'- )- )-- res = @dub.links.create(req)-- render json: res.raw_response.body-end-```--## 4. Upsert link--Dub Ruby SDK provides a method to create or update a link so you don't have to worry about checking if the link already exists.--```ruby links_controller.rb-def upsert- req = ::OpenApiSDK::Operations::UpsertLinkRequest.new(- request_body: ::OpenApiSDK::Operations::UpsertLinkRequestBody.new(- url: "https://google.com",- ),- )-- res = @dub.links.upsert(req)-- render json: res.raw_response.body-end-```--## 5. Update link--Let's update an existing link using the Dub Ruby SDK.--You can do that in two ways:--- Using the link's `linkId` in Dub's system.-- Using the link's `externalId` in your own database (prefixed with `ext_`).--```ruby links_controller.rb-def update- req = ::OpenApiSDK::Operations::UpdateLinkRequest.new(- link_id: 'clx1gvi9o0005hf5momm6f7hj',- request_body: ::OpenApiSDK::Operations::UpdateLinkRequestBody.new(- url: 'https://google.uk'- )- )-- res = @dub.links.update(req)-- render json: res.raw_response.body-end-```--## 6. Retrieve analytics for link--Let's retrieve analytics for a link using the Dub Ruby SDK.--```ruby index.rb-def analytics- req = ::OpenApiSDK::Operations::RetrieveAnalyticsRequest.new(- link_id: "clx1gvi9o0005hf5momm6f7hj",- interval: ::OpenApiSDK::Operations::Interval::SEVEND,- group_by: ::OpenApiSDK::Operations::GroupBy::TIMESERIES- )-- res = @dub.analytics.retrieve(req)-- render json: res.raw_response.body-end-```--## 7. Examples--<CardGroup cols={2}>- <Card- title="Rails Example"- icon="arrow-up-right-from-square"- href="https://github.com/dubinc/examples/tree/main/ruby/rails/example"- >- See the full example on GitHub.- </Card>-</CardGroup>diff --git a/apps/docs/quickstart/remix.mdx b/apps/docs/quickstart/remix.mdxdeleted file mode 100644index 384e7c8097..0000000000--- a/apps/docs/quickstart/remix.mdx+++ /dev/null@@ -1,155 +0,0 @@-----title: "Remix"-description: "Learn how to create a short link using the Remix and Dub TypeScript SDK."------import Prerequisites from "/snippets/sdk-prerequisites.mdx";-import InstallTypescript from "/snippets/sdk-install-ts.mdx";-import LinkArguments from "/snippets/link-arguments.mdx";--<Prerequisites />--<InstallTypescript />--## 3. Create link--Let's create a short link using the [Dub TypeScript SDK](/sdks/typescript/overview).--```typescript app/routes/create-link.ts-export const loader = async () => {- try {- const result = await dub.links.create({- url: "https://www.google.com",- });-- return json(result, 200);- } catch (error: any) {- console.error(error);- return json(error, 400);- }-};-```--<Accordion title="Full list of available attributes for the Link model">- <LinkArguments />-</Accordion>--## 3a. Create link with `externalId`--Optionally, you can also pass an `externalId` field which is a unique identifier for the link in your own database to associate it with the link in Dub's system.--```typescript app/routes/create-link.ts-export const loader = async () => {- try {- const result = await dub.links.create({- url: "https://www.google.com",- externalId: "12345",- });-- return json(result, 200);- } catch (error: any) {- console.error(error);- return json(error, 400);- }-};-```--This will let you easily [update the link](#5-update-link) later on using the `externalId`, or [retrieve analytics](#6-retrieve-analytics-for-link) for it.--## 4. Upsert link--Dub TypeScript SDK provides a method to create or update a link so you don't have to worry about checking if the link already exists.--```typescript app/routes/upsert-link.ts-export const loader = async () => {- try {- const result = await dub.links.upsert({- url: "https://www.google.com",- });-- return json(result, 200);- } catch (error: any) {- console.error(error);- return json(error, 400);- }-};-```--## 5. Update link--Let's update an existing link using the Dub TypeScript SDK.--You can do that in two ways:--- Using the link's `linkId` in Dub's system.-- Using the link's `externalId` in your own database (prefixed with `ext_`).--```typescript app/routes/update-link.ts-export const loader = async () => {- try {- // Update a link by its linkId- const { shortLink } = await dub.links.update("clv3o9p9q000au1h0mc7r6l63", {- url: "https://www.google.uk", // new URL- });-- // Update a link by its externalId- const { shortLink } = await dub.links.update("ext_12345", {- url: "https://www.google.uk", // new URL- });-- return json({ shortLink }, 200);- } catch (error: any) {- console.error(error);- return json(error, 400);- }-};-```--## 6. Retrieve analytics for link--Dub allows you to retrieve analytics for a link using the Dub TypeScript SDK.--```typescript app/routes/analytics.ts-export const loader = async () => {- try {- // Retrieve the timeseries analytics for the last 7 days for a link- const result = await dub.analytics.retrieve({- linkId: "clv3o9p9q000au1h0mc7r6l63",- interval: "7d",- groupBy: "timeseries",- });-- const timeseries = response as ClicksTimeseries[];-- return json(timeseries, 200);- } catch (error: any) {- console.error(error);- return json(error, 400);- }-};-```--Simliarly, you can retrieve analytics for a link using the `externalId` field.--```typescript app/routes/analytics.ts-// Retrieve the timeseries analytics for the last 7 days for a link-const response = await dub.analytics.retrieve({- externalId: "ext_12345",- interval: "7d",- groupBy: "timeseries",-});--const timeseries = response as ClicksTimeseries[];-```--## 7. Examples--<CardGroup cols={2}>- <Card- title="Remix Example"- icon="arrow-up-right-from-square"- href="https://github.com/dubinc/examples/tree/main/typescript/remix"- >- See the full example on GitHub.- </Card>-</CardGroup>diff --git a/apps/docs/quickstart/ruby.mdx b/apps/docs/quickstart/ruby.mdxdeleted file mode 100644index 04686ca524..0000000000--- a/apps/docs/quickstart/ruby.mdx+++ /dev/null@@ -1,145 +0,0 @@-----title: "Introduction"-description: "Learn how to create a short link using the Dub Ruby SDK."------import Prerequisites from "/snippets/sdk-prerequisites.mdx";-import LinkArguments from "/snippets/link-arguments.mdx";--<Prerequisites />--## 2. Install and initialize the Dub Ruby SDK--<Steps titleSize="h3">--<Step title="Install">--To install the [Dub Ruby SDK](https://d.to/ruby), run the following command:--```bash bash-gem install dub-```--</Step>--<Step title="Initialize">--Initialize the Dub Ruby SDK by creating a new instance of the `Dub` struct.--```ruby-require 'dub'--dub = ::OpenApiSDK::Dub.new-dub.config_security(- ::OpenApiSDK::Shared::Security.new(- token: ENV['DUB_API_KEY'],- )-)-```--</Step>--</Steps>--## 3. Create link--Let's create a short link using the [Dub Ruby SDK](https://d.to/ruby).--```ruby index.rb-req = ::OpenApiSDK::Operations::CreateLinkRequest.new(- request_body: ::OpenApiSDK::Operations::CreateLinkRequestBody.new(- url: "https://google.com"- )-)--res = dub.links.create(req)--puts res.raw_response.body-```--<Accordion title="Full list of available attributes for the Link model">- <LinkArguments />-</Accordion>--## 3a. Create link with `externalId`--Optionally, you can also pass an `externalId` field which is a unique identifier for the link in your own database to associate it with the link in Dub's system.--```ruby index.rb-req = ::OpenApiSDK::Operations::CreateLinkRequest.new(- request_body: ::OpenApiSDK::Operations::CreateLinkRequestBody.new(- url: "https://google.com",- external_id: "12345"- )-)--res = dub.links.create(req)--puts res.raw_response.body-```--## 4. Upsert link--Dub Ruby SDK provides a method to create or update a link so you don't have to worry about checking if the link already exists.--```ruby index.rb-req = ::OpenApiSDK::Operations::UpsertLinkRequest.new(- request_body: ::OpenApiSDK::Operations::UpsertLinkRequestBody.new(- url: "https://google.com",- ),-)--res = dub.links.upsert(req)--puts res.raw_response.body-```--## 5. Update link--Let's update an existing link using the Dub Ruby SDK.--You can do that in two ways:--- Using the link's `linkId` in Dub's system.-- Using the link's `externalId` in your own database (prefixed with `ext_`).--```ruby index.rb-req = ::OpenApiSDK::Operations::UpdateLinkRequest.new(- link_id: "cly2p8onm000cym8200nfay7l",- request_body: ::OpenApiSDK::Operations::UpdateLinkRequestBody.new(- url: "https://google.us",- ),-)--res = dub.links.update(req)--puts res.raw_response.body-```--## 6. Retrieve analytics for link--Let's retrieve analytics for a link using the Dub Ruby SDK.--```ruby index.rb-req = ::OpenApiSDK::Operations::RetrieveAnalyticsRequest.new(- link_id: "clmnr6jcc0005l308q9v56uz1",- interval: ::OpenApiSDK::Operations::Interval::SEVEND,- group_by: ::OpenApiSDK::Operations::GroupBy::TIMESERIES-)--res = dub.analytics.retrieve(req)--puts res.raw_response.body-```--## 7. Examples--<CardGroup cols={2}>- <Card- title="Ruby Example"- icon="arrow-up-right-from-square"- href="https://github.com/dubinc/examples/tree/main/ruby"- >- See the full example on GitHub.- </Card>-</CardGroup>diff --git a/apps/docs/quickstart/sinatra.mdx b/apps/docs/quickstart/sinatra.mdxdeleted file mode 100644index 3f67d54bea..0000000000--- a/apps/docs/quickstart/sinatra.mdx+++ /dev/null@@ -1,161 +0,0 @@-----title: "Sinatra"-description: "Learn how to create a short link using Sinatra and the Dub Ruby SDK."------import Prerequisites from "/snippets/sdk-prerequisites.mdx";-import LinkArguments from "/snippets/link-arguments.mdx";--<Prerequisites />--## 2. Install and initialize the Dub Ruby SDK--<Steps titleSize="h3">--<Step title="Install">--To install the [Dub Ruby SDK](https://d.to/ruby), run the following command:--```bash bash-gem install dub-```--</Step>--<Step title="Initialize">--Initialize the Dub Ruby SDK by creating a new instance of the `Dub` struct.--```ruby index.rb-require "sinatra"-require "dub"--dub = ::OpenApiSDK::Dub.new-dub.config_security(- ::OpenApiSDK::Shared::Security.new(- token: ENV['DUB_API_KEY'],- )-)-```--</Step>--</Steps>--## 3. Create link--Let's create a short link using the [Dub Ruby SDK](https://d.to/ruby).--```ruby index.rb-post "/links" do- req = ::OpenApiSDK::Operations::CreateLinkRequest.new(- request_body: ::OpenApiSDK::Operations::CreateLinkRequestBody.new(- url: 'https://google.com'- )- )-- res = dub.links.create(req)-- content_type :json- res.raw_response.body-end-```--<Accordion title="Full list of available attributes for the Link model">- <LinkArguments />-</Accordion>--## 3a. Create link with `externalId`--Optionally, you can also pass an `externalId` field which is a unique identifier for the link in your own database to associate it with the link in Dub's system.--```ruby index.rb-post "/links" do- req = ::OpenApiSDK::Operations::CreateLinkRequest.new(- request_body: ::OpenApiSDK::Operations::CreateLinkRequestBody.new(- url: 'https://google.com',- external_id: '12345'- )- )-- res = dub.links.create(req)-- content_type :json- res.raw_response.body-end-```--## 4. Upsert link--Dub Ruby SDK provides a method to create or update a link so you don't have to worry about checking if the link already exists.--```ruby index.rb-put "/links" do- req = ::OpenApiSDK::Operations::UpsertLinkRequest.new(- request_body: ::OpenApiSDK::Operations::UpsertLinkRequestBody.new(- url: "https://google.com",- ),- )-- res = dub.links.upsert(req)-- content_type :json- res.raw_response.body-end-```--## 5. Update link--Let's update an existing link using the Dub Ruby SDK.--You can do that in two ways:--- Using the link's `linkId` in Dub's system.-- Using the link's `externalId` in your own database (prefixed with `ext_`).--```ruby index.rb-patch "/links" do- req = ::OpenApiSDK::Operations::UpdateLinkRequest.new(- link_id: "clyci5h0w000511sjmu0tyjv9",- request_body: ::OpenApiSDK::Operations::UpdateLinkRequestBody.new(- url: 'https://google.uk'- )- )-- res = dub.links.update(req)-- content_type :json- res.raw_response.body-end-```--## 6. Retrieve analytics for link--Let's retrieve analytics for a link using the Dub Ruby SDK.--```ruby index.rb-get "/analytics" do- req = ::OpenApiSDK::Operations::RetrieveAnalyticsRequest.new(- link_id: "clx1gvi9o0005hf5momm6f7hj",- interval: ::OpenApiSDK::Operations::Interval::SEVEND,- group_by: ::OpenApiSDK::Operations::GroupBy::TIMESERIES- )-- res = dub.analytics.retrieve(req)-- content_type :json- res.raw_response.body-end-```--## 7. Examples--<CardGroup cols={2}>- <Card- title="Sinatra Example"- icon="arrow-up-right-from-square"- href="https://github.com/dubinc/examples/tree/main/ruby/sinatra"- >- See the full example on GitHub.- </Card>-</CardGroup>\ No newline at end of filediff --git a/apps/docs/quickstart/typescript.mdx b/apps/docs/quickstart/typescript.mdxdeleted file mode 100644index c0b914cd16..0000000000--- a/apps/docs/quickstart/typescript.mdx+++ /dev/null@@ -1,118 +0,0 @@-----title: "Introduction"-description: "Learn how to create a short link using the Dub TypeScript SDK."------import Prerequisites from "/snippets/sdk-prerequisites.mdx";-import InstallTypescript from "/snippets/sdk-install-ts.mdx";-import LinkArguments from "/snippets/link-arguments.mdx";--<Prerequisites />--<InstallTypescript />--## 3. Create link--Let's create a short link using the [Dub TypeScript SDK](/sdks/typescript/overview).--```typescript create-link.ts-const { shortLink } = await dub.links.create({- url: "https://google.com",-});--console.log(shortLink); // e.g. https://dub.sh/abc123-```--<Accordion title="Full list of available attributes for the Link model">- <LinkArguments />-</Accordion>--## 3a. Create link with `externalId`--Optionally, you can also pass an `externalId` field which is a unique identifier for the link in your own database to associate it with the link in Dub's system.--```typescript create-link-external-id.ts-await dub.links.create({- url: "https://google.com",- externalId: "12345",-});-```--This will let you easily [update the link](#5-update-link) later on using the `externalId`, or [retrieve analytics](#6-retrieve-analytics-for-link) for it.--## 4. Upsert link--Dub TypeScript SDK provides a method to create or update a link so you don't have to worry about checking if the link already exists.--```typescript upsert-link.ts-const { shortLink } = await dub.links.upsert({- url: "https://www.google.com",-});--console.log(shortLink); // will always be the same short link-```--## 5. Update link--Let's update an existing link using the Dub TypeScript SDK.--You can do that in two ways:--- Using the link's `linkId` in Dub's system.-- Using the link's `externalId` in your own database (prefixed with `ext_`).--```typescript update-link.ts-// Update a link by its linkId-await dub.links.update("clv3o9p9q000au1h0mc7r6l63", {- url: "https://www.google.uk", // new URL-});--// Update a link by its externalId-await dub.links.update("ext_12345", {- url: "https://www.google.uk", // new URL-});-```--## 6. Retrieve analytics for link--Dub allows you to retrieve analytics for a link using the Dub TypeScript SDK.--```typescript get-analytics.ts-import { ClicksTimeseries } from "dub/models/components";--// Retrieve the timeseries analytics for the last 7 days for a link-const response = await dub.analytics.retrieve({- linkId: "clv3o9p9q000au1h0mc7r6l63",- interval: "7d",- groupBy: "timeseries",-});--const timeseries = response as ClicksTimeseries[];-```--Simliarly, you can retrieve analytics for a link using the `externalId` field.--```typescript get-analytics-external-id.ts-import { ClicksTimeseries } from "dub/models/components";--// Retrieve the timeseries analytics for the last 7 days for a link-const response = await dub.analytics.retrieve({- externalId: "ext_12345",- interval: "7d",- groupBy: "timeseries",-});--const timeseries = response as ClicksTimeseries[];-```--## 7. Examples--<CardGroup cols={2}>- <Card- title="TypeScript Example"- icon="arrow-up-right-from-square"- href="https://github.com/dubinc/examples/tree/main/node"- >- See the full example on GitHub.- </Card>-</CardGroup>diff --git a/apps/docs/sdks/overview.mdx b/apps/docs/sdks/overview.mdxdeleted file mode 100644index 9833bd0ef6..0000000000--- a/apps/docs/sdks/overview.mdx+++ /dev/null@@ -1,29 +0,0 @@-----title: "Overview"-description: "Open-source client libraries for the Dub.co API"-icon: code------## Official SDKs--<CardGroup cols={2}>- <Card title="TypeScript" icon="npm" href="/sdks/typescript/overview">- TypeScript library for the Dub API- </Card>- <Card title="Go" icon="golang" href="https://d.to/go" iconType="brands">- Go library for the Dub API- </Card>- <Card title="Python" icon="python" href="https://d.to/python">- Python library for the Dub API- </Card>- <Card title="Ruby" icon="gem" href="https://d.to/ruby">- Ruby library for the Dub API- </Card>-</CardGroup>-## Community SDKs--<CardGroup cols={2}>- <Card title="Flutter (Dart)" icon="github" href="https://d.to/dart">- Dart SDK for Dub.co API- </Card>-</CardGroup>diff --git a/apps/docs/sdks/typescript/analytics/retrieve.mdx b/apps/docs/sdks/typescript/analytics/retrieve.mdxdeleted file mode 100644index f6dcacd0b8..0000000000--- a/apps/docs/sdks/typescript/analytics/retrieve.mdx+++ /dev/null@@ -1,153 +0,0 @@-----title: dub.analytics.retrieve-sidebarTitle: Retrieve-description: Retrieve analytics for a link, a domain, or the authenticated workspace. The response type depends on the `event` and `type` query parameters.------<Note>- Analytics endpoints require a [Pro plan](https://d.to/pro) subscription or- higher.-</Note>--## Arguments--<ParamField body="event" type="enum" default="clicks">- The type of event to retrieve analytics for. Available options: `clicks`,- `leads`, and `sales`.-</ParamField>--<ParamField body="groupBy" type="enum">- The parameter to group the analytics data points by. Defaults to 'count' if- undefined. Available options: `count`, `timeseries`, `countries`, `cities`,- `devices`, `browsers`, `os`, `referers`, `top_links`, `top_urls`, and- `trigger`.-</ParamField>--<ParamField body="domain" type="string">- The domain of the short link.-</ParamField>--<ParamField body="key" type="string">- The short link slug.-</ParamField>--<ParamField body="interval" type="enum<string>">- The interval to retrieve analytics for.-- Available options are `1h`, `24h`, `7d`, `30d`, `90d`, `ytd`, `1y`, and `all`.--Takes precedence over `start` and `end`.--</ParamField>--<ParamField body="start" type="string">- The start date to retrieve analytics for.--Cannot be earlier than September 22, 2022.--</ParamField>--<ParamField body="end" type="string">- The start date to retrieve analytics for.--Cannot be in the future. If not provided, defaults to the current date.--</ParamField>--<ParamField body="country" type="enum<string>">- The country to retrieve analytics for.--Available options are `AF`, `AL`, `DZ`,-`AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`,-`BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BA`, `BW`, `BV`,-`BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `KH`, `CM`, `CA`, `CV`, `KY`, `CF`, `TD`,-`CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `CI`, `HR`, `CU`,-`CY`, `CZ`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `ET`,-`FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`,-`GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`,-`HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IL`, `IT`, `JM`, `JP`,-`JO`, `KZ`, `KE`, `KI`, `KP`, `KR`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`,-`LY`, `LI`, `LT`, `LU`, `MO`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`,-`MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `MS`, `MA`, `MZ`, `MM`, `NA`,-`NR`, `NP`, `NL`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `MK`, `MP`, `NO`,-`OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`,-`QA`, `RE`, `RO`, `RU`, `RW`, `SH`, `KN`, `LC`, `PM`, `VC`, `WS`, `SM`, `ST`,-`SA`, `SN`, `SC`, `SL`, `SG`, `SK`, `SI`, `SB`, `SO`, `ZA`, `GS`, `ES`, `LK`,-`SD`, `SR`, `SJ`, `SZ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`,-`TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `US`,-`UM`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`,-`AX`, `BQ`, `CW`, `GG`, `IM`, `JE`, `ME`, `BL`, `MF`, `RS`, `SX`, `SS`, `XK`--</ParamField>--<ParamField body="city" type="string">- The city to retrieve analytics for.-</ParamField>--<ParamField body="device" type="string">- The device to retrieve analytics for.-</ParamField>--<ParamField body="browser" type="string">- The browser to retrieve analytics for.-</ParamField>--<ParamField body="os" type="string">- The OS to retrieve analytics for.-</ParamField>--<ParamField body="referer" type="string">- The referer to retrieve analytics for.-</ParamField>--<ParamField body="url" type="string">- The URL to retrieve analytics for.-</ParamField>--<ParamField body="excludeRoot" type="boolean">- Whether to exclude the root link from the response.-</ParamField>--<ParamField body="tagId" type="string">- The tag ID to retrieve analytics for.-</ParamField>--## Response--<ResponseField name="browser" type="string" required>- The name of the browser-</ResponseField>--<ResponseField name="clicks" type="number" required>- The number of clicks from this browser-</ResponseField>--<RequestExample>--```typescript-// Retrieve total clicks for a link-await dub.analytics.retrieve({- key: "dummy",- domain: "dub.sh",- event: "clicks",-});--// Retrieve timeseries analytics for a link-await dub.analytics.retrieve({- key: "dummy",- domain: "dub.sh",- interval: "30d",- event: "clicks",- groupBy: "timeseries",-});-```--</RequestExample>--<ResponseExample>--```typescript-// The response type depends on the `event` and `type` query parameters.-```--</ResponseExample>diff --git a/apps/docs/sdks/typescript/domains/create.mdx b/apps/docs/sdks/typescript/domains/create.mdxdeleted file mode 100644index 29fb58bc54..0000000000--- a/apps/docs/sdks/typescript/domains/create.mdx+++ /dev/null@@ -1,76 +0,0 @@-----title: "Create"-"og:title": "dub.domains.create - Create a domain - TypeScript SDK"-description: "Create a domain for the authenticated workspace."------import DomainResponse from "/snippets/domain-response.mdx";--## Arguments--<ParamField body="slug" type="string" required>- Name of the domain. Eg. `acme.com`.-</ParamField>--<ParamField body="type" type="enum<string>" default="redirect">- The type of redirect to use for this domain.- <enum>- <value>redirect</value>- <value>rewrite</value>- </enum>-</ParamField>--<ParamField body="target" type="string | null">- The page your users will get redirected to when they visit your domain.-</ParamField>--<ParamField body="expiredUrl" type="string | null">- Redirect users to a specific URL when any link under this domain has expired.-</ParamField>--<ParamField body="archived" type="boolean" default={false}>- Whether to archive this domain. false will unarchive a previously archived- domain.-</ParamField>--<ParamField- body="placeholder"- type="string | null"- default="https://dub.co/help/article/what-is-dub"->- Provide context to your teammates in the link creation modal by showing them- an example of a link to be shortened.-</ParamField>--## Response--<DomainResponse />--<RequestExample>--```ts-await dub.domains.create({- slug: "acme.com",-});-```--</RequestExample>--<ResponseExample>--```ts-{- id: "clvcep2sn87jh8nf808x00005",- slug: "acme.com",- verified: false,- primary: true,- archived: false,- placeholder: "https://dub.co/help/article/what-is-dub",- expiredUrl: null,- target: null,- type: "redirect",- clicks: 0-}-```--</ResponseExample>diff --git a/apps/docs/sdks/typescript/domains/delete.mdx b/apps/docs/sdks/typescript/domains/delete.mdxdeleted file mode 100644index 2ad7c9a35e..0000000000--- a/apps/docs/sdks/typescript/domains/delete.mdx+++ /dev/null@@ -1,35 +0,0 @@-----title: "Delete"-"og:title": "dub.domains.delete - Delete a domain - TypeScript SDK"-description: "Delete a domain from a workspace. It cannot be undone. This will also delete all the links associated with the domain."------## Arguments--<ParamField body="slug" type="string" required>- Name of the domain. Eg. `acme.com`.-</ParamField>--## Response--<ResponseField name="slug" type="string" required>- Name of the domain that was deleted.-</ResponseField>--<RequestExample>--```ts-await dub.domains.delete("acme.com");-```--</RequestExample>--<ResponseExample>--```ts-{- slug: "acme.com";-}-```--</ResponseExample>diff --git a/apps/docs/sdks/typescript/domains/list.mdx b/apps/docs/sdks/typescript/domains/list.mdxdeleted file mode 100644index 4b17543c6b..0000000000--- a/apps/docs/sdks/typescript/domains/list.mdx+++ /dev/null@@ -1,44 +0,0 @@-----title: "List"-"og:title": "dub.domains.list - Retrieve a list of domains - TypeScript SDK"-description: "Retrieve a list of domains associated with the authenticated workspace."------import DomainResponse from "/snippets/domain-response.mdx";--## Arguments--No arguments.--## Response--<DomainResponse />--<RequestExample>--```ts-await dub.domains.list({});-```--</RequestExample>--<ResponseExample>--```ts-[- {- id: "clvcep2sn87jh8nf808x00005",- slug: "acme.com",- verified: false,- primary: true,- archived: false,- placeholder: "https://dub.co/help/article/what-is-dub",- expiredUrl: "https://acme.com/expired",- target: "https://acme.com/home",- type: "redirect",- clicks: 0,- },-];-```--</ResponseExample>diff --git a/apps/docs/sdks/typescript/domains/update.mdx b/apps/docs/sdks/typescript/domains/update.mdxdeleted file mode 100644index 9e5c3f4afb..0000000000--- a/apps/docs/sdks/typescript/domains/update.mdx+++ /dev/null@@ -1,78 +0,0 @@-----title: "Update"-"og:title": "dub.domains.update - Edit a domain - TypeScript SDK"-description: "Edit a domain for the authenticated workspace."------import DomainResponse from "/snippets/domain-response.mdx";--## Arguments--<ParamField body="slug" type="string">- Name of the domain. If provided, the existing domain will be updated with the- new domain. Eg. `acme.com`.-</ParamField>--<ParamField body="type" type="enum<string>" default="redirect">- The type of redirect to use for this domain.- <enum>- <value>redirect</value>- <value>rewrite</value>- </enum>-</ParamField>--<ParamField body="target" type="string | null">- The page your users will get redirected to when they visit your domain.-</ParamField>--<ParamField body="expiredUrl" type="string | null">- Redirect users to a specific URL when any link under this domain has expired.-</ParamField>--<ParamField body="archived" type="boolean" default={false}>- Whether to archive this domain. false will unarchive a previously archived- domain.-</ParamField>--<ParamField- body="placeholder"- type="string | null"- default="https://dub.co/help/article/what-is-dub"->- Provide context to your teammates in the link creation modal by showing them- an example of a link to be shortened.-</ParamField>--## Response--<DomainResponse />--<RequestExample>--```ts-await dub.domains.update("acme.com", {- expiredUrl: "https://acme.com/expired",- target: "https://acme.com/home",-});-```--</RequestExample>--<ResponseExample>--```ts-{- id: "clvcep2sn87jh8nf808x00005",- slug: "acme.com",- verified: false,- primary: true,- archived: false,- placeholder: "https://dub.co/help/article/what-is-dub",- expiredUrl: "https://acme.com/expired",- target: "https://acme.com/home",- type: "redirect",- clicks: 0-}-```--</ResponseExample>diff --git a/apps/docs/sdks/typescript/links/count.mdx b/apps/docs/sdks/typescript/links/count.mdxdeleted file mode 100644index 348ca4a3f7..0000000000--- a/apps/docs/sdks/typescript/links/count.mdx+++ /dev/null@@ -1,71 +0,0 @@-----title: "Count"-"og:title": "dub.links.count - Retrieve the number of links - TypeScript SDK"-description: "Retrieve the number of links for the authenticated workspace. The provided query parameters allow filtering the returned links."------## Arguments--<ParamField body="domain" type="string">- The domain to filter the links by. E.g. `ac.me`. If not provided, all links- for the workspace will be returned.-</ParamField>--<ParamField body="tagId" type="string">- The tag ID to filter the links by. This field is deprecated – use `tagIds`- instead.-</ParamField>--<ParamField body="tagIds" type="string">- The tag IDs to filter the links by.-</ParamField>--<ParamField body="search" type="string">- The search term to filter the links by. The search term will be matched- against the short link slug and the destination URL.-</ParamField>--<ParamField body="userId" type="string">- The user ID to filter the links by.-</ParamField>--<ParamField body="showArchived" type="boolean" default={false}>- Whether to include archived links in the response. Defaults to `false` if not- provided.-</ParamField>--<ParamField body="withTags" type="boolean" default={false}>- Whether to include tags in the response. Defaults to `false` if not provided.-</ParamField>--<ParamField body="groupBy" type="string">- The field to group the links by. Available options are `domain` and `tagId`.-</ParamField>--## Response--The number of links matching the query.--<RequestExample>--```ts-// Count links by domain-await dub.links.count({- domain: "dub.sh",-});--// Count links by tagIds-await dub.links.count({- tagIds: ["clv3mewk30001mq0rxl3j3frn"],-});-```--</RequestExample>--<ResponseExample>--```ts-2;-```--</ResponseExample>diff --git a/apps/docs/sdks/typescript/links/create-many.mdx b/apps/docs/sdks/typescript/links/create-many.mdxdeleted file mode 100644index 9033fca477..0000000000--- a/apps/docs/sdks/typescript/links/create-many.mdx+++ /dev/null@@ -1,80 +0,0 @@-----title: "Create Many"-"og:title": "dub.links.createMany - Bulk create links - TypeScript SDK"-description: "Bulk create up to 100 links for the authenticated workspace."------import LinkArguments from "/snippets/link-arguments.mdx";-import LinkResponse from "/snippets/link-response.mdx";--## Arguments--<LinkArguments />--## Response--<LinkResponse />--<RequestExample>--```ts-await dub.links.createMany([- {- url: "https://www.google.com",- },- {- url: "https://github.com",- },-]);-```--</RequestExample>--<ResponseExample>--```ts-[- {- id: "clv3u86ej0008y9nm1f1yto2w",- domain: "dub.sh",- key: "FTC1AXj",- externalId: "123",- url: "https://www.google.com",- archived: false,- expiresAt: null,- expiredUrl: null,- password: null,- proxy: false,- title: null,- description: null,- image: null,- rewrite: false,- ios: null,- android: null,- geo: null,- ...- },- {- id: "clv3u86ej000ay9nm55qgbh5r",- domain: "dub.sh",- key: "B6qpMch",- externalId: "123",- url: "https://github.com",- archived: false,- expiresAt: null,- expiredUrl: null,- password: null,- proxy: false,- title: null,- description: null,- image: null,- rewrite: false,- ios: null,- android: null,- geo: null,- ...- },-];-```--</ResponseExample>diff --git a/apps/docs/sdks/typescript/links/create.mdx b/apps/docs/sdks/typescript/links/create.mdxdeleted file mode 100644index bbaada3e43..0000000000--- a/apps/docs/sdks/typescript/links/create.mdx+++ /dev/null@@ -1,70 +0,0 @@-----title: "Create"-"og:title": "dub.links.create - Create a new link - TypeScript SDK"-description: "Create a new link for the authenticated workspace."------import LinkArguments from "/snippets/link-arguments.mdx";-import LinkResponse from "/snippets/link-response.mdx";--## Arguments--<LinkArguments />--## Response--<LinkResponse />--<RequestExample>--```ts-await dub.links.create({- url: "https://www.google.com",-});-```--</RequestExample>--<ResponseExample>--```ts-{- id: 'clv3o9p9q000au1h0mc7r6l63',- domain: 'dub.sh',- key: 'e7qzMuI',- externalId: "123",- url: 'https://www.google.com',- archived: false,- expiresAt: null,- expiredUrl: null,- password: null,- proxy: false,- title: null,- description: null,- image: null,- rewrite: false,- ios: null,- android: null,- geo: null,- publicStats: false,- tagId: null,- tags: [],- comments: null,- shortLink: 'https://dub.sh/e7qzMuI',- qrCode: 'https://api.dub.co/qr?url=https://dub.sh/e7qzMuI?qr=1',- utmSource: null,- utmMedium: null,- utmCampaign: null,- utmTerm: null,- utmContent: null,- userId: 'cludszk1h0000wmd2e0ea2b0p',- workspaceId: 'ws_clugls3tn000lwfotbpy30304',- clicks: 0,- lastClicked: null,- createdAt: '2024-04-17T10:31:00.398Z',- updatedAt: '2024-04-17T10:31:00.398Z',- projectId: 'clugls3tn000lwfotbpy30304'-}-```--</ResponseExample>diff --git a/apps/docs/sdks/typescript/links/delete.mdx b/apps/docs/sdks/typescript/links/delete.mdxdeleted file mode 100644index f35f67f7b6..0000000000--- a/apps/docs/sdks/typescript/links/delete.mdx+++ /dev/null@@ -1,40 +0,0 @@-----title: "Delete"-"og:title": "dub.links.delete - Delete a link - TypeScript SDK"-description: "Delete a link for the authenticated workspace."------## Arguments--<ParamField body="linkId" type="string" required>- The id of the link to delete. You can get this via the `links.get` method.- Alternatively, you can use your `externalId` prefixed with `ext_`.-</ParamField>--## Response--<ResponseField name="id" type="string" required>- The id of the link that was deleted.-</ResponseField>--<RequestExample>--```ts-// Delete a link by linkId-await dub.links.delete("clv3o9p9q000au1h0mc7r6l63");--// Delete a link by externalId-await dub.links.delete("ext_123");-```--</RequestExample>--<ResponseExample>--```ts-{- id: "clv3o9p9q000au1h0mc7r6l63";-}-```--</ResponseExample>diff --git a/apps/docs/sdks/typescript/links/get.mdx b/apps/docs/sdks/typescript/links/get.mdxdeleted file mode 100644index a6c4f81bb9..0000000000--- a/apps/docs/sdks/typescript/links/get.mdx+++ /dev/null@@ -1,97 +0,0 @@-----title: "Get"-"og:title": "dub.links.get - Retrieve a link - TypeScript SDK"-description: "Retrieve info for a link by specifying either the domain and key or the linkId or externalId"------import LinkResponse from "/snippets/link-response.mdx";--## Arguments--<ParamField body="domain" type="string">- The domain of the link to retrieve. E.g. for `d.to/github`, the domain is- `d.to`.-</ParamField>--<ParamField body="key" type="string">- The key of the link to retrieve. E.g. for `d.to/github`, the key is `github`.-</ParamField>--<ParamField body="linkId" type="string">- The unique ID of the short link.-</ParamField>--<ParamField body="externalId" type="string">- This is the ID of the link in the your database. Must be prefixed with `ext_`- when provided.-</ParamField>--## Response--<LinkResponse />--<RequestExample>--```ts-// Retrieve a link by domain and key-await dub.links.get({- domain: "dub.sh",- key: "e7qzMuI",-});--// Retrieve a link by linkId-await dub.links.get({- linkId: "clv3o9p9q000au1h0mc7r6l63",-});--// Retrieve a link by externalId-await dub.links.get({- externalId: "ext_123",-});-```--</RequestExample>--<ResponseExample>--```ts-{- id: 'clv3o9p9q000au1h0mc7r6l63',- domain: 'dub.sh',- key: 'e7qzMuI',- externalId: "123",- url: 'https://www.google.com',- archived: false,- expiresAt: null,- expiredUrl: null,- password: null,- proxy: false,- title: null,- description: null,- image: null,- rewrite: false,- ios: null,- android: null,- geo: null,- publicStats: false,- tagId: null,- tags: [],- comments: null,- shortLink: 'https://dub.sh/e7qzMuI',- qrCode: 'https://api.dub.co/qr?url=https://dub.sh/e7qzMuI?qr=1',- utmSource: null,- utmMedium: null,- utmCampaign: null,- utmTerm: null,- utmContent: null,- userId: 'cludszk1h0000wmd2e0ea2b0p',- workspaceId: 'ws_clugls3tn000lwfotbpy30304',- clicks: 0,- lastClicked: null,- createdAt: '2024-04-17T10:31:00.398Z',- updatedAt: '2024-04-17T10:31:00.398Z',- projectId: 'clugls3tn000lwfotbpy30304'-}-```--</ResponseExample>diff --git a/apps/docs/sdks/typescript/links/list.mdx b/apps/docs/sdks/typescript/links/list.mdxdeleted file mode 100644index c3d65cba76..0000000000--- a/apps/docs/sdks/typescript/links/list.mdx+++ /dev/null@@ -1,117 +0,0 @@-----title: "List"-"og:title": "dub.links.list - Retrieve a list of links - TypeScript SDK"-description: "Retrieve a list of links for the authenticated workspace. The list will be paginated and the provided query parameters allow filtering the returned links."------import LinkResponse from "/snippets/link-response.mdx";--## Arguments--<ParamField body="domain" type="string">- The domain to filter the links by. E.g. `ac.me`. If not provided, all links- for the workspace will be returned.-</ParamField>--<ParamField body="tagId" type="string">- The tag ID to filter the links by. This field is deprecated – use `tagIds`- instead.-</ParamField>--<ParamField body="tagIds" type="string">- The tag IDs to filter the links by.-</ParamField>--<ParamField body="search" type="string">- The search term to filter the links by. The search term will be matched- against the short link slug and the destination URL.-</ParamField>--<ParamField body="userId" type="string">- The user ID to filter the links by.-</ParamField>--<ParamField body="showArchived" type="boolean" default={false}>- Whether to include archived links in the response. Defaults to `false` if not- provided.-</ParamField>--<ParamField body="withTags" type="boolean" default={false}>- Whether to include tags in the response. Defaults to `false` if not provided.-</ParamField>--<ParamField body="sort" type="string" default="createdAt">- The field to sort the links by. The default is `createdAt`, and sort order is- always descending. Available options are `createdAt`, `clicks`, and- `lastClicked`.-</ParamField>--<ParamField body="page" type="number">- The page number for pagination (each page contains `100` links).-</ParamField>--## Response--<LinkResponse />--<RequestExample>--```ts-// Find links by domain-await dub.links.list({- domain: "dub.sh",-});--// Find links by tagIds-await dub.links.list({- tagIds: ["clv3mewk30001mq0rxl3j3frn"],-});-```--</RequestExample>--<ResponseExample>--```ts-[- {- id: "clv3o9p9q000au1h0mc7r6l63",- domain: "dub.sh",- key: "e7qzMuI",- externalId: "123",- url: "https://www.google.com",- archived: false,- expiresAt: null,- expiredUrl: null,- password: null,- proxy: false,- title: null,- description: null,- image: null,- rewrite: false,- ios: null,- android: null,- geo: null,- publicStats: false,- tagId: null,- tags: [],- comments: null,- shortLink: "https://dub.sh/e7qzMuI",- qrCode: "https://api.dub.co/qr?url=https://dub.sh/e7qzMuI?qr=1",- utmSource: null,- utmMedium: null,- utmCampaign: null,- utmTerm: null,- utmContent: null,- userId: "cludszk1h0000wmd2e0ea2b0p",- workspaceId: "ws_clugls3tn000lwfotbpy30304",- clicks: 0,- lastClicked: null,- createdAt: "2024-04-17T10:31:00.398Z",- updatedAt: "2024-04-17T10:31:00.398Z",- projectId: "clugls3tn000lwfotbpy30304",- },-];-```--</ResponseExample>diff --git a/apps/docs/sdks/typescript/links/update.mdx b/apps/docs/sdks/typescript/links/update.mdxdeleted file mode 100644index 394162d747..0000000000--- a/apps/docs/sdks/typescript/links/update.mdx+++ /dev/null@@ -1,82 +0,0 @@-----title: "Update"-"og:title": "dub.links.update - Edit a link - TypeScript SDK"-description: "Edit a link for the authenticated workspace. Support partial updates."------import LinkArguments from "/snippets/link-arguments.mdx";-import LinkResponse from "/snippets/link-response.mdx";--## Arguments--<LinkArguments />--## Response--<LinkResponse />--<RequestExample>--```ts-// Update a link by its linkId-await dub.links.update("clv3o9p9q000au1h0mc7r6l63", {- url: "https://www.google.com",-});--// Update a link by its externalId-await dub.links.update("ext_123", {- url: "https://www.google.com",-});-```--</RequestExample>--<ResponseExample>--```ts-{- id: 'clv3o9p9q000au1h0mc7r6l63',- domain: 'dub.sh',- key: 'e7qzMuI',- externalId: "123",- url: 'https://www.google.com',- archived: false,- expiresAt: null,- expiredUrl: null,- password: null,- proxy: false,- title: null,- description: null,- image: null,- rewrite: false,- ios: null,- android: null,- geo: null,- publicStats: false,- tagId: 'clv3j1h7o00032u1ngo8luv84',- tags: [- {- id: 'clv3j1h7o00032u1ngo8luv84',- name: 'news',- color: 'blue'- }- ],- comments: null,- shortLink: 'https://dub.sh/e7qzMuI',- qrCode: 'https://api.dub.co/qr?url=https://dub.sh/e7qzMuI?qr=1',- utmSource: null,- utmMedium: null,- utmCampaign: null,- utmTerm: null,- utmContent: null,- userId: 'cludszk1h0000wmd2e0ea2b0p',- workspaceId: 'ws_clugls3tn000lwfotbpy30304',- clicks: 0,- lastClicked: null,- createdAt: '2024-04-17T10:31:00.398Z',- updatedAt: '2024-04-17T10:31:00.398Z',- projectId: 'clugls3tn000lwfotbpy30304'-}-```--</ResponseExample>diff --git a/apps/docs/sdks/typescript/links/upsert.mdx b/apps/docs/sdks/typescript/links/upsert.mdxdeleted file mode 100644index d3b6ca8782..0000000000--- a/apps/docs/sdks/typescript/links/upsert.mdx+++ /dev/null@@ -1,72 +0,0 @@-----title: "Upsert"-"og:title": "dub.links.upsert - Upsert a new link - TypeScript SDK"-description: "Upsert a link for the authenticated workspace by its URL. If a link with the same URL already exists, return it (or update it if there are any changes). Otherwise, a new link will be created."------import LinkArguments from "/snippets/link-arguments.mdx";-import LinkResponse from "/snippets/link-response.mdx";--## Arguments--<LinkArguments />--## Response--<LinkResponse />--<RequestExample>--```ts-const { shortLink } = await dub.links.upsert({- url: "https://www.google.com",-});--console.log(shortLink); // will always be https://dub.sh/xnjk23d-```--</RequestExample>--<ResponseExample>--```ts-{- id: 'clv3o9p9q000au1h0mc7r6l63',- domain: 'dub.sh',- key: 'e7qzMuI',- externalId: "123",- url: 'https://www.google.com',- archived: false,- expiresAt: null,- expiredUrl: null,- password: null,- proxy: false,- title: null,- description: null,- image: null,- rewrite: false,- ios: null,- android: null,- geo: null,- publicStats: false,- tagId: null,- tags: [],- comments: null,- shortLink: 'https://dub.sh/e7qzMuI',- qrCode: 'https://api.dub.co/qr?url=https://dub.sh/e7qzMuI?qr=1',- utmSource: null,- utmMedium: null,- utmCampaign: null,- utmTerm: null,- utmContent: null,- userId: 'cludszk1h0000wmd2e0ea2b0p',- workspaceId: 'ws_clugls3tn000lwfotbpy30304',- clicks: 0,- lastClicked: null,- createdAt: '2024-04-17T10:31:00.398Z',- updatedAt: '2024-04-17T10:31:00.398Z',- projectId: 'clugls3tn000lwfotbpy30304'-}-```--</ResponseExample>diff --git a/apps/docs/sdks/typescript/metatags/get.mdx b/apps/docs/sdks/typescript/metatags/get.mdxdeleted file mode 100644index e3d84bcd2d..0000000000--- a/apps/docs/sdks/typescript/metatags/get.mdx+++ /dev/null@@ -1,47 +0,0 @@-----title: "Get"-"og:title": "dub.metatags.get - Retrieve the metatags for a URL - TypeScript SDK"-description: "Retrieve the metatags for a URL."------## Arguments--<ParamField body="url" type="string" required>- The URL to retrieve metatags for.-</ParamField>--## Response--<ResponseField name="title" type="string | null" required>- The meta title tag for the URL.-</ResponseField>--<ResponseField name="id" type="string | null" required>- The meta description tag for the URL.-</ResponseField>--<ResponseField name="id" type="string | null" required>- The OpenGraph image for the URL.-</ResponseField>--<RequestExample>--```ts-await dub.metatags.get({- url: "https://dub.co",-});-```--</RequestExample>--<ResponseExample>--```ts-{- title: 'Dub.co - Link Management for Modern Marketing Teams',- description: 'Dub.co is the open-source link management infrastructure ...',- image: 'https://assets.dub.co/thumbnail.jpg'-}-```--</ResponseExample>diff --git a/apps/docs/sdks/typescript/overview.mdx b/apps/docs/sdks/typescript/overview.mdxdeleted file mode 100644index a8f05b00c4..0000000000--- a/apps/docs/sdks/typescript/overview.mdx+++ /dev/null@@ -1,69 +0,0 @@-----title: "Overview"-description: "TypeScript SDK for Dub.co"-icon: npm------## Install--<Tabs>- <Tab title="npm">-- ```bash- npm install dub- ```-- </Tab>-- <Tab title="yarn">-- ```bash- yarn add dub zod # zod is a peer dependency- ```-- </Tab>-- <Tab title="pnpm">-- ```bash- pnpm add dub- ```-- </Tab>-</Tabs>--## Options--The SDK constructor accepts an options object with the following properties:--<ParamField body="token" type="string" required>- The API token for the Dub.co API. You can create your token from the [Dub.co- dashboard](https://app.dub.co/settings/tokens).-</ParamField>--<ParamField body="workspaceId" type="string">- The [unique ID of the- workspace](https://dub.co/help/article/how-to-get-workspace-id) you want to- interact with. Learn how to get your Workspace ID on Dub. Deprecated in favor- of [workspace API keys](/api-reference/tokens).-</ParamField>--<ParamField body="projectSlug" type="string">- The slug of the project you want to interact with. `projectSlug` is- deprecated, use `workspaceId` instead.-</ParamField>--## Usage--```typescript-import { Dub } from "dub";--const dub = new Dub({- token: "DUB_API_KEY",- workspaceId: "ws_clugls3...",-});--await dub.links.create({- url: "https://google/com",-});-```diff --git a/apps/docs/sdks/typescript/tags/create.mdx b/apps/docs/sdks/typescript/tags/create.mdxdeleted file mode 100644index f5463eb38a..0000000000--- a/apps/docs/sdks/typescript/tags/create.mdx+++ /dev/null@@ -1,44 +0,0 @@-----title: "Create"-"og:title": "dub.tags.create - Create a new tag - TypeScript SDK"-description: "Create a new tag for the authenticated workspace."------import TagResponse from "/snippets/tag-response.mdx";--## Arguments--<ParamField body="tag" type="string" required>- The name of the tag to create.-</ParamField>--<ParamField body="color" type="string">- The color of the tag. If not provided, a random color will be used from the- list: `red`, `yellow`, `green`, `blue`, `purple`, `pink`, `brown`.-</ParamField>--## Response--<TagResponse />--<RequestExample>--```ts-await dub.tags.create({- tag: "news",-});-```--</RequestExample>--<ResponseExample>--```ts-{- id: "clv3j1h7o00032u1ngo8luv84",- name: "news",- color: "blue"-}-```--</ResponseExample>diff --git a/apps/docs/sdks/typescript/tags/list.mdx b/apps/docs/sdks/typescript/tags/list.mdxdeleted file mode 100644index f483360678..0000000000--- a/apps/docs/sdks/typescript/tags/list.mdx+++ /dev/null@@ -1,38 +0,0 @@-----title: "List"-"og:title": "dub.tags.list - Retrieve a list of tags - TypeScript SDK"-description: "Retrieve a list of tags for the authenticated workspace."------import TagResponse from "/snippets/tag-response.mdx";--## Response--<TagResponse />--<RequestExample>--```ts-await dub.tags.list({});-```--</RequestExample>--<ResponseExample>--```ts-[- {- id: "clv3j1h7o00032u1ngo8luv84",- name: "news",- color: "blue",- },- {- id: "cluibmjj5000975qol4hnx0t7",- name: "work",- color: "red",- },-];-```--</ResponseExample>diff --git a/apps/docs/sdks/typescript/tags/update.mdx b/apps/docs/sdks/typescript/tags/update.mdxdeleted file mode 100644index 33e2923682..0000000000--- a/apps/docs/sdks/typescript/tags/update.mdx+++ /dev/null@@ -1,45 +0,0 @@-----title: "dub.tags.update"-sidebarTitle: "Update"-"og:title": "dub.tags.update - Update a tag - TypeScript SDK"-description: "Update a tag for the authenticated user."------import TagResponse from "/snippets/tag-response.mdx";--## Arguments--<ParamField body="name" type="string">- The name of the tag to update.-</ParamField>--<ParamField body="color" type="string">- The color of the tag.-</ParamField>--## Response--<TagResponse />--<RequestExample>--```ts-await dub.tags.update("cluibmjj5000975qol4hnx0t7", {- name: "Jobs",- color: "red",-});-```--</RequestExample>--<ResponseExample>--```ts-{- id: "clv3j1h7o00032u1ngo8luv84",- name: "news",- color: "blue"-}-````--</ResponseExample>diff --git a/apps/docs/sdks/typescript/workspaces/get.mdx b/apps/docs/sdks/typescript/workspaces/get.mdxdeleted file mode 100644index f12f1cd8cf..0000000000--- a/apps/docs/sdks/typescript/workspaces/get.mdx+++ /dev/null@@ -1,60 +0,0 @@-----title: "dub.workspaces.get"-sidebarTitle: "Get"-"og:title": "dub.workspaces.get - Retrieve a workspace - TypeScript SDK"-description: "Retrieve a workspace for the authenticated user."------import WorkspaceResponse from "/snippets/workspace-response.mdx";--## Arguments--<ParamField body="idOrSlug" type="string" required>- The unique ID or slug of the workspace.-</ParamField>--## Response--<WorkspaceResponse />--<RequestExample>--```ts-// Retrieve a workspace by ID-await dub.workspaces.get({- idOrSlug: "clv3mw4qb00008tvuw86c53db,-});--// Retrieve a workspace by slug-await dub.workspaces.get({- idOrSlug: "acme",-});-```--</RequestExample>--<ResponseExample>--```ts-{- id: 'clv3mw4qb00008tvuw86c53db',- name: 'Acme',- slug: 'acme',- logo: null,- usage: 0,- usageLimit: 1000,- linksUsage: 0,- linksLimit: 25,- domainsLimit: 3,- tagsLimit: 5,- usersLimit: 1,- plan: 'free',- stripeId: null,- billingCycleStart: 17,- createdAt: '2024-04-17T09:52:27.635Z',- users: [ { role: 'owner' } ],- domains: []-}-```--</ResponseExample>diff --git a/apps/docs/sdks/typescript/workspaces/update.mdx b/apps/docs/sdks/typescript/workspaces/update.mdxdeleted file mode 100644index f8ee3956e7..0000000000--- a/apps/docs/sdks/typescript/workspaces/update.mdx+++ /dev/null@@ -1,68 +0,0 @@-----title: "dub.workspaces.update"-sidebarTitle: "Update"-"og:title": "dub.workspaces.update - Update a workspace - TypeScript SDK"-description: "Update a workspace for the authenticated user."------import WorkspaceResponse from "/snippets/workspace-response.mdx";--## Arguments--<ParamField body="idOrSlug" type="string" required>- The unique ID or slug of the workspace.-</ParamField>--<ParamField body="name" type="string">- The name of the workspace.-</ParamField>--<ParamField body="slug" type="string">- The slug of the workspace.-</ParamField>--## Response--<WorkspaceResponse />--<RequestExample>--```ts-// Update a workspace by its slug-await dub.workspaces.update("acme", {- name: "Acme Inc",-});--// Update a workspace by its ID-await dub.workspaces.update("ws_clv3mw4qb00008tvuw86c53db", {- name: "Acme Inc",-});-```--</RequestExample>--<ResponseExample>--```ts-{- id: 'clv3mw4qb00008tvuw86c53db',- name: 'Acme',- slug: 'acme',- logo: null,- usage: 0,- usageLimit: 1000,- linksUsage: 0,- linksLimit: 25,- domainsLimit: 3,- tagsLimit: 5,- usersLimit: 1,- plan: 'free',- stripeId: null,- billingCycleStart: 17,- createdAt: '2024-04-17T09:52:27.635Z',- users: [ { role: 'owner' } ],- domains: []-}-````--</ResponseExample>diff --git a/apps/docs/self-hosting.mdx b/apps/docs/self-hosting.mdxdeleted file mode 100644index 5ffea03145..0000000000--- a/apps/docs/self-hosting.mdx+++ /dev/null@@ -1,460 +0,0 @@-----title: "Self-hosting Dub.co"-"og:title": "How to self-host Dub.co in 8 easy steps"-description: "An end-to-end guide on how to self-host Dub.co – the open-source link management platform."-icon: server------<Frame>- <img- src="/images/logo-background-gradient.png"- alt="Dub.co Logo on a gradient background"- width="1200"- height="630"- />-</Frame>--You can self-host Dub.co on your own servers and cloud infrastructure for greater control over your data and design. This guide will walk you through the entire process of setting up Dub.co on your own servers.--## Prerequisites--Before you begin, make sure you have the following:--- A [GitHub](https://github.com/) account-- A [Tinybird](https://www.tinybird.co/) account-- An [Upstash](https://upstash.com/) account-- A [PlanetScale](https://planetscale.com/) account-- A [Vercel](https://vercel.com/) account-- Either a [Cloudflare](https://www.cloudflare.com/) or [AWS](https://aws.com) account--You'll also need a custom domain that you will be using for your Dub.co instance, with an optional custom short domain for your links.--In this guide, we'll use `acme.com` as a placeholder for your custom domain, and `ac.me` as a placeholder for your custom short domain.--## Step 1: Local setup--First, you'll need to clone the Dub.co repo and install the dependencies.--<Steps>-- <Step title="Clone the repo">--First, clone the [Dub repo](https://d.to/github) into a public GitHub repository. If you are planning to distribute the code or allow users to interact with the code remotely (e.g., as part of a hosted application), make sure to provide source access (including modifications) as required by the [AGPLv3 license](https://d.to/license).-- ```bash Terminal- git clone https://github.com/dubinc/dub.git- ```-- </Step>-- <Step title="Install dependencies">-- Run the following command to install the dependencies:-- ```bash Terminal- pnpm i- ```-- </Step>-- <Step title="Remove unnecessary files">-- Delete the `apps/docs` directory since it's not needed for self-hosting:-- ```bash Terminal- rm -rf apps/docs- ```-- Delete the `apps/web/vercel.json` file since cron jobs are not required for the self-hosted version:-- ```bash Terminal- rm apps/web/vercel.json- ```-- </Step>-- <Step title="Set up environment variables">-- Convert the `.env.example` file to `.env`. You can start filling in the first few environment variables:-- ```bash Terminal- # The domain that your app will be hosted on- NEXT_PUBLIC_APP_DOMAIN=acme.com- # The short domain that your app will be using (could be the same as the above)- NEXT_PUBLIC_APP_SHORT_DOMAIN=ac.me- # The ID of the Vercel team that your app will be deployed to: https://vercel.com/docs/accounts/create-a-team#find-your-team-id- TEAM_ID_VERCEL=- # The unique access token for your Vercel account: https://vercel.com/guides/how-do-i-use-a-vercel-api-access-token- AUTH_BEARER_TOKEN=- ```-- You will fill in the remaining environment variables in the following steps.-- </Step>--</Steps>--## Step 2: Set up Tinybird Clickhouse database--Next, you'll need to set up the [Tinybird](https://tinybird.co) Clickhouse database. This will be used to store time-series click events data.--<Steps>-- <Step title="Create Tinybird Workspace">-- In your [Tinybird](https://tinybird.co/) account, create a new Workspace.-- Copy your `admin` [Auth Token](https://www.tinybird.co/docs/concepts/auth-tokens.html). Paste this token as the `TINYBIRD_API_KEY` environment variable in your `.env` file.-- </Step>-- <Step title="Install Tinybird CLI and authenticate">--In your newly-cloned Dub.co repo, navigate to the `packages/tinybird` directory.-- Install the Tinybird CLI with `pip install tinybird-cli` (requires Python >= 3.8).-- Run `tb auth` and paste your `admin` Auth Token.-- </Step>-- <Step title="Publish Tinybird datasource and endpoints">-- Run `tb push` to publish the datasource and endpoints in the `packages/tinybird` directory. You should see the following output (truncated for brevity):-- ```bash Terminal- $ tb push-- ** Processing ./datasources/click_events.datasource- ** Processing ./endpoints/clicks.pipe- ...- ** Building dependencies- ** Running 'click_events'- ** 'click_events' created- ** Running 'device'- ** => Test endpoint at https://api.us-east.tinybird.co/v0/pipes/device.json- ** Token device_endpoint_read_8888 not found, creating one- ** => Test endpoint with:- ** $ curl https://api.us-east.tinybird.co/v0/pipes/device.json?token=p.ey...NWeaoTLM- ** 'device' created- ...- ```-- </Step>-- <Step title="Set up Tinybird API base URL">-- You will then need to update your [Tinybird API base URL](https://www.tinybird.co/docs/api-reference/api-reference.html#regions-and-endpoints) to match the region of your database.-- From the previous step, take note of the **Test endpoint** URL. It should look something like this:-- ```bash Terminal- Test endpoint at https://api.us-east.tinybird.co/v0/pipes/device.json- ```-- Copy the base URL and paste it as the `TINYBIRD_API_URL` environment variable in your `.env` file.-- ```bash Terminal- TINYBIRD_API_URL=https://api.us-east.tinybird.co- ```-- </Step>--</Steps>--## Step 3: Set up Upstash Redis database--Next, you'll need to set up the [Upstash](https://upstash.com) Redis database. This will be used to cache link metadata and serve link redirects.--<Steps>-- <Step title="Create Upstash database">--In your [Upstash account](https://console.upstash.com/), create a new database.--For better performance & read times, we recommend setting up a global database with several read regions.--<Frame></Frame>-- </Step>-- <Step title="Set up Upstash environment variables">--Once your database is created, copy the `UPSTASH_REDIS_REST_URL` and `UPSTASH_REDIS_REST_TOKEN` from the **REST API** section into your `.env` file.--<Frame></Frame>--Navigate to the [QStash tab](https://console.upstash.com/qstash) and copy the `QSTASH_TOKEN`, `QSTASH_CURRENT_SIGNING_KEY`, and `QSTASH_NEXT_SIGNING_KEY` from the **Request Builder** section into your `.env` file.--<Frame>--</Frame>- </Step>--</Steps>--## Step 4: Set up PlanetScale MySQL database--Next, you'll need to set up a [PlanetScale](https://planetscale.com/)-compatible MySQL database. This will be used to store user data and link metadata.--{/* prettier-ignore */}-<Note>- PlanetScale recently [removed their free- tier](https://planetscale.com/blog/planetscale-forever), so you'll need to pay- for this option. A cheaper alternative is to use a [MySQL database on- Railway](https://railway.app/template/mysql) ($5/month).-- For [local development](local-development), we recommend using a [local MySQL database- with PlanetScale simulator](local-development#option-1-local-mysql-database-with-planetscale-simulator-recommended) (100% free).-</Note>--<Steps>-- <Step title="Create PlanetScale database">-- In your [PlanetScale account](https://app.planetscale.com/), create a new database.-- Once your database is created, you'll be prompted to select your language or Framework. Select **Prisma**.-- <Frame>- - </Frame>-- </Step>-- <Step title="Set up PlanetScale environment variables">-- Then, you'll have to create a new password for your database. Once the password is created, scroll down to the **Add credentials to .env** section and copy the `DATABASE_URL` into your `.env` file.-- <Frame>- - </Frame>-- </Step>-- <Step title="Generate Prisma client and create database tables">--In your Dub.co codebase, navigate to `apps/web/prisma/schema.prisma` and replace all the columns in the `DefaultDomains` model to the normalized version of your custom short domain (removing the `.` character).--For example, if your custom short domain is `ac.me`, your `DefaultDomains` model should look like this:-- ```prisma apps/web/prisma/schema.prisma- model DefaultDomains {- id String @id @default(cuid())- acme Boolean @default(true)- projectId String @unique- project Project @relation(fields: [projectId], references: [id], onDelete: Cascade)- }- ```-- In the terminal, navigate to the `apps/web` directory and run the following command to generate the Prisma client:-- ```bash Terminal- npx prisma generate- ```-- Then, create the database tables with the following command:-- ```bash Terminal- npx prisma db push- ```-- </Step>--</Steps>--## Step 5: Set up GitHub OAuth--Next, [create a new GitHub App](https://github.com/settings/applications/new). This will allow you to sign in to Dub.co with your GitHub account.--Don't forget to set the following Callback URLs:--- `https://app.acme.com/api/auth/callback/github`-- `http://localhost:8888/api/auth/callback/github` for local development.--<Info>- Optional: Set the "Email addresses" account permission to **read-only** in- order to access private email addresses on GitHub.-</Info>--Once your GitHub App is created, copy the `Client ID` and `Client Secret` into your `.env` file as the `GITHUB_CLIENT_ID` and `GITHUB_CLIENT_SECRET` environment variables.--## Step 6: Set up Cloudflare R2--Dub stores user-generated assets in either S3 or S3-compatible services like [Cloudflare R2](https://cloudflare.com/r2). These include:--- Project logos-- User avatars-- [Custom Social Media Cards](https://dub.co/help/article/custom-social-media-cards) images--We recommend using [Cloudflare R2](https://cloudflare.com/r2) for self-hosting Dub.co, as it's a more cost-effective solution compared to AWS S3. Here's how you can set it up:--<Steps>-- <Step title="Create R2 bucket">--<Note>You'll need to subscribe to the R2 service if you haven't already.</Note>--In your [Cloudflare account](https://dash.cloudflare.com/), create a new R2 bucket. We recommend giving your bucket a descriptive name (e.g. `dubassets`) and leaving the remaining settings as is.--<Frame></Frame>--In your bucket settings, copy the **S3 API** value – you'll need it in Step 3.-- </Step>-- <Step title="Set up access to R2">--From the R2 main page, click **Manage R2 API Tokens** on the right-hand column.--<Frame>- -</Frame>--Then, click **Create API Token**.--<Frame>- -</Frame>--Make sure to name your API token something relevant to the service that will be using the token.--Give it "Object Read & Write" permissions, and we recommend only applying ito to a single bucket.--You can leave the remaining settings (TTL, Client IP Address Filtering) as is, and click **Create API Token**.--After you create you token, copy the `Access Key ID` and `Secret Access Key` values – you'll need them in the next step.-- </Step>--<Step title="Set up R2 environment variables">--Once you have your credentials, set them in your `.env` file:--```TypeScript .env-STORAGE_ACCESS_KEY_ID= // this is the Access Key ID value from Step 2-STORAGE_SECRET_ACCESS_KEY= // this is the Secret Access Key value from Step 2-STORAGE_ENDPOINT= // this is the S3 API value from Step 1-```--</Step>--<Step title="Set up R2 domain">--In order for your images to be publically accessible in R2 you need to setup a domain. You can either use your own domain or an R2.dev subdomain.--To use your own domain, you'll need to create a CNAME record in your DNS settings that points to your R2 bucket.--In you plan to use an R2.dev subdomain, make sure you "Allow Access".--Then set the `STORAGE_BASE_URL` in your `.env` file to the domain you chose.--```bash-STORAGE_BASE_URL={URL your assets as available at} # https://static.example.com-```--<Frame></Frame>--</Step>--</Steps>--## Step 7: Set up Postmark (optional)--<Note>- Note that if you want to use magic link sign-in, this is a required step.-</Note>--Next, you'll need to set up Postmark for transactional emails (e.g. magic link emails):--1. Follow [this guide](https://postmarkapp.com/support/article/1008-what-are-the-account-and-server-api-tokens) to create a new API token.-2. Copy the API key into your `.env` file as the `POSTMARK_API_KEY` environment variable.-3. You'll then need to set up DKIM records and for your domain to start working. You can [follow this guide](https://postmarkapp.com/support/article/1002-getting-started-with-postmark) to learn how to do so.--## Step 8: Set up Unsplash (optional)--Dub uses Unsplash's API for the [Custom Social Media Cards](https://dub.co/help/article/custom-social-media-cards) feature. You'll need to set up an Unsplash application to get an access key.--<Frame>- -</Frame>--Check out Unsplash's [official documentation](https://unsplash.com/documentation#creating-a-developer-account) to learn how you can set up the `UNSPLASH_ACCESS_KEY` env var.--## Step 9: Deploy to Vercel--Once you've set up all of the above services, you can now deploy your app to Vercel.--<Steps>- <Step title="Deploy code to GitHub">- If you haven't already, push up your cloned repository to GitHub by running the following commands:-- ```bash Terminal- git add .- git commit -m "Initial commit"- git push origin main- ```-- </Step>-- <Step title="Create a new Vercel project">- In your [Vercel account](https://vercel.com/), create a new project. Then, select your GitHub repository and click **Import**.-- Make sure that your **Framework Preset** is set to **Next.js** and the **Root Directory** is set to `apps/web`.-- <Frame>- - </Frame>-- In the **Environment Variables** section, add all of the environment variables from your `.env` file by copying all of them and pasting it into the first input field. A few notes:-- - Remove the `PROJECT_ID_VERCEL` environment variable for now since we will only get the project ID after deploying the project.- - Replace the `NEXTAUTH_URL` environment variable with the app domain that you will be using (e.g. `https://app.acme.com`).-- Click on **Deploy** to deploy your project.-- <Tip>- If you get a `No Output Directory called "public" was found after the build- completed` error, make sure that your [Vercel deployment- settings](https://vercel.com/docs/deployments/configure-a-build) to make sure that they match the following:-- <Frame>- - </Frame>-- </Tip>-- </Step>-- <Step title="Add required environment variables">--Once the project deploys, retrieve your [Vercel project ID](https://vercel.com/docs/projects/overview#project-id) and add it as the `PROJECT_ID_VERCEL` environment variable – both in your `.env` file and in your newly created Vercel project's settings (under **Settings > Environment Variables**)--Add both the `NEXT_PUBLIC_APP_DOMAIN` and `NEXT_PUBLIC_APP_SHORT_DOMAIN` as domains in your Vercel project's settings (under **Settings** > **Domains**). You can follow this guide to learn [how to set up a custom domain on Vercel](https://vercel.com/docs/projects/domains/add-a-domain).-- </Step>-- <Step title="Redeploy your Vercel project">- Go back to the **Deployments** page and redeploy your project.-- Once the deployment is complete, you should be able to visit your app domain (e.g. `https://app.acme.com`) and see the following login page:--<Frame></Frame>--</Step>--</Steps>--## Caveats--This guide is meant to be a starting point for self-hosting Dub.co. It currently depends on the following services to work:--- [Tinybird](https://www.tinybird.co/) for the analytics database-- [Upstash](https://upstash.com/) for the Redis database-- [PlanetScale](https://planetscale.com/) for the MySQL database-- [Vercel](https://vercel.com/) for hosting & [Edge Middleware](https://vercel.com/docs/functions/edge-middleware)--In the future, we plan to make it easier to self-host Dub.co by making these dependencies optional by swapping them out for native databases (e.g. mysql, redis, clickhouse, [GeoLite2](https://github.com/GitSquared/node-geolite2-redist) etc.)--Also, Docker is currently not supported, but we have a few [open](https://github.com/dubinc/dub/issues/25) [issues](https://github.com/dubinc/dub/issues/378) and [PRs](https://github.com/dubinc/dub/pull/391) for it.diff --git a/apps/docs/snippets/domain-response.mdx b/apps/docs/snippets/domain-response.mdxdeleted file mode 100644index cfa2f9271c..0000000000--- a/apps/docs/snippets/domain-response.mdx+++ /dev/null@@ -1,46 +0,0 @@-<ParamField body="id" type="string" required>- The unique identifier of the domain.-</ParamField>--<ParamField body="slug" type="string" required>- The domain name.-</ParamField>--<ParamField body="verified" type="boolean" default={false} required>- Whether the domain is verified.-</ParamField>--<ParamField body="primary" type="boolean" default={false} required>- Whether the domain is the primary domain for the workspace.-</ParamField>--<ParamField body="archived" type="boolean" default={false} required>- Whether the domain is archived.-</ParamField>--<ParamField- body="placeholder"- type="string"- default="https://dub.co/help/article/what-is-dub"- required->- Provide context to your teammates in the link creation modal by showing them- an example of a link to be shortened.-</ParamField>--<ParamField body="expiredUrl" type="string | null" required>- The URL to redirect to when a link under this domain has expired.-</ParamField>--<ParamField body="target" type="string | null" required>- The page your users will get redirected to when they visit your domain.-</ParamField>--<ParamField body="type" type="enum<string>" required>- The type of redirect to use for this domain. Available values are `redirect`- and `rewrite`.-</ParamField>--<ParamField body="clicks" type="number" default={0} required>- The number of clicks on the domain.-</ParamField>diff --git a/apps/docs/snippets/link-arguments.mdx b/apps/docs/snippets/link-arguments.mdxdeleted file mode 100644index 3c6a573879..0000000000--- a/apps/docs/snippets/link-arguments.mdx+++ /dev/null@@ -1,88 +0,0 @@-<ParamField body="url" type="string" required>- The destination URL of the short link.-</ParamField>--<ParamField body="domain" type="string">- The domain of the short link. If not provided, the primary domain for the- workspace will be used (or `dub.sh` if the workspace has no domains).-</ParamField>--<ParamField body="key" type="string">- The short link slug. If not provided, a random 7-character slug will be- generated.-</ParamField>--<ParamField body="externalId" type="string | null">- This is the ID of the link in your database. If set, it can be used to- identify the link in the future.-</ParamField>--<ParamField body="prefix" type="string">- The prefix of the short link slug for randomly-generated keys (e.g. if prefix- is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if- key is provided.-</ParamField>--<ParamField body="archived" type="boolean" default={false}>- Whether the short link is archived.-</ParamField>--<ParamField body="publicStats" type="boolean" default={false}>- Whether the short link's stats are publicly accessible.-</ParamField>--<ParamField body="tagId" type="string | null">- The unique ID of the tag assigned to the short link. This field is deprecated- – use `tagIds` instead.-</ParamField>--<ParamField body="tagIds" type="string">- The unique IDs of the tags assigned to the short link.-</ParamField>--<ParamField body="comments" type="string | null">- The comments for the short link.-</ParamField>--<ParamField body="expiresAt" type="string | null">- The date and time when the short link will expire at.-</ParamField>--<ParamField body="expiredUrl" type="string | null">- The URL to redirect to when the short link has expired.-</ParamField>--<ParamField body="password" type="string | null">- The password required to access the destination URL of the short link.-</ParamField>--<ParamField body="proxy" type="boolean" default={false}>- Whether the short link uses Custom Social Media Cards feature.-</ParamField>--<ParamField body="title" type="string | null">- The title of the short link generated via `api.dub.co/metatags`. Will be used- for Custom Social Media Cards if proxy is true.-</ParamField>--<ParamField body="description" type="string | null">- The description of the short link generated via `api.dub.co/metatags`. Will be- used for Custom Social Media Cards if proxy is true.-</ParamField>--<ParamField body="image" type="string | null">- The image of the short link generated via `api.dub.co/metatags`. Will be used- for Custom Social Media Cards if proxy is true.-</ParamField>--<ParamField body="rewrite" type="boolean" default={false}>- Whether the short link uses link cloaking.-</ParamField>--<ParamField body="ios" type="string | null">- The iOS destination URL for the short link for iOS device targeting.-</ParamField>--<ParamField body="android" type="string | null">- The Android destination URL for the short link for Android device targeting.-</ParamField>diff --git a/apps/docs/snippets/link-response.mdx b/apps/docs/snippets/link-response.mdxdeleted file mode 100644index 5b33ec3e6b..0000000000--- a/apps/docs/snippets/link-response.mdx+++ /dev/null@@ -1,161 +0,0 @@-<ResponseField name="id" type="string" required>- The unique ID of the short link.-</ResponseField>--<ResponseField name="domain" type="string" required>- The domain of the short link. If not provided, the primary domain for the- workspace will be used (or dub.sh if the workspace has no domains).-</ResponseField>--<ResponseField name="key" type="string" required>- The short link slug. If not provided, a random 7-character slug will be- generated.-</ResponseField>--<ResponseField name="externalId" type="string | null" required>- This is the ID of the link in your database. If set, it can be used to- identify the link in the future. Must be prefixed with `ext_` when provided to- `links.get`, `links.update`, and `links.delete` methods.-</ResponseField>--<ResponseField name="url" type="string" required>- The destination URL of the short link.-</ResponseField>--<ResponseField name="archived" type="boolean" required default="false">- Whether the short link is archived.-</ResponseField>--<ResponseField name="expiresAt" type="string | null" required>- The date and time when the short link will expire in ISO-8601 format.-</ResponseField>--<ResponseField name="expiredUrl" type="string | null" required>- The URL to redirect to when the short link has expired.-</ResponseField>--<ResponseField name="password" type="string | null" required>- The password required to access the destination URL of the short link.-</ResponseField>--<ResponseField name="proxy" type="boolean" required default="false">- Whether the short link uses Custom Social Media Cards feature.-</ResponseField>--<ResponseField name="title" type="string | null" required>- The title of the short link generated via api.dub.co/metatags. Will be used- for Custom Social Media Cards if proxy is true.-</ResponseField>--<ResponseField name="description" type="string | null" required>- The description of the short link generated via api.dub.co/metatags. Will be- used for Custom Social Media Cards if proxy is true.-</ResponseField>--<ResponseField name="image" type="string | null" required>- The image of the short link generated via api.dub.co/metatags. Will be used- for Custom Social Media Cards if proxy is true.-</ResponseField>--<ResponseField name="rewrite" type="boolean" required default="false">- Whether the short link uses link cloaking.-</ResponseField>--<ResponseField name="ios" type="string | null" required>- The iOS destination URL for the short link for iOS device targeting.-</ResponseField>--<ResponseField name="android" type="string | null" required>- The Android destination URL for the short link for Android device targeting.-</ResponseField>--<ResponseField name="publicStats" type="boolean" required default="false">- Whether the short link's stats are publicly accessible.-</ResponseField>--<ResponseField name="tagId" type="string | null" required>- The unique ID of the tag assigned to the short link. This field is deprecated- – use `tags` instead.-</ResponseField>--<ResponseField name="tags" type="object[] | null" required>- The tags assigned to the short link.-- <Expandable title="properties">- <ResponseField name="tags.id" type="string" required>- The unique ID of the tag.- </ResponseField>-- <ResponseField name="tags.name" type="string" required>- The name of the tag.- </ResponseField>-- <ResponseField name="tags.color" type="string" required>- The color of the tag.- </ResponseField>-- </Expandable>-</ResponseField>--<ResponseField name="comments" type="string | null" required>- The comments for the short link.-</ResponseField>--<ResponseField name="shortLink" type="string" required>- The full URL of the short link, including the https protocol (e.g.- `https://dub.sh/try`).-</ResponseField>--<ResponseField name="qrCode" type="string" required>- The full URL of the QR code for the short link (e.g.- `https://api.dub.co/qr?url=https://dub.sh/try`).-</ResponseField>--<ResponseField name="utm_source" type="string | null" required>- The UTM source of the short link.-</ResponseField>--<ResponseField name="utm_medium" type="string | null" required>- The UTM medium of the short link.-</ResponseField>--<ResponseField name="utm_campaign" type="string | null" required>- The UTM campaign of the short link.-</ResponseField>--<ResponseField name="utm_term" type="string | null" required>- The UTM term of the short link.-</ResponseField>--<ResponseField name="utm_content" type="string | null" required>- The UTM content of the short link.-</ResponseField>--<ResponseField name="userId" type="string" required>- The user ID of the creator of the short link.-</ResponseField>--<ResponseField name="workspaceId" type="string" required>- The workspace ID of the short link.-</ResponseField>--<ResponseField name="clicks" type="number" required default="0">- The number of clicks on the short link.-</ResponseField>--<ResponseField name="lastClicked" type="string | null" required>- The date and time when the short link was last clicked.-</ResponseField>--<ResponseField name="createdAt" type="string" required>- The date and time when the short link was created.-</ResponseField>--<ResponseField name="updatedAt" type="string" required>- The date and time when the short link was last updated.-</ResponseField>--<ResponseField name="projectId" type="string" required>- The project ID of the short link. This field is deprecated – use `workspaceId`- instead.-</ResponseField>diff --git a/apps/docs/snippets/sdk-install-ts.mdx b/apps/docs/snippets/sdk-install-ts.mdxdeleted file mode 100644index 619f04af83..0000000000--- a/apps/docs/snippets/sdk-install-ts.mdx+++ /dev/null@@ -1,56 +0,0 @@-## 2. Install and initialize the Dub TypeScript SDK--<Steps titleSize="h3">--<Step title="Install">--Install the [Dub TypeScript SDK](/sdks/typescript/overview) using your preferred package manager:--<Tabs>- <Tab title="npm">-- ```bash- npm install dub- ```-- </Tab>- <Tab title="yarn">-- ```bash- yarn add dub zod # zod is a peer dependency- ```-- </Tab>-- <Tab title="pnpm">-- ```bash- pnpm add dub- ```-- </Tab>-</Tabs>--</Step>--<Step title="Initialize">--Then, initialize the Dub TypeScript SDK with your API key.--```typescript lib/dub.ts-import { Dub } from "dub";--export const dub = new Dub({- token: process.env.DUB_API_KEY, // optional, defaults to DUB_API_KEY env variable-});-```--You can now use the `dub` object to interact with the Dub API.--```typescript-import { dub } from "./lib/dub";-```--</Step>--</Steps>diff --git a/apps/docs/snippets/sdk-prerequisites.mdx b/apps/docs/snippets/sdk-prerequisites.mdxdeleted file mode 100644index 0b66e817f0..0000000000--- a/apps/docs/snippets/sdk-prerequisites.mdx+++ /dev/null@@ -1,6 +0,0 @@-## 1. Prerequisites--To follow this guide, you will need to:--- [Create a Dub account](https://d.to/try)-- [Create an API key](https://app.dub.co/settings/tokens)diff --git a/apps/docs/snippets/tag-response.mdx b/apps/docs/snippets/tag-response.mdxdeleted file mode 100644index 1b2f0b8200..0000000000--- a/apps/docs/snippets/tag-response.mdx+++ /dev/null@@ -1,11 +0,0 @@-<ResponseField name="id" type="string" required>- The unique ID of the tag.-</ResponseField>--<ResponseField name="name" type="string" required>- The name of the tag.-</ResponseField>--<ResponseField name="color" type="string" required>- The color of the tag.-</ResponseField>diff --git a/apps/docs/snippets/workspace-response.mdx b/apps/docs/snippets/workspace-response.mdxdeleted file mode 100644index bbfa88e441..0000000000--- a/apps/docs/snippets/workspace-response.mdx+++ /dev/null@@ -1,84 +0,0 @@-<ResponseField name="id" type="string" required>- The unique ID of the workspace.-</ResponseField>--<ResponseField name="name" type="string" required>- The name of the workspace.-</ResponseField>--<ResponseField name="slug" type="string" required>- The slug of the workspace.-</ResponseField>--<ResponseField name="logo" type="string | null" required>- The logo of the workspace.-</ResponseField>--<ResponseField name="usage" type="number" required>- The usage of the workspace.-</ResponseField>--<ResponseField name="usageLimit" type="number" required>- The usage limit of the workspace.-</ResponseField>--<ResponseField name="linksUsage" type="number" required>- The links usage of the workspace.-</ResponseField>--<ResponseField name="linksLimit" type="number" required>- The links limit of the workspace.-</ResponseField>--<ResponseField name="domainsLimit" type="number" required>- The domains limit of the workspace.-</ResponseField>--<ResponseField name="tagsLimit" type="number" required>- The tags limit of the workspace.-</ResponseField>--<ResponseField name="usersLimit" type="number" required>- The users limit of the workspace.-</ResponseField>--<ResponseField name="plan" type="string" required>- The plan of the workspace.-</ResponseField>--<ResponseField name="stripeId" type="string | null" required>- The Stripe ID of the workspace.-</ResponseField>--<ResponseField name="billingCycleStart" type="number" required>- The date and time when the billing cycle starts for the workspace.-</ResponseField>--<ResponseField name="createdAt" type="string" required>- The date and time when the workspace was created.-</ResponseField>--<ResponseField name="users" type="object[]" required>-The role of the authenticated user in the workspace.-- <Expandable title="properties">- <ResponseField name="users.role" type="string" required>- The role of the authenticated user in the workspace.- </ResponseField>- </Expandable>-</ResponseField>--<ResponseField name="domains" type="object[]" required>-The domains of the workspace.-- <Expandable title="properties">- <ResponseField name="domains.slug" type="string">- The domain of the workspace.- </ResponseField>-- <ResponseField name="domains.primary" type="string">- Indicates if the domain is the primary domain.- </ResponseField>-- </Expandable>-</ResponseField>diff --git a/apps/web/openapi.json b/apps/web/openapi.jsondeleted file mode 100644index 20379e62e8..0000000000--- a/apps/web/openapi.json+++ /dev/null@@ -1,12867 +0,0 @@-{- "openapi": "3.0.3",- "info": {- "title": "Dub.co API",- "description": "Dub is link management infrastructure for companies to create marketing campaigns, link sharing features, and referral programs.",- "version": "0.0.1",- "contact": {- "name": "Dub.co Support",- "email": "[email protected]",- "url": "https://dub.co/api"- },- "license": {- "name": "AGPL-3.0 license",- "url": "https://github.com/dubinc/dub/blob/main/LICENSE.md"- }- },- "servers": [- {- "url": "http://api.localhost:8888",- "description": "Production API"- }- ],- "x-speakeasy-globals": {- "parameters": [- {- "x-speakeasy-globals-hidden": true,- "name": "workspaceId",- "in": "query",- "required": true,- "schema": {- "type": "string"- }- },- {- "x-speakeasy-globals-hidden": true,- "name": "projectSlug",- "in": "query",- "deprecated": true,- "schema": {- "type": "string"- }- }- ]- },- "paths": {- "/links": {- "post": {- "operationId": "createLink",- "x-speakeasy-name-override": "create",- "x-speakeasy-usage-example": true,- "summary": "Create a new link",- "description": "Create a new link for the authenticated workspace.",- "tags": ["Links"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "query",- "name": "workspaceId",- "description": "The ID of the workspace.",- "schema": {- "type": "string",- "description": "The ID of the workspace.",- "example": "ws_cluuwcv0r..."- },- "required": true- },- {- "in": "query",- "name": "projectSlug",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "schema": {- "type": "string",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- }- ],- "requestBody": {- "content": {- "application/json": {- "schema": {- "type": "object",- "properties": {- "url": {- "type": "string",- "description": "The destination URL of the short link.",- "example": "https://google/com"- },- "domain": {- "type": "string",- "description": "The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains)."- },- "key": {- "type": "string",- "description": "The short link slug. If not provided, a random 7-character slug will be generated."- },- "externalId": {- "type": "string",- "nullable": true,- "minLength": 1,- "maxLength": 255,- "description": "This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with `ext_` when passed as a query parameter.",- "example": "123456"- },- "prefix": {- "type": "string",- "description": "The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided."- },- "archived": {- "type": "boolean",- "default": false,- "description": "Whether the short link is archived."- },- "publicStats": {- "type": "boolean",- "default": false,- "description": "Whether the short link's stats are publicly accessible."- },- "tagId": {- "type": "string",- "nullable": true,- "description": "The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead.",- "deprecated": true- },- "tagIds": {- "anyOf": [- {- "type": "string"- },- {- "type": "array",- "items": {- "type": "string"- }- }- ],- "description": "The unique IDs of the tags assigned to the short link.",- "example": ["clux0rgak00011..."]- },- "tagNames": {- "anyOf": [- {- "type": "string"- },- {- "type": "array",- "items": {- "type": "string"- }- }- ],- "description": "The unique name of the tags assigned to the short link (case insensitive)."- },- "comments": {- "type": "string",- "nullable": true,- "description": "The comments for the short link."- },- "expiresAt": {- "type": "string",- "nullable": true,- "description": "The date and time when the short link will expire at."- },- "expiredUrl": {- "type": "string",- "nullable": true,- "description": "The URL to redirect to when the short link has expired."- },- "password": {- "type": "string",- "nullable": true,- "description": "The password required to access the destination URL of the short link."- },- "proxy": {- "type": "boolean",- "default": false,- "description": "Whether the short link uses Custom Social Media Cards feature."- },- "title": {- "type": "string",- "nullable": true,- "description": "The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."- },- "description": {- "type": "string",- "nullable": true,- "description": "The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."- },- "image": {- "type": "string",- "nullable": true,- "description": "The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."- },- "rewrite": {- "type": "boolean",- "default": false,- "description": "Whether the short link uses link cloaking."- },- "ios": {- "type": "string",- "nullable": true,- "description": "The iOS destination URL for the short link for iOS device targeting."- },- "android": {- "type": "string",- "nullable": true,- "description": "The Android destination URL for the short link for Android device targeting."- },- "geo": {- "type": "object",- "nullable": true,- "properties": {- "AF": {- "type": "string"- },- "AL": {- "type": "string"- },- "DZ": {- "type": "string"- },- "AS": {- "type": "string"- },- "AD": {- "type": "string"- },- "AO": {- "type": "string"- },- "AI": {- "type": "string"- },- "AQ": {- "type": "string"- },- "AG": {- "type": "string"- },- "AR": {- "type": "string"- },- "AM": {- "type": "string"- },- "AW": {- "type": "string"- },- "AU": {- "type": "string"- },- "AT": {- "type": "string"- },- "AZ": {- "type": "string"- },- "BS": {- "type": "string"- },- "BH": {- "type": "string"- },- "BD": {- "type": "string"- },- "BB": {- "type": "string"- },- "BY": {- "type": "string"- },- "BE": {- "type": "string"- },- "BZ": {- "type": "string"- },- "BJ": {- "type": "string"- },- "BM": {- "type": "string"- },- "BT": {- "type": "string"- },- "BO": {- "type": "string"- },- "BA": {- "type": "string"- },- "BW": {- "type": "string"- },- "BV": {- "type": "string"- },- "BR": {- "type": "string"- },- "IO": {- "type": "string"- },- "BN": {- "type": "string"- },- "BG": {- "type": "string"- },- "BF": {- "type": "string"- },- "BI": {- "type": "string"- },- "KH": {- "type": "string"- },- "CM": {- "type": "string"- },- "CA": {- "type": "string"- },- "CV": {- "type": "string"- },- "KY": {- "type": "string"- },- "CF": {- "type": "string"- },- "TD": {- "type": "string"- },- "CL": {- "type": "string"- },- "CN": {- "type": "string"- },- "CX": {- "type": "string"- },- "CC": {- "type": "string"- },- "CO": {- "type": "string"- },- "KM": {- "type": "string"- },- "CG": {- "type": "string"- },- "CD": {- "type": "string"- },- "CK": {- "type": "string"- },- "CR": {- "type": "string"- },- "CI": {- "type": "string"- },- "HR": {- "type": "string"- },- "CU": {- "type": "string"- },- "CY": {- "type": "string"- },- "CZ": {- "type": "string"- },- "DK": {- "type": "string"- },- "DJ": {- "type": "string"- },- "DM": {- "type": "string"- },- "DO": {- "type": "string"- },- "EC": {- "type": "string"- },- "EG": {- "type": "string"- },- "SV": {- "type": "string"- },- "GQ": {- "type": "string"- },- "ER": {- "type": "string"- },- "EE": {- "type": "string"- },- "ET": {- "type": "string"- },- "FK": {- "type": "string"- },- "FO": {- "type": "string"- },- "FJ": {- "type": "string"- },- "FI": {- "type": "string"- },- "FR": {- "type": "string"- },- "GF": {- "type": "string"- },- "PF": {- "type": "string"- },- "TF": {- "type": "string"- },- "GA": {- "type": "string"- },- "GM": {- "type": "string"- },- "GE": {- "type": "string"- },- "DE": {- "type": "string"- },- "GH": {- "type": "string"- },- "GI": {- "type": "string"- },- "GR": {- "type": "string"- },- "GL": {- "type": "string"- },- "GD": {- "type": "string"- },- "GP": {- "type": "string"- },- "GU": {- "type": "string"- },- "GT": {- "type": "string"- },- "GN": {- "type": "string"- },- "GW": {- "type": "string"- },- "GY": {- "type": "string"- },- "HT": {- "type": "string"- },- "HM": {- "type": "string"- },- "VA": {- "type": "string"- },- "HN": {- "type": "string"- },- "HK": {- "type": "string"- },- "HU": {- "type": "string"- },- "IS": {- "type": "string"- },- "IN": {- "type": "string"- },- "ID": {- "type": "string"- },- "IR": {- "type": "string"- },- "IQ": {- "type": "string"- },- "IE": {- "type": "string"- },- "IL": {- "type": "string"- },- "IT": {- "type": "string"- },- "JM": {- "type": "string"- },- "JP": {- "type": "string"- },- "JO": {- "type": "string"- },- "KZ": {- "type": "string"- },- "KE": {- "type": "string"- },- "KI": {- "type": "string"- },- "KP": {- "type": "string"- },- "KR": {- "type": "string"- },- "KW": {- "type": "string"- },- "KG": {- "type": "string"- },- "LA": {- "type": "string"- },- "LV": {- "type": "string"- },- "LB": {- "type": "string"- },- "LS": {- "type": "string"- },- "LR": {- "type": "string"- },- "LY": {- "type": "string"- },- "LI": {- "type": "string"- },- "LT": {- "type": "string"- },- "LU": {- "type": "string"- },- "MO": {- "type": "string"- },- "MG": {- "type": "string"- },- "MW": {- "type": "string"- },- "MY": {- "type": "string"- },- "MV": {- "type": "string"- },- "ML": {- "type": "string"- },- "MT": {- "type": "string"- },- "MH": {- "type": "string"- },- "MQ": {- "type": "string"- },- "MR": {- "type": "string"- },- "MU": {- "type": "string"- },- "YT": {- "type": "string"- },- "MX": {- "type": "string"- },- "FM": {- "type": "string"- },- "MD": {- "type": "string"- },- "MC": {- "type": "string"- },- "MN": {- "type": "string"- },- "MS": {- "type": "string"- },- "MA": {- "type": "string"- },- "MZ": {- "type": "string"- },- "MM": {- "type": "string"- },- "NA": {- "type": "string"- },- "NR": {- "type": "string"- },- "NP": {- "type": "string"- },- "NL": {- "type": "string"- },- "NC": {- "type": "string"- },- "NZ": {- "type": "string"- },- "NI": {- "type": "string"- },- "NE": {- "type": "string"- },- "NG": {- "type": "string"- },- "NU": {- "type": "string"- },- "NF": {- "type": "string"- },- "MK": {- "type": "string"- },- "MP": {- "type": "string"- },- "NO": {- "type": "string"- },- "OM": {- "type": "string"- },- "PK": {- "type": "string"- },- "PW": {- "type": "string"- },- "PS": {- "type": "string"- },- "PA": {- "type": "string"- },- "PG": {- "type": "string"- },- "PY": {- "type": "string"- },- "PE": {- "type": "string"- },- "PH": {- "type": "string"- },- "PN": {- "type": "string"- },- "PL": {- "type": "string"- },- "PT": {- "type": "string"- },- "PR": {- "type": "string"- },- "QA": {- "type": "string"- },- "RE": {- "type": "string"- },- "RO": {- "type": "string"- },- "RU": {- "type": "string"- },- "RW": {- "type": "string"- },- "SH": {- "type": "string"- },- "KN": {- "type": "string"- },- "LC": {- "type": "string"- },- "PM": {- "type": "string"- },- "VC": {- "type": "string"- },- "WS": {- "type": "string"- },- "SM": {- "type": "string"- },- "ST": {- "type": "string"- },- "SA": {- "type": "string"- },- "SN": {- "type": "string"- },- "SC": {- "type": "string"- },- "SL": {- "type": "string"- },- "SG": {- "type": "string"- },- "SK": {- "type": "string"- },- "SI": {- "type": "string"- },- "SB": {- "type": "string"- },- "SO": {- "type": "string"- },- "ZA": {- "type": "string"- },- "GS": {- "type": "string"- },- "ES": {- "type": "string"- },- "LK": {- "type": "string"- },- "SD": {- "type": "string"- },- "SR": {- "type": "string"- },- "SJ": {- "type": "string"- },- "SZ": {- "type": "string"- },- "SE": {- "type": "string"- },- "CH": {- "type": "string"- },- "SY": {- "type": "string"- },- "TW": {- "type": "string"- },- "TJ": {- "type": "string"- },- "TZ": {- "type": "string"- },- "TH": {- "type": "string"- },- "TL": {- "type": "string"- },- "TG": {- "type": "string"- },- "TK": {- "type": "string"- },- "TO": {- "type": "string"- },- "TT": {- "type": "string"- },- "TN": {- "type": "string"- },- "TR": {- "type": "string"- },- "TM": {- "type": "string"- },- "TC": {- "type": "string"- },- "TV": {- "type": "string"- },- "UG": {- "type": "string"- },- "UA": {- "type": "string"- },- "AE": {- "type": "string"- },- "GB": {- "type": "string"- },- "US": {- "type": "string"- },- "UM": {- "type": "string"- },- "UY": {- "type": "string"- },- "UZ": {- "type": "string"- },- "VU": {- "type": "string"- },- "VE": {- "type": "string"- },- "VN": {- "type": "string"- },- "VG": {- "type": "string"- },- "VI": {- "type": "string"- },- "WF": {- "type": "string"- },- "EH": {- "type": "string"- },- "YE": {- "type": "string"- },- "ZM": {- "type": "string"- },- "ZW": {- "type": "string"- },- "AX": {- "type": "string"- },- "BQ": {- "type": "string"- },- "CW": {- "type": "string"- },- "GG": {- "type": "string"- },- "IM": {- "type": "string"- },- "JE": {- "type": "string"- },- "ME": {- "type": "string"- },- "BL": {- "type": "string"- },- "MF": {- "type": "string"- },- "RS": {- "type": "string"- },- "SX": {- "type": "string"- },- "SS": {- "type": "string"- },- "XK": {- "type": "string"- }- },- "additionalProperties": false,- "description": "Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`."- }- },- "required": ["url"]- }- }- }- },- "responses": {- "200": {- "description": "The created link",- "content": {- "application/json": {- "schema": {- "$ref": "#/components/schemas/LinkSchema"- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- },- "get": {- "operationId": "getLinks",- "x-speakeasy-name-override": "list",- "summary": "Retrieve a list of links",- "description": "Retrieve a list of links for the authenticated workspace. The list will be paginated and the provided query parameters allow filtering the returned links.",- "tags": ["Links"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "query",- "name": "workspaceId",- "description": "The ID of the workspace.",- "schema": {- "type": "string",- "description": "The ID of the workspace.",- "example": "ws_cluuwcv0r..."- },- "required": true- },- {- "in": "query",- "name": "projectSlug",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "schema": {- "type": "string",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- },- {- "in": "query",- "name": "domain",- "description": "The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned.",- "schema": {- "type": "string",- "description": "The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned."- }- },- {- "in": "query",- "name": "tagId",- "description": "The tag ID to filter the links by. This field is deprecated – use `tagIds` instead.",- "schema": {- "type": "string",- "description": "The tag ID to filter the links by. This field is deprecated – use `tagIds` instead.",- "deprecated": true- }- },- {- "in": "query",- "name": "tagIds",- "description": "The tag IDs to filter the links by.",- "schema": {- "anyOf": [- {- "type": "string"- },- {- "type": "array",- "items": {- "type": "string"- }- }- ],- "description": "The tag IDs to filter the links by."- }- },- {- "in": "query",- "name": "tagNames",- "description": "The unique name of the tags assigned to the short link (case insensitive).",- "schema": {- "anyOf": [- {- "type": "string"- },- {- "type": "array",- "items": {- "type": "string"- }- }- ],- "description": "The unique name of the tags assigned to the short link (case insensitive)."- }- },- {- "in": "query",- "name": "search",- "description": "The search term to filter the links by. The search term will be matched against the short link slug and the destination url.",- "schema": {- "type": "string",- "description": "The search term to filter the links by. The search term will be matched against the short link slug and the destination url."- }- },- {- "in": "query",- "name": "userId",- "description": "The user ID to filter the links by.",- "schema": {- "type": "string",- "description": "The user ID to filter the links by."- }- },- {- "in": "query",- "name": "showArchived",- "description": "Whether to include archived links in the response. Defaults to `false` if not provided.",- "schema": {- "type": "boolean",- "default": "false",- "description": "Whether to include archived links in the response. Defaults to `false` if not provided."- }- },- {- "in": "query",- "name": "withTags",- "description": "Whether to include tags in the response. Defaults to `false` if not provided.",- "schema": {- "type": "boolean",- "default": "false",- "description": "Whether to include tags in the response. Defaults to `false` if not provided."- }- },- {- "in": "query",- "name": "sort",- "description": "The field to sort the links by. The default is `createdAt`, and sort order is always descending.",- "schema": {- "type": "string",- "enum": ["createdAt", "clicks", "lastClicked"],- "default": "createdAt",- "description": "The field to sort the links by. The default is `createdAt`, and sort order is always descending."- }- },- {- "in": "query",- "name": "page",- "description": "The page number for pagination (each page contains 100 links).",- "schema": {- "type": "number",- "description": "The page number for pagination (each page contains 100 links)."- }- }- ],- "responses": {- "200": {- "description": "A list of links",- "content": {- "application/json": {- "schema": {- "type": "array",- "items": {- "$ref": "#/components/schemas/LinkSchema"- }- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- }- },- "/links/count": {- "get": {- "operationId": "getLinksCount",- "x-speakeasy-name-override": "count",- "summary": "Retrieve the number of links",- "description": "Retrieve the number of links for the authenticated workspace. The provided query parameters allow filtering the returned links.",- "tags": ["Links"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "query",- "name": "workspaceId",- "description": "The ID of the workspace.",- "schema": {- "type": "string",- "description": "The ID of the workspace.",- "example": "ws_cluuwcv0r..."- },- "required": true- },- {- "in": "query",- "name": "projectSlug",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "schema": {- "type": "string",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- },- {- "in": "query",- "name": "domain",- "description": "The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned.",- "schema": {- "type": "string",- "description": "The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned."- }- },- {- "in": "query",- "name": "tagId",- "description": "The tag ID to filter the links by. This field is deprecated – use `tagIds` instead.",- "schema": {- "type": "string",- "description": "The tag ID to filter the links by. This field is deprecated – use `tagIds` instead.",- "deprecated": true- }- },- {- "in": "query",- "name": "tagIds",- "description": "The tag IDs to filter the links by.",- "schema": {- "anyOf": [- {- "type": "string"- },- {- "type": "array",- "items": {- "type": "string"- }- }- ],- "description": "The tag IDs to filter the links by."- }- },- {- "in": "query",- "name": "tagNames",- "description": "The unique name of the tags assigned to the short link (case insensitive).",- "schema": {- "anyOf": [- {- "type": "string"- },- {- "type": "array",- "items": {- "type": "string"- }- }- ],- "description": "The unique name of the tags assigned to the short link (case insensitive)."- }- },- {- "in": "query",- "name": "search",- "description": "The search term to filter the links by. The search term will be matched against the short link slug and the destination url.",- "schema": {- "type": "string",- "description": "The search term to filter the links by. The search term will be matched against the short link slug and the destination url."- }- },- {- "in": "query",- "name": "userId",- "description": "The user ID to filter the links by.",- "schema": {- "type": "string",- "description": "The user ID to filter the links by."- }- },- {- "in": "query",- "name": "showArchived",- "description": "Whether to include archived links in the response. Defaults to `false` if not provided.",- "schema": {- "type": "boolean",- "default": "false",- "description": "Whether to include archived links in the response. Defaults to `false` if not provided."- }- },- {- "in": "query",- "name": "withTags",- "description": "Whether to include tags in the response. Defaults to `false` if not provided.",- "schema": {- "type": "boolean",- "default": "false",- "description": "Whether to include tags in the response. Defaults to `false` if not provided."- }- },- {- "in": "query",- "name": "groupBy",- "description": "The field to group the links by.",- "schema": {- "anyOf": [- {- "type": "string",- "enum": ["domain"]- },- {- "type": "string",- "enum": ["tagId"]- }- ],- "description": "The field to group the links by."- }- }- ],- "responses": {- "200": {- "description": "A list of links",- "content": {- "application/json": {- "schema": {- "type": "number",- "description": "The number of links matching the query."- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- }- },- "/links/info": {- "get": {- "operationId": "getLinkInfo",- "x-speakeasy-name-override": "get",- "summary": "Retrieve a link",- "description": "Retrieve the info for a link.",- "tags": ["Links"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "query",- "name": "workspaceId",- "description": "The ID of the workspace.",- "schema": {- "type": "string",- "description": "The ID of the workspace.",- "example": "ws_cluuwcv0r..."- },- "required": true- },- {- "in": "query",- "name": "projectSlug",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "schema": {- "type": "string",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- },- {- "in": "query",- "name": "domain",- "schema": {- "type": "string",- "minLength": 1,- "description": "The domain of the link to retrieve. E.g. for `d.to/github`, the domain is `d.to`."- }- },- {- "in": "query",- "name": "key",- "description": "The key of the link to retrieve. E.g. for `d.to/github`, the key is `github`.",- "schema": {- "type": "string",- "minLength": 1,- "description": "The key of the link to retrieve. E.g. for `d.to/github`, the key is `github`."- }- },- {- "in": "query",- "name": "linkId",- "description": "The unique ID of the short link.",- "schema": {- "type": "string",- "description": "The unique ID of the short link.",- "example": "clux0rgak00011..."- }- },- {- "in": "query",- "name": "externalId",- "description": "This is the ID of the link in the your database. Must be prefixed with `ext_` when passed as a query parameter.",- "schema": {- "type": "string",- "description": "This is the ID of the link in the your database. Must be prefixed with `ext_` when passed as a query parameter.",- "example": "ext_123456"- }- }- ],- "responses": {- "200": {- "description": "The retrieved link",- "content": {- "application/json": {- "schema": {- "$ref": "#/components/schemas/LinkSchema"- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- }- },- "/links/{linkId}": {- "patch": {- "operationId": "updateLink",- "x-speakeasy-name-override": "update",- "x-speakeasy-max-method-params": 2,- "summary": "Update a link",- "description": "Update a link for the authenticated workspace.",- "tags": ["Links"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "path",- "name": "linkId",- "description": "The id of the link to update. You may use either `linkId` (obtained via `/links/info` endpoint) or `externalId` prefixed with `ext_`.",- "schema": {- "type": "string",- "description": "The id of the link to update. You may use either `linkId` (obtained via `/links/info` endpoint) or `externalId` prefixed with `ext_`."- },- "required": true- },- {- "in": "query",- "name": "workspaceId",- "description": "The ID of the workspace.",- "schema": {- "type": "string",- "description": "The ID of the workspace.",- "example": "ws_cluuwcv0r..."- },- "required": true- },- {- "in": "query",- "name": "projectSlug",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "schema": {- "type": "string",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- }- ],- "requestBody": {- "content": {- "application/json": {- "schema": {- "type": "object",- "properties": {- "url": {- "type": "string",- "description": "The destination URL of the short link.",- "example": "https://google/com"- },- "domain": {- "type": "string",- "description": "The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains)."- },- "key": {- "type": "string",- "description": "The short link slug. If not provided, a random 7-character slug will be generated."- },- "externalId": {- "type": "string",- "nullable": true,- "minLength": 1,- "maxLength": 255,- "description": "This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with `ext_` when passed as a query parameter.",- "example": "123456"- },- "prefix": {- "type": "string",- "description": "The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided."- },- "archived": {- "type": "boolean",- "default": false,- "description": "Whether the short link is archived."- },- "publicStats": {- "type": "boolean",- "default": false,- "description": "Whether the short link's stats are publicly accessible."- },- "tagId": {- "type": "string",- "nullable": true,- "description": "The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead.",- "deprecated": true- },- "tagIds": {- "anyOf": [- {- "type": "string"- },- {- "type": "array",- "items": {- "type": "string"- }- }- ],- "description": "The unique IDs of the tags assigned to the short link.",- "example": ["clux0rgak00011..."]- },- "tagNames": {- "anyOf": [- {- "type": "string"- },- {- "type": "array",- "items": {- "type": "string"- }- }- ],- "description": "The unique name of the tags assigned to the short link (case insensitive)."- },- "comments": {- "type": "string",- "nullable": true,- "description": "The comments for the short link."- },- "expiresAt": {- "type": "string",- "nullable": true,- "description": "The date and time when the short link will expire at."- },- "expiredUrl": {- "type": "string",- "nullable": true,- "description": "The URL to redirect to when the short link has expired."- },- "password": {- "type": "string",- "nullable": true,- "description": "The password required to access the destination URL of the short link."- },- "proxy": {- "type": "boolean",- "default": false,- "description": "Whether the short link uses Custom Social Media Cards feature."- },- "title": {- "type": "string",- "nullable": true,- "description": "The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."- },- "description": {- "type": "string",- "nullable": true,- "description": "The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."- },- "image": {- "type": "string",- "nullable": true,- "description": "The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."- },- "rewrite": {- "type": "boolean",- "default": false,- "description": "Whether the short link uses link cloaking."- },- "ios": {- "type": "string",- "nullable": true,- "description": "The iOS destination URL for the short link for iOS device targeting."- },- "android": {- "type": "string",- "nullable": true,- "description": "The Android destination URL for the short link for Android device targeting."- },- "geo": {- "type": "object",- "nullable": true,- "properties": {- "AF": {- "type": "string"- },- "AL": {- "type": "string"- },- "DZ": {- "type": "string"- },- "AS": {- "type": "string"- },- "AD": {- "type": "string"- },- "AO": {- "type": "string"- },- "AI": {- "type": "string"- },- "AQ": {- "type": "string"- },- "AG": {- "type": "string"- },- "AR": {- "type": "string"- },- "AM": {- "type": "string"- },- "AW": {- "type": "string"- },- "AU": {- "type": "string"- },- "AT": {- "type": "string"- },- "AZ": {- "type": "string"- },- "BS": {- "type": "string"- },- "BH": {- "type": "string"- },- "BD": {- "type": "string"- },- "BB": {- "type": "string"- },- "BY": {- "type": "string"- },- "BE": {- "type": "string"- },- "BZ": {- "type": "string"- },- "BJ": {- "type": "string"- },- "BM": {- "type": "string"- },- "BT": {- "type": "string"- },- "BO": {- "type": "string"- },- "BA": {- "type": "string"- },- "BW": {- "type": "string"- },- "BV": {- "type": "string"- },- "BR": {- "type": "string"- },- "IO": {- "type": "string"- },- "BN": {- "type": "string"- },- "BG": {- "type": "string"- },- "BF": {- "type": "string"- },- "BI": {- "type": "string"- },- "KH": {- "type": "string"- },- "CM": {- "type": "string"- },- "CA": {- "type": "string"- },- "CV": {- "type": "string"- },- "KY": {- "type": "string"- },- "CF": {- "type": "string"- },- "TD": {- "type": "string"- },- "CL": {- "type": "string"- },- "CN": {- "type": "string"- },- "CX": {- "type": "string"- },- "CC": {- "type": "string"- },- "CO": {- "type": "string"- },- "KM": {- "type": "string"- },- "CG": {- "type": "string"- },- "CD": {- "type": "string"- },- "CK": {- "type": "string"- },- "CR": {- "type": "string"- },- "CI": {- "type": "string"- },- "HR": {- "type": "string"- },- "CU": {- "type": "string"- },- "CY": {- "type": "string"- },- "CZ": {- "type": "string"- },- "DK": {- "type": "string"- },- "DJ": {- "type": "string"- },- "DM": {- "type": "string"- },- "DO": {- "type": "string"- },- "EC": {- "type": "string"- },- "EG": {- "type": "string"- },- "SV": {- "type": "string"- },- "GQ": {- "type": "string"- },- "ER": {- "type": "string"- },- "EE": {- "type": "string"- },- "ET": {- "type": "string"- },- "FK": {- "type": "string"- },- "FO": {- "type": "string"- },- "FJ": {- "type": "string"- },- "FI": {- "type": "string"- },- "FR": {- "type": "string"- },- "GF": {- "type": "string"- },- "PF": {- "type": "string"- },- "TF": {- "type": "string"- },- "GA": {- "type": "string"- },- "GM": {- "type": "string"- },- "GE": {- "type": "string"- },- "DE": {- "type": "string"- },- "GH": {- "type": "string"- },- "GI": {- "type": "string"- },- "GR": {- "type": "string"- },- "GL": {- "type": "string"- },- "GD": {- "type": "string"- },- "GP": {- "type": "string"- },- "GU": {- "type": "string"- },- "GT": {- "type": "string"- },- "GN": {- "type": "string"- },- "GW": {- "type": "string"- },- "GY": {- "type": "string"- },- "HT": {- "type": "string"- },- "HM": {- "type": "string"- },- "VA": {- "type": "string"- },- "HN": {- "type": "string"- },- "HK": {- "type": "string"- },- "HU": {- "type": "string"- },- "IS": {- "type": "string"- },- "IN": {- "type": "string"- },- "ID": {- "type": "string"- },- "IR": {- "type": "string"- },- "IQ": {- "type": "string"- },- "IE": {- "type": "string"- },- "IL": {- "type": "string"- },- "IT": {- "type": "string"- },- "JM": {- "type": "string"- },- "JP": {- "type": "string"- },- "JO": {- "type": "string"- },- "KZ": {- "type": "string"- },- "KE": {- "type": "string"- },- "KI": {- "type": "string"- },- "KP": {- "type": "string"- },- "KR": {- "type": "string"- },- "KW": {- "type": "string"- },- "KG": {- "type": "string"- },- "LA": {- "type": "string"- },- "LV": {- "type": "string"- },- "LB": {- "type": "string"- },- "LS": {- "type": "string"- },- "LR": {- "type": "string"- },- "LY": {- "type": "string"- },- "LI": {- "type": "string"- },- "LT": {- "type": "string"- },- "LU": {- "type": "string"- },- "MO": {- "type": "string"- },- "MG": {- "type": "string"- },- "MW": {- "type": "string"- },- "MY": {- "type": "string"- },- "MV": {- "type": "string"- },- "ML": {- "type": "string"- },- "MT": {- "type": "string"- },- "MH": {- "type": "string"- },- "MQ": {- "type": "string"- },- "MR": {- "type": "string"- },- "MU": {- "type": "string"- },- "YT": {- "type": "string"- },- "MX": {- "type": "string"- },- "FM": {- "type": "string"- },- "MD": {- "type": "string"- },- "MC": {- "type": "string"- },- "MN": {- "type": "string"- },- "MS": {- "type": "string"- },- "MA": {- "type": "string"- },- "MZ": {- "type": "string"- },- "MM": {- "type": "string"- },- "NA": {- "type": "string"- },- "NR": {- "type": "string"- },- "NP": {- "type": "string"- },- "NL": {- "type": "string"- },- "NC": {- "type": "string"- },- "NZ": {- "type": "string"- },- "NI": {- "type": "string"- },- "NE": {- "type": "string"- },- "NG": {- "type": "string"- },- "NU": {- "type": "string"- },- "NF": {- "type": "string"- },- "MK": {- "type": "string"- },- "MP": {- "type": "string"- },- "NO": {- "type": "string"- },- "OM": {- "type": "string"- },- "PK": {- "type": "string"- },- "PW": {- "type": "string"- },- "PS": {- "type": "string"- },- "PA": {- "type": "string"- },- "PG": {- "type": "string"- },- "PY": {- "type": "string"- },- "PE": {- "type": "string"- },- "PH": {- "type": "string"- },- "PN": {- "type": "string"- },- "PL": {- "type": "string"- },- "PT": {- "type": "string"- },- "PR": {- "type": "string"- },- "QA": {- "type": "string"- },- "RE": {- "type": "string"- },- "RO": {- "type": "string"- },- "RU": {- "type": "string"- },- "RW": {- "type": "string"- },- "SH": {- "type": "string"- },- "KN": {- "type": "string"- },- "LC": {- "type": "string"- },- "PM": {- "type": "string"- },- "VC": {- "type": "string"- },- "WS": {- "type": "string"- },- "SM": {- "type": "string"- },- "ST": {- "type": "string"- },- "SA": {- "type": "string"- },- "SN": {- "type": "string"- },- "SC": {- "type": "string"- },- "SL": {- "type": "string"- },- "SG": {- "type": "string"- },- "SK": {- "type": "string"- },- "SI": {- "type": "string"- },- "SB": {- "type": "string"- },- "SO": {- "type": "string"- },- "ZA": {- "type": "string"- },- "GS": {- "type": "string"- },- "ES": {- "type": "string"- },- "LK": {- "type": "string"- },- "SD": {- "type": "string"- },- "SR": {- "type": "string"- },- "SJ": {- "type": "string"- },- "SZ": {- "type": "string"- },- "SE": {- "type": "string"- },- "CH": {- "type": "string"- },- "SY": {- "type": "string"- },- "TW": {- "type": "string"- },- "TJ": {- "type": "string"- },- "TZ": {- "type": "string"- },- "TH": {- "type": "string"- },- "TL": {- "type": "string"- },- "TG": {- "type": "string"- },- "TK": {- "type": "string"- },- "TO": {- "type": "string"- },- "TT": {- "type": "string"- },- "TN": {- "type": "string"- },- "TR": {- "type": "string"- },- "TM": {- "type": "string"- },- "TC": {- "type": "string"- },- "TV": {- "type": "string"- },- "UG": {- "type": "string"- },- "UA": {- "type": "string"- },- "AE": {- "type": "string"- },- "GB": {- "type": "string"- },- "US": {- "type": "string"- },- "UM": {- "type": "string"- },- "UY": {- "type": "string"- },- "UZ": {- "type": "string"- },- "VU": {- "type": "string"- },- "VE": {- "type": "string"- },- "VN": {- "type": "string"- },- "VG": {- "type": "string"- },- "VI": {- "type": "string"- },- "WF": {- "type": "string"- },- "EH": {- "type": "string"- },- "YE": {- "type": "string"- },- "ZM": {- "type": "string"- },- "ZW": {- "type": "string"- },- "AX": {- "type": "string"- },- "BQ": {- "type": "string"- },- "CW": {- "type": "string"- },- "GG": {- "type": "string"- },- "IM": {- "type": "string"- },- "JE": {- "type": "string"- },- "ME": {- "type": "string"- },- "BL": {- "type": "string"- },- "MF": {- "type": "string"- },- "RS": {- "type": "string"- },- "SX": {- "type": "string"- },- "SS": {- "type": "string"- },- "XK": {- "type": "string"- }- },- "additionalProperties": false,- "description": "Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`."- }- },- "required": ["url"]- }- }- }- },- "responses": {- "200": {- "description": "The updated link",- "content": {- "application/json": {- "schema": {- "$ref": "#/components/schemas/LinkSchema"- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- },- "delete": {- "operationId": "deleteLink",- "x-speakeasy-name-override": "delete",- "x-speakeasy-max-method-params": 1,- "summary": "Delete a link",- "description": "Delete a link for the authenticated workspace.",- "tags": ["Links"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "path",- "name": "linkId",- "description": "The id of the link to delete. You may use either `linkId` (obtained via `/links/info` endpoint) or `externalId` prefixed with `ext_`.",- "schema": {- "type": "string",- "description": "The id of the link to delete. You may use either `linkId` (obtained via `/links/info` endpoint) or `externalId` prefixed with `ext_`."- },- "required": true- },- {- "in": "query",- "name": "workspaceId",- "description": "The ID of the workspace.",- "schema": {- "type": "string",- "description": "The ID of the workspace.",- "example": "ws_cluuwcv0r..."- },- "required": true- },- {- "in": "query",- "name": "projectSlug",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "schema": {- "type": "string",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- }- ],- "responses": {- "200": {- "description": "The deleted link",- "content": {- "application/json": {- "schema": {- "type": "object",- "properties": {- "id": {- "type": "string",- "description": "The ID of the link."- }- },- "required": ["id"]- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- }- },- "/links/bulk": {- "post": {- "operationId": "bulkCreateLinks",- "x-speakeasy-name-override": "createMany",- "summary": "Bulk create links",- "description": "Bulk create up to 100 links for the authenticated workspace.",- "tags": ["Links"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "query",- "name": "workspaceId",- "description": "The ID of the workspace.",- "schema": {- "type": "string",- "description": "The ID of the workspace.",- "example": "ws_cluuwcv0r..."- },- "required": true- },- {- "in": "query",- "name": "projectSlug",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "schema": {- "type": "string",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- }- ],- "requestBody": {- "content": {- "application/json": {- "schema": {- "type": "array",- "items": {- "type": "object",- "properties": {- "url": {- "type": "string",- "description": "The destination URL of the short link.",- "example": "https://google/com"- },- "domain": {- "type": "string",- "description": "The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains)."- },- "key": {- "type": "string",- "description": "The short link slug. If not provided, a random 7-character slug will be generated."- },- "externalId": {- "type": "string",- "nullable": true,- "minLength": 1,- "maxLength": 255,- "description": "This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with `ext_` when passed as a query parameter.",- "example": "123456"- },- "prefix": {- "type": "string",- "description": "The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided."- },- "archived": {- "type": "boolean",- "default": false,- "description": "Whether the short link is archived."- },- "publicStats": {- "type": "boolean",- "default": false,- "description": "Whether the short link's stats are publicly accessible."- },- "tagId": {- "type": "string",- "nullable": true,- "description": "The unique ID of the tag assigned to the short link. This field is deprecated – use `tagIds` instead.",- "deprecated": true- },- "tagIds": {- "anyOf": [- {- "type": "string"- },- {- "type": "array",- "items": {- "type": "string"- }- }- ],- "description": "The unique IDs of the tags assigned to the short link.",- "example": ["clux0rgak00011..."]- },- "tagNames": {- "anyOf": [- {- "type": "string"- },- {- "type": "array",- "items": {- "type": "string"- }- }- ],- "description": "The unique name of the tags assigned to the short link (case insensitive)."- },- "comments": {- "type": "string",- "nullable": true,- "description": "The comments for the short link."- },- "expiresAt": {- "type": "string",- "nullable": true,- "description": "The date and time when the short link will expire at."- },- "expiredUrl": {- "type": "string",- "nullable": true,- "description": "The URL to redirect to when the short link has expired."- },- "password": {- "type": "string",- "nullable": true,- "description": "The password required to access the destination URL of the short link."- },- "proxy": {- "type": "boolean",- "default": false,- "description": "Whether the short link uses Custom Social Media Cards feature."- },- "title": {- "type": "string",- "nullable": true,- "description": "The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."- },- "description": {- "type": "string",- "nullable": true,- "description": "The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."- },- "image": {- "type": "string",- "nullable": true,- "description": "The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."- },- "rewrite": {- "type": "boolean",- "default": false,- "description": "Whether the short link uses link cloaking."- },- "ios": {- "type": "string",- "nullable": true,- "description": "The iOS destination URL for the short link for iOS device targeting."- },- "android": {- "type": "string",- "nullable": true,- "description": "The Android destination URL for the short link for Android device targeting."- },- "geo": {- "type": "object",- "nullable": true,- "properties": {- "AF": {- "type": "string"- },- "AL": {- "type": "string"- },- "DZ": {- "type": "string"- },- "AS": {- "type": "string"- },- "AD": {- "type": "string"- },- "AO": {- "type": "string"- },- "AI": {- "type": "string"- },- "AQ": {- "type": "string"- },- "AG": {- "type": "string"- },- "AR": {- "type": "string"- },- "AM": {- "type": "string"- },- "AW": {- "type": "string"- },- "AU": {- "type": "string"- },- "AT": {- "type": "string"- },- "AZ": {- "type": "string"- },- "BS": {- "type": "string"- },- "BH": {- "type": "string"- },- "BD": {- "type": "string"- },- "BB": {- "type": "string"- },- "BY": {- "type": "string"- },- "BE": {- "type": "string"- },- "BZ": {- "type": "string"- },- "BJ": {- "type": "string"- },- "BM": {- "type": "string"- },- "BT": {- "type": "string"- },- "BO": {- "type": "string"- },- "BA": {- "type": "string"- },- "BW": {- "type": "string"- },- "BV": {- "type": "string"- },- "BR": {- "type": "string"- },- "IO": {- "type": "string"- },- "BN": {- "type": "string"- },- "BG": {- "type": "string"- },- "BF": {- "type": "string"- },- "BI": {- "type": "string"- },- "KH": {- "type": "string"- },- "CM": {- "type": "string"- },- "CA": {- "type": "string"- },- "CV": {- "type": "string"- },- "KY": {- "type": "string"- },- "CF": {- "type": "string"- },- "TD": {- "type": "string"- },- "CL": {- "type": "string"- },- "CN": {- "type": "string"- },- "CX": {- "type": "string"- },- "CC": {- "type": "string"- },- "CO": {- "type": "string"- },- "KM": {- "type": "string"- },- "CG": {- "type": "string"- },- "CD": {- "type": "string"- },- "CK": {- "type": "string"- },- "CR": {- "type": "string"- },- "CI": {- "type": "string"- },- "HR": {- "type": "string"- },- "CU": {- "type": "string"- },- "CY": {- "type": "string"- },- "CZ": {- "type": "string"- },- "DK": {- "type": "string"- },- "DJ": {- "type": "string"- },- "DM": {- "type": "string"- },- "DO": {- "type": "string"- },- "EC": {- "type": "string"- },- "EG": {- "type": "string"- },- "SV": {- "type": "string"- },- "GQ": {- "type": "string"- },- "ER": {- "type": "string"- },- "EE": {- "type": "string"- },- "ET": {- "type": "string"- },- "FK": {- "type": "string"- },- "FO": {- "type": "string"- },- "FJ": {- "type": "string"- },- "FI": {- "type": "string"- },- "FR": {- "type": "string"- },- "GF": {- "type": "string"- },- "PF": {- "type": "string"- },- "TF": {- "type": "string"- },- "GA": {- "type": "string"- },- "GM": {- "type": "string"- },- "GE": {- "type": "string"- },- "DE": {- "type": "string"- },- "GH": {- "type": "string"- },- "GI": {- "type": "string"- },- "GR": {- "type": "string"- },- "GL": {- "type": "string"- },- "GD": {- "type": "string"- },- "GP": {- "type": "string"- },- "GU": {- "type": "string"- },- "GT": {- "type": "string"- },- "GN": {- "type": "string"- },- "GW": {- "type": "string"- },- "GY": {- "type": "string"- },- "HT": {- "type": "string"- },- "HM": {- "type": "string"- },- "VA": {- "type": "string"- },- "HN": {- "type": "string"- },- "HK": {- "type": "string"- },- "HU": {- "type": "string"- },- "IS": {- "type": "string"- },- "IN": {- "type": "string"- },- "ID": {- "type": "string"- },- "IR": {- "type": "string"- },- "IQ": {- "type": "string"- },- "IE": {- "type": "string"- },- "IL": {- "type": "string"- },- "IT": {- "type": "string"- },- "JM": {- "type": "string"- },- "JP": {- "type": "string"- },- "JO": {- "type": "string"- },- "KZ": {- "type": "string"- },- "KE": {- "type": "string"- },- "KI": {- "type": "string"- },- "KP": {- "type": "string"- },- "KR": {- "type": "string"- },- "KW": {- "type": "string"- },- "KG": {- "type": "string"- },- "LA": {- "type": "string"- },- "LV": {- "type": "string"- },- "LB": {- "type": "string"- },- "LS": {- "type": "string"- },- "LR": {- "type": "string"- },- "LY": {- "type": "string"- },- "LI": {- "type": "string"- },- "LT": {- "type": "string"- },- "LU": {- "type": "string"- },- "MO": {- "type": "string"- },- "MG": {- "type": "string"- },- "MW": {- "type": "string"- },- "MY": {- "type": "string"- },- "MV": {- "type": "string"- },- "ML": {- "type": "string"- },- "MT": {- "type": "string"- },- "MH": {- "type": "string"- },- "MQ": {- "type": "string"- },- "MR": {- "type": "string"- },- "MU": {- "type": "string"- },- "YT": {- "type": "string"- },- "MX": {- "type": "string"- },- "FM": {- "type": "string"- },- "MD": {- "type": "string"- },- "MC": {- "type": "string"- },- "MN": {- "type": "string"- },- "MS": {- "type": "string"- },- "MA": {- "type": "string"- },- "MZ": {- "type": "string"- },- "MM": {- "type": "string"- },- "NA": {- "type": "string"- },- "NR": {- "type": "string"- },- "NP": {- "type": "string"- },- "NL": {- "type": "string"- },- "NC": {- "type": "string"- },- "NZ": {- "type": "string"- },- "NI": {- "type": "string"- },- "NE": {- "type": "string"- },- "NG": {- "type": "string"- },- "NU": {- "type": "string"- },- "NF": {- "type": "string"- },- "MK": {- "type": "string"- },- "MP": {- "type": "string"- },- "NO": {- "type": "string"- },- "OM": {- "type": "string"- },- "PK": {- "type": "string"- },- "PW": {- "type": "string"- },- "PS": {- "type": "string"- },- "PA": {- "type": "string"- },- "PG": {- "type": "string"- },- "PY": {- "type": "string"- },- "PE": {- "type": "string"- },- "PH": {- "type": "string"- },- "PN": {- "type": "string"- },- "PL": {- "type": "string"- },- "PT": {- "type": "string"- },- "PR": {- "type": "string"- },- "QA": {- "type": "string"- },- "RE": {- "type": "string"- },- "RO": {- "type": "string"- },- "RU": {- "type": "string"- },- "RW": {- "type": "string"- },- "SH": {- "type": "string"- },- "KN": {- "type": "string"- },- "LC": {- "type": "string"- },- "PM": {- "type": "string"- },- "VC": {- "type": "string"- },- "WS": {- "type": "string"- },- "SM": {- "type": "string"- },- "ST": {- "type": "string"- },- "SA": {- "type": "string"- },- "SN": {- "type": "string"- },- "SC": {- "type": "string"- },- "SL": {- "type": "string"- },- "SG": {- "type": "string"- },- "SK": {- "type": "string"- },- "SI": {- "type": "string"- },- "SB": {- "type": "string"- },- "SO": {- "type": "string"- },- "ZA": {- "type": "string"- },- "GS": {- "type": "string"- },- "ES": {- "type": "string"- },- "LK": {- "type": "string"- },- "SD": {- "type": "string"- },- "SR": {- "type": "string"- },- "SJ": {- "type": "string"- },- "SZ": {- "type": "string"- },- "SE": {- "type": "string"- },- "CH": {- "type": "string"- },- "SY": {- "type": "string"- },- "TW": {- "type": "string"- },- "TJ": {- "type": "string"- },- "TZ": {- "type": "string"- },- "TH": {- "type": "string"- },- "TL": {- "type": "string"- },- "TG": {- "type": "string"- },- "TK": {- "type": "string"- },- "TO": {- "type": "string"- },- "TT": {- "type": "string"- },- "TN": {- "type": "string"- },- "TR": {- "type": "string"- },- "TM": {- "type": "string"- },- "TC": {- "type": "string"- },- "TV": {- "type": "string"- },- "UG": {- "type": "string"- },- "UA": {- "type": "string"- },- "AE": {- "type": "string"- },- "GB": {- "type": "string"- },- "US": {- "type": "string"- },- "UM": {- "type": "string"- },- "UY": {- "type": "string"- },- "UZ": {- "type": "string"- },- "VU": {- "type": "string"- },- "VE": {- "type": "string"- },- "VN": {- "type": "string"- },- "VG": {- "type": "string"- },- "VI": {- "type": "string"- },- "WF": {- "type": "string"- },- "EH": {- "type": "string"- },- "YE": {- "type": "string"- },- "ZM": {- "type": "string"- },- "ZW": {- "type": "string"- },- "AX": {- "type": "string"- },- "BQ": {- "type": "string"- },- "CW": {- "type": "string"- },- "GG": {- "type": "string"- },- "IM": {- "type": "string"- },- "JE": {- "type": "string"- },- "ME": {- "type": "string"- },- "BL": {- "type": "string"- },- "MF": {- "type": "string"- },- "RS": {- "type": "string"- },- "SX": {- "type": "string"- },- "SS": {- "type": "string"- },- "XK": {- "type": "string"- }- },- "additionalProperties": false,- "description": "Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`."- }- },- "required": ["url"]- }- }- }- }- },- "responses": {- "200": {- "description": "The created links",- "content": {- "application/json": {- "schema": {- "type": "array",- "items": {- "$ref": "#/components/schemas/LinkSchema"- }- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- }- },- "/qr": {- "get": {- "operationId": "getQRCode",- "x-speakeasy-name-override": "get",- "summary": "Retrieve a QR code",- "description": "Retrieve a QR code for a link.",- "tags": ["QR Codes"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "query",- "name": "url",- "description": "The URL to generate a QR code for. Defaults to `https://dub.co` if not provided.",- "schema": {- "type": "string",- "format": "uri",- "default": "https://dub.co",- "description": "The URL to generate a QR code for. Defaults to `https://dub.co` if not provided."- }- },- {- "in": "query",- "name": "size",- "description": "The size of the QR code in pixels. Defaults to `600` if not provided.",- "schema": {- "type": "number",- "default": 600,- "description": "The size of the QR code in pixels. Defaults to `600` if not provided."- }- },- {- "in": "query",- "name": "level",- "description": "The level of error correction to use for the QR code. Defaults to `L` if not provided.",- "schema": {- "type": "string",- "enum": ["L", "M", "Q", "H"],- "default": "L",- "description": "The level of error correction to use for the QR code. Defaults to `L` if not provided."- }- },- {- "in": "query",- "name": "fgColor",- "description": "The foreground color of the QR code in hex format. Defaults to `#000000` if not provided.",- "schema": {- "type": "string",- "default": "#000000",- "description": "The foreground color of the QR code in hex format. Defaults to `#000000` if not provided."- }- },- {- "in": "query",- "name": "bgColor",- "description": "The background color of the QR code in hex format. Defaults to `#ffffff` if not provided.",- "schema": {- "type": "string",- "default": "#FFFFFF",- "description": "The background color of the QR code in hex format. Defaults to `#ffffff` if not provided."- }- },- {- "in": "query",- "name": "includeMargin",- "description": "Whether to include a margin around the QR code. Defaults to `false` if not provided.",- "schema": {- "type": "boolean",- "default": "false",- "description": "Whether to include a margin around the QR code. Defaults to `false` if not provided."- }- }- ],- "responses": {- "200": {- "description": "The QR code",- "content": {- "image/png": {- "schema": {- "type": "string"- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- }- },- "/analytics/clicks": {- "get": {- "operationId": "getClicksAnalytics",- "x-speakeasy-name-override": "clicks",- "summary": "Retrieve clicks analytics",- "description": "Retrieve the number of clicks for a link, a domain, or the authenticated workspace.",- "tags": ["Analytics"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "query",- "name": "workspaceId",- "description": "The ID of the workspace.",- "schema": {- "type": "string",- "description": "The ID of the workspace.",- "example": "ws_cluuwcv0r..."- },- "required": true- },- {- "in": "query",- "name": "projectSlug",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "schema": {- "type": "string",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- },- {- "in": "query",- "name": "groupBy",- "description": "The field to group the analytics by. If undefined, returns the total click count.",- "schema": {- "type": "string",- "enum": [- "timeseries",- "country",- "city",- "device",- "browser",- "os",- "referer",- "top_links",- "top_urls"- ],- "description": "The field to group the analytics by. If undefined, returns the total click count."- }- },- {- "in": "query",- "name": "domain",- "description": "The domain to filter analytics for.",- "schema": {- "type": "string",- "description": "The domain to filter analytics for."- }- },- {- "in": "query",- "name": "key",- "description": "The short link slug.",- "schema": {- "type": "string",- "description": "The short link slug."- }- },- {- "in": "query",- "name": "linkId",- "description": "The unique ID of the short link on Dub.",- "schema": {- "type": "string",- "description": "The unique ID of the short link on Dub."- }- },- {- "in": "query",- "name": "externalId",- "description": "This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter.",- "schema": {- "type": "string",- "description": "This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter."- }- },- {- "in": "query",- "name": "interval",- "description": "The interval to retrieve analytics for. Takes precedence over start and end.",- "schema": {- "type": "string",- "enum": ["1h", "24h", "7d", "30d", "90d", "ytd", "1y", "all"],- "description": "The interval to retrieve analytics for. Takes precedence over start and end."- }- },- {- "in": "query",- "name": "start",- "description": "The start date and time when to retrieve analytics from.",- "schema": {- "type": "string",- "description": "The start date and time when to retrieve analytics from."- }- },- {- "in": "query",- "name": "end",- "description": "The end date and time when to retrieve analytics from. If not provided, defaults to the current date.",- "schema": {- "type": "string",- "description": "The end date and time when to retrieve analytics from. If not provided, defaults to the current date."- }- },- {- "in": "query",- "name": "country",- "description": "The country to retrieve analytics for.",- "schema": {- "type": "string",- "enum": [- "AF",- "AL",- "DZ",- "AS",- "AD",- "AO",- "AI",- "AQ",- "AG",- "AR",- "AM",- "AW",- "AU",- "AT",- "AZ",- "BS",- "BH",- "BD",- "BB",- "BY",- "BE",- "BZ",- "BJ",- "BM",- "BT",- "BO",- "BA",- "BW",- "BV",- "BR",- "IO",- "BN",- "BG",- "BF",- "BI",- "KH",- "CM",- "CA",- "CV",- "KY",- "CF",- "TD",- "CL",- "CN",- "CX",- "CC",- "CO",- "KM",- "CG",- "CD",- "CK",- "CR",- "CI",- "HR",- "CU",- "CY",- "CZ",- "DK",- "DJ",- "DM",- "DO",- "EC",- "EG",- "SV",- "GQ",- "ER",- "EE",- "ET",- "FK",- "FO",- "FJ",- "FI",- "FR",- "GF",- "PF",- "TF",- "GA",- "GM",- "GE",- "DE",- "GH",- "GI",- "GR",- "GL",- "GD",- "GP",- "GU",- "GT",- "GN",- "GW",- "GY",- "HT",- "HM",- "VA",- "HN",- "HK",- "HU",- "IS",- "IN",- "ID",- "IR",- "IQ",- "IE",- "IL",- "IT",- "JM",- "JP",- "JO",- "KZ",- "KE",- "KI",- "KP",- "KR",- "KW",- "KG",- "LA",- "LV",- "LB",- "LS",- "LR",- "LY",- "LI",- "LT",- "LU",- "MO",- "MG",- "MW",- "MY",- "MV",- "ML",- "MT",- "MH",- "MQ",- "MR",- "MU",- "YT",- "MX",- "FM",- "MD",- "MC",- "MN",- "MS",- "MA",- "MZ",- "MM",- "NA",- "NR",- "NP",- "NL",- "NC",- "NZ",- "NI",- "NE",- "NG",- "NU",- "NF",- "MK",- "MP",- "NO",- "OM",- "PK",- "PW",- "PS",- "PA",- "PG",- "PY",- "PE",- "PH",- "PN",- "PL",- "PT",- "PR",- "QA",- "RE",- "RO",- "RU",- "RW",- "SH",- "KN",- "LC",- "PM",- "VC",- "WS",- "SM",- "ST",- "SA",- "SN",- "SC",- "SL",- "SG",- "SK",- "SI",- "SB",- "SO",- "ZA",- "GS",- "ES",- "LK",- "SD",- "SR",- "SJ",- "SZ",- "SE",- "CH",- "SY",- "TW",- "TJ",- "TZ",- "TH",- "TL",- "TG",- "TK",- "TO",- "TT",- "TN",- "TR",- "TM",- "TC",- "TV",- "UG",- "UA",- "AE",- "GB",- "US",- "UM",- "UY",- "UZ",- "VU",- "VE",- "VN",- "VG",- "VI",- "WF",- "EH",- "YE",- "ZM",- "ZW",- "AX",- "BQ",- "CW",- "GG",- "IM",- "JE",- "ME",- "BL",- "MF",- "RS",- "SX",- "SS",- "XK"- ],- "description": "The country to retrieve analytics for."- }- },- {- "in": "query",- "name": "city",- "description": "The city to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The city to retrieve analytics for."- }- },- {- "in": "query",- "name": "device",- "description": "The device to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The device to retrieve analytics for."- }- },- {- "in": "query",- "name": "browser",- "description": "The browser to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The browser to retrieve analytics for."- }- },- {- "in": "query",- "name": "os",- "description": "The OS to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The OS to retrieve analytics for."- }- },- {- "in": "query",- "name": "referer",- "description": "The referer to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The referer to retrieve analytics for."- }- },- {- "in": "query",- "name": "url",- "description": "The URL to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The URL to retrieve analytics for."- }- },- {- "in": "query",- "name": "tagId",- "description": "The tag ID to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The tag ID to retrieve analytics for."- }- },- {- "in": "query",- "name": "qr",- "description": "Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both.",- "schema": {- "type": "boolean",- "description": "Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both."- }- },- {- "in": "query",- "name": "root",- "description": "Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both.",- "schema": {- "type": "boolean",- "description": "Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both."- }- }- ],- "responses": {- "200": {- "description": "The number of clicks",- "content": {- "application/json": {- "schema": {- "anyOf": [- {- "type": "number",- "description": "The total number of clicks"- },- {- "type": "array",- "items": {- "type": "object",- "properties": {- "start": {- "type": "string",- "description": "The starting timestamp of the interval"- },- "clicks": {- "type": "number",- "description": "The number of clicks in the interval"- }- },- "required": ["start", "clicks"]- }- },- {- "type": "array",- "items": {- "type": "object",- "properties": {- "country": {- "type": "string",- "enum": [- "AF",- "AL",- "DZ",- "AS",- "AD",- "AO",- "AI",- "AQ",- "AG",- "AR",- "AM",- "AW",- "AU",- "AT",- "AZ",- "BS",- "BH",- "BD",- "BB",- "BY",- "BE",- "BZ",- "BJ",- "BM",- "BT",- "BO",- "BA",- "BW",- "BV",- "BR",- "IO",- "BN",- "BG",- "BF",- "BI",- "KH",- "CM",- "CA",- "CV",- "KY",- "CF",- "TD",- "CL",- "CN",- "CX",- "CC",- "CO",- "KM",- "CG",- "CD",- "CK",- "CR",- "CI",- "HR",- "CU",- "CY",- "CZ",- "DK",- "DJ",- "DM",- "DO",- "EC",- "EG",- "SV",- "GQ",- "ER",- "EE",- "ET",- "FK",- "FO",- "FJ",- "FI",- "FR",- "GF",- "PF",- "TF",- "GA",- "GM",- "GE",- "DE",- "GH",- "GI",- "GR",- "GL",- "GD",- "GP",- "GU",- "GT",- "GN",- "GW",- "GY",- "HT",- "HM",- "VA",- "HN",- "HK",- "HU",- "IS",- "IN",- "ID",- "IR",- "IQ",- "IE",- "IL",- "IT",- "JM",- "JP",- "JO",- "KZ",- "KE",- "KI",- "KP",- "KR",- "KW",- "KG",- "LA",- "LV",- "LB",- "LS",- "LR",- "LY",- "LI",- "LT",- "LU",- "MO",- "MG",- "MW",- "MY",- "MV",- "ML",- "MT",- "MH",- "MQ",- "MR",- "MU",- "YT",- "MX",- "FM",- "MD",- "MC",- "MN",- "MS",- "MA",- "MZ",- "MM",- "NA",- "NR",- "NP",- "NL",- "NC",- "NZ",- "NI",- "NE",- "NG",- "NU",- "NF",- "MK",- "MP",- "NO",- "OM",- "PK",- "PW",- "PS",- "PA",- "PG",- "PY",- "PE",- "PH",- "PN",- "PL",- "PT",- "PR",- "QA",- "RE",- "RO",- "RU",- "RW",- "SH",- "KN",- "LC",- "PM",- "VC",- "WS",- "SM",- "ST",- "SA",- "SN",- "SC",- "SL",- "SG",- "SK",- "SI",- "SB",- "SO",- "ZA",- "GS",- "ES",- "LK",- "SD",- "SR",- "SJ",- "SZ",- "SE",- "CH",- "SY",- "TW",- "TJ",- "TZ",- "TH",- "TL",- "TG",- "TK",- "TO",- "TT",- "TN",- "TR",- "TM",- "TC",- "TV",- "UG",- "UA",- "AE",- "GB",- "US",- "UM",- "UY",- "UZ",- "VU",- "VE",- "VN",- "VG",- "VI",- "WF",- "EH",- "YE",- "ZM",- "ZW",- "AX",- "BQ",- "CW",- "GG",- "IM",- "JE",- "ME",- "BL",- "MF",- "RS",- "SX",- "SS",- "XK"- ],- "description": "The 2-letter country code: https://d.to/geo"- },- "clicks": {- "type": "number",- "description": "The number of clicks from this country"- }- },- "required": ["country", "clicks"]- }- },- {- "type": "array",- "items": {- "type": "object",- "properties": {- "city": {- "type": "string",- "description": "The name of the city"- },- "country": {- "type": "string",- "enum": [- "AF",- "AL",- "DZ",- "AS",- "AD",- "AO",- "AI",- "AQ",- "AG",- "AR",- "AM",- "AW",- "AU",- "AT",- "AZ",- "BS",- "BH",- "BD",- "BB",- "BY",- "BE",- "BZ",- "BJ",- "BM",- "BT",- "BO",- "BA",- "BW",- "BV",- "BR",- "IO",- "BN",- "BG",- "BF",- "BI",- "KH",- "CM",- "CA",- "CV",- "KY",- "CF",- "TD",- "CL",- "CN",- "CX",- "CC",- "CO",- "KM",- "CG",- "CD",- "CK",- "CR",- "CI",- "HR",- "CU",- "CY",- "CZ",- "DK",- "DJ",- "DM",- "DO",- "EC",- "EG",- "SV",- "GQ",- "ER",- "EE",- "ET",- "FK",- "FO",- "FJ",- "FI",- "FR",- "GF",- "PF",- "TF",- "GA",- "GM",- "GE",- "DE",- "GH",- "GI",- "GR",- "GL",- "GD",- "GP",- "GU",- "GT",- "GN",- "GW",- "GY",- "HT",- "HM",- "VA",- "HN",- "HK",- "HU",- "IS",- "IN",- "ID",- "IR",- "IQ",- "IE",- "IL",- "IT",- "JM",- "JP",- "JO",- "KZ",- "KE",- "KI",- "KP",- "KR",- "KW",- "KG",- "LA",- "LV",- "LB",- "LS",- "LR",- "LY",- "LI",- "LT",- "LU",- "MO",- "MG",- "MW",- "MY",- "MV",- "ML",- "MT",- "MH",- "MQ",- "MR",- "MU",- "YT",- "MX",- "FM",- "MD",- "MC",- "MN",- "MS",- "MA",- "MZ",- "MM",- "NA",- "NR",- "NP",- "NL",- "NC",- "NZ",- "NI",- "NE",- "NG",- "NU",- "NF",- "MK",- "MP",- "NO",- "OM",- "PK",- "PW",- "PS",- "PA",- "PG",- "PY",- "PE",- "PH",- "PN",- "PL",- "PT",- "PR",- "QA",- "RE",- "RO",- "RU",- "RW",- "SH",- "KN",- "LC",- "PM",- "VC",- "WS",- "SM",- "ST",- "SA",- "SN",- "SC",- "SL",- "SG",- "SK",- "SI",- "SB",- "SO",- "ZA",- "GS",- "ES",- "LK",- "SD",- "SR",- "SJ",- "SZ",- "SE",- "CH",- "SY",- "TW",- "TJ",- "TZ",- "TH",- "TL",- "TG",- "TK",- "TO",- "TT",- "TN",- "TR",- "TM",- "TC",- "TV",- "UG",- "UA",- "AE",- "GB",- "US",- "UM",- "UY",- "UZ",- "VU",- "VE",- "VN",- "VG",- "VI",- "WF",- "EH",- "YE",- "ZM",- "ZW",- "AX",- "BQ",- "CW",- "GG",- "IM",- "JE",- "ME",- "BL",- "MF",- "RS",- "SX",- "SS",- "XK"- ],- "description": "The 2-letter country code of the city: https://d.to/geo"- },- "clicks": {- "type": "number",- "description": "The number of clicks from this city"- }- },- "required": ["city", "country", "clicks"]- }- },- {- "type": "array",- "items": {- "type": "object",- "properties": {- "device": {- "type": "string",- "description": "The name of the device"- },- "clicks": {- "type": "number",- "description": "The number of clicks from this device"- }- },- "required": ["device", "clicks"]- }- },- {- "type": "array",- "items": {- "type": "object",- "properties": {- "browser": {- "type": "string",- "description": "The name of the browser"- },- "clicks": {- "type": "number",- "description": "The number of clicks from this browser"- }- },- "required": ["browser", "clicks"]- }- },- {- "type": "array",- "items": {- "type": "object",- "properties": {- "os": {- "type": "string",- "description": "The name of the OS"- },- "clicks": {- "type": "number",- "description": "The number of clicks from this OS"- }- },- "required": ["os", "clicks"]- }- },- {- "type": "array",- "items": {- "type": "object",- "properties": {- "referer": {- "type": "string",- "description": "The name of the referer. If unknown, this will be `(direct)`"- },- "clicks": {- "type": "number",- "description": "The number of clicks from this referer"- }- },- "required": ["referer", "clicks"]- }- },- {- "type": "array",- "items": {- "type": "object",- "properties": {- "link": {- "type": "string",- "description": "The unique ID of the short link"- },- "clicks": {- "type": "number",- "description": "The number of clicks from this link"- }- },- "required": ["link", "clicks"]- }- },- {- "type": "array",- "items": {- "type": "object",- "properties": {- "url": {- "type": "string",- "description": "The destination URL"- },- "clicks": {- "type": "number",- "description": "The number of clicks from this URL"- }- },- "required": ["url", "clicks"]- }- }- ]- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- }- },- "/analytics/timeseries": {- "get": {- "operationId": "getTimeseriesAnalytics",- "x-speakeasy-name-override": "timeseries",- "summary": "Retrieve timeseries analytics",- "deprecated": true,- "description": "Retrieve the number of clicks for a link, a domain, or the authenticated workspace over a period of time.",- "tags": ["Analytics"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "query",- "name": "workspaceId",- "description": "The ID of the workspace.",- "schema": {- "type": "string",- "description": "The ID of the workspace.",- "example": "ws_cluuwcv0r..."- },- "required": true- },- {- "in": "query",- "name": "projectSlug",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "schema": {- "type": "string",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- },- {- "in": "query",- "name": "groupBy",- "description": "The field to group the analytics by. If undefined, returns the total click count.",- "schema": {- "type": "string",- "enum": [- "timeseries",- "country",- "city",- "device",- "browser",- "os",- "referer",- "top_links",- "top_urls"- ],- "description": "The field to group the analytics by. If undefined, returns the total click count."- }- },- {- "in": "query",- "name": "domain",- "description": "The domain to filter analytics for.",- "schema": {- "type": "string",- "description": "The domain to filter analytics for."- }- },- {- "in": "query",- "name": "key",- "description": "The short link slug.",- "schema": {- "type": "string",- "description": "The short link slug."- }- },- {- "in": "query",- "name": "linkId",- "description": "The unique ID of the short link on Dub.",- "schema": {- "type": "string",- "description": "The unique ID of the short link on Dub."- }- },- {- "in": "query",- "name": "externalId",- "description": "This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter.",- "schema": {- "type": "string",- "description": "This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter."- }- },- {- "in": "query",- "name": "interval",- "description": "The interval to retrieve analytics for. Takes precedence over start and end.",- "schema": {- "type": "string",- "enum": ["1h", "24h", "7d", "30d", "90d", "ytd", "1y", "all"],- "description": "The interval to retrieve analytics for. Takes precedence over start and end."- }- },- {- "in": "query",- "name": "start",- "description": "The start date and time when to retrieve analytics from.",- "schema": {- "type": "string",- "description": "The start date and time when to retrieve analytics from."- }- },- {- "in": "query",- "name": "end",- "description": "The end date and time when to retrieve analytics from. If not provided, defaults to the current date.",- "schema": {- "type": "string",- "description": "The end date and time when to retrieve analytics from. If not provided, defaults to the current date."- }- },- {- "in": "query",- "name": "country",- "description": "The country to retrieve analytics for.",- "schema": {- "type": "string",- "enum": [- "AF",- "AL",- "DZ",- "AS",- "AD",- "AO",- "AI",- "AQ",- "AG",- "AR",- "AM",- "AW",- "AU",- "AT",- "AZ",- "BS",- "BH",- "BD",- "BB",- "BY",- "BE",- "BZ",- "BJ",- "BM",- "BT",- "BO",- "BA",- "BW",- "BV",- "BR",- "IO",- "BN",- "BG",- "BF",- "BI",- "KH",- "CM",- "CA",- "CV",- "KY",- "CF",- "TD",- "CL",- "CN",- "CX",- "CC",- "CO",- "KM",- "CG",- "CD",- "CK",- "CR",- "CI",- "HR",- "CU",- "CY",- "CZ",- "DK",- "DJ",- "DM",- "DO",- "EC",- "EG",- "SV",- "GQ",- "ER",- "EE",- "ET",- "FK",- "FO",- "FJ",- "FI",- "FR",- "GF",- "PF",- "TF",- "GA",- "GM",- "GE",- "DE",- "GH",- "GI",- "GR",- "GL",- "GD",- "GP",- "GU",- "GT",- "GN",- "GW",- "GY",- "HT",- "HM",- "VA",- "HN",- "HK",- "HU",- "IS",- "IN",- "ID",- "IR",- "IQ",- "IE",- "IL",- "IT",- "JM",- "JP",- "JO",- "KZ",- "KE",- "KI",- "KP",- "KR",- "KW",- "KG",- "LA",- "LV",- "LB",- "LS",- "LR",- "LY",- "LI",- "LT",- "LU",- "MO",- "MG",- "MW",- "MY",- "MV",- "ML",- "MT",- "MH",- "MQ",- "MR",- "MU",- "YT",- "MX",- "FM",- "MD",- "MC",- "MN",- "MS",- "MA",- "MZ",- "MM",- "NA",- "NR",- "NP",- "NL",- "NC",- "NZ",- "NI",- "NE",- "NG",- "NU",- "NF",- "MK",- "MP",- "NO",- "OM",- "PK",- "PW",- "PS",- "PA",- "PG",- "PY",- "PE",- "PH",- "PN",- "PL",- "PT",- "PR",- "QA",- "RE",- "RO",- "RU",- "RW",- "SH",- "KN",- "LC",- "PM",- "VC",- "WS",- "SM",- "ST",- "SA",- "SN",- "SC",- "SL",- "SG",- "SK",- "SI",- "SB",- "SO",- "ZA",- "GS",- "ES",- "LK",- "SD",- "SR",- "SJ",- "SZ",- "SE",- "CH",- "SY",- "TW",- "TJ",- "TZ",- "TH",- "TL",- "TG",- "TK",- "TO",- "TT",- "TN",- "TR",- "TM",- "TC",- "TV",- "UG",- "UA",- "AE",- "GB",- "US",- "UM",- "UY",- "UZ",- "VU",- "VE",- "VN",- "VG",- "VI",- "WF",- "EH",- "YE",- "ZM",- "ZW",- "AX",- "BQ",- "CW",- "GG",- "IM",- "JE",- "ME",- "BL",- "MF",- "RS",- "SX",- "SS",- "XK"- ],- "description": "The country to retrieve analytics for."- }- },- {- "in": "query",- "name": "city",- "description": "The city to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The city to retrieve analytics for."- }- },- {- "in": "query",- "name": "device",- "description": "The device to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The device to retrieve analytics for."- }- },- {- "in": "query",- "name": "browser",- "description": "The browser to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The browser to retrieve analytics for."- }- },- {- "in": "query",- "name": "os",- "description": "The OS to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The OS to retrieve analytics for."- }- },- {- "in": "query",- "name": "referer",- "description": "The referer to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The referer to retrieve analytics for."- }- },- {- "in": "query",- "name": "url",- "description": "The URL to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The URL to retrieve analytics for."- }- },- {- "in": "query",- "name": "tagId",- "description": "The tag ID to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The tag ID to retrieve analytics for."- }- },- {- "in": "query",- "name": "qr",- "description": "Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both.",- "schema": {- "type": "boolean",- "description": "Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both."- }- },- {- "in": "query",- "name": "root",- "description": "Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both.",- "schema": {- "type": "boolean",- "description": "Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both."- }- }- ],- "responses": {- "200": {- "description": "The number of clicks over a period of time",- "content": {- "application/json": {- "schema": {- "type": "array",- "items": {- "type": "object",- "properties": {- "start": {- "type": "string",- "description": "The starting timestamp of the interval"- },- "clicks": {- "type": "number",- "description": "The number of clicks in the interval"- }- },- "required": ["start", "clicks"]- }- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- }- },- "/analytics/country": {- "get": {- "operationId": "getCountryAnalytics",- "x-speakeasy-name-override": "countries",- "summary": "Retrieve country analytics",- "deprecated": true,- "description": "Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace.",- "tags": ["Analytics"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "query",- "name": "workspaceId",- "description": "The ID of the workspace.",- "schema": {- "type": "string",- "description": "The ID of the workspace.",- "example": "ws_cluuwcv0r..."- },- "required": true- },- {- "in": "query",- "name": "projectSlug",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "schema": {- "type": "string",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- },- {- "in": "query",- "name": "groupBy",- "description": "The field to group the analytics by. If undefined, returns the total click count.",- "schema": {- "type": "string",- "enum": [- "timeseries",- "country",- "city",- "device",- "browser",- "os",- "referer",- "top_links",- "top_urls"- ],- "description": "The field to group the analytics by. If undefined, returns the total click count."- }- },- {- "in": "query",- "name": "domain",- "description": "The domain to filter analytics for.",- "schema": {- "type": "string",- "description": "The domain to filter analytics for."- }- },- {- "in": "query",- "name": "key",- "description": "The short link slug.",- "schema": {- "type": "string",- "description": "The short link slug."- }- },- {- "in": "query",- "name": "linkId",- "description": "The unique ID of the short link on Dub.",- "schema": {- "type": "string",- "description": "The unique ID of the short link on Dub."- }- },- {- "in": "query",- "name": "externalId",- "description": "This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter.",- "schema": {- "type": "string",- "description": "This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter."- }- },- {- "in": "query",- "name": "interval",- "description": "The interval to retrieve analytics for. Takes precedence over start and end.",- "schema": {- "type": "string",- "enum": ["1h", "24h", "7d", "30d", "90d", "ytd", "1y", "all"],- "description": "The interval to retrieve analytics for. Takes precedence over start and end."- }- },- {- "in": "query",- "name": "start",- "description": "The start date and time when to retrieve analytics from.",- "schema": {- "type": "string",- "description": "The start date and time when to retrieve analytics from."- }- },- {- "in": "query",- "name": "end",- "description": "The end date and time when to retrieve analytics from. If not provided, defaults to the current date.",- "schema": {- "type": "string",- "description": "The end date and time when to retrieve analytics from. If not provided, defaults to the current date."- }- },- {- "in": "query",- "name": "country",- "description": "The country to retrieve analytics for.",- "schema": {- "type": "string",- "enum": [- "AF",- "AL",- "DZ",- "AS",- "AD",- "AO",- "AI",- "AQ",- "AG",- "AR",- "AM",- "AW",- "AU",- "AT",- "AZ",- "BS",- "BH",- "BD",- "BB",- "BY",- "BE",- "BZ",- "BJ",- "BM",- "BT",- "BO",- "BA",- "BW",- "BV",- "BR",- "IO",- "BN",- "BG",- "BF",- "BI",- "KH",- "CM",- "CA",- "CV",- "KY",- "CF",- "TD",- "CL",- "CN",- "CX",- "CC",- "CO",- "KM",- "CG",- "CD",- "CK",- "CR",- "CI",- "HR",- "CU",- "CY",- "CZ",- "DK",- "DJ",- "DM",- "DO",- "EC",- "EG",- "SV",- "GQ",- "ER",- "EE",- "ET",- "FK",- "FO",- "FJ",- "FI",- "FR",- "GF",- "PF",- "TF",- "GA",- "GM",- "GE",- "DE",- "GH",- "GI",- "GR",- "GL",- "GD",- "GP",- "GU",- "GT",- "GN",- "GW",- "GY",- "HT",- "HM",- "VA",- "HN",- "HK",- "HU",- "IS",- "IN",- "ID",- "IR",- "IQ",- "IE",- "IL",- "IT",- "JM",- "JP",- "JO",- "KZ",- "KE",- "KI",- "KP",- "KR",- "KW",- "KG",- "LA",- "LV",- "LB",- "LS",- "LR",- "LY",- "LI",- "LT",- "LU",- "MO",- "MG",- "MW",- "MY",- "MV",- "ML",- "MT",- "MH",- "MQ",- "MR",- "MU",- "YT",- "MX",- "FM",- "MD",- "MC",- "MN",- "MS",- "MA",- "MZ",- "MM",- "NA",- "NR",- "NP",- "NL",- "NC",- "NZ",- "NI",- "NE",- "NG",- "NU",- "NF",- "MK",- "MP",- "NO",- "OM",- "PK",- "PW",- "PS",- "PA",- "PG",- "PY",- "PE",- "PH",- "PN",- "PL",- "PT",- "PR",- "QA",- "RE",- "RO",- "RU",- "RW",- "SH",- "KN",- "LC",- "PM",- "VC",- "WS",- "SM",- "ST",- "SA",- "SN",- "SC",- "SL",- "SG",- "SK",- "SI",- "SB",- "SO",- "ZA",- "GS",- "ES",- "LK",- "SD",- "SR",- "SJ",- "SZ",- "SE",- "CH",- "SY",- "TW",- "TJ",- "TZ",- "TH",- "TL",- "TG",- "TK",- "TO",- "TT",- "TN",- "TR",- "TM",- "TC",- "TV",- "UG",- "UA",- "AE",- "GB",- "US",- "UM",- "UY",- "UZ",- "VU",- "VE",- "VN",- "VG",- "VI",- "WF",- "EH",- "YE",- "ZM",- "ZW",- "AX",- "BQ",- "CW",- "GG",- "IM",- "JE",- "ME",- "BL",- "MF",- "RS",- "SX",- "SS",- "XK"- ],- "description": "The country to retrieve analytics for."- }- },- {- "in": "query",- "name": "city",- "description": "The city to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The city to retrieve analytics for."- }- },- {- "in": "query",- "name": "device",- "description": "The device to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The device to retrieve analytics for."- }- },- {- "in": "query",- "name": "browser",- "description": "The browser to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The browser to retrieve analytics for."- }- },- {- "in": "query",- "name": "os",- "description": "The OS to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The OS to retrieve analytics for."- }- },- {- "in": "query",- "name": "referer",- "description": "The referer to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The referer to retrieve analytics for."- }- },- {- "in": "query",- "name": "url",- "description": "The URL to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The URL to retrieve analytics for."- }- },- {- "in": "query",- "name": "tagId",- "description": "The tag ID to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The tag ID to retrieve analytics for."- }- },- {- "in": "query",- "name": "qr",- "description": "Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both.",- "schema": {- "type": "boolean",- "description": "Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both."- }- },- {- "in": "query",- "name": "root",- "description": "Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both.",- "schema": {- "type": "boolean",- "description": "Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both."- }- }- ],- "responses": {- "200": {- "description": "The top countries by number of clicks",- "content": {- "application/json": {- "schema": {- "type": "array",- "items": {- "type": "object",- "properties": {- "country": {- "type": "string",- "enum": [- "AF",- "AL",- "DZ",- "AS",- "AD",- "AO",- "AI",- "AQ",- "AG",- "AR",- "AM",- "AW",- "AU",- "AT",- "AZ",- "BS",- "BH",- "BD",- "BB",- "BY",- "BE",- "BZ",- "BJ",- "BM",- "BT",- "BO",- "BA",- "BW",- "BV",- "BR",- "IO",- "BN",- "BG",- "BF",- "BI",- "KH",- "CM",- "CA",- "CV",- "KY",- "CF",- "TD",- "CL",- "CN",- "CX",- "CC",- "CO",- "KM",- "CG",- "CD",- "CK",- "CR",- "CI",- "HR",- "CU",- "CY",- "CZ",- "DK",- "DJ",- "DM",- "DO",- "EC",- "EG",- "SV",- "GQ",- "ER",- "EE",- "ET",- "FK",- "FO",- "FJ",- "FI",- "FR",- "GF",- "PF",- "TF",- "GA",- "GM",- "GE",- "DE",- "GH",- "GI",- "GR",- "GL",- "GD",- "GP",- "GU",- "GT",- "GN",- "GW",- "GY",- "HT",- "HM",- "VA",- "HN",- "HK",- "HU",- "IS",- "IN",- "ID",- "IR",- "IQ",- "IE",- "IL",- "IT",- "JM",- "JP",- "JO",- "KZ",- "KE",- "KI",- "KP",- "KR",- "KW",- "KG",- "LA",- "LV",- "LB",- "LS",- "LR",- "LY",- "LI",- "LT",- "LU",- "MO",- "MG",- "MW",- "MY",- "MV",- "ML",- "MT",- "MH",- "MQ",- "MR",- "MU",- "YT",- "MX",- "FM",- "MD",- "MC",- "MN",- "MS",- "MA",- "MZ",- "MM",- "NA",- "NR",- "NP",- "NL",- "NC",- "NZ",- "NI",- "NE",- "NG",- "NU",- "NF",- "MK",- "MP",- "NO",- "OM",- "PK",- "PW",- "PS",- "PA",- "PG",- "PY",- "PE",- "PH",- "PN",- "PL",- "PT",- "PR",- "QA",- "RE",- "RO",- "RU",- "RW",- "SH",- "KN",- "LC",- "PM",- "VC",- "WS",- "SM",- "ST",- "SA",- "SN",- "SC",- "SL",- "SG",- "SK",- "SI",- "SB",- "SO",- "ZA",- "GS",- "ES",- "LK",- "SD",- "SR",- "SJ",- "SZ",- "SE",- "CH",- "SY",- "TW",- "TJ",- "TZ",- "TH",- "TL",- "TG",- "TK",- "TO",- "TT",- "TN",- "TR",- "TM",- "TC",- "TV",- "UG",- "UA",- "AE",- "GB",- "US",- "UM",- "UY",- "UZ",- "VU",- "VE",- "VN",- "VG",- "VI",- "WF",- "EH",- "YE",- "ZM",- "ZW",- "AX",- "BQ",- "CW",- "GG",- "IM",- "JE",- "ME",- "BL",- "MF",- "RS",- "SX",- "SS",- "XK"- ],- "description": "The 2-letter country code: https://d.to/geo"- },- "clicks": {- "type": "number",- "description": "The number of clicks from this country"- }- },- "required": ["country", "clicks"]- }- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- }- },- "/analytics/city": {- "get": {- "operationId": "getCityAnalytics",- "x-speakeasy-name-override": "cities",- "summary": "Retrieve city analytics",- "deprecated": true,- "description": "Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace.",- "tags": ["Analytics"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "query",- "name": "workspaceId",- "description": "The ID of the workspace.",- "schema": {- "type": "string",- "description": "The ID of the workspace.",- "example": "ws_cluuwcv0r..."- },- "required": true- },- {- "in": "query",- "name": "projectSlug",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "schema": {- "type": "string",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- },- {- "in": "query",- "name": "groupBy",- "description": "The field to group the analytics by. If undefined, returns the total click count.",- "schema": {- "type": "string",- "enum": [- "timeseries",- "country",- "city",- "device",- "browser",- "os",- "referer",- "top_links",- "top_urls"- ],- "description": "The field to group the analytics by. If undefined, returns the total click count."- }- },- {- "in": "query",- "name": "domain",- "description": "The domain to filter analytics for.",- "schema": {- "type": "string",- "description": "The domain to filter analytics for."- }- },- {- "in": "query",- "name": "key",- "description": "The short link slug.",- "schema": {- "type": "string",- "description": "The short link slug."- }- },- {- "in": "query",- "name": "linkId",- "description": "The unique ID of the short link on Dub.",- "schema": {- "type": "string",- "description": "The unique ID of the short link on Dub."- }- },- {- "in": "query",- "name": "externalId",- "description": "This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter.",- "schema": {- "type": "string",- "description": "This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter."- }- },- {- "in": "query",- "name": "interval",- "description": "The interval to retrieve analytics for. Takes precedence over start and end.",- "schema": {- "type": "string",- "enum": ["1h", "24h", "7d", "30d", "90d", "ytd", "1y", "all"],- "description": "The interval to retrieve analytics for. Takes precedence over start and end."- }- },- {- "in": "query",- "name": "start",- "description": "The start date and time when to retrieve analytics from.",- "schema": {- "type": "string",- "description": "The start date and time when to retrieve analytics from."- }- },- {- "in": "query",- "name": "end",- "description": "The end date and time when to retrieve analytics from. If not provided, defaults to the current date.",- "schema": {- "type": "string",- "description": "The end date and time when to retrieve analytics from. If not provided, defaults to the current date."- }- },- {- "in": "query",- "name": "country",- "description": "The country to retrieve analytics for.",- "schema": {- "type": "string",- "enum": [- "AF",- "AL",- "DZ",- "AS",- "AD",- "AO",- "AI",- "AQ",- "AG",- "AR",- "AM",- "AW",- "AU",- "AT",- "AZ",- "BS",- "BH",- "BD",- "BB",- "BY",- "BE",- "BZ",- "BJ",- "BM",- "BT",- "BO",- "BA",- "BW",- "BV",- "BR",- "IO",- "BN",- "BG",- "BF",- "BI",- "KH",- "CM",- "CA",- "CV",- "KY",- "CF",- "TD",- "CL",- "CN",- "CX",- "CC",- "CO",- "KM",- "CG",- "CD",- "CK",- "CR",- "CI",- "HR",- "CU",- "CY",- "CZ",- "DK",- "DJ",- "DM",- "DO",- "EC",- "EG",- "SV",- "GQ",- "ER",- "EE",- "ET",- "FK",- "FO",- "FJ",- "FI",- "FR",- "GF",- "PF",- "TF",- "GA",- "GM",- "GE",- "DE",- "GH",- "GI",- "GR",- "GL",- "GD",- "GP",- "GU",- "GT",- "GN",- "GW",- "GY",- "HT",- "HM",- "VA",- "HN",- "HK",- "HU",- "IS",- "IN",- "ID",- "IR",- "IQ",- "IE",- "IL",- "IT",- "JM",- "JP",- "JO",- "KZ",- "KE",- "KI",- "KP",- "KR",- "KW",- "KG",- "LA",- "LV",- "LB",- "LS",- "LR",- "LY",- "LI",- "LT",- "LU",- "MO",- "MG",- "MW",- "MY",- "MV",- "ML",- "MT",- "MH",- "MQ",- "MR",- "MU",- "YT",- "MX",- "FM",- "MD",- "MC",- "MN",- "MS",- "MA",- "MZ",- "MM",- "NA",- "NR",- "NP",- "NL",- "NC",- "NZ",- "NI",- "NE",- "NG",- "NU",- "NF",- "MK",- "MP",- "NO",- "OM",- "PK",- "PW",- "PS",- "PA",- "PG",- "PY",- "PE",- "PH",- "PN",- "PL",- "PT",- "PR",- "QA",- "RE",- "RO",- "RU",- "RW",- "SH",- "KN",- "LC",- "PM",- "VC",- "WS",- "SM",- "ST",- "SA",- "SN",- "SC",- "SL",- "SG",- "SK",- "SI",- "SB",- "SO",- "ZA",- "GS",- "ES",- "LK",- "SD",- "SR",- "SJ",- "SZ",- "SE",- "CH",- "SY",- "TW",- "TJ",- "TZ",- "TH",- "TL",- "TG",- "TK",- "TO",- "TT",- "TN",- "TR",- "TM",- "TC",- "TV",- "UG",- "UA",- "AE",- "GB",- "US",- "UM",- "UY",- "UZ",- "VU",- "VE",- "VN",- "VG",- "VI",- "WF",- "EH",- "YE",- "ZM",- "ZW",- "AX",- "BQ",- "CW",- "GG",- "IM",- "JE",- "ME",- "BL",- "MF",- "RS",- "SX",- "SS",- "XK"- ],- "description": "The country to retrieve analytics for."- }- },- {- "in": "query",- "name": "city",- "description": "The city to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The city to retrieve analytics for."- }- },- {- "in": "query",- "name": "device",- "description": "The device to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The device to retrieve analytics for."- }- },- {- "in": "query",- "name": "browser",- "description": "The browser to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The browser to retrieve analytics for."- }- },- {- "in": "query",- "name": "os",- "description": "The OS to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The OS to retrieve analytics for."- }- },- {- "in": "query",- "name": "referer",- "description": "The referer to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The referer to retrieve analytics for."- }- },- {- "in": "query",- "name": "url",- "description": "The URL to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The URL to retrieve analytics for."- }- },- {- "in": "query",- "name": "tagId",- "description": "The tag ID to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The tag ID to retrieve analytics for."- }- },- {- "in": "query",- "name": "qr",- "description": "Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both.",- "schema": {- "type": "boolean",- "description": "Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both."- }- },- {- "in": "query",- "name": "root",- "description": "Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both.",- "schema": {- "type": "boolean",- "description": "Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both."- }- }- ],- "responses": {- "200": {- "description": "The top cities by number of clicks",- "content": {- "application/json": {- "schema": {- "type": "array",- "items": {- "type": "object",- "properties": {- "city": {- "type": "string",- "description": "The name of the city"- },- "country": {- "type": "string",- "enum": [- "AF",- "AL",- "DZ",- "AS",- "AD",- "AO",- "AI",- "AQ",- "AG",- "AR",- "AM",- "AW",- "AU",- "AT",- "AZ",- "BS",- "BH",- "BD",- "BB",- "BY",- "BE",- "BZ",- "BJ",- "BM",- "BT",- "BO",- "BA",- "BW",- "BV",- "BR",- "IO",- "BN",- "BG",- "BF",- "BI",- "KH",- "CM",- "CA",- "CV",- "KY",- "CF",- "TD",- "CL",- "CN",- "CX",- "CC",- "CO",- "KM",- "CG",- "CD",- "CK",- "CR",- "CI",- "HR",- "CU",- "CY",- "CZ",- "DK",- "DJ",- "DM",- "DO",- "EC",- "EG",- "SV",- "GQ",- "ER",- "EE",- "ET",- "FK",- "FO",- "FJ",- "FI",- "FR",- "GF",- "PF",- "TF",- "GA",- "GM",- "GE",- "DE",- "GH",- "GI",- "GR",- "GL",- "GD",- "GP",- "GU",- "GT",- "GN",- "GW",- "GY",- "HT",- "HM",- "VA",- "HN",- "HK",- "HU",- "IS",- "IN",- "ID",- "IR",- "IQ",- "IE",- "IL",- "IT",- "JM",- "JP",- "JO",- "KZ",- "KE",- "KI",- "KP",- "KR",- "KW",- "KG",- "LA",- "LV",- "LB",- "LS",- "LR",- "LY",- "LI",- "LT",- "LU",- "MO",- "MG",- "MW",- "MY",- "MV",- "ML",- "MT",- "MH",- "MQ",- "MR",- "MU",- "YT",- "MX",- "FM",- "MD",- "MC",- "MN",- "MS",- "MA",- "MZ",- "MM",- "NA",- "NR",- "NP",- "NL",- "NC",- "NZ",- "NI",- "NE",- "NG",- "NU",- "NF",- "MK",- "MP",- "NO",- "OM",- "PK",- "PW",- "PS",- "PA",- "PG",- "PY",- "PE",- "PH",- "PN",- "PL",- "PT",- "PR",- "QA",- "RE",- "RO",- "RU",- "RW",- "SH",- "KN",- "LC",- "PM",- "VC",- "WS",- "SM",- "ST",- "SA",- "SN",- "SC",- "SL",- "SG",- "SK",- "SI",- "SB",- "SO",- "ZA",- "GS",- "ES",- "LK",- "SD",- "SR",- "SJ",- "SZ",- "SE",- "CH",- "SY",- "TW",- "TJ",- "TZ",- "TH",- "TL",- "TG",- "TK",- "TO",- "TT",- "TN",- "TR",- "TM",- "TC",- "TV",- "UG",- "UA",- "AE",- "GB",- "US",- "UM",- "UY",- "UZ",- "VU",- "VE",- "VN",- "VG",- "VI",- "WF",- "EH",- "YE",- "ZM",- "ZW",- "AX",- "BQ",- "CW",- "GG",- "IM",- "JE",- "ME",- "BL",- "MF",- "RS",- "SX",- "SS",- "XK"- ],- "description": "The 2-letter country code of the city: https://d.to/geo"- },- "clicks": {- "type": "number",- "description": "The number of clicks from this city"- }- },- "required": ["city", "country", "clicks"]- }- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- }- },- "/analytics/device": {- "get": {- "operationId": "getDeviceAnalytics",- "x-speakeasy-name-override": "devices",- "summary": "Retrieve device analytics",- "deprecated": true,- "description": "Retrieve the top devices by number of clicks for a link, a domain, or the authenticated workspace.",- "tags": ["Analytics"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "query",- "name": "workspaceId",- "description": "The ID of the workspace.",- "schema": {- "type": "string",- "description": "The ID of the workspace.",- "example": "ws_cluuwcv0r..."- },- "required": true- },- {- "in": "query",- "name": "projectSlug",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "schema": {- "type": "string",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- },- {- "in": "query",- "name": "groupBy",- "description": "The field to group the analytics by. If undefined, returns the total click count.",- "schema": {- "type": "string",- "enum": [- "timeseries",- "country",- "city",- "device",- "browser",- "os",- "referer",- "top_links",- "top_urls"- ],- "description": "The field to group the analytics by. If undefined, returns the total click count."- }- },- {- "in": "query",- "name": "domain",- "description": "The domain to filter analytics for.",- "schema": {- "type": "string",- "description": "The domain to filter analytics for."- }- },- {- "in": "query",- "name": "key",- "description": "The short link slug.",- "schema": {- "type": "string",- "description": "The short link slug."- }- },- {- "in": "query",- "name": "linkId",- "description": "The unique ID of the short link on Dub.",- "schema": {- "type": "string",- "description": "The unique ID of the short link on Dub."- }- },- {- "in": "query",- "name": "externalId",- "description": "This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter.",- "schema": {- "type": "string",- "description": "This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter."- }- },- {- "in": "query",- "name": "interval",- "description": "The interval to retrieve analytics for. Takes precedence over start and end.",- "schema": {- "type": "string",- "enum": ["1h", "24h", "7d", "30d", "90d", "ytd", "1y", "all"],- "description": "The interval to retrieve analytics for. Takes precedence over start and end."- }- },- {- "in": "query",- "name": "start",- "description": "The start date and time when to retrieve analytics from.",- "schema": {- "type": "string",- "description": "The start date and time when to retrieve analytics from."- }- },- {- "in": "query",- "name": "end",- "description": "The end date and time when to retrieve analytics from. If not provided, defaults to the current date.",- "schema": {- "type": "string",- "description": "The end date and time when to retrieve analytics from. If not provided, defaults to the current date."- }- },- {- "in": "query",- "name": "country",- "description": "The country to retrieve analytics for.",- "schema": {- "type": "string",- "enum": [- "AF",- "AL",- "DZ",- "AS",- "AD",- "AO",- "AI",- "AQ",- "AG",- "AR",- "AM",- "AW",- "AU",- "AT",- "AZ",- "BS",- "BH",- "BD",- "BB",- "BY",- "BE",- "BZ",- "BJ",- "BM",- "BT",- "BO",- "BA",- "BW",- "BV",- "BR",- "IO",- "BN",- "BG",- "BF",- "BI",- "KH",- "CM",- "CA",- "CV",- "KY",- "CF",- "TD",- "CL",- "CN",- "CX",- "CC",- "CO",- "KM",- "CG",- "CD",- "CK",- "CR",- "CI",- "HR",- "CU",- "CY",- "CZ",- "DK",- "DJ",- "DM",- "DO",- "EC",- "EG",- "SV",- "GQ",- "ER",- "EE",- "ET",- "FK",- "FO",- "FJ",- "FI",- "FR",- "GF",- "PF",- "TF",- "GA",- "GM",- "GE",- "DE",- "GH",- "GI",- "GR",- "GL",- "GD",- "GP",- "GU",- "GT",- "GN",- "GW",- "GY",- "HT",- "HM",- "VA",- "HN",- "HK",- "HU",- "IS",- "IN",- "ID",- "IR",- "IQ",- "IE",- "IL",- "IT",- "JM",- "JP",- "JO",- "KZ",- "KE",- "KI",- "KP",- "KR",- "KW",- "KG",- "LA",- "LV",- "LB",- "LS",- "LR",- "LY",- "LI",- "LT",- "LU",- "MO",- "MG",- "MW",- "MY",- "MV",- "ML",- "MT",- "MH",- "MQ",- "MR",- "MU",- "YT",- "MX",- "FM",- "MD",- "MC",- "MN",- "MS",- "MA",- "MZ",- "MM",- "NA",- "NR",- "NP",- "NL",- "NC",- "NZ",- "NI",- "NE",- "NG",- "NU",- "NF",- "MK",- "MP",- "NO",- "OM",- "PK",- "PW",- "PS",- "PA",- "PG",- "PY",- "PE",- "PH",- "PN",- "PL",- "PT",- "PR",- "QA",- "RE",- "RO",- "RU",- "RW",- "SH",- "KN",- "LC",- "PM",- "VC",- "WS",- "SM",- "ST",- "SA",- "SN",- "SC",- "SL",- "SG",- "SK",- "SI",- "SB",- "SO",- "ZA",- "GS",- "ES",- "LK",- "SD",- "SR",- "SJ",- "SZ",- "SE",- "CH",- "SY",- "TW",- "TJ",- "TZ",- "TH",- "TL",- "TG",- "TK",- "TO",- "TT",- "TN",- "TR",- "TM",- "TC",- "TV",- "UG",- "UA",- "AE",- "GB",- "US",- "UM",- "UY",- "UZ",- "VU",- "VE",- "VN",- "VG",- "VI",- "WF",- "EH",- "YE",- "ZM",- "ZW",- "AX",- "BQ",- "CW",- "GG",- "IM",- "JE",- "ME",- "BL",- "MF",- "RS",- "SX",- "SS",- "XK"- ],- "description": "The country to retrieve analytics for."- }- },- {- "in": "query",- "name": "city",- "description": "The city to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The city to retrieve analytics for."- }- },- {- "in": "query",- "name": "device",- "description": "The device to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The device to retrieve analytics for."- }- },- {- "in": "query",- "name": "browser",- "description": "The browser to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The browser to retrieve analytics for."- }- },- {- "in": "query",- "name": "os",- "description": "The OS to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The OS to retrieve analytics for."- }- },- {- "in": "query",- "name": "referer",- "description": "The referer to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The referer to retrieve analytics for."- }- },- {- "in": "query",- "name": "url",- "description": "The URL to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The URL to retrieve analytics for."- }- },- {- "in": "query",- "name": "tagId",- "description": "The tag ID to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The tag ID to retrieve analytics for."- }- },- {- "in": "query",- "name": "qr",- "description": "Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both.",- "schema": {- "type": "boolean",- "description": "Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both."- }- },- {- "in": "query",- "name": "root",- "description": "Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both.",- "schema": {- "type": "boolean",- "description": "Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both."- }- }- ],- "responses": {- "200": {- "description": "The top devices by number of clicks",- "content": {- "application/json": {- "schema": {- "type": "array",- "items": {- "type": "object",- "properties": {- "device": {- "type": "string",- "description": "The name of the device"- },- "clicks": {- "type": "number",- "description": "The number of clicks from this device"- }- },- "required": ["device", "clicks"]- }- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- }- },- "/analytics/browser": {- "get": {- "operationId": "getBrowserAnalytics",- "x-speakeasy-name-override": "browsers",- "summary": "Retrieve browser analytics",- "deprecated": true,- "description": "Retrieve the top browsers by number of clicks for a link, a domain, or the authenticated workspace.",- "tags": ["Analytics"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "query",- "name": "workspaceId",- "description": "The ID of the workspace.",- "schema": {- "type": "string",- "description": "The ID of the workspace.",- "example": "ws_cluuwcv0r..."- },- "required": true- },- {- "in": "query",- "name": "projectSlug",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "schema": {- "type": "string",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- },- {- "in": "query",- "name": "groupBy",- "description": "The field to group the analytics by. If undefined, returns the total click count.",- "schema": {- "type": "string",- "enum": [- "timeseries",- "country",- "city",- "device",- "browser",- "os",- "referer",- "top_links",- "top_urls"- ],- "description": "The field to group the analytics by. If undefined, returns the total click count."- }- },- {- "in": "query",- "name": "domain",- "description": "The domain to filter analytics for.",- "schema": {- "type": "string",- "description": "The domain to filter analytics for."- }- },- {- "in": "query",- "name": "key",- "description": "The short link slug.",- "schema": {- "type": "string",- "description": "The short link slug."- }- },- {- "in": "query",- "name": "linkId",- "description": "The unique ID of the short link on Dub.",- "schema": {- "type": "string",- "description": "The unique ID of the short link on Dub."- }- },- {- "in": "query",- "name": "externalId",- "description": "This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter.",- "schema": {- "type": "string",- "description": "This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter."- }- },- {- "in": "query",- "name": "interval",- "description": "The interval to retrieve analytics for. Takes precedence over start and end.",- "schema": {- "type": "string",- "enum": ["1h", "24h", "7d", "30d", "90d", "ytd", "1y", "all"],- "description": "The interval to retrieve analytics for. Takes precedence over start and end."- }- },- {- "in": "query",- "name": "start",- "description": "The start date and time when to retrieve analytics from.",- "schema": {- "type": "string",- "description": "The start date and time when to retrieve analytics from."- }- },- {- "in": "query",- "name": "end",- "description": "The end date and time when to retrieve analytics from. If not provided, defaults to the current date.",- "schema": {- "type": "string",- "description": "The end date and time when to retrieve analytics from. If not provided, defaults to the current date."- }- },- {- "in": "query",- "name": "country",- "description": "The country to retrieve analytics for.",- "schema": {- "type": "string",- "enum": [- "AF",- "AL",- "DZ",- "AS",- "AD",- "AO",- "AI",- "AQ",- "AG",- "AR",- "AM",- "AW",- "AU",- "AT",- "AZ",- "BS",- "BH",- "BD",- "BB",- "BY",- "BE",- "BZ",- "BJ",- "BM",- "BT",- "BO",- "BA",- "BW",- "BV",- "BR",- "IO",- "BN",- "BG",- "BF",- "BI",- "KH",- "CM",- "CA",- "CV",- "KY",- "CF",- "TD",- "CL",- "CN",- "CX",- "CC",- "CO",- "KM",- "CG",- "CD",- "CK",- "CR",- "CI",- "HR",- "CU",- "CY",- "CZ",- "DK",- "DJ",- "DM",- "DO",- "EC",- "EG",- "SV",- "GQ",- "ER",- "EE",- "ET",- "FK",- "FO",- "FJ",- "FI",- "FR",- "GF",- "PF",- "TF",- "GA",- "GM",- "GE",- "DE",- "GH",- "GI",- "GR",- "GL",- "GD",- "GP",- "GU",- "GT",- "GN",- "GW",- "GY",- "HT",- "HM",- "VA",- "HN",- "HK",- "HU",- "IS",- "IN",- "ID",- "IR",- "IQ",- "IE",- "IL",- "IT",- "JM",- "JP",- "JO",- "KZ",- "KE",- "KI",- "KP",- "KR",- "KW",- "KG",- "LA",- "LV",- "LB",- "LS",- "LR",- "LY",- "LI",- "LT",- "LU",- "MO",- "MG",- "MW",- "MY",- "MV",- "ML",- "MT",- "MH",- "MQ",- "MR",- "MU",- "YT",- "MX",- "FM",- "MD",- "MC",- "MN",- "MS",- "MA",- "MZ",- "MM",- "NA",- "NR",- "NP",- "NL",- "NC",- "NZ",- "NI",- "NE",- "NG",- "NU",- "NF",- "MK",- "MP",- "NO",- "OM",- "PK",- "PW",- "PS",- "PA",- "PG",- "PY",- "PE",- "PH",- "PN",- "PL",- "PT",- "PR",- "QA",- "RE",- "RO",- "RU",- "RW",- "SH",- "KN",- "LC",- "PM",- "VC",- "WS",- "SM",- "ST",- "SA",- "SN",- "SC",- "SL",- "SG",- "SK",- "SI",- "SB",- "SO",- "ZA",- "GS",- "ES",- "LK",- "SD",- "SR",- "SJ",- "SZ",- "SE",- "CH",- "SY",- "TW",- "TJ",- "TZ",- "TH",- "TL",- "TG",- "TK",- "TO",- "TT",- "TN",- "TR",- "TM",- "TC",- "TV",- "UG",- "UA",- "AE",- "GB",- "US",- "UM",- "UY",- "UZ",- "VU",- "VE",- "VN",- "VG",- "VI",- "WF",- "EH",- "YE",- "ZM",- "ZW",- "AX",- "BQ",- "CW",- "GG",- "IM",- "JE",- "ME",- "BL",- "MF",- "RS",- "SX",- "SS",- "XK"- ],- "description": "The country to retrieve analytics for."- }- },- {- "in": "query",- "name": "city",- "description": "The city to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The city to retrieve analytics for."- }- },- {- "in": "query",- "name": "device",- "description": "The device to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The device to retrieve analytics for."- }- },- {- "in": "query",- "name": "browser",- "description": "The browser to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The browser to retrieve analytics for."- }- },- {- "in": "query",- "name": "os",- "description": "The OS to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The OS to retrieve analytics for."- }- },- {- "in": "query",- "name": "referer",- "description": "The referer to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The referer to retrieve analytics for."- }- },- {- "in": "query",- "name": "url",- "description": "The URL to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The URL to retrieve analytics for."- }- },- {- "in": "query",- "name": "tagId",- "description": "The tag ID to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The tag ID to retrieve analytics for."- }- },- {- "in": "query",- "name": "qr",- "description": "Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both.",- "schema": {- "type": "boolean",- "description": "Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both."- }- },- {- "in": "query",- "name": "root",- "description": "Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both.",- "schema": {- "type": "boolean",- "description": "Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both."- }- }- ],- "responses": {- "200": {- "description": "The top browsers by number of clicks",- "content": {- "application/json": {- "schema": {- "type": "array",- "items": {- "type": "object",- "properties": {- "browser": {- "type": "string",- "description": "The name of the browser"- },- "clicks": {- "type": "number",- "description": "The number of clicks from this browser"- }- },- "required": ["browser", "clicks"]- }- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- }- },- "/analytics/os": {- "get": {- "operationId": "getOSAnalytics",- "x-speakeasy-name-override": "os",- "summary": "Retrieve OS analytics",- "deprecated": true,- "description": "Retrieve the top OS by number of clicks for a link, a domain, or the authenticated workspace.",- "tags": ["Analytics"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "query",- "name": "workspaceId",- "description": "The ID of the workspace.",- "schema": {- "type": "string",- "description": "The ID of the workspace.",- "example": "ws_cluuwcv0r..."- },- "required": true- },- {- "in": "query",- "name": "projectSlug",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "schema": {- "type": "string",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- },- {- "in": "query",- "name": "groupBy",- "description": "The field to group the analytics by. If undefined, returns the total click count.",- "schema": {- "type": "string",- "enum": [- "timeseries",- "country",- "city",- "device",- "browser",- "os",- "referer",- "top_links",- "top_urls"- ],- "description": "The field to group the analytics by. If undefined, returns the total click count."- }- },- {- "in": "query",- "name": "domain",- "description": "The domain to filter analytics for.",- "schema": {- "type": "string",- "description": "The domain to filter analytics for."- }- },- {- "in": "query",- "name": "key",- "description": "The short link slug.",- "schema": {- "type": "string",- "description": "The short link slug."- }- },- {- "in": "query",- "name": "linkId",- "description": "The unique ID of the short link on Dub.",- "schema": {- "type": "string",- "description": "The unique ID of the short link on Dub."- }- },- {- "in": "query",- "name": "externalId",- "description": "This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter.",- "schema": {- "type": "string",- "description": "This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter."- }- },- {- "in": "query",- "name": "interval",- "description": "The interval to retrieve analytics for. Takes precedence over start and end.",- "schema": {- "type": "string",- "enum": ["1h", "24h", "7d", "30d", "90d", "ytd", "1y", "all"],- "description": "The interval to retrieve analytics for. Takes precedence over start and end."- }- },- {- "in": "query",- "name": "start",- "description": "The start date and time when to retrieve analytics from.",- "schema": {- "type": "string",- "description": "The start date and time when to retrieve analytics from."- }- },- {- "in": "query",- "name": "end",- "description": "The end date and time when to retrieve analytics from. If not provided, defaults to the current date.",- "schema": {- "type": "string",- "description": "The end date and time when to retrieve analytics from. If not provided, defaults to the current date."- }- },- {- "in": "query",- "name": "country",- "description": "The country to retrieve analytics for.",- "schema": {- "type": "string",- "enum": [- "AF",- "AL",- "DZ",- "AS",- "AD",- "AO",- "AI",- "AQ",- "AG",- "AR",- "AM",- "AW",- "AU",- "AT",- "AZ",- "BS",- "BH",- "BD",- "BB",- "BY",- "BE",- "BZ",- "BJ",- "BM",- "BT",- "BO",- "BA",- "BW",- "BV",- "BR",- "IO",- "BN",- "BG",- "BF",- "BI",- "KH",- "CM",- "CA",- "CV",- "KY",- "CF",- "TD",- "CL",- "CN",- "CX",- "CC",- "CO",- "KM",- "CG",- "CD",- "CK",- "CR",- "CI",- "HR",- "CU",- "CY",- "CZ",- "DK",- "DJ",- "DM",- "DO",- "EC",- "EG",- "SV",- "GQ",- "ER",- "EE",- "ET",- "FK",- "FO",- "FJ",- "FI",- "FR",- "GF",- "PF",- "TF",- "GA",- "GM",- "GE",- "DE",- "GH",- "GI",- "GR",- "GL",- "GD",- "GP",- "GU",- "GT",- "GN",- "GW",- "GY",- "HT",- "HM",- "VA",- "HN",- "HK",- "HU",- "IS",- "IN",- "ID",- "IR",- "IQ",- "IE",- "IL",- "IT",- "JM",- "JP",- "JO",- "KZ",- "KE",- "KI",- "KP",- "KR",- "KW",- "KG",- "LA",- "LV",- "LB",- "LS",- "LR",- "LY",- "LI",- "LT",- "LU",- "MO",- "MG",- "MW",- "MY",- "MV",- "ML",- "MT",- "MH",- "MQ",- "MR",- "MU",- "YT",- "MX",- "FM",- "MD",- "MC",- "MN",- "MS",- "MA",- "MZ",- "MM",- "NA",- "NR",- "NP",- "NL",- "NC",- "NZ",- "NI",- "NE",- "NG",- "NU",- "NF",- "MK",- "MP",- "NO",- "OM",- "PK",- "PW",- "PS",- "PA",- "PG",- "PY",- "PE",- "PH",- "PN",- "PL",- "PT",- "PR",- "QA",- "RE",- "RO",- "RU",- "RW",- "SH",- "KN",- "LC",- "PM",- "VC",- "WS",- "SM",- "ST",- "SA",- "SN",- "SC",- "SL",- "SG",- "SK",- "SI",- "SB",- "SO",- "ZA",- "GS",- "ES",- "LK",- "SD",- "SR",- "SJ",- "SZ",- "SE",- "CH",- "SY",- "TW",- "TJ",- "TZ",- "TH",- "TL",- "TG",- "TK",- "TO",- "TT",- "TN",- "TR",- "TM",- "TC",- "TV",- "UG",- "UA",- "AE",- "GB",- "US",- "UM",- "UY",- "UZ",- "VU",- "VE",- "VN",- "VG",- "VI",- "WF",- "EH",- "YE",- "ZM",- "ZW",- "AX",- "BQ",- "CW",- "GG",- "IM",- "JE",- "ME",- "BL",- "MF",- "RS",- "SX",- "SS",- "XK"- ],- "description": "The country to retrieve analytics for."- }- },- {- "in": "query",- "name": "city",- "description": "The city to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The city to retrieve analytics for."- }- },- {- "in": "query",- "name": "device",- "description": "The device to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The device to retrieve analytics for."- }- },- {- "in": "query",- "name": "browser",- "description": "The browser to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The browser to retrieve analytics for."- }- },- {- "in": "query",- "name": "os",- "description": "The OS to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The OS to retrieve analytics for."- }- },- {- "in": "query",- "name": "referer",- "description": "The referer to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The referer to retrieve analytics for."- }- },- {- "in": "query",- "name": "url",- "description": "The URL to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The URL to retrieve analytics for."- }- },- {- "in": "query",- "name": "tagId",- "description": "The tag ID to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The tag ID to retrieve analytics for."- }- },- {- "in": "query",- "name": "qr",- "description": "Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both.",- "schema": {- "type": "boolean",- "description": "Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both."- }- },- {- "in": "query",- "name": "root",- "description": "Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both.",- "schema": {- "type": "boolean",- "description": "Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both."- }- }- ],- "responses": {- "200": {- "description": "The top OS by number of clicks",- "content": {- "application/json": {- "schema": {- "type": "array",- "items": {- "type": "object",- "properties": {- "os": {- "type": "string",- "description": "The name of the OS"- },- "clicks": {- "type": "number",- "description": "The number of clicks from this OS"- }- },- "required": ["os", "clicks"]- }- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- }- },- "/analytics/referer": {- "get": {- "operationId": "getRefererAnalytics",- "x-speakeasy-name-override": "referers",- "summary": "Retrieve referer analytics",- "deprecated": true,- "description": "Retrieve the top referers by number of clicks for a link, a domain, or the authenticated workspace.",- "tags": ["Analytics"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "query",- "name": "workspaceId",- "description": "The ID of the workspace.",- "schema": {- "type": "string",- "description": "The ID of the workspace.",- "example": "ws_cluuwcv0r..."- },- "required": true- },- {- "in": "query",- "name": "projectSlug",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "schema": {- "type": "string",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- },- {- "in": "query",- "name": "groupBy",- "description": "The field to group the analytics by. If undefined, returns the total click count.",- "schema": {- "type": "string",- "enum": [- "timeseries",- "country",- "city",- "device",- "browser",- "os",- "referer",- "top_links",- "top_urls"- ],- "description": "The field to group the analytics by. If undefined, returns the total click count."- }- },- {- "in": "query",- "name": "domain",- "description": "The domain to filter analytics for.",- "schema": {- "type": "string",- "description": "The domain to filter analytics for."- }- },- {- "in": "query",- "name": "key",- "description": "The short link slug.",- "schema": {- "type": "string",- "description": "The short link slug."- }- },- {- "in": "query",- "name": "linkId",- "description": "The unique ID of the short link on Dub.",- "schema": {- "type": "string",- "description": "The unique ID of the short link on Dub."- }- },- {- "in": "query",- "name": "externalId",- "description": "This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter.",- "schema": {- "type": "string",- "description": "This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter."- }- },- {- "in": "query",- "name": "interval",- "description": "The interval to retrieve analytics for. Takes precedence over start and end.",- "schema": {- "type": "string",- "enum": ["1h", "24h", "7d", "30d", "90d", "ytd", "1y", "all"],- "description": "The interval to retrieve analytics for. Takes precedence over start and end."- }- },- {- "in": "query",- "name": "start",- "description": "The start date and time when to retrieve analytics from.",- "schema": {- "type": "string",- "description": "The start date and time when to retrieve analytics from."- }- },- {- "in": "query",- "name": "end",- "description": "The end date and time when to retrieve analytics from. If not provided, defaults to the current date.",- "schema": {- "type": "string",- "description": "The end date and time when to retrieve analytics from. If not provided, defaults to the current date."- }- },- {- "in": "query",- "name": "country",- "description": "The country to retrieve analytics for.",- "schema": {- "type": "string",- "enum": [- "AF",- "AL",- "DZ",- "AS",- "AD",- "AO",- "AI",- "AQ",- "AG",- "AR",- "AM",- "AW",- "AU",- "AT",- "AZ",- "BS",- "BH",- "BD",- "BB",- "BY",- "BE",- "BZ",- "BJ",- "BM",- "BT",- "BO",- "BA",- "BW",- "BV",- "BR",- "IO",- "BN",- "BG",- "BF",- "BI",- "KH",- "CM",- "CA",- "CV",- "KY",- "CF",- "TD",- "CL",- "CN",- "CX",- "CC",- "CO",- "KM",- "CG",- "CD",- "CK",- "CR",- "CI",- "HR",- "CU",- "CY",- "CZ",- "DK",- "DJ",- "DM",- "DO",- "EC",- "EG",- "SV",- "GQ",- "ER",- "EE",- "ET",- "FK",- "FO",- "FJ",- "FI",- "FR",- "GF",- "PF",- "TF",- "GA",- "GM",- "GE",- "DE",- "GH",- "GI",- "GR",- "GL",- "GD",- "GP",- "GU",- "GT",- "GN",- "GW",- "GY",- "HT",- "HM",- "VA",- "HN",- "HK",- "HU",- "IS",- "IN",- "ID",- "IR",- "IQ",- "IE",- "IL",- "IT",- "JM",- "JP",- "JO",- "KZ",- "KE",- "KI",- "KP",- "KR",- "KW",- "KG",- "LA",- "LV",- "LB",- "LS",- "LR",- "LY",- "LI",- "LT",- "LU",- "MO",- "MG",- "MW",- "MY",- "MV",- "ML",- "MT",- "MH",- "MQ",- "MR",- "MU",- "YT",- "MX",- "FM",- "MD",- "MC",- "MN",- "MS",- "MA",- "MZ",- "MM",- "NA",- "NR",- "NP",- "NL",- "NC",- "NZ",- "NI",- "NE",- "NG",- "NU",- "NF",- "MK",- "MP",- "NO",- "OM",- "PK",- "PW",- "PS",- "PA",- "PG",- "PY",- "PE",- "PH",- "PN",- "PL",- "PT",- "PR",- "QA",- "RE",- "RO",- "RU",- "RW",- "SH",- "KN",- "LC",- "PM",- "VC",- "WS",- "SM",- "ST",- "SA",- "SN",- "SC",- "SL",- "SG",- "SK",- "SI",- "SB",- "SO",- "ZA",- "GS",- "ES",- "LK",- "SD",- "SR",- "SJ",- "SZ",- "SE",- "CH",- "SY",- "TW",- "TJ",- "TZ",- "TH",- "TL",- "TG",- "TK",- "TO",- "TT",- "TN",- "TR",- "TM",- "TC",- "TV",- "UG",- "UA",- "AE",- "GB",- "US",- "UM",- "UY",- "UZ",- "VU",- "VE",- "VN",- "VG",- "VI",- "WF",- "EH",- "YE",- "ZM",- "ZW",- "AX",- "BQ",- "CW",- "GG",- "IM",- "JE",- "ME",- "BL",- "MF",- "RS",- "SX",- "SS",- "XK"- ],- "description": "The country to retrieve analytics for."- }- },- {- "in": "query",- "name": "city",- "description": "The city to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The city to retrieve analytics for."- }- },- {- "in": "query",- "name": "device",- "description": "The device to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The device to retrieve analytics for."- }- },- {- "in": "query",- "name": "browser",- "description": "The browser to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The browser to retrieve analytics for."- }- },- {- "in": "query",- "name": "os",- "description": "The OS to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The OS to retrieve analytics for."- }- },- {- "in": "query",- "name": "referer",- "description": "The referer to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The referer to retrieve analytics for."- }- },- {- "in": "query",- "name": "url",- "description": "The URL to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The URL to retrieve analytics for."- }- },- {- "in": "query",- "name": "tagId",- "description": "The tag ID to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The tag ID to retrieve analytics for."- }- },- {- "in": "query",- "name": "qr",- "description": "Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both.",- "schema": {- "type": "boolean",- "description": "Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both."- }- },- {- "in": "query",- "name": "root",- "description": "Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both.",- "schema": {- "type": "boolean",- "description": "Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both."- }- }- ],- "responses": {- "200": {- "description": "The top referers by number of clicks",- "content": {- "application/json": {- "schema": {- "type": "array",- "items": {- "type": "object",- "properties": {- "referer": {- "type": "string",- "description": "The name of the referer. If unknown, this will be `(direct)`"- },- "clicks": {- "type": "number",- "description": "The number of clicks from this referer"- }- },- "required": ["referer", "clicks"]- }- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- }- },- "/analytics/top_links": {- "get": {- "operationId": "getTopLinks",- "x-speakeasy-name-override": "topLinks",- "summary": "Retrieve top links",- "deprecated": true,- "description": "Retrieve the top links by number of clicks for a domain or the authenticated workspace.",- "tags": ["Analytics"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "query",- "name": "workspaceId",- "description": "The ID of the workspace.",- "schema": {- "type": "string",- "description": "The ID of the workspace.",- "example": "ws_cluuwcv0r..."- },- "required": true- },- {- "in": "query",- "name": "projectSlug",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "schema": {- "type": "string",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- },- {- "in": "query",- "name": "groupBy",- "description": "The field to group the analytics by. If undefined, returns the total click count.",- "schema": {- "type": "string",- "enum": [- "timeseries",- "country",- "city",- "device",- "browser",- "os",- "referer",- "top_links",- "top_urls"- ],- "description": "The field to group the analytics by. If undefined, returns the total click count."- }- },- {- "in": "query",- "name": "domain",- "description": "The domain to filter analytics for.",- "schema": {- "type": "string",- "description": "The domain to filter analytics for."- }- },- {- "in": "query",- "name": "key",- "description": "The short link slug.",- "schema": {- "type": "string",- "description": "The short link slug."- }- },- {- "in": "query",- "name": "linkId",- "description": "The unique ID of the short link on Dub.",- "schema": {- "type": "string",- "description": "The unique ID of the short link on Dub."- }- },- {- "in": "query",- "name": "externalId",- "description": "This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter.",- "schema": {- "type": "string",- "description": "This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter."- }- },- {- "in": "query",- "name": "interval",- "description": "The interval to retrieve analytics for. Takes precedence over start and end.",- "schema": {- "type": "string",- "enum": ["1h", "24h", "7d", "30d", "90d", "ytd", "1y", "all"],- "description": "The interval to retrieve analytics for. Takes precedence over start and end."- }- },- {- "in": "query",- "name": "start",- "description": "The start date and time when to retrieve analytics from.",- "schema": {- "type": "string",- "description": "The start date and time when to retrieve analytics from."- }- },- {- "in": "query",- "name": "end",- "description": "The end date and time when to retrieve analytics from. If not provided, defaults to the current date.",- "schema": {- "type": "string",- "description": "The end date and time when to retrieve analytics from. If not provided, defaults to the current date."- }- },- {- "in": "query",- "name": "country",- "description": "The country to retrieve analytics for.",- "schema": {- "type": "string",- "enum": [- "AF",- "AL",- "DZ",- "AS",- "AD",- "AO",- "AI",- "AQ",- "AG",- "AR",- "AM",- "AW",- "AU",- "AT",- "AZ",- "BS",- "BH",- "BD",- "BB",- "BY",- "BE",- "BZ",- "BJ",- "BM",- "BT",- "BO",- "BA",- "BW",- "BV",- "BR",- "IO",- "BN",- "BG",- "BF",- "BI",- "KH",- "CM",- "CA",- "CV",- "KY",- "CF",- "TD",- "CL",- "CN",- "CX",- "CC",- "CO",- "KM",- "CG",- "CD",- "CK",- "CR",- "CI",- "HR",- "CU",- "CY",- "CZ",- "DK",- "DJ",- "DM",- "DO",- "EC",- "EG",- "SV",- "GQ",- "ER",- "EE",- "ET",- "FK",- "FO",- "FJ",- "FI",- "FR",- "GF",- "PF",- "TF",- "GA",- "GM",- "GE",- "DE",- "GH",- "GI",- "GR",- "GL",- "GD",- "GP",- "GU",- "GT",- "GN",- "GW",- "GY",- "HT",- "HM",- "VA",- "HN",- "HK",- "HU",- "IS",- "IN",- "ID",- "IR",- "IQ",- "IE",- "IL",- "IT",- "JM",- "JP",- "JO",- "KZ",- "KE",- "KI",- "KP",- "KR",- "KW",- "KG",- "LA",- "LV",- "LB",- "LS",- "LR",- "LY",- "LI",- "LT",- "LU",- "MO",- "MG",- "MW",- "MY",- "MV",- "ML",- "MT",- "MH",- "MQ",- "MR",- "MU",- "YT",- "MX",- "FM",- "MD",- "MC",- "MN",- "MS",- "MA",- "MZ",- "MM",- "NA",- "NR",- "NP",- "NL",- "NC",- "NZ",- "NI",- "NE",- "NG",- "NU",- "NF",- "MK",- "MP",- "NO",- "OM",- "PK",- "PW",- "PS",- "PA",- "PG",- "PY",- "PE",- "PH",- "PN",- "PL",- "PT",- "PR",- "QA",- "RE",- "RO",- "RU",- "RW",- "SH",- "KN",- "LC",- "PM",- "VC",- "WS",- "SM",- "ST",- "SA",- "SN",- "SC",- "SL",- "SG",- "SK",- "SI",- "SB",- "SO",- "ZA",- "GS",- "ES",- "LK",- "SD",- "SR",- "SJ",- "SZ",- "SE",- "CH",- "SY",- "TW",- "TJ",- "TZ",- "TH",- "TL",- "TG",- "TK",- "TO",- "TT",- "TN",- "TR",- "TM",- "TC",- "TV",- "UG",- "UA",- "AE",- "GB",- "US",- "UM",- "UY",- "UZ",- "VU",- "VE",- "VN",- "VG",- "VI",- "WF",- "EH",- "YE",- "ZM",- "ZW",- "AX",- "BQ",- "CW",- "GG",- "IM",- "JE",- "ME",- "BL",- "MF",- "RS",- "SX",- "SS",- "XK"- ],- "description": "The country to retrieve analytics for."- }- },- {- "in": "query",- "name": "city",- "description": "The city to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The city to retrieve analytics for."- }- },- {- "in": "query",- "name": "device",- "description": "The device to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The device to retrieve analytics for."- }- },- {- "in": "query",- "name": "browser",- "description": "The browser to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The browser to retrieve analytics for."- }- },- {- "in": "query",- "name": "os",- "description": "The OS to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The OS to retrieve analytics for."- }- },- {- "in": "query",- "name": "referer",- "description": "The referer to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The referer to retrieve analytics for."- }- },- {- "in": "query",- "name": "url",- "description": "The URL to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The URL to retrieve analytics for."- }- },- {- "in": "query",- "name": "tagId",- "description": "The tag ID to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The tag ID to retrieve analytics for."- }- },- {- "in": "query",- "name": "qr",- "description": "Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both.",- "schema": {- "type": "boolean",- "description": "Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both."- }- },- {- "in": "query",- "name": "root",- "description": "Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both.",- "schema": {- "type": "boolean",- "description": "Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both."- }- }- ],- "responses": {- "200": {- "description": "The top links by number of clicks",- "content": {- "application/json": {- "schema": {- "type": "array",- "items": {- "type": "object",- "properties": {- "link": {- "type": "string",- "description": "The unique ID of the short link"- },- "clicks": {- "type": "number",- "description": "The number of clicks from this link"- }- },- "required": ["link", "clicks"]- }- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- }- },- "/analytics/top_urls": {- "get": {- "operationId": "getTopURLs",- "x-speakeasy-name-override": "topUrls",- "summary": "Retrieve top URLs",- "deprecated": true,- "description": "Retrieve the top URLs by number of clicks for a given short link.",- "tags": ["Analytics"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "query",- "name": "workspaceId",- "description": "The ID of the workspace.",- "schema": {- "type": "string",- "description": "The ID of the workspace.",- "example": "ws_cluuwcv0r..."- },- "required": true- },- {- "in": "query",- "name": "projectSlug",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "schema": {- "type": "string",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- },- {- "in": "query",- "name": "groupBy",- "description": "The field to group the analytics by. If undefined, returns the total click count.",- "schema": {- "type": "string",- "enum": [- "timeseries",- "country",- "city",- "device",- "browser",- "os",- "referer",- "top_links",- "top_urls"- ],- "description": "The field to group the analytics by. If undefined, returns the total click count."- }- },- {- "in": "query",- "name": "domain",- "description": "The domain to filter analytics for.",- "schema": {- "type": "string",- "description": "The domain to filter analytics for."- }- },- {- "in": "query",- "name": "key",- "description": "The short link slug.",- "schema": {- "type": "string",- "description": "The short link slug."- }- },- {- "in": "query",- "name": "linkId",- "description": "The unique ID of the short link on Dub.",- "schema": {- "type": "string",- "description": "The unique ID of the short link on Dub."- }- },- {- "in": "query",- "name": "externalId",- "description": "This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter.",- "schema": {- "type": "string",- "description": "This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter."- }- },- {- "in": "query",- "name": "interval",- "description": "The interval to retrieve analytics for. Takes precedence over start and end.",- "schema": {- "type": "string",- "enum": ["1h", "24h", "7d", "30d", "90d", "ytd", "1y", "all"],- "description": "The interval to retrieve analytics for. Takes precedence over start and end."- }- },- {- "in": "query",- "name": "start",- "description": "The start date and time when to retrieve analytics from.",- "schema": {- "type": "string",- "description": "The start date and time when to retrieve analytics from."- }- },- {- "in": "query",- "name": "end",- "description": "The end date and time when to retrieve analytics from. If not provided, defaults to the current date.",- "schema": {- "type": "string",- "description": "The end date and time when to retrieve analytics from. If not provided, defaults to the current date."- }- },- {- "in": "query",- "name": "country",- "description": "The country to retrieve analytics for.",- "schema": {- "type": "string",- "enum": [- "AF",- "AL",- "DZ",- "AS",- "AD",- "AO",- "AI",- "AQ",- "AG",- "AR",- "AM",- "AW",- "AU",- "AT",- "AZ",- "BS",- "BH",- "BD",- "BB",- "BY",- "BE",- "BZ",- "BJ",- "BM",- "BT",- "BO",- "BA",- "BW",- "BV",- "BR",- "IO",- "BN",- "BG",- "BF",- "BI",- "KH",- "CM",- "CA",- "CV",- "KY",- "CF",- "TD",- "CL",- "CN",- "CX",- "CC",- "CO",- "KM",- "CG",- "CD",- "CK",- "CR",- "CI",- "HR",- "CU",- "CY",- "CZ",- "DK",- "DJ",- "DM",- "DO",- "EC",- "EG",- "SV",- "GQ",- "ER",- "EE",- "ET",- "FK",- "FO",- "FJ",- "FI",- "FR",- "GF",- "PF",- "TF",- "GA",- "GM",- "GE",- "DE",- "GH",- "GI",- "GR",- "GL",- "GD",- "GP",- "GU",- "GT",- "GN",- "GW",- "GY",- "HT",- "HM",- "VA",- "HN",- "HK",- "HU",- "IS",- "IN",- "ID",- "IR",- "IQ",- "IE",- "IL",- "IT",- "JM",- "JP",- "JO",- "KZ",- "KE",- "KI",- "KP",- "KR",- "KW",- "KG",- "LA",- "LV",- "LB",- "LS",- "LR",- "LY",- "LI",- "LT",- "LU",- "MO",- "MG",- "MW",- "MY",- "MV",- "ML",- "MT",- "MH",- "MQ",- "MR",- "MU",- "YT",- "MX",- "FM",- "MD",- "MC",- "MN",- "MS",- "MA",- "MZ",- "MM",- "NA",- "NR",- "NP",- "NL",- "NC",- "NZ",- "NI",- "NE",- "NG",- "NU",- "NF",- "MK",- "MP",- "NO",- "OM",- "PK",- "PW",- "PS",- "PA",- "PG",- "PY",- "PE",- "PH",- "PN",- "PL",- "PT",- "PR",- "QA",- "RE",- "RO",- "RU",- "RW",- "SH",- "KN",- "LC",- "PM",- "VC",- "WS",- "SM",- "ST",- "SA",- "SN",- "SC",- "SL",- "SG",- "SK",- "SI",- "SB",- "SO",- "ZA",- "GS",- "ES",- "LK",- "SD",- "SR",- "SJ",- "SZ",- "SE",- "CH",- "SY",- "TW",- "TJ",- "TZ",- "TH",- "TL",- "TG",- "TK",- "TO",- "TT",- "TN",- "TR",- "TM",- "TC",- "TV",- "UG",- "UA",- "AE",- "GB",- "US",- "UM",- "UY",- "UZ",- "VU",- "VE",- "VN",- "VG",- "VI",- "WF",- "EH",- "YE",- "ZM",- "ZW",- "AX",- "BQ",- "CW",- "GG",- "IM",- "JE",- "ME",- "BL",- "MF",- "RS",- "SX",- "SS",- "XK"- ],- "description": "The country to retrieve analytics for."- }- },- {- "in": "query",- "name": "city",- "description": "The city to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The city to retrieve analytics for."- }- },- {- "in": "query",- "name": "device",- "description": "The device to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The device to retrieve analytics for."- }- },- {- "in": "query",- "name": "browser",- "description": "The browser to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The browser to retrieve analytics for."- }- },- {- "in": "query",- "name": "os",- "description": "The OS to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The OS to retrieve analytics for."- }- },- {- "in": "query",- "name": "referer",- "description": "The referer to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The referer to retrieve analytics for."- }- },- {- "in": "query",- "name": "url",- "description": "The URL to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The URL to retrieve analytics for."- }- },- {- "in": "query",- "name": "tagId",- "description": "The tag ID to retrieve analytics for.",- "schema": {- "type": "string",- "description": "The tag ID to retrieve analytics for."- }- },- {- "in": "query",- "name": "qr",- "description": "Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both.",- "schema": {- "type": "boolean",- "description": "Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both."- }- },- {- "in": "query",- "name": "root",- "description": "Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both.",- "schema": {- "type": "boolean",- "description": "Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both."- }- }- ],- "responses": {- "200": {- "description": "The top URLs by number of clicks",- "content": {- "application/json": {- "schema": {- "type": "array",- "items": {- "type": "object",- "properties": {- "url": {- "type": "string",- "description": "The destination URL"- },- "clicks": {- "type": "number",- "description": "The number of clicks from this URL"- }- },- "required": ["url", "clicks"]- }- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- }- },- "/workspaces": {- "get": {- "operationId": "getWorkspaces",- "x-speakeasy-name-override": "list",- "summary": "Retrieve a list of workspaces",- "description": "Retrieve a list of workspaces for the authenticated user.",- "tags": ["Workspaces"],- "security": [- {- "token": []- }- ],- "responses": {- "200": {- "description": "A list of workspaces",- "content": {- "application/json": {- "schema": {- "type": "array",- "items": {- "$ref": "#/components/schemas/WorkspaceSchema"- }- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- },- "post": {- "operationId": "createWorkspace",- "x-speakeasy-name-override": "create",- "summary": "Create a workspace",- "description": "Create a new workspace for the authenticated user.",- "tags": ["Workspaces"],- "security": [- {- "token": []- }- ],- "requestBody": {- "content": {- "application/json": {- "schema": {- "type": "object",- "properties": {- "name": {- "type": "string",- "minLength": 1,- "maxLength": 32- },- "slug": {- "type": "string",- "minLength": 3,- "maxLength": 48- },- "domain": {- "type": "string"- }- },- "required": ["name", "slug"]- }- }- }- },- "responses": {- "200": {- "description": "The created workspace",- "content": {- "application/json": {- "schema": {- "$ref": "#/components/schemas/WorkspaceSchema"- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- }- },- "/workspaces/{idOrSlug}": {- "get": {- "operationId": "getWorkspace",- "x-speakeasy-name-override": "get",- "summary": "Retrieve a workspace",- "description": "Retrieve a workspace for the authenticated user.",- "tags": ["Workspaces"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "path",- "name": "idOrSlug",- "description": "The ID or slug of the workspace.",- "schema": {- "type": "string",- "description": "The ID or slug of the workspace."- },- "required": true- }- ],- "responses": {- "200": {- "description": "The retrieved workspace",- "content": {- "application/json": {- "schema": {- "$ref": "#/components/schemas/WorkspaceSchema"- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- }- },- "/tags": {- "post": {- "operationId": "createTag",- "x-speakeasy-name-override": "create",- "summary": "Create a new tag",- "description": "Create a new tag for the authenticated workspace.",- "tags": ["Tags"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "query",- "name": "workspaceId",- "description": "The ID of the workspace.",- "schema": {- "type": "string",- "description": "The ID of the workspace.",- "example": "ws_cluuwcv0r..."- },- "required": true- },- {- "in": "query",- "name": "projectSlug",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "schema": {- "type": "string",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- }- ],- "requestBody": {- "content": {- "application/json": {- "schema": {- "type": "object",- "properties": {- "tag": {- "type": "string",- "minLength": 1,- "description": "The name of the tag to create."- },- "color": {- "type": "string",- "enum": [- "red",- "yellow",- "green",- "blue",- "purple",- "pink",- "brown"- ],- "description": "The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown."- }- },- "required": ["tag"]- }- }- }- },- "responses": {- "201": {- "description": "The created tag",- "content": {- "application/json": {- "schema": {- "$ref": "#/components/schemas/TagSchema"- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- },- "get": {- "operationId": "getTags",- "x-speakeasy-name-override": "list",- "summary": "Retrieve a list of tags",- "description": "Retrieve a list of tags for the authenticated workspace.",- "tags": ["Tags"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "query",- "name": "workspaceId",- "description": "The ID of the workspace.",- "schema": {- "type": "string",- "description": "The ID of the workspace.",- "example": "ws_cluuwcv0r..."- },- "required": true- },- {- "in": "query",- "name": "projectSlug",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "schema": {- "type": "string",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- }- ],- "responses": {- "200": {- "description": "A list of tags",- "content": {- "application/json": {- "schema": {- "type": "array",- "items": {- "$ref": "#/components/schemas/TagSchema"- }- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- }- },- "/domains": {- "post": {- "operationId": "createDomain",- "x-speakeasy-name-override": "create",- "summary": "Create a domain",- "description": "Create a domain for the authenticated workspace.",- "tags": ["Domains"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "query",- "name": "workspaceId",- "description": "The ID of the workspace.",- "schema": {- "type": "string",- "description": "The ID of the workspace.",- "example": "ws_cluuwcv0r..."- },- "required": true- },- {- "in": "query",- "name": "projectSlug",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "schema": {- "type": "string",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- }- ],- "requestBody": {- "content": {- "application/json": {- "schema": {- "type": "object",- "properties": {- "slug": {- "type": "string",- "minLength": 1,- "description": "Name of the domain.",- "example": "acme.com"- },- "type": {- "type": "string",- "enum": ["redirect", "rewrite"],- "default": "redirect",- "description": "The type of redirect to use for this domain.",- "example": "redirect"- },- "target": {- "type": "string",- "nullable": true,- "description": "The page your users will get redirected to when they visit your domain.",- "example": "https://acme.com/landing"- },- "expiredUrl": {- "type": "string",- "nullable": true,- "description": "Redirect users to a specific URL when any link under this domain has expired.",- "example": "https://acme.com/expired"- },- "archived": {- "type": "boolean",- "default": false,- "description": "Whether to archive this domain. `false` will unarchive a previously archived domain.",- "example": false- },- "placeholder": {- "type": "string",- "nullable": true,- "default": "https://dub.co/help/article/what-is-dub",- "description": "Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.",- "example": "https://dub.co/help/article/what-is-dub"- }- },- "required": ["slug"]- }- }- }- },- "responses": {- "201": {- "description": "The domain was added.",- "content": {- "application/json": {- "schema": {- "$ref": "#/components/schemas/DomainSchema"- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- },- "get": {- "operationId": "listDomains",- "x-speakeasy-name-override": "list",- "summary": "Retrieve a list of domains",- "description": "Retrieve a list of domains associated with the authenticated workspace.",- "tags": ["Domains"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "query",- "name": "workspaceId",- "description": "The ID of the workspace.",- "schema": {- "type": "string",- "description": "The ID of the workspace.",- "example": "ws_cluuwcv0r..."- },- "required": true- },- {- "in": "query",- "name": "projectSlug",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "schema": {- "type": "string",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- }- ],- "responses": {- "200": {- "description": "The domains were retrieved.",- "content": {- "application/json": {- "schema": {- "type": "array",- "items": {- "$ref": "#/components/schemas/DomainSchema"- }- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- }- },- "/domains/{slug}": {- "patch": {- "operationId": "updateDomain",- "x-speakeasy-name-override": "update",- "x-speakeasy-max-method-params": 2,- "summary": "Update a domain",- "description": "Update a domain for the authenticated workspace.",- "tags": ["Domains"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "path",- "name": "slug",- "description": "The domain name.",- "schema": {- "type": "string",- "description": "The domain name.",- "example": "acme.com"- },- "required": true- },- {- "in": "query",- "name": "workspaceId",- "description": "The ID of the workspace.",- "schema": {- "type": "string",- "description": "The ID of the workspace.",- "example": "ws_cluuwcv0r..."- },- "required": true- },- {- "in": "query",- "name": "projectSlug",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "schema": {- "type": "string",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- }- ],- "requestBody": {- "content": {- "application/json": {- "schema": {- "type": "object",- "properties": {- "slug": {- "type": "string",- "minLength": 1,- "description": "Name of the domain.",- "example": "acme.com"- },- "type": {- "type": "string",- "enum": ["redirect", "rewrite"],- "default": "redirect",- "description": "The type of redirect to use for this domain.",- "example": "redirect"- },- "target": {- "type": "string",- "nullable": true,- "description": "The page your users will get redirected to when they visit your domain.",- "example": "https://acme.com/landing"- },- "expiredUrl": {- "type": "string",- "nullable": true,- "description": "Redirect users to a specific URL when any link under this domain has expired.",- "example": "https://acme.com/expired"- },- "archived": {- "type": "boolean",- "default": false,- "description": "Whether to archive this domain. `false` will unarchive a previously archived domain.",- "example": false- },- "placeholder": {- "type": "string",- "nullable": true,- "default": "https://dub.co/help/article/what-is-dub",- "description": "Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.",- "example": "https://dub.co/help/article/what-is-dub"- }- }- }- }- }- },- "responses": {- "200": {- "description": "The domain was updated.",- "content": {- "application/json": {- "schema": {- "$ref": "#/components/schemas/DomainSchema"- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- },- "delete": {- "operationId": "deleteDomain",- "x-speakeasy-name-override": "delete",- "x-speakeasy-max-method-params": 1,- "summary": "Delete a domain",- "description": "Delete a domain from a workspace. It cannot be undone. This will also delete all the links associated with the domain.",- "tags": ["Domains"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "path",- "name": "slug",- "description": "The domain name.",- "schema": {- "type": "string",- "description": "The domain name.",- "example": "acme.com"- },- "required": true- },- {- "in": "query",- "name": "workspaceId",- "description": "The ID of the workspace.",- "schema": {- "type": "string",- "description": "The ID of the workspace.",- "example": "ws_cluuwcv0r..."- },- "required": true- },- {- "in": "query",- "name": "projectSlug",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "schema": {- "type": "string",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- }- ],- "responses": {- "200": {- "description": "The domain was deleted.",- "content": {- "application/json": {- "schema": {- "type": "object",- "properties": {- "slug": {- "type": "string",- "description": "The domain name.",- "example": "acme.com"- }- },- "required": ["slug"]- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- }- },- "/domains/{slug}/primary": {- "post": {- "operationId": "setPrimaryDomain",- "x-speakeasy-name-override": "setPrimary",- "x-speakeasy-max-method-params": 1,- "summary": "Set a domain as primary",- "description": "Set a domain as primary for the authenticated workspace.",- "tags": ["Domains"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "path",- "name": "slug",- "description": "The domain name.",- "schema": {- "type": "string",- "description": "The domain name.",- "example": "acme.com"- },- "required": true- },- {- "in": "query",- "name": "workspaceId",- "description": "The ID of the workspace.",- "schema": {- "type": "string",- "description": "The ID of the workspace.",- "example": "ws_cluuwcv0r..."- },- "required": true- },- {- "in": "query",- "name": "projectSlug",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "schema": {- "type": "string",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- }- ],- "responses": {- "200": {- "description": "The domain was set as primary",- "content": {- "application/json": {- "schema": {- "$ref": "#/components/schemas/DomainSchema"- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- }- },- "/domains/{slug}/transfer": {- "post": {- "operationId": "transferDomain",- "x-speakeasy-name-override": "transfer",- "x-speakeasy-max-method-params": 2,- "summary": "Transfer a domain",- "description": "Transfer a domain to another workspace within the authenticated account.",- "tags": ["Domains"],- "security": [- {- "token": []- }- ],- "parameters": [- {- "in": "path",- "name": "slug",- "description": "The domain name.",- "schema": {- "type": "string",- "description": "The domain name.",- "example": "acme.com"- },- "required": true- },- {- "in": "query",- "name": "workspaceId",- "description": "The ID of the workspace.",- "schema": {- "type": "string",- "description": "The ID of the workspace.",- "example": "ws_cluuwcv0r..."- },- "required": true- },- {- "in": "query",- "name": "projectSlug",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "schema": {- "type": "string",- "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- }- ],- "requestBody": {- "content": {- "application/json": {- "schema": {- "type": "object",- "properties": {- "newWorkspaceId": {- "type": "string",- "minLength": 1,- "description": "The ID of the new workspace to transfer the domain to."- }- },- "required": ["newWorkspaceId"]- }- }- }- },- "responses": {- "200": {- "description": "The domain transfer initiated",- "content": {- "application/json": {- "schema": {- "$ref": "#/components/schemas/DomainSchema"- }- }- }- },- "400": {- "$ref": "#/components/responses/400"- },- "401": {- "$ref": "#/components/responses/401"- },- "403": {- "$ref": "#/components/responses/403"- },- "404": {- "$ref": "#/components/responses/404"- },- "409": {- "$ref": "#/components/responses/409"- },- "410": {- "$ref": "#/components/responses/410"- },- "422": {- "$ref": "#/components/responses/422"- },- "429": {- "$ref": "#/components/responses/429"- },- "500": {- "$ref": "#/components/responses/500"- }- }- }- },- "/metatags": {- "get": {- "operationId": "getMetatags",- "x-speakeasy-name-override": "get",- "summary": "Retrieve the metatags for a URL",- "description": "Retrieve the metatags for a URL.",- "tags": ["Metatags"],- "parameters": [- {- "in": "query",- "name": "url",- "description": "The URL to retrieve metatags for.",- "schema": {- "type": "string",- "example": "https://dub.co",- "description": "The URL to retrieve metatags for."- },- "required": true- }- ],- "responses": {- "200": {- "description": "The retrieved metatags",- "content": {- "application/json": {- "schema": {- "type": "object",- "properties": {- "title": {- "type": "string",- "nullable": true,- "description": "The meta title tag for the URL.",- "example": "Dub.co - Link Management for Modern Marketing Teams"- },- "description": {- "type": "string",- "nullable": true,- "description": "The meta description tag for the URL.",- "example": "Dub.co is the open-source link management infrastructure ..."- },- "image": {- "type": "string",- "nullable": true,- "description": "The OpenGraph image for the URL.",- "example": "https://assets.dub.co/thumbnail.jpg"- }- },- "required": ["title", "description", "image"]- }- }- }- }- }- }- }- },- "components": {- "securitySchemes": {- "token": {- "type": "http",- "description": "Default authentication mechanism",- "scheme": "bearer",- "x-speakeasy-example": "DUB_API_KEY"- }- },- "schemas": {- "LinkSchema": {- "type": "object",- "properties": {- "id": {- "type": "string",- "description": "The unique ID of the short link."- },- "domain": {- "type": "string",- "description": "The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains)."- },- "key": {- "type": "string",- "description": "The short link slug. If not provided, a random 7-character slug will be generated."- },- "externalId": {- "type": "string",- "nullable": true,- "description": "This is the ID of the link in your database. If set, it can be used to identify the link in the future. Must be prefixed with 'ext_' when passed as a query parameter."- },- "url": {- "type": "string",- "format": "uri",- "description": "The destination URL of the short link."- },- "archived": {- "type": "boolean",- "default": false,- "description": "Whether the short link is archived."- },- "expiresAt": {- "type": "string",- "nullable": true,- "description": "The date and time when the short link will expire in ISO-8601 format."- },- "expiredUrl": {- "type": "string",- "nullable": true,- "format": "uri",- "description": "The URL to redirect to when the short link has expired."- },- "password": {- "type": "string",- "nullable": true,- "description": "The password required to access the destination URL of the short link."- },- "proxy": {- "type": "boolean",- "default": false,- "description": "Whether the short link uses Custom Social Media Cards feature."- },- "title": {- "type": "string",- "nullable": true,- "description": "The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."- },- "description": {- "type": "string",- "nullable": true,- "description": "The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."- },- "image": {- "type": "string",- "nullable": true,- "description": "The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true."- },- "rewrite": {- "type": "boolean",- "default": false,- "description": "Whether the short link uses link cloaking."- },- "ios": {- "type": "string",- "nullable": true,- "description": "The iOS destination URL for the short link for iOS device targeting."- },- "android": {- "type": "string",- "nullable": true,- "description": "The Android destination URL for the short link for Android device targeting."- },- "geo": {- "type": "object",- "nullable": true,- "properties": {- "AF": {- "type": "string",- "format": "uri"- },- "AL": {- "type": "string",- "format": "uri"- },- "DZ": {- "type": "string",- "format": "uri"- },- "AS": {- "type": "string",- "format": "uri"- },- "AD": {- "type": "string",- "format": "uri"- },- "AO": {- "type": "string",- "format": "uri"- },- "AI": {- "type": "string",- "format": "uri"- },- "AQ": {- "type": "string",- "format": "uri"- },- "AG": {- "type": "string",- "format": "uri"- },- "AR": {- "type": "string",- "format": "uri"- },- "AM": {- "type": "string",- "format": "uri"- },- "AW": {- "type": "string",- "format": "uri"- },- "AU": {- "type": "string",- "format": "uri"- },- "AT": {- "type": "string",- "format": "uri"- },- "AZ": {- "type": "string",- "format": "uri"- },- "BS": {- "type": "string",- "format": "uri"- },- "BH": {- "type": "string",- "format": "uri"- },- "BD": {- "type": "string",- "format": "uri"- },- "BB": {- "type": "string",- "format": "uri"- },- "BY": {- "type": "string",- "format": "uri"- },- "BE": {- "type": "string",- "format": "uri"- },- "BZ": {- "type": "string",- "format": "uri"- },- "BJ": {- "type": "string",- "format": "uri"- },- "BM": {- "type": "string",- "format": "uri"- },- "BT": {- "type": "string",- "format": "uri"- },- "BO": {- "type": "string",- "format": "uri"- },- "BA": {- "type": "string",- "format": "uri"- },- "BW": {- "type": "string",- "format": "uri"- },- "BV": {- "type": "string",- "format": "uri"- },- "BR": {- "type": "string",- "format": "uri"- },- "IO": {- "type": "string",- "format": "uri"- },- "BN": {- "type": "string",- "format": "uri"- },- "BG": {- "type": "string",- "format": "uri"- },- "BF": {- "type": "string",- "format": "uri"- },- "BI": {- "type": "string",- "format": "uri"- },- "KH": {- "type": "string",- "format": "uri"- },- "CM": {- "type": "string",- "format": "uri"- },- "CA": {- "type": "string",- "format": "uri"- },- "CV": {- "type": "string",- "format": "uri"- },- "KY": {- "type": "string",- "format": "uri"- },- "CF": {- "type": "string",- "format": "uri"- },- "TD": {- "type": "string",- "format": "uri"- },- "CL": {- "type": "string",- "format": "uri"- },- "CN": {- "type": "string",- "format": "uri"- },- "CX": {- "type": "string",- "format": "uri"- },- "CC": {- "type": "string",- "format": "uri"- },- "CO": {- "type": "string",- "format": "uri"- },- "KM": {- "type": "string",- "format": "uri"- },- "CG": {- "type": "string",- "format": "uri"- },- "CD": {- "type": "string",- "format": "uri"- },- "CK": {- "type": "string",- "format": "uri"- },- "CR": {- "type": "string",- "format": "uri"- },- "CI": {- "type": "string",- "format": "uri"- },- "HR": {- "type": "string",- "format": "uri"- },- "CU": {- "type": "string",- "format": "uri"- },- "CY": {- "type": "string",- "format": "uri"- },- "CZ": {- "type": "string",- "format": "uri"- },- "DK": {- "type": "string",- "format": "uri"- },- "DJ": {- "type": "string",- "format": "uri"- },- "DM": {- "type": "string",- "format": "uri"- },- "DO": {- "type": "string",- "format": "uri"- },- "EC": {- "type": "string",- "format": "uri"- },- "EG": {- "type": "string",- "format": "uri"- },- "SV": {- "type": "string",- "format": "uri"- },- "GQ": {- "type": "string",- "format": "uri"- },- "ER": {- "type": "string",- "format": "uri"- },- "EE": {- "type": "string",- "format": "uri"- },- "ET": {- "type": "string",- "format": "uri"- },- "FK": {- "type": "string",- "format": "uri"- },- "FO": {- "type": "string",- "format": "uri"- },- "FJ": {- "type": "string",- "format": "uri"- },- "FI": {- "type": "string",- "format": "uri"- },- "FR": {- "type": "string",- "format": "uri"- },- "GF": {- "type": "string",- "format": "uri"- },- "PF": {- "type": "string",- "format": "uri"- },- "TF": {- "type": "string",- "format": "uri"- },- "GA": {- "type": "string",- "format": "uri"- },- "GM": {- "type": "string",- "format": "uri"- },- "GE": {- "type": "string",- "format": "uri"- },- "DE": {- "type": "string",- "format": "uri"- },- "GH": {- "type": "string",- "format": "uri"- },- "GI": {- "type": "string",- "format": "uri"- },- "GR": {- "type": "string",- "format": "uri"- },- "GL": {- "type": "string",- "format": "uri"- },- "GD": {- "type": "string",- "format": "uri"- },- "GP": {- "type": "string",- "format": "uri"- },- "GU": {- "type": "string",- "format": "uri"- },- "GT": {- "type": "string",- "format": "uri"- },- "GN": {- "type": "string",- "format": "uri"- },- "GW": {- "type": "string",- "format": "uri"- },- "GY": {- "type": "string",- "format": "uri"- },- "HT": {- "type": "string",- "format": "uri"- },- "HM": {- "type": "string",- "format": "uri"- },- "VA": {- "type": "string",- "format": "uri"- },- "HN": {- "type": "string",- "format": "uri"- },- "HK": {- "type": "string",- "format": "uri"- },- "HU": {- "type": "string",- "format": "uri"- },- "IS": {- "type": "string",- "format": "uri"- },- "IN": {- "type": "string",- "format": "uri"- },- "ID": {- "type": "string",- "format": "uri"- },- "IR": {- "type": "string",- "format": "uri"- },- "IQ": {- "type": "string",- "format": "uri"- },- "IE": {- "type": "string",- "format": "uri"- },- "IL": {- "type": "string",- "format": "uri"- },- "IT": {- "type": "string",- "format": "uri"- },- "JM": {- "type": "string",- "format": "uri"- },- "JP": {- "type": "string",- "format": "uri"- },- "JO": {- "type": "string",- "format": "uri"- },- "KZ": {- "type": "string",- "format": "uri"- },- "KE": {- "type": "string",- "format": "uri"- },- "KI": {- "type": "string",- "format": "uri"- },- "KP": {- "type": "string",- "format": "uri"- },- "KR": {- "type": "string",- "format": "uri"- },- "KW": {- "type": "string",- "format": "uri"- },- "KG": {- "type": "string",- "format": "uri"- },- "LA": {- "type": "string",- "format": "uri"- },- "LV": {- "type": "string",- "format": "uri"- },- "LB": {- "type": "string",- "format": "uri"- },- "LS": {- "type": "string",- "format": "uri"- },- "LR": {- "type": "string",- "format": "uri"- },- "LY": {- "type": "string",- "format": "uri"- },- "LI": {- "type": "string",- "format": "uri"- },- "LT": {- "type": "string",- "format": "uri"- },- "LU": {- "type": "string",- "format": "uri"- },- "MO": {- "type": "string",- "format": "uri"- },- "MG": {- "type": "string",- "format": "uri"- },- "MW": {- "type": "string",- "format": "uri"- },- "MY": {- "type": "string",- "format": "uri"- },- "MV": {- "type": "string",- "format": "uri"- },- "ML": {- "type": "string",- "format": "uri"- },- "MT": {- "type": "string",- "format": "uri"- },- "MH": {- "type": "string",- "format": "uri"- },- "MQ": {- "type": "string",- "format": "uri"- },- "MR": {- "type": "string",- "format": "uri"- },- "MU": {- "type": "string",- "format": "uri"- },- "YT": {- "type": "string",- "format": "uri"- },- "MX": {- "type": "string",- "format": "uri"- },- "FM": {- "type": "string",- "format": "uri"- },- "MD": {- "type": "string",- "format": "uri"- },- "MC": {- "type": "string",- "format": "uri"- },- "MN": {- "type": "string",- "format": "uri"- },- "MS": {- "type": "string",- "format": "uri"- },- "MA": {- "type": "string",- "format": "uri"- },- "MZ": {- "type": "string",- "format": "uri"- },- "MM": {- "type": "string",- "format": "uri"- },- "NA": {- "type": "string",- "format": "uri"- },- "NR": {- "type": "string",- "format": "uri"- },- "NP": {- "type": "string",- "format": "uri"- },- "NL": {- "type": "string",- "format": "uri"- },- "NC": {- "type": "string",- "format": "uri"- },- "NZ": {- "type": "string",- "format": "uri"- },- "NI": {- "type": "string",- "format": "uri"- },- "NE": {- "type": "string",- "format": "uri"- },- "NG": {- "type": "string",- "format": "uri"- },- "NU": {- "type": "string",- "format": "uri"- },- "NF": {- "type": "string",- "format": "uri"- },- "MK": {- "type": "string",- "format": "uri"- },- "MP": {- "type": "string",- "format": "uri"- },- "NO": {- "type": "string",- "format": "uri"- },- "OM": {- "type": "string",- "format": "uri"- },- "PK": {- "type": "string",- "format": "uri"- },- "PW": {- "type": "string",- "format": "uri"- },- "PS": {- "type": "string",- "format": "uri"- },- "PA": {- "type": "string",- "format": "uri"- },- "PG": {- "type": "string",- "format": "uri"- },- "PY": {- "type": "string",- "format": "uri"- },- "PE": {- "type": "string",- "format": "uri"- },- "PH": {- "type": "string",- "format": "uri"- },- "PN": {- "type": "string",- "format": "uri"- },- "PL": {- "type": "string",- "format": "uri"- },- "PT": {- "type": "string",- "format": "uri"- },- "PR": {- "type": "string",- "format": "uri"- },- "QA": {- "type": "string",- "format": "uri"- },- "RE": {- "type": "string",- "format": "uri"- },- "RO": {- "type": "string",- "format": "uri"- },- "RU": {- "type": "string",- "format": "uri"- },- "RW": {- "type": "string",- "format": "uri"- },- "SH": {- "type": "string",- "format": "uri"- },- "KN": {- "type": "string",- "format": "uri"- },- "LC": {- "type": "string",- "format": "uri"- },- "PM": {- "type": "string",- "format": "uri"- },- "VC": {- "type": "string",- "format": "uri"- },- "WS": {- "type": "string",- "format": "uri"- },- "SM": {- "type": "string",- "format": "uri"- },- "ST": {- "type": "string",- "format": "uri"- },- "SA": {- "type": "string",- "format": "uri"- },- "SN": {- "type": "string",- "format": "uri"- },- "SC": {- "type": "string",- "format": "uri"- },- "SL": {- "type": "string",- "format": "uri"- },- "SG": {- "type": "string",- "format": "uri"- },- "SK": {- "type": "string",- "format": "uri"- },- "SI": {- "type": "string",- "format": "uri"- },- "SB": {- "type": "string",- "format": "uri"- },- "SO": {- "type": "string",- "format": "uri"- },- "ZA": {- "type": "string",- "format": "uri"- },- "GS": {- "type": "string",- "format": "uri"- },- "ES": {- "type": "string",- "format": "uri"- },- "LK": {- "type": "string",- "format": "uri"- },- "SD": {- "type": "string",- "format": "uri"- },- "SR": {- "type": "string",- "format": "uri"- },- "SJ": {- "type": "string",- "format": "uri"- },- "SZ": {- "type": "string",- "format": "uri"- },- "SE": {- "type": "string",- "format": "uri"- },- "CH": {- "type": "string",- "format": "uri"- },- "SY": {- "type": "string",- "format": "uri"- },- "TW": {- "type": "string",- "format": "uri"- },- "TJ": {- "type": "string",- "format": "uri"- },- "TZ": {- "type": "string",- "format": "uri"- },- "TH": {- "type": "string",- "format": "uri"- },- "TL": {- "type": "string",- "format": "uri"- },- "TG": {- "type": "string",- "format": "uri"- },- "TK": {- "type": "string",- "format": "uri"- },- "TO": {- "type": "string",- "format": "uri"- },- "TT": {- "type": "string",- "format": "uri"- },- "TN": {- "type": "string",- "format": "uri"- },- "TR": {- "type": "string",- "format": "uri"- },- "TM": {- "type": "string",- "format": "uri"- },- "TC": {- "type": "string",- "format": "uri"- },- "TV": {- "type": "string",- "format": "uri"- },- "UG": {- "type": "string",- "format": "uri"- },- "UA": {- "type": "string",- "format": "uri"- },- "AE": {- "type": "string",- "format": "uri"- },- "GB": {- "type": "string",- "format": "uri"- },- "US": {- "type": "string",- "format": "uri"- },- "UM": {- "type": "string",- "format": "uri"- },- "UY": {- "type": "string",- "format": "uri"- },- "UZ": {- "type": "string",- "format": "uri"- },- "VU": {- "type": "string",- "format": "uri"- },- "VE": {- "type": "string",- "format": "uri"- },- "VN": {- "type": "string",- "format": "uri"- },- "VG": {- "type": "string",- "format": "uri"- },- "VI": {- "type": "string",- "format": "uri"- },- "WF": {- "type": "string",- "format": "uri"- },- "EH": {- "type": "string",- "format": "uri"- },- "YE": {- "type": "string",- "format": "uri"- },- "ZM": {- "type": "string",- "format": "uri"- },- "ZW": {- "type": "string",- "format": "uri"- },- "AX": {- "type": "string",- "format": "uri"- },- "BQ": {- "type": "string",- "format": "uri"- },- "CW": {- "type": "string",- "format": "uri"- },- "GG": {- "type": "string",- "format": "uri"- },- "IM": {- "type": "string",- "format": "uri"- },- "JE": {- "type": "string",- "format": "uri"- },- "ME": {- "type": "string",- "format": "uri"- },- "BL": {- "type": "string",- "format": "uri"- },- "MF": {- "type": "string",- "format": "uri"- },- "RS": {- "type": "string",- "format": "uri"- },- "SX": {- "type": "string",- "format": "uri"- },- "SS": {- "type": "string",- "format": "uri"- },- "XK": {- "type": "string",- "format": "uri"- }- },- "additionalProperties": false,- "description": "Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo"- },- "publicStats": {- "type": "boolean",- "default": false,- "description": "Whether the short link's stats are publicly accessible."- },- "tagId": {- "type": "string",- "nullable": true,- "description": "The unique ID of the tag assigned to the short link. This field is deprecated – use `tags` instead.",- "deprecated": true- },- "tags": {- "type": "array",- "nullable": true,- "items": {- "$ref": "#/components/schemas/TagSchema"- },- "description": "The tags assigned to the short link."- },- "comments": {- "type": "string",- "nullable": true,- "description": "The comments for the short link."- },- "shortLink": {- "type": "string",- "format": "uri",- "description": "The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`)."- },- "qrCode": {- "type": "string",- "format": "uri",- "description": "The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`)."- },- "utm_source": {- "type": "string",- "nullable": true,- "description": "The UTM source of the short link."- },- "utm_medium": {- "type": "string",- "nullable": true,- "description": "The UTM medium of the short link."- },- "utm_campaign": {- "type": "string",- "nullable": true,- "description": "The UTM campaign of the short link."- },- "utm_term": {- "type": "string",- "nullable": true,- "description": "The UTM term of the short link."- },- "utm_content": {- "type": "string",- "nullable": true,- "description": "The UTM content of the short link."- },- "userId": {- "type": "string",- "description": "The user ID of the creator of the short link."- },- "workspaceId": {- "type": "string",- "description": "The workspace ID of the short link."- },- "clicks": {- "type": "number",- "default": 0,- "description": "The number of clicks on the short link."- },- "lastClicked": {- "type": "string",- "nullable": true,- "description": "The date and time when the short link was last clicked."- },- "createdAt": {- "type": "string",- "description": "The date and time when the short link was created."- },- "updatedAt": {- "type": "string",- "description": "The date and time when the short link was last updated."- },- "projectId": {- "type": "string",- "description": "The project ID of the short link. This field is deprecated – use `workspaceId` instead.",- "deprecated": true- }- },- "required": [- "id",- "domain",- "key",- "externalId",- "url",- "archived",- "expiresAt",- "expiredUrl",- "password",- "proxy",- "title",- "description",- "image",- "rewrite",- "ios",- "android",- "geo",- "publicStats",- "tagId",- "tags",- "comments",- "shortLink",- "qrCode",- "utm_source",- "utm_medium",- "utm_campaign",- "utm_term",- "utm_content",- "userId",- "workspaceId",- "clicks",- "lastClicked",- "createdAt",- "updatedAt",- "projectId"- ],- "title": "Link"- },- "WorkspaceSchema": {- "type": "object",- "properties": {- "id": {- "type": "string",- "description": "The unique ID of the workspace."- },- "name": {- "type": "string",- "description": "The name of the workspace."- },- "slug": {- "type": "string",- "description": "The slug of the workspace."- },- "logo": {- "type": "string",- "nullable": true,- "default": null,- "description": "The logo of the workspace."- },- "usage": {- "type": "number",- "description": "The usage of the workspace."- },- "usageLimit": {- "type": "number",- "description": "The usage limit of the workspace."- },- "linksUsage": {- "type": "number",- "description": "The links usage of the workspace."- },- "linksLimit": {- "type": "number",- "description": "The links limit of the workspace."- },- "domainsLimit": {- "type": "number",- "description": "The domains limit of the workspace."- },- "tagsLimit": {- "type": "number",- "description": "The tags limit of the workspace."- },- "usersLimit": {- "type": "number",- "description": "The users limit of the workspace."- },- "plan": {- "type": "string",- "enum": [- "free",- "pro",- "business",- "business plus",- "business extra",- "business max",- "enterprise"- ],- "description": "The plan of the workspace."- },- "stripeId": {- "type": "string",- "nullable": true,- "description": "The Stripe ID of the workspace."- },- "billingCycleStart": {- "type": "number",- "description": "The date and time when the billing cycle starts for the workspace."- },- "createdAt": {- "type": "string",- "description": "The date and time when the workspace was created."- },- "users": {- "type": "array",- "items": {- "type": "object",- "properties": {- "role": {- "type": "string",- "enum": ["owner", "member"],- "description": "The role of the authenticated user in the workspace."- }- },- "required": ["role"]- },- "description": "The role of the authenticated user in the workspace."- },- "domains": {- "type": "array",- "items": {- "type": "object",- "properties": {- "slug": {- "type": "string",- "description": "The domain name.",- "example": "acme.com"- },- "primary": {- "type": "boolean",- "default": false,- "description": "Whether the domain is the primary domain for the workspace."- }- },- "required": ["slug", "primary"]- },- "description": "The domains of the workspace."- },- "inviteCode": {- "type": "string",- "nullable": true,- "description": "The invite code of the workspace."- }- },- "required": [- "id",- "name",- "slug",- "logo",- "usage",- "usageLimit",- "linksUsage",- "linksLimit",- "domainsLimit",- "tagsLimit",- "usersLimit",- "plan",- "stripeId",- "billingCycleStart",- "createdAt",- "users",- "domains",- "inviteCode"- ],- "title": "Workspace"- },- "TagSchema": {- "type": "object",- "properties": {- "id": {- "type": "string",- "description": "The unique ID of the tag."- },- "name": {- "type": "string",- "description": "The name of the tag."- },- "color": {- "type": "string",- "enum": [- "red",- "yellow",- "green",- "blue",- "purple",- "pink",- "brown"- ],- "description": "The color of the tag."- }- },- "required": ["id", "name", "color"],- "title": "Tag"- },- "DomainSchema": {- "type": "object",- "properties": {- "id": {- "type": "string",- "description": "The unique identifier of the domain."- },- "slug": {- "type": "string",- "description": "The domain name.",- "example": "acme.com"- },- "verified": {- "type": "boolean",- "default": false,- "description": "Whether the domain is verified."- },- "primary": {- "type": "boolean",- "default": false,- "description": "Whether the domain is the primary domain for the workspace."- },- "archived": {- "type": "boolean",- "description": "Whether the domain is archived.",- "default": false- },- "placeholder": {- "type": "string",- "description": "Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.",- "default": "https://dub.co/help/article/what-is-dub",- "example": "https://dub.co/help/article/what-is-dub"- },- "expiredUrl": {- "type": "string",- "nullable": true,- "description": "The URL to redirect to when a link under this domain has expired.",- "example": "https://acme.com/expired"- },- "target": {- "type": "string",- "nullable": true,- "description": "The page your users will get redirected to when they visit your domain.",- "example": "https://acme.com/landing"- },- "type": {- "type": "string",- "description": "The type of redirect to use for this domain.",- "enum": ["redirect", "rewrite"]- },- "clicks": {- "type": "number",- "description": "The number of clicks on the domain.",- "default": 0- }- },- "required": [- "id",- "slug",- "verified",- "primary",- "archived",- "placeholder",- "expiredUrl",- "target",- "type",- "clicks"- ]- }- },- "responses": {- "400": {- "description": "The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).",- "content": {- "application/json": {- "schema": {- "x-speakeasy-name-override": "BadRequest",- "type": "object",- "properties": {- "error": {- "type": "object",- "properties": {- "code": {- "type": "string",- "enum": ["bad_request"],- "description": "A short code indicating the error code returned.",- "example": "bad_request"- },- "message": {- "type": "string",- "description": "A human readable explanation of what went wrong.",- "example": "The requested resource was not found."- },- "doc_url": {- "type": "string",- "description": "A link to our documentation with more details about this error code",- "example": "https://dub.co/docs/api-reference/errors#bad_request"- }- },- "required": ["code", "message"]- }- },- "required": ["error"]- }- }- }- },- "401": {- "description": "Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.",- "content": {- "application/json": {- "schema": {- "x-speakeasy-name-override": "Unauthorized",- "type": "object",- "properties": {- "error": {- "type": "object",- "properties": {- "code": {- "type": "string",- "enum": ["unauthorized"],- "description": "A short code indicating the error code returned.",- "example": "unauthorized"- },- "message": {- "type": "string",- "description": "A human readable explanation of what went wrong.",- "example": "The requested resource was not found."- },- "doc_url": {- "type": "string",- "description": "A link to our documentation with more details about this error code",- "example": "https://dub.co/docs/api-reference/errors#unauthorized"- }- },- "required": ["code", "message"]- }- },- "required": ["error"]- }- }- }- },- "403": {- "description": "The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.",- "content": {- "application/json": {- "schema": {- "x-speakeasy-name-override": "Forbidden",- "type": "object",- "properties": {- "error": {- "type": "object",- "properties": {- "code": {- "type": "string",- "enum": ["forbidden"],- "description": "A short code indicating the error code returned.",- "example": "forbidden"- },- "message": {- "type": "string",- "description": "A human readable explanation of what went wrong.",- "example": "The requested resource was not found."- },- "doc_url": {- "type": "string",- "description": "A link to our documentation with more details about this error code",- "example": "https://dub.co/docs/api-reference/errors#forbidden"- }- },- "required": ["code", "message"]- }- },- "required": ["error"]- }- }- }- },- "404": {- "description": "The server cannot find the requested resource.",- "content": {- "application/json": {- "schema": {- "x-speakeasy-name-override": "NotFound",- "type": "object",- "properties": {- "error": {- "type": "object",- "properties": {- "code": {- "type": "string",- "enum": ["not_found"],- "description": "A short code indicating the error code returned.",- "example": "not_found"- },- "message": {- "type": "string",- "description": "A human readable explanation of what went wrong.",- "example": "The requested resource was not found."- },- "doc_url": {- "type": "string",- "description": "A link to our documentation with more details about this error code",- "example": "https://dub.co/docs/api-reference/errors#not_found"- }- },- "required": ["code", "message"]- }- },- "required": ["error"]- }- }- }- },- "409": {- "description": "This response is sent when a request conflicts with the current state of the server.",- "content": {- "application/json": {- "schema": {- "x-speakeasy-name-override": "Conflict",- "type": "object",- "properties": {- "error": {- "type": "object",- "properties": {- "code": {- "type": "string",- "enum": ["conflict"],- "description": "A short code indicating the error code returned.",- "example": "conflict"- },- "message": {- "type": "string",- "description": "A human readable explanation of what went wrong.",- "example": "The requested resource was not found."- },- "doc_url": {- "type": "string",- "description": "A link to our documentation with more details about this error code",- "example": "https://dub.co/docs/api-reference/errors#conflict"- }- },- "required": ["code", "message"]- }- },- "required": ["error"]- }- }- }- },- "410": {- "description": "This response is sent when the requested content has been permanently deleted from server, with no forwarding address.",- "content": {- "application/json": {- "schema": {- "x-speakeasy-name-override": "InviteExpired",- "type": "object",- "properties": {- "error": {- "type": "object",- "properties": {- "code": {- "type": "string",- "enum": ["invite_expired"],- "description": "A short code indicating the error code returned.",- "example": "invite_expired"- },- "message": {- "type": "string",- "description": "A human readable explanation of what went wrong.",- "example": "The requested resource was not found."- },- "doc_url": {- "type": "string",- "description": "A link to our documentation with more details about this error code",- "example": "https://dub.co/docs/api-reference/errors#invite_expired"- }- },- "required": ["code", "message"]- }- },- "required": ["error"]- }- }- }- },- "422": {- "description": "The request was well-formed but was unable to be followed due to semantic errors.",- "content": {- "application/json": {- "schema": {- "x-speakeasy-name-override": "UnprocessableEntity",- "type": "object",- "properties": {- "error": {- "type": "object",- "properties": {- "code": {- "type": "string",- "enum": ["unprocessable_entity"],- "description": "A short code indicating the error code returned.",- "example": "unprocessable_entity"- },- "message": {- "type": "string",- "description": "A human readable explanation of what went wrong.",- "example": "The requested resource was not found."- },- "doc_url": {- "type": "string",- "description": "A link to our documentation with more details about this error code",- "example": "https://dub.co/docs/api-reference/errors#unprocessable_entity"- }- },- "required": ["code", "message"]- }- },- "required": ["error"]- }- }- }- },- "429": {- "description": "The user has sent too many requests in a given amount of time (\"rate limiting\")",- "content": {- "application/json": {- "schema": {- "x-speakeasy-name-override": "RateLimitExceeded",- "type": "object",- "properties": {- "error": {- "type": "object",- "properties": {- "code": {- "type": "string",- "enum": ["rate_limit_exceeded"],- "description": "A short code indicating the error code returned.",- "example": "rate_limit_exceeded"- },- "message": {- "type": "string",- "description": "A human readable explanation of what went wrong.",- "example": "The requested resource was not found."- },- "doc_url": {- "type": "string",- "description": "A link to our documentation with more details about this error code",- "example": "https://dub.co/docs/api-reference/errors#rate_limit_exceeded"- }- },- "required": ["code", "message"]- }- },- "required": ["error"]- }- }- }- },- "500": {- "description": "The server has encountered a situation it does not know how to handle.",- "content": {- "application/json": {- "schema": {- "x-speakeasy-name-override": "InternalServerError",- "type": "object",- "properties": {- "error": {- "type": "object",- "properties": {- "code": {- "type": "string",- "enum": ["internal_server_error"],- "description": "A short code indicating the error code returned.",- "example": "internal_server_error"- },- "message": {- "type": "string",- "description": "A human readable explanation of what went wrong.",- "example": "The requested resource was not found."- },- "doc_url": {- "type": "string",- "description": "A link to our documentation with more details about this error code",- "example": "https://dub.co/docs/api-reference/errors#internal_server_error"- }- },- "required": ["code", "message"]- }- },- "required": ["error"]- }- }- }- }- }- }-}