The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
update docs
Steven Teyff09a54e8f14
diff --git a/apps/docs/api-reference/endpoint/retrieve-browser-by-clicks.mdx b/apps/docs/api-reference/endpoint/retrieve-browser-by-clicks.mdxnew file mode 100644index 0000000000..f98d67800f--- /dev/null+++ b/apps/docs/api-reference/endpoint/retrieve-browser-by-clicks.mdx@@ -0,0 +1,8 @@+---+openapi: get /analytics/clicks/browser+---++<Note>+ Analytics endpoints require a [Pro plan](https://d.to/pro) subscription or+ higher.+</Note>diff --git a/apps/docs/api-reference/endpoint/retrieve-city-by-clicks.mdx b/apps/docs/api-reference/endpoint/retrieve-city-by-clicks.mdxnew file mode 100644index 0000000000..372ad7e81e--- /dev/null+++ b/apps/docs/api-reference/endpoint/retrieve-city-by-clicks.mdx@@ -0,0 +1,8 @@+---+openapi: get /analytics/clicks/city+---++<Note>+ Analytics endpoints require a [Pro plan](https://d.to/pro) subscription or+ higher.+</Note>diff --git a/apps/docs/api-reference/endpoint/retrieve-country-by-clicks.mdx b/apps/docs/api-reference/endpoint/retrieve-country-by-clicks.mdxnew file mode 100644index 0000000000..eaab8821bc--- /dev/null+++ b/apps/docs/api-reference/endpoint/retrieve-country-by-clicks.mdx@@ -0,0 +1,8 @@+---+openapi: get /analytics/clicks/country+---++<Note>+ Analytics endpoints require a [Pro plan](https://d.to/pro) subscription or+ higher.+</Note>diff --git a/apps/docs/api-reference/endpoint/retrieve-device-by-clicks.mdx b/apps/docs/api-reference/endpoint/retrieve-device-by-clicks.mdxnew file mode 100644index 0000000000..578cadb8c3--- /dev/null+++ b/apps/docs/api-reference/endpoint/retrieve-device-by-clicks.mdx@@ -0,0 +1,8 @@+---+openapi: get /analytics/clicks/device+---++<Note>+ Analytics endpoints require a [Pro plan](https://d.to/pro) subscription or+ higher.+</Note>diff --git a/apps/docs/api-reference/endpoint/retrieve-os-by-clicks.mdx b/apps/docs/api-reference/endpoint/retrieve-os-by-clicks.mdxnew file mode 100644index 0000000000..fd3b73edf2--- /dev/null+++ b/apps/docs/api-reference/endpoint/retrieve-os-by-clicks.mdx@@ -0,0 +1,8 @@+---+openapi: get /analytics/clicks/os+---++<Note>+ Analytics endpoints require a [Pro plan](https://d.to/pro) subscription or+ higher.+</Note>diff --git a/apps/docs/api-reference/endpoint/retrieve-referer-by-clicks.mdx b/apps/docs/api-reference/endpoint/retrieve-referer-by-clicks.mdxnew file mode 100644index 0000000000..732be15862--- /dev/null+++ b/apps/docs/api-reference/endpoint/retrieve-referer-by-clicks.mdx@@ -0,0 +1,8 @@+---+openapi: get /analytics/clicks/referer+---++<Note>+ Analytics endpoints require a [Pro plan](https://d.to/pro) subscription or+ higher.+</Note>diff --git a/apps/docs/api-reference/endpoint/retrieve-timeseries-by-clicks.mdx b/apps/docs/api-reference/endpoint/retrieve-timeseries-by-clicks.mdxnew file mode 100644index 0000000000..37b654adbf--- /dev/null+++ b/apps/docs/api-reference/endpoint/retrieve-timeseries-by-clicks.mdx@@ -0,0 +1,8 @@+---+openapi: get /analytics/clicks/timeseries+---++<Note>+ Analytics endpoints require a [Pro plan](https://d.to/pro) subscription or+ higher.+</Note>diff --git a/apps/docs/api-reference/endpoint/retrieve-top-links-by-clicks.mdx b/apps/docs/api-reference/endpoint/retrieve-top-links-by-clicks.mdxnew file mode 100644index 0000000000..c66000e887--- /dev/null+++ b/apps/docs/api-reference/endpoint/retrieve-top-links-by-clicks.mdx@@ -0,0 +1,8 @@+---+openapi: get /analytics/clicks/top_links+---++<Note>+ Analytics endpoints require a [Pro plan](https://d.to/pro) subscription or+ higher.+</Note>diff --git a/apps/docs/api-reference/endpoint/retrieve-top-urls-by-clicks.mdx b/apps/docs/api-reference/endpoint/retrieve-top-urls-by-clicks.mdxnew file mode 100644index 0000000000..80c1073986--- /dev/null+++ b/apps/docs/api-reference/endpoint/retrieve-top-urls-by-clicks.mdx@@ -0,0 +1,8 @@+---+openapi: get /analytics/clicks/top_urls+---++<Note>+ Analytics endpoints require a [Pro plan](https://d.to/pro) subscription or+ higher.+</Note>diff --git a/apps/docs/mint.json b/apps/docs/mint.jsonindex d3d0062fda..984094f4e2 100644--- a/apps/docs/mint.json+++ b/apps/docs/mint.json@@ -88,8 +88,19 @@]},{- "group": "Analytics",- "pages": ["api-reference/endpoint/retrieve-clicks-analytics"]+ "group": "Click Analytics",+ "pages": [+ "api-reference/endpoint/retrieve-clicks-analytics",+ "api-reference/endpoint/retrieve-browser-by-clicks",+ "api-reference/endpoint/retrieve-city-by-clicks",+ "api-reference/endpoint/retrieve-country-by-clicks",+ "api-reference/endpoint/retrieve-device-by-clicks",+ "api-reference/endpoint/retrieve-os-by-clicks",+ "api-reference/endpoint/retrieve-referer-by-clicks",+ "api-reference/endpoint/retrieve-timeseries-by-clicks",+ "api-reference/endpoint/retrieve-top-links-by-clicks",+ "api-reference/endpoint/retrieve-top-urls-by-clicks"+ ]},{"group": "QR Codes",@@ -148,7 +159,23 @@},{"group": "Analytics",- "pages": ["sdks/typescript/analytics/clicks"]+ "pages": [+ {+ "group": "Clicks",+ "pages": [+ "sdks/typescript/analytics/clicks",+ "sdks/typescript/analytics/clicks/browsers",+ "sdks/typescript/analytics/clicks/cities",+ "sdks/typescript/analytics/clicks/countries",+ "sdks/typescript/analytics/clicks/devices",+ "sdks/typescript/analytics/clicks/os",+ "sdks/typescript/analytics/clicks/referers",+ "sdks/typescript/analytics/clicks/timeseries",+ "sdks/typescript/analytics/clicks/top-links",+ "sdks/typescript/analytics/clicks/top-urls"+ ]+ }+ ]},{"group": "Workspaces",@@ -223,11 +250,11 @@},{"source": "/api-reference/endpoint/retrieve-browser",- "destination": "/api-reference/endpoint/retrieve-clicks-analytics"+ "destination": "/api-reference/endpoint/retrieve-browser-by-clicks"},{"source": "/api-reference/endpoint/retrieve-city",- "destination": "/api-reference/endpoint/retrieve-clicks-analytics"+ "destination": "/api-reference/endpoint/retrieve-city-by-clicks"},{"source": "/api-reference/endpoint/retrieve-clicks",@@ -235,35 +262,35 @@},{"source": "/api-reference/endpoint/retrieve-country",- "destination": "/api-reference/endpoint/retrieve-clicks-analytics"+ "destination": "/api-reference/endpoint/retrieve-country-by-clicks"},{"source": "/api-reference/endpoint/retrieve-device",- "destination": "/api-reference/endpoint/retrieve-clicks-analytics"+ "destination": "/api-reference/endpoint/retrieve-device-by-clicks"},{"source": "/api-reference/endpoint/retrieve-os",- "destination": "/api-reference/endpoint/retrieve-clicks-analytics"+ "destination": "/api-reference/endpoint/retrieve-os-by-clicks"},{"source": "/api-reference/endpoint/retrieve-referer",- "destination": "/api-reference/endpoint/retrieve-clicks-analytics"+ "destination": "/api-reference/endpoint/retrieve-referer-by-clicks"},{"source": "/api-reference/endpoint/retrieve-timeseries",- "destination": "/api-reference/endpoint/retrieve-clicks-analytics"+ "destination": "/api-reference/endpoint/retrieve-timeseries-by-clicks"},{"source": "/api-reference/endpoint/retrieve-top-links",- "destination": "/api-reference/endpoint/retrieve-clicks-analytics"+ "destination": "/api-reference/endpoint/retrieve-top-links-by-clicks"},{"source": "/api-reference/endpoint/retrieve-top-urls",- "destination": "/api-reference/endpoint/retrieve-clicks-analytics"+ "destination": "/api-reference/endpoint/retrieve-top-urls-by-clicks"},{"source": "/sdks/typescript/analytics/:path*",- "destination": "/sdks/typescript/analytics/clicks"+ "destination": "/sdks/typescript/analytics/clicks/:path*"}]}diff --git a/apps/docs/openapi.json b/apps/docs/openapi.jsonnew file mode 100644index 0000000000..8305a1b4b5--- /dev/null+++ b/apps/docs/openapi.json@@ -0,0 +1,13736 @@+{+ "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. If there's no change, returns it as it is.",+ "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"+ }+ }+ }+ },+ "/links/upsert": {+ "put": {+ "operationId": "upsertLink",+ "x-speakeasy-name-override": "upsert",+ "x-speakeasy-usage-example": true,+ "summary": "Upsert a link",+ "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.",+ "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 upserted 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"+ }+ }+ }+ },+ "/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"],+ "parameters": [+ {+ "in": "query",+ "name": "url",+ "description": "The URL to generate a QR code for.",+ "schema": {+ "type": "string",+ "description": "The URL to generate a QR code for."+ },+ "required": true+ },+ {+ "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": "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. If undefined, defaults to 24h.",+ "schema": {+ "type": "string",+ "enum": ["1h", "24h", "7d", "30d", "90d", "ytd", "1y", "all"],+ "default": "24h",+ "description": "The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h."+ }+ },+ {+ "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": {+ "oneOf": [+ {+ "type": "object",+ "properties": {+ "response": {+ "type": "number",+ "description": "The total number of clicks"+ }+ },+ "required": ["response"]+ },+ {+ "type": "object",+ "properties": {+ "groupBy": {+ "type": "string",+ "enum": ["timeseries"]+ },+ "response": {+ "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"]+ }+ }+ },+ "required": ["groupBy", "response"]+ },+ {+ "type": "object",+ "properties": {+ "groupBy": {+ "type": "string",+ "enum": ["country"]+ },+ "response": {+ "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"]+ }+ }+ },+ "required": ["groupBy", "response"]+ },+ {+ "type": "object",+ "properties": {+ "groupBy": {+ "type": "string",+ "enum": ["city"]+ },+ "response": {+ "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"]+ }+ }+ },+ "required": ["groupBy", "response"]+ },+ {+ "type": "object",+ "properties": {+ "groupBy": {+ "type": "string",+ "enum": ["device"]+ },+ "response": {+ "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"]+ }+ }+ },+ "required": ["groupBy", "response"]+ },+ {+ "type": "object",+ "properties": {+ "groupBy": {+ "type": "string",+ "enum": ["browser"]+ },+ "response": {+ "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"]+ }+ }+ },+ "required": ["groupBy", "response"]+ },+ {+ "type": "object",+ "properties": {+ "groupBy": {+ "type": "string",+ "enum": ["os"]+ },+ "response": {+ "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"]+ }+ }+ },+ "required": ["groupBy", "response"]+ },+ {+ "type": "object",+ "properties": {+ "groupBy": {+ "type": "string",+ "enum": ["referer"]+ },+ "response": {+ "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"]+ }+ }+ },+ "required": ["groupBy", "response"]+ },+ {+ "type": "object",+ "properties": {+ "groupBy": {+ "type": "string",+ "enum": ["top_links"]+ },+ "response": {+ "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"]+ }+ }+ },+ "required": ["groupBy", "response"]+ },+ {+ "type": "object",+ "properties": {+ "groupBy": {+ "type": "string",+ "enum": ["top_urls"]+ },+ "response": {+ "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"]+ }+ }+ },+ "required": ["groupBy", "response"]+ }+ ]+ }+ }+ }+ },+ "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/timeseries": {+ "get": {+ "operationId": "getTimeseriesByClicks",+ "x-speakeasy-name-override": "timeseries",+ "summary": "Retrieve timeseries analytics by clicks",+ "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": "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. If undefined, defaults to 24h.",+ "schema": {+ "type": "string",+ "enum": ["1h", "24h", "7d", "30d", "90d", "ytd", "1y", "all"],+ "default": "24h",+ "description": "The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h."+ }+ },+ {+ "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/clicks/country": {+ "get": {+ "operationId": "getCountryByClicks",+ "x-speakeasy-name-override": "countries",+ "summary": "Retrieve top countries by clicks",+ "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": "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. If undefined, defaults to 24h.",+ "schema": {+ "type": "string",+ "enum": ["1h", "24h", "7d", "30d", "90d", "ytd", "1y", "all"],+ "default": "24h",+ "description": "The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h."+ }+ },+ {+ "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/clicks/city": {+ "get": {+ "operationId": "getCityByClicks",+ "x-speakeasy-name-override": "cities",+ "summary": "Retrieve top cities by clicks",+ "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": "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. If undefined, defaults to 24h.",+ "schema": {+ "type": "string",+ "enum": ["1h", "24h", "7d", "30d", "90d", "ytd", "1y", "all"],+ "default": "24h",+ "description": "The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h."+ }+ },+ {+ "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/clicks/device": {+ "get": {+ "operationId": "getDeviceByClicks",+ "x-speakeasy-name-override": "devices",+ "summary": "Retrieve top devices by clicks",+ "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": "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. If undefined, defaults to 24h.",+ "schema": {+ "type": "string",+ "enum": ["1h", "24h", "7d", "30d", "90d", "ytd", "1y", "all"],+ "default": "24h",+ "description": "The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h."+ }+ },+ {+ "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/clicks/browser": {+ "get": {+ "operationId": "getBrowserByClicks",+ "x-speakeasy-name-override": "browsers",+ "summary": "Retrieve top browsers by clicks",+ "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": "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. If undefined, defaults to 24h.",+ "schema": {+ "type": "string",+ "enum": ["1h", "24h", "7d", "30d", "90d", "ytd", "1y", "all"],+ "default": "24h",+ "description": "The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h."+ }+ },+ {+ "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/clicks/os": {+ "get": {+ "operationId": "getOSByClicks",+ "x-speakeasy-name-override": "os",+ "summary": "Retrieve top OS by clicks",+ "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": "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. If undefined, defaults to 24h.",+ "schema": {+ "type": "string",+ "enum": ["1h", "24h", "7d", "30d", "90d", "ytd", "1y", "all"],+ "default": "24h",+ "description": "The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h."+ }+ },+ {+ "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/clicks/referer": {+ "get": {+ "operationId": "getRefererByClicks",+ "x-speakeasy-name-override": "referers",+ "summary": "Retrieve top referers by clicks",+ "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": "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. If undefined, defaults to 24h.",+ "schema": {+ "type": "string",+ "enum": ["1h", "24h", "7d", "30d", "90d", "ytd", "1y", "all"],+ "default": "24h",+ "description": "The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h."+ }+ },+ {+ "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/clicks/top_links": {+ "get": {+ "operationId": "getTopLinksByClicks",+ "x-speakeasy-name-override": "topLinks",+ "summary": "Retrieve top links by clicks",+ "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": "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. If undefined, defaults to 24h.",+ "schema": {+ "type": "string",+ "enum": ["1h", "24h", "7d", "30d", "90d", "ytd", "1y", "all"],+ "default": "24h",+ "description": "The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h."+ }+ },+ {+ "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/clicks/top_urls": {+ "get": {+ "operationId": "getTopURLsByClicks",+ "x-speakeasy-name-override": "topUrls",+ "summary": "Retrieve top URLs by clicks",+ "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": "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. If undefined, defaults to 24h.",+ "schema": {+ "type": "string",+ "enum": ["1h", "24h", "7d", "30d", "90d", "ytd", "1y", "all"],+ "default": "24h",+ "description": "The interval to retrieve analytics for. Takes precedence over start and end. If undefined, defaults to 24h."+ }+ },+ {+ "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": "addDomain",+ "x-speakeasy-name-override": "add",+ "summary": "Add a domain",+ "description": "Add a domain to 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."+ },+ "trackConversion": {+ "type": "boolean",+ "default": false,+ "description": "[BETA] Whether to track conversions for 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",+ "trackConversion",+ "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"]+ }+ }+ }+ }+ }+ }+}diff --git a/apps/docs/sdks/typescript/analytics/clicks/browsers.mdx b/apps/docs/sdks/typescript/analytics/clicks/browsers.mdxnew file mode 100644index 0000000000..53d747a25c--- /dev/null+++ b/apps/docs/sdks/typescript/analytics/clicks/browsers.mdx@@ -0,0 +1,47 @@+---+title: "Browsers"+"og:title": "dub.analytics.browsers - Retrieve browser analytics - TypeScript SDK"+description: "Retrieve the top browsers by number of clicks for a link, a domain, or the authenticated workspace."+---++import AnalyticsArguments from "/snippets/analytics-arguments.mdx";++<Note>+ Analytics endpoints require a [Pro plan](https://d.to/pro) subscription or+ higher.+</Note>++<AnalyticsArguments />++## 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+await dub.analytics.browsers({+ key: "dummy",+ domain: "dub.sh",+ interval: "30d",+});+```++</RequestExample>++<ResponseExample>++```typescript+[+ { browser: "Chrome", clicks: 19 },+ { browser: "Safari", clicks: 12 },+];+```++</ResponseExample>diff --git a/apps/docs/sdks/typescript/analytics/clicks/cities.mdx b/apps/docs/sdks/typescript/analytics/clicks/cities.mdxnew file mode 100644index 0000000000..6155b69479--- /dev/null+++ b/apps/docs/sdks/typescript/analytics/clicks/cities.mdx@@ -0,0 +1,51 @@+---+title: "Cities"+"og:title": "dub.analytics.cities - Retrieve city analytics - TypeScript SDK"+description: "Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace."+---++import AnalyticsArguments from "/snippets/analytics-arguments.mdx";++<Note>+ Analytics endpoints require a [Pro plan](https://d.to/pro) subscription or+ higher.+</Note>++<AnalyticsArguments />++## Response++<ResponseField name="city" type="string" required>+ The name of the city+</ResponseField>++<ResponseField name="country" type="string" required>+ The 2-letter country code: [https://d.to/geo](https://d.to/geo)+</ResponseField>++<ResponseField name="clicks" type="number" required>+ The number of clicks from this city+</ResponseField>++<RequestExample>++```typescript+await dub.analytics.cities({+ key: "dummy",+ domain: "dub.sh",+ interval: "30d",+});+```++</RequestExample>++<ResponseExample>++```typescript+[+ { city: "San Francisco", country: "US", clicks: 18 },+ { city: "Lviv", country: "UA", clicks: 1 },+];+```++</ResponseExample>diff --git a/apps/docs/sdks/typescript/analytics/clicks/countries.mdx b/apps/docs/sdks/typescript/analytics/clicks/countries.mdxnew file mode 100644index 0000000000..d54a7903a5--- /dev/null+++ b/apps/docs/sdks/typescript/analytics/clicks/countries.mdx@@ -0,0 +1,47 @@+---+title: "Countries"+"og:title": "dub.analytics.countries - Retrieve country analytics - TypeScript SDK"+description: "Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace."+---++import AnalyticsArguments from "/snippets/analytics-arguments.mdx";++<Note>+ Analytics endpoints require a [Pro plan](https://d.to/pro) subscription or+ higher.+</Note>++<AnalyticsArguments />++## Response++<ResponseField name="country" type="string" required>+ The 2-letter country code: [https://d.to/geo](https://d.to/geo)+</ResponseField>++<ResponseField name="clicks" type="number" required>+ The number of clicks from this country+</ResponseField>++<RequestExample>++```typescript+await dub.analytics.countries({+ key: "dummy",+ domain: "dub.sh",+ interval: "30d",+});+```++</RequestExample>++<ResponseExample>++```typescript+[+ { country: "US", clicks: 18 },+ { country: "UA", clicks: 1 },+];+```++</ResponseExample>diff --git a/apps/docs/sdks/typescript/analytics/clicks/devices.mdx b/apps/docs/sdks/typescript/analytics/clicks/devices.mdxnew file mode 100644index 0000000000..1bb9524346--- /dev/null+++ b/apps/docs/sdks/typescript/analytics/clicks/devices.mdx@@ -0,0 +1,47 @@+---+title: "Devices"+"og:title": "dub.analytics.devices - Retrieve device analytics - TypeScript SDK"+description: "Retrieve the top devices by number of clicks for a link, a domain, or the authenticated workspace."+---++import AnalyticsArguments from "/snippets/analytics-arguments.mdx";++<Note>+ Analytics endpoints require a [Pro plan](https://d.to/pro) subscription or+ higher.+</Note>++<AnalyticsArguments />++## Response++<ResponseField name="device" type="string" required>+ The name of the device+</ResponseField>++<ResponseField name="clicks" type="number" required>+ The number of clicks from this device+</ResponseField>++<RequestExample>++```typescript+await dub.analytics.devices({+ key: "dummy",+ domain: "dub.sh",+ interval: "30d",+});+```++</RequestExample>++<ResponseExample>++```typescript+[+ { device: "Desktop", clicks: 15 },+ { device: "Mobile", clicks: 12 },+];+```++</ResponseExample>diff --git a/apps/docs/sdks/typescript/analytics/clicks/os.mdx b/apps/docs/sdks/typescript/analytics/clicks/os.mdxnew file mode 100644index 0000000000..d1a00acf29--- /dev/null+++ b/apps/docs/sdks/typescript/analytics/clicks/os.mdx@@ -0,0 +1,47 @@+---+title: "OS"+"og:title": "dub.analytics.os - Retrieve OS analytics - TypeScript SDK"+description: "Retrieve the top OS by number of clicks for a link, a domain, or the authenticated workspace."+---++import AnalyticsArguments from "/snippets/analytics-arguments.mdx";++<Note>+ Analytics endpoints require a [Pro plan](https://d.to/pro) subscription or+ higher.+</Note>++<AnalyticsArguments />++## Response++<ResponseField name="os" type="string" required>+ The name of the OS+</ResponseField>++<ResponseField name="clicks" type="number" required>+ The number of clicks from this OS+</ResponseField>++<RequestExample>++```typescript+await dub.analytics.os({+ key: "dummy",+ domain: "dub.sh",+ interval: "30d",+});+```++</RequestExample>++<ResponseExample>++```typescript+[+ { os: "Mac OS", clicks: 19 },+ { os: "Windows", clicks: 12 },+];+```++</ResponseExample>diff --git a/apps/docs/sdks/typescript/analytics/clicks/referers.mdx b/apps/docs/sdks/typescript/analytics/clicks/referers.mdxnew file mode 100644index 0000000000..07b1221008--- /dev/null+++ b/apps/docs/sdks/typescript/analytics/clicks/referers.mdx@@ -0,0 +1,47 @@+---+title: "Referers"+"og:title": "dub.analytics.referers - Retrieve referer analytics - TypeScript SDK"+description: "Retrieve the top referers by number of clicks for a link, a domain, or the authenticated workspace."+---++import AnalyticsArguments from "/snippets/analytics-arguments.mdx";++<Note>+ Analytics endpoints require a [Pro plan](https://d.to/pro) subscription or+ higher.+</Note>++<AnalyticsArguments />++## Response++<ResponseField name="referer" type="string" required>+ The name of the referer. If unknown, this will be `(direct)`+</ResponseField>++<ResponseField name="clicks" type="number" required>+ The number of clicks from this referer+</ResponseField>++<RequestExample>++```typescript+await dub.analytics.referers({+ key: "dummy",+ domain: "dub.sh",+ interval: "30d",+});+```++</RequestExample>++<ResponseExample>++```typescript+[+ { referer: "(direct)", clicks: 14 },+ { referer: "t.co", clicks: 12 },+];+```++</ResponseExample>diff --git a/apps/docs/sdks/typescript/analytics/clicks/timeseries.mdx b/apps/docs/sdks/typescript/analytics/clicks/timeseries.mdxnew file mode 100644index 0000000000..985464d5bc--- /dev/null+++ b/apps/docs/sdks/typescript/analytics/clicks/timeseries.mdx@@ -0,0 +1,49 @@+---+title: "Timeseries"+"og:title": "dub.analytics.timeseries - Retrieve timeseries analytics - TypeScript SDK"+description: "Retrieve the number of clicks for a link, a domain, or the authenticated workspace over a period of time."+---++import AnalyticsArguments from "/snippets/analytics-arguments.mdx";++<Note>+ Analytics endpoints require a [Pro plan](https://d.to/pro) subscription or+ higher.+</Note>++<AnalyticsArguments />++## Response++<ResponseField name="start" type="string" required>+ The starting timestamp of the interval+</ResponseField>++<ResponseField name="clicks" type="number" required>+ The number of clicks in the interval+</ResponseField>++<RequestExample>++```typescript+await dub.analytics.timeseries({+ key: "dummy",+ domain: "dub.sh",+ interval: "30d",+});+```++</RequestExample>++<ResponseExample>++```typescript+[+ { start: "2024-03-20T00:00:00.000Z", clicks: 15 },+ { start: "2024-03-21T00:00:00.000Z", clicks: 20 },+ { start: "2024-03-22T00:00:00.000Z", clicks: 18 },+ { start: "2024-03-23T00:00:00.000Z", clicks: 14 },+];+```++</ResponseExample>diff --git a/apps/docs/sdks/typescript/analytics/clicks/top-links.mdx b/apps/docs/sdks/typescript/analytics/clicks/top-links.mdxnew file mode 100644index 0000000000..9869b40fb3--- /dev/null+++ b/apps/docs/sdks/typescript/analytics/clicks/top-links.mdx@@ -0,0 +1,47 @@+---+title: "Top Links"+"og:title": "dub.analytics.topLinks - Retrieve top links - TypeScript SDK"+description: "Retrieve the top links by number of clicks for a domain or the authenticated workspace."+---++import AnalyticsArguments from "/snippets/analytics-arguments.mdx";++<Note>+ Analytics endpoints require a [Pro plan](https://d.to/pro) subscription or+ higher.+</Note>++<AnalyticsArguments />++## Response++<ResponseField name="link" type="string" required>+ The unique ID of the short link+</ResponseField>++<ResponseField name="clicks" type="number" required>+ The number of clicks from this link+</ResponseField>++<RequestExample>++```typescript+await dub.analytics.topLinks({+ key: "dummy",+ domain: "dub.sh",+ interval: "30d",+});+```++</RequestExample>++<ResponseExample>++```typescript+[+ { link: "cluvb4cwi0001sd593yfdl1sz", clicks: 19 },+ { link: "clri4mgix0001l608ru12tcfr", clicks: 8 },+];+```++</ResponseExample>diff --git a/apps/docs/sdks/typescript/analytics/clicks/top-urls.mdx b/apps/docs/sdks/typescript/analytics/clicks/top-urls.mdxnew file mode 100644index 0000000000..d6be2ac1e1--- /dev/null+++ b/apps/docs/sdks/typescript/analytics/clicks/top-urls.mdx@@ -0,0 +1,47 @@+---+title: "Top Urls"+"og:title": "dub.analytics.topUrls - Retrieve top urls - TypeScript SDK"+description: "Retrieve the top URLs by number of clicks for a given short link."+---++import AnalyticsArguments from "/snippets/analytics-arguments.mdx";++<Note>+ Analytics endpoints require a [Pro plan](https://d.to/pro) subscription or+ higher.+</Note>++<AnalyticsArguments />++## Response++<ResponseField name="url" type="string" required>+ The destination URL+</ResponseField>++<ResponseField name="clicks" type="number" required>+ The number of clicks from this URL+</ResponseField>++<RequestExample>++```typescript+await dub.analytics.topUrls({+ key: "dummy",+ domain: "dub.sh",+ interval: "30d",+});+```++</RequestExample>++<ResponseExample>++```typescript+[+ { url: "https://dub.co/", clicks: 13 },+ { url: "https://dub.co/?qr=", clicks: 4 },+];+```++</ResponseExample>diff --git a/apps/web/lib/openapi/analytics/browser.ts b/apps/web/lib/openapi/analytics/clicks/browser.tssimilarity index 80%rename from apps/web/lib/openapi/analytics/browser.tsrename to apps/web/lib/openapi/analytics/clicks/browser.tsindex b3e9abc45b..752f415b0a 100644--- a/apps/web/lib/openapi/analytics/browser.ts+++ b/apps/web/lib/openapi/analytics/clicks/browser.ts@@ -5,12 +5,12 @@ import {getClickAnalyticsResponse,} from "@/lib/zod/schemas";import { ZodOpenApiOperationObject } from "zod-openapi";-import { workspaceParamsSchema } from "../request";+import { workspaceParamsSchema } from "../../request";-export const getBrowserAnalytics: ZodOpenApiOperationObject = {- operationId: "getBrowserAnalytics",+export const getBrowserByClicks: ZodOpenApiOperationObject = {+ operationId: "getBrowserByClicks","x-speakeasy-name-override": "browsers",- summary: "Retrieve browser analytics",+ summary: "Retrieve top browsers by clicks",description:"Retrieve the top browsers by number of clicks for a link, a domain, or the authenticated workspace.",requestParams: {diff --git a/apps/web/lib/openapi/analytics/city.ts b/apps/web/lib/openapi/analytics/clicks/city.tssimilarity index 80%rename from apps/web/lib/openapi/analytics/city.tsrename to apps/web/lib/openapi/analytics/clicks/city.tsindex f1697f5dec..114a37b600 100644--- a/apps/web/lib/openapi/analytics/city.ts+++ b/apps/web/lib/openapi/analytics/clicks/city.ts@@ -5,12 +5,12 @@ import {getClickAnalyticsResponse,} from "@/lib/zod/schemas";import { ZodOpenApiOperationObject } from "zod-openapi";-import { workspaceParamsSchema } from "../request";+import { workspaceParamsSchema } from "../../request";-export const getCityAnalytics: ZodOpenApiOperationObject = {- operationId: "getCityAnalytics",+export const getCityByClicks: ZodOpenApiOperationObject = {+ operationId: "getCityByClicks","x-speakeasy-name-override": "cities",- summary: "Retrieve city analytics",+ summary: "Retrieve top cities by clicks",description:"Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace.",requestParams: {diff --git a/apps/web/lib/openapi/analytics/clicks.ts b/apps/web/lib/openapi/analytics/clicks/clicks.tssimilarity index 97%rename from apps/web/lib/openapi/analytics/clicks.tsrename to apps/web/lib/openapi/analytics/clicks/clicks.tsindex ed5f3fbe7c..424c5d9097 100644--- a/apps/web/lib/openapi/analytics/clicks.ts+++ b/apps/web/lib/openapi/analytics/clicks/clicks.ts@@ -5,7 +5,7 @@ import {getClickAnalyticsResponse,} from "@/lib/zod/schemas";import { ZodOpenApiOperationObject } from "zod-openapi";-import { workspaceParamsSchema } from "../request";+import { workspaceParamsSchema } from "../../request";export const getClicksAnalytics: ZodOpenApiOperationObject = {operationId: "getClicksAnalytics",diff --git a/apps/web/lib/openapi/analytics/country.ts b/apps/web/lib/openapi/analytics/clicks/country.tssimilarity index 80%rename from apps/web/lib/openapi/analytics/country.tsrename to apps/web/lib/openapi/analytics/clicks/country.tsindex 20790f66b8..1d3efb237f 100644--- a/apps/web/lib/openapi/analytics/country.ts+++ b/apps/web/lib/openapi/analytics/clicks/country.ts@@ -5,12 +5,12 @@ import {getClickAnalyticsResponse,} from "@/lib/zod/schemas";import { ZodOpenApiOperationObject } from "zod-openapi";-import { workspaceParamsSchema } from "../request";+import { workspaceParamsSchema } from "../../request";-export const getCountryAnalytics: ZodOpenApiOperationObject = {- operationId: "getCountryAnalytics",+export const getCountryByClicks: ZodOpenApiOperationObject = {+ operationId: "getCountryByClicks","x-speakeasy-name-override": "countries",- summary: "Retrieve country analytics",+ summary: "Retrieve top countries by clicks",description:"Retrieve the top countries by number of clicks for a link, a domain, or the authenticated workspace.",requestParams: {diff --git a/apps/web/lib/openapi/analytics/device.ts b/apps/web/lib/openapi/analytics/clicks/device.tssimilarity index 80%rename from apps/web/lib/openapi/analytics/device.tsrename to apps/web/lib/openapi/analytics/clicks/device.tsindex 666db076dc..e75d6e5033 100644--- a/apps/web/lib/openapi/analytics/device.ts+++ b/apps/web/lib/openapi/analytics/clicks/device.ts@@ -5,12 +5,12 @@ import {getClickAnalyticsResponse,} from "@/lib/zod/schemas";import { ZodOpenApiOperationObject } from "zod-openapi";-import { workspaceParamsSchema } from "../request";+import { workspaceParamsSchema } from "../../request";-export const getDeviceAnalytics: ZodOpenApiOperationObject = {- operationId: "getDeviceAnalytics",+export const getDeviceByClicks: ZodOpenApiOperationObject = {+ operationId: "getDeviceByClicks","x-speakeasy-name-override": "devices",- summary: "Retrieve device analytics",+ summary: "Retrieve top devices by clicks",description:"Retrieve the top devices by number of clicks for a link, a domain, or the authenticated workspace.",requestParams: {diff --git a/apps/web/lib/openapi/analytics/clicks/index.ts b/apps/web/lib/openapi/analytics/clicks/index.tsnew file mode 100644index 0000000000..5fcc18a447--- /dev/null+++ b/apps/web/lib/openapi/analytics/clicks/index.ts@@ -0,0 +1,44 @@+import { ZodOpenApiPathsObject } from "zod-openapi";+import { getBrowserByClicks } from "./browser";+import { getCityByClicks } from "./city";+import { getClicksAnalytics } from "./clicks";+import { getCountryByClicks } from "./country";+import { getDeviceByClicks } from "./device";+import { getOSByClicks } from "./os";+import { getRefererByClicks } from "./referer";+import { getTimeseriesByClicks } from "./timeseries";+import { getTopLinksByClicks } from "./top-links";+import { getTopURLsByClicks } from "./top-urls";++export const clickAnalyticsPaths: ZodOpenApiPathsObject = {+ "/analytics/clicks": {+ get: getClicksAnalytics,+ },+ "/analytics/clicks/timeseries": {+ get: getTimeseriesByClicks,+ },+ "/analytics/clicks/country": {+ get: getCountryByClicks,+ },+ "/analytics/clicks/city": {+ get: getCityByClicks,+ },+ "/analytics/clicks/device": {+ get: getDeviceByClicks,+ },+ "/analytics/clicks/browser": {+ get: getBrowserByClicks,+ },+ "/analytics/clicks/os": {+ get: getOSByClicks,+ },+ "/analytics/clicks/referer": {+ get: getRefererByClicks,+ },+ "/analytics/clicks/top_links": {+ get: getTopLinksByClicks,+ },+ "/analytics/clicks/top_urls": {+ get: getTopURLsByClicks,+ },+};diff --git a/apps/web/lib/openapi/analytics/os.ts b/apps/web/lib/openapi/analytics/clicks/os.tssimilarity index 81%rename from apps/web/lib/openapi/analytics/os.tsrename to apps/web/lib/openapi/analytics/clicks/os.tsindex 4b723acae3..1bf06b6e24 100644--- a/apps/web/lib/openapi/analytics/os.ts+++ b/apps/web/lib/openapi/analytics/clicks/os.ts@@ -5,12 +5,12 @@ import {getClickAnalyticsResponse,} from "@/lib/zod/schemas";import { ZodOpenApiOperationObject } from "zod-openapi";-import { workspaceParamsSchema } from "../request";+import { workspaceParamsSchema } from "../../request";-export const getOSAnalytics: ZodOpenApiOperationObject = {- operationId: "getOSAnalytics",+export const getOSByClicks: ZodOpenApiOperationObject = {+ operationId: "getOSByClicks","x-speakeasy-name-override": "os",- summary: "Retrieve OS analytics",+ summary: "Retrieve top OS by clicks",description:"Retrieve the top OS by number of clicks for a link, a domain, or the authenticated workspace.",requestParams: {diff --git a/apps/web/lib/openapi/analytics/referer.ts b/apps/web/lib/openapi/analytics/clicks/referer.tssimilarity index 80%rename from apps/web/lib/openapi/analytics/referer.tsrename to apps/web/lib/openapi/analytics/clicks/referer.tsindex 3773734f40..25f44b9ed8 100644--- a/apps/web/lib/openapi/analytics/referer.ts+++ b/apps/web/lib/openapi/analytics/clicks/referer.ts@@ -5,12 +5,12 @@ import {getClickAnalyticsResponse,} from "@/lib/zod/schemas";import { ZodOpenApiOperationObject } from "zod-openapi";-import { workspaceParamsSchema } from "../request";+import { workspaceParamsSchema } from "../../request";-export const getRefererAnalytics: ZodOpenApiOperationObject = {- operationId: "getRefererAnalytics",+export const getRefererByClicks: ZodOpenApiOperationObject = {+ operationId: "getRefererByClicks","x-speakeasy-name-override": "referers",- summary: "Retrieve referer analytics",+ summary: "Retrieve top referers by clicks",description:"Retrieve the top referers by number of clicks for a link, a domain, or the authenticated workspace.",requestParams: {diff --git a/apps/web/lib/openapi/analytics/timeseries.ts b/apps/web/lib/openapi/analytics/clicks/timeseries.tssimilarity index 79%rename from apps/web/lib/openapi/analytics/timeseries.tsrename to apps/web/lib/openapi/analytics/clicks/timeseries.tsindex bd9071207e..b0332ac609 100644--- a/apps/web/lib/openapi/analytics/timeseries.ts+++ b/apps/web/lib/openapi/analytics/clicks/timeseries.ts@@ -5,12 +5,12 @@ import {getClickAnalyticsResponse,} from "@/lib/zod/schemas";import { ZodOpenApiOperationObject } from "zod-openapi";-import { workspaceParamsSchema } from "../request";+import { workspaceParamsSchema } from "../../request";-export const getTimeseriesAnalytics: ZodOpenApiOperationObject = {- operationId: "getTimeseriesAnalytics",+export const getTimeseriesByClicks: ZodOpenApiOperationObject = {+ operationId: "getTimeseriesByClicks","x-speakeasy-name-override": "timeseries",- summary: "Retrieve timeseries analytics",+ summary: "Retrieve timeseries analytics by clicks",description:"Retrieve the number of clicks for a link, a domain, or the authenticated workspace over a period of time.",requestParams: {diff --git a/apps/web/lib/openapi/analytics/top-links.ts b/apps/web/lib/openapi/analytics/clicks/top-links.tssimilarity index 80%rename from apps/web/lib/openapi/analytics/top-links.tsrename to apps/web/lib/openapi/analytics/clicks/top-links.tsindex 9d90f13aac..899de801e2 100644--- a/apps/web/lib/openapi/analytics/top-links.ts+++ b/apps/web/lib/openapi/analytics/clicks/top-links.ts@@ -5,12 +5,12 @@ import {getClickAnalyticsResponse,} from "@/lib/zod/schemas";import { ZodOpenApiOperationObject } from "zod-openapi";-import { workspaceParamsSchema } from "../request";+import { workspaceParamsSchema } from "../../request";-export const getTopLinks: ZodOpenApiOperationObject = {- operationId: "getTopLinks",+export const getTopLinksByClicks: ZodOpenApiOperationObject = {+ operationId: "getTopLinksByClicks","x-speakeasy-name-override": "topLinks",- summary: "Retrieve top links",+ summary: "Retrieve top links by clicks",description:"Retrieve the top links by number of clicks for a domain or the authenticated workspace.",requestParams: {diff --git a/apps/web/lib/openapi/analytics/top-urls.ts b/apps/web/lib/openapi/analytics/clicks/top-urls.tssimilarity index 79%rename from apps/web/lib/openapi/analytics/top-urls.tsrename to apps/web/lib/openapi/analytics/clicks/top-urls.tsindex 5b4d949571..8147a62438 100644--- a/apps/web/lib/openapi/analytics/top-urls.ts+++ b/apps/web/lib/openapi/analytics/clicks/top-urls.ts@@ -5,12 +5,12 @@ import {getClickAnalyticsResponse,} from "@/lib/zod/schemas";import { ZodOpenApiOperationObject } from "zod-openapi";-import { workspaceParamsSchema } from "../request";+import { workspaceParamsSchema } from "../../request";-export const getTopURLs: ZodOpenApiOperationObject = {- operationId: "getTopURLs",+export const getTopURLsByClicks: ZodOpenApiOperationObject = {+ operationId: "getTopURLsByClicks","x-speakeasy-name-override": "topUrls",- summary: "Retrieve top URLs",+ summary: "Retrieve top URLs by clicks",description:"Retrieve the top URLs by number of clicks for a given short link.",requestParams: {diff --git a/apps/web/lib/openapi/analytics/index.ts b/apps/web/lib/openapi/analytics/index.tsdeleted file mode 100644index b3651d023a..0000000000--- a/apps/web/lib/openapi/analytics/index.ts+++ /dev/null@@ -1,44 +0,0 @@-import { ZodOpenApiPathsObject } from "zod-openapi";-import { getBrowserAnalytics } from "./browser";-import { getCityAnalytics } from "./city";-import { getClicksAnalytics } from "./clicks";-import { getCountryAnalytics } from "./country";-import { getDeviceAnalytics } from "./device";-import { getOSAnalytics } from "./os";-import { getRefererAnalytics } from "./referer";-import { getTimeseriesAnalytics } from "./timeseries";-import { getTopLinks } from "./top-links";-import { getTopURLs } from "./top-urls";--export const analyticsPaths: ZodOpenApiPathsObject = {- "/analytics/clicks": {- get: getClicksAnalytics,- },- "/analytics/clicks/timeseries": {- get: getTimeseriesAnalytics,- },- "/analytics/clicks/country": {- get: getCountryAnalytics,- },- "/analytics/clicks/city": {- get: getCityAnalytics,- },- "/analytics/clicks/device": {- get: getDeviceAnalytics,- },- "/analytics/clicks/browser": {- get: getBrowserAnalytics,- },- "/analytics/clicks/os": {- get: getOSAnalytics,- },- "/analytics/clicks/referer": {- get: getRefererAnalytics,- },- "/analytics/clicks/top_links": {- get: getTopLinks,- },- "/analytics/clicks/top_urls": {- get: getTopURLs,- },-};diff --git a/apps/web/lib/openapi/index.ts b/apps/web/lib/openapi/index.tsindex ad584bf4e5..aaad139e59 100644--- a/apps/web/lib/openapi/index.ts+++ b/apps/web/lib/openapi/index.ts@@ -7,7 +7,7 @@ import {} from "@/lib/zod/schemas";import { API_DOMAIN } from "@dub/utils";import { createDocument } from "zod-openapi";-import { analyticsPaths } from "./analytics";+import { clickAnalyticsPaths } from "./analytics/clicks";import { domainsPaths } from "./domains";import { linksPaths } from "./links";import { metatagsPath } from "./metatags";@@ -41,7 +41,7 @@ export const document = createDocument({paths: {...linksPaths,...qrCodePaths,- ...analyticsPaths,+ ...clickAnalyticsPaths,...workspacesPaths,...tagsPaths,...domainsPaths,