-
Notifications
You must be signed in to change notification settings - Fork 0
/
base.yaml
1 lines (1 loc) · 126 KB
/
base.yaml
1
{"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": "https://api.dub.co", "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."}, "trackConversion": {"type": "boolean", "default": false, "description": "Whether to track conversions for the short link."}, "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": {"$ref": "#/components/schemas/linkGeoTargeting"}, "doIndex": {"type": "boolean", "default": false, "description": "Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex"}}, "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."}, "trackConversion": {"type": "boolean", "default": false, "description": "Whether to track conversions for the short link."}, "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": {"$ref": "#/components/schemas/linkGeoTargeting"}, "doIndex": {"type": "boolean", "default": false, "description": "Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex"}}, "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."}, "trackConversion": {"type": "boolean", "default": false, "description": "Whether to track conversions for the short link."}, "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": {"$ref": "#/components/schemas/linkGeoTargeting"}, "doIndex": {"type": "boolean", "default": false, "description": "Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex"}}, "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."}, "trackConversion": {"type": "boolean", "default": false, "description": "Whether to track conversions for the short link."}, "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": {"$ref": "#/components/schemas/linkGeoTargeting"}, "doIndex": {"type": "boolean", "default": false, "description": "Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex"}}, "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": {"get": {"operationId": "retrieveAnalytics", "x-speakeasy-name-override": "retrieve", "summary": "Retrieve analytics for a link, a domain, or the authenticated workspace.", "description": "Retrieve analytics for a link, a domain, or the authenticated workspace. The response type depends on the `event` and `type` query parameters.", "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": "event", "description": "The type of event to retrieve analytics for. Defaults to 'clicks'.", "schema": {"type": "string", "enum": ["clicks", "leads", "sales", "composite"], "default": "clicks", "description": "The type of event to retrieve analytics for. Defaults to 'clicks'."}}, {"in": "query", "name": "groupBy", "description": "The parameter to group the analytics data points by. Defaults to 'count' if undefined.", "schema": {"type": "string", "enum": ["count", "timeseries", "countries", "cities", "devices", "browsers", "os", "referers", "top_links", "top_urls", "trigger"], "default": "count", "description": "The parameter to group the analytics data points by. Defaults to 'count' if undefined."}}, {"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": ["24h", "7d", "30d", "90d", "ytd", "1y", "all", "all_unfiltered"], "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": "timezone", "description": "The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC.", "schema": {"type": "string", "description": "The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC.", "example": "America/New_York", "default": "UTC"}}, {"in": "query", "name": "country", "description": "The country to retrieve analytics for.", "schema": {"$ref": "#/components/schemas/countryCode"}}, {"in": "query", "name": "city", "description": "The city to retrieve analytics for.", "schema": {"type": "string", "description": "The city to retrieve analytics for.", "example": "New York"}}, {"in": "query", "name": "device", "description": "The device to retrieve analytics for.", "schema": {"type": "string", "description": "The device to retrieve analytics for.", "example": "Desktop"}}, {"in": "query", "name": "browser", "description": "The browser to retrieve analytics for.", "schema": {"type": "string", "description": "The browser to retrieve analytics for.", "example": "Chrome"}}, {"in": "query", "name": "os", "description": "The OS to retrieve analytics for.", "schema": {"type": "string", "description": "The OS to retrieve analytics for.", "example": "Windows"}}, {"in": "query", "name": "referer", "description": "The referer to retrieve analytics for.", "schema": {"type": "string", "description": "The referer to retrieve analytics for.", "example": "google.com"}}, {"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": "Analytics data", "content": {"application/json": {"schema": {"anyOf": [{"$ref": "#/components/schemas/ClicksCount"}, {"type": "array", "items": {"$ref": "#/components/schemas/ClicksTimeseries"}, "title": "ClickTimeseries"}, {"type": "array", "items": {"$ref": "#/components/schemas/ClicksCountries"}, "title": "ClickCountries"}, {"type": "array", "items": {"$ref": "#/components/schemas/ClicksCities"}, "title": "ClickCities"}, {"type": "array", "items": {"$ref": "#/components/schemas/ClicksDevices"}, "title": "ClickDevices"}, {"type": "array", "items": {"$ref": "#/components/schemas/ClicksBrowsers"}, "title": "ClickBrowsers"}, {"type": "array", "items": {"$ref": "#/components/schemas/ClicksOS"}, "title": "ClickOS"}, {"type": "array", "items": {"$ref": "#/components/schemas/ClicksReferers"}, "title": "ClickReferers"}, {"type": "array", "items": {"$ref": "#/components/schemas/ClicksTopLinks"}, "title": "ClickTopLinks"}, {"type": "array", "items": {"$ref": "#/components/schemas/ClicksTopUrls"}, "title": "ClickTopUrls"}, {"$ref": "#/components/schemas/LeadsCount"}, {"type": "array", "items": {"$ref": "#/components/schemas/LeadsTimeseries"}, "title": "LeadsTimeseries"}, {"type": "array", "items": {"$ref": "#/components/schemas/LeadsCountries"}, "title": "LeadsCountries"}, {"type": "array", "items": {"$ref": "#/components/schemas/LeadsCities"}, "title": "LeadsCities"}, {"type": "array", "items": {"$ref": "#/components/schemas/LeadsDevices"}, "title": "LeadsDevices"}, {"type": "array", "items": {"$ref": "#/components/schemas/LeadsBrowsers"}, "title": "LeadsBrowsers"}, {"type": "array", "items": {"$ref": "#/components/schemas/LeadsOS"}, "title": "LeadsOS"}, {"type": "array", "items": {"$ref": "#/components/schemas/LeadsReferers"}, "title": "LeadsReferers"}, {"type": "array", "items": {"$ref": "#/components/schemas/LeadsTopLinks"}, "title": "LeadsTopLinks"}, {"type": "array", "items": {"$ref": "#/components/schemas/LeadsTopUrls"}, "title": "LeadsTopUrls"}, {"$ref": "#/components/schemas/SalesCount"}, {"type": "array", "items": {"$ref": "#/components/schemas/SalesTimeseries"}, "title": "SalesTimeseries"}, {"type": "array", "items": {"$ref": "#/components/schemas/SalesCountries"}, "title": "SalesCountries"}, {"type": "array", "items": {"$ref": "#/components/schemas/SalesCities"}, "title": "SalesCities"}, {"type": "array", "items": {"$ref": "#/components/schemas/SalesDevices"}, "title": "SalesDevices"}, {"type": "array", "items": {"$ref": "#/components/schemas/SalesBrowsers"}, "title": "SalesBrowsers"}, {"type": "array", "items": {"$ref": "#/components/schemas/SalesOS"}, "title": "SalesOS"}, {"type": "array", "items": {"$ref": "#/components/schemas/SalesReferers"}, "title": "SalesReferers"}, {"type": "array", "items": {"$ref": "#/components/schemas/SalesTopLinks"}, "title": "SalesTopLinks"}, {"type": "array", "items": {"$ref": "#/components/schemas/SalesTopUrls"}, "title": "SalesTopUrls"}]}}}}, "400": {"$ref": "#/components/responses/400"}, "401": {"$ref": "#/components/responses/401"}, "403": {"$ref": "#/components/responses/403"}, "404": {"$ref": "#/components/responses/404"}, "409": {"$ref": "#/components/responses/409"}, "410": {"$ref": "#/components/responses/410"}, "422": {"$ref": "#/components/responses/422"}, "429": {"$ref": "#/components/responses/429"}, "500": {"$ref": "#/components/responses/500"}}}}, "/workspaces": {"get": {"operationId": "getWorkspaces", "x-speakeasy-name-override": "list", "summary": "Retrieve a list of workspaces", "description": "Retrieve a list of workspaces for the authenticated user.", "tags": ["Workspaces"], "security": [{"token": []}], "responses": {"200": {"description": "A list of workspaces", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/WorkspaceSchema"}}}}}, "400": {"$ref": "#/components/responses/400"}, "401": {"$ref": "#/components/responses/401"}, "403": {"$ref": "#/components/responses/403"}, "404": {"$ref": "#/components/responses/404"}, "409": {"$ref": "#/components/responses/409"}, "410": {"$ref": "#/components/responses/410"}, "422": {"$ref": "#/components/responses/422"}, "429": {"$ref": "#/components/responses/429"}, "500": {"$ref": "#/components/responses/500"}}}, "post": {"operationId": "createWorkspace", "x-speakeasy-name-override": "create", "summary": "Create a workspace", "description": "Create a new workspace for the authenticated user.", "tags": ["Workspaces"], "security": [{"token": []}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string", "minLength": 1, "maxLength": 32}, "slug": {"type": "string", "minLength": 3, "maxLength": 48}, "domain": {"type": "string"}}, "required": ["name", "slug"]}}}}, "responses": {"200": {"description": "The created workspace", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WorkspaceSchema"}}}}, "400": {"$ref": "#/components/responses/400"}, "401": {"$ref": "#/components/responses/401"}, "403": {"$ref": "#/components/responses/403"}, "404": {"$ref": "#/components/responses/404"}, "409": {"$ref": "#/components/responses/409"}, "410": {"$ref": "#/components/responses/410"}, "422": {"$ref": "#/components/responses/422"}, "429": {"$ref": "#/components/responses/429"}, "500": {"$ref": "#/components/responses/500"}}}}, "/workspaces/{idOrSlug}": {"get": {"operationId": "getWorkspace", "x-speakeasy-name-override": "get", "summary": "Retrieve a workspace", "description": "Retrieve a workspace for the authenticated user.", "tags": ["Workspaces"], "security": [{"token": []}], "parameters": [{"in": "path", "name": "idOrSlug", "description": "The ID or slug of the workspace.", "schema": {"type": "string", "description": "The ID or slug of the workspace."}, "required": true}], "responses": {"200": {"description": "The retrieved workspace", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WorkspaceSchema"}}}}, "400": {"$ref": "#/components/responses/400"}, "401": {"$ref": "#/components/responses/401"}, "403": {"$ref": "#/components/responses/403"}, "404": {"$ref": "#/components/responses/404"}, "409": {"$ref": "#/components/responses/409"}, "410": {"$ref": "#/components/responses/410"}, "422": {"$ref": "#/components/responses/422"}, "429": {"$ref": "#/components/responses/429"}, "500": {"$ref": "#/components/responses/500"}}}}, "/tags": {"post": {"operationId": "createTag", "x-speakeasy-name-override": "create", "summary": "Create a new tag", "description": "Create a new tag for the authenticated workspace.", "tags": ["Tags"], "security": [{"token": []}], "parameters": [{"in": "query", "name": "workspaceId", "description": "The ID of the workspace.", "schema": {"type": "string", "description": "The ID of the workspace.", "example": "ws_cluuwcv0r..."}, "required": true}, {"in": "query", "name": "projectSlug", "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.", "schema": {"type": "string", "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.", "deprecated": true}}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"tag": {"type": "string", "minLength": 1, "description": "The name of the tag to create."}, "color": {"type": "string", "enum": ["red", "yellow", "green", "blue", "purple", "pink", "brown"], "description": "The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, pink, brown."}}, "required": ["tag"]}}}}, "responses": {"201": {"description": "The created tag", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TagSchema"}}}}, "400": {"$ref": "#/components/responses/400"}, "401": {"$ref": "#/components/responses/401"}, "403": {"$ref": "#/components/responses/403"}, "404": {"$ref": "#/components/responses/404"}, "409": {"$ref": "#/components/responses/409"}, "410": {"$ref": "#/components/responses/410"}, "422": {"$ref": "#/components/responses/422"}, "429": {"$ref": "#/components/responses/429"}, "500": {"$ref": "#/components/responses/500"}}}, "get": {"operationId": "getTags", "x-speakeasy-name-override": "list", "summary": "Retrieve a list of tags", "description": "Retrieve a list of tags for the authenticated workspace.", "tags": ["Tags"], "security": [{"token": []}], "parameters": [{"in": "query", "name": "workspaceId", "description": "The ID of the workspace.", "schema": {"type": "string", "description": "The ID of the workspace.", "example": "ws_cluuwcv0r..."}, "required": true}, {"in": "query", "name": "projectSlug", "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.", "schema": {"type": "string", "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.", "deprecated": true}}], "responses": {"200": {"description": "A list of tags", "content": {"application/json": {"schema": {"type": "array", "items": {"$ref": "#/components/schemas/TagSchema"}}}}}, "400": {"$ref": "#/components/responses/400"}, "401": {"$ref": "#/components/responses/401"}, "403": {"$ref": "#/components/responses/403"}, "404": {"$ref": "#/components/responses/404"}, "409": {"$ref": "#/components/responses/409"}, "410": {"$ref": "#/components/responses/410"}, "422": {"$ref": "#/components/responses/422"}, "429": {"$ref": "#/components/responses/429"}, "500": {"$ref": "#/components/responses/500"}}}}, "/domains": {"post": {"operationId": "createDomain", "x-speakeasy-name-override": "create", "summary": "Create a domain", "description": "Create a domain for the authenticated workspace.", "tags": ["Domains"], "security": [{"token": []}], "parameters": [{"in": "query", "name": "workspaceId", "description": "The ID of the workspace.", "schema": {"type": "string", "description": "The ID of the workspace.", "example": "ws_cluuwcv0r..."}, "required": true}, {"in": "query", "name": "projectSlug", "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.", "schema": {"type": "string", "description": "The slug of the project. This field is deprecated – use `workspaceId` instead.", "deprecated": true}}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "properties": {"slug": {"type": "string", "minLength": 1, "description": "Name of the domain.", "example": "acme.com"}, "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 created.", "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"}, "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"}}}}, "/track/lead": {"post": {"operationId": "trackLead", "x-speakeasy-name-override": "lead", "summary": "Track a lead", "description": "Track a lead for a short link.", "tags": ["Track"], "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": {"clickId": {"type": "string", "minLength": 1, "description": "The ID of the click in th Dub. You can read this value from `dclid` cookie."}, "eventName": {"type": "string", "minLength": 1, "maxLength": 50, "description": "The name of the event to track.", "example": "Sign up"}, "customerId": {"type": "string", "minLength": 1, "maxLength": 100, "description": "This is the unique identifier for the customer in the client's app. This is used to track the customer's journey."}, "customerName": {"type": "string", "nullable": true, "maxLength": 100, "description": "Name of the customer in the client's app."}, "customerEmail": {"type": "string", "nullable": true, "format": "email", "maxLength": 100, "description": "Email of the customer in the client's app."}, "customerAvatar": {"type": "string", "nullable": true, "maxLength": 100, "description": "Avatar of the customer in the client's app."}, "metadata": {"type": "object", "nullable": true, "additionalProperties": {}, "description": "Additional metadata to be stored with the lead event"}}, "required": ["clickId", "eventName", "customerId"]}}}}, "responses": {"200": {"description": "A lead was tracked.", "content": {"application/json": {"schema": {"type": "object", "properties": {"clickId": {"type": "string"}, "eventName": {"type": "string"}, "customerId": {"type": "string"}, "customerName": {"type": "string", "nullable": true}, "customerEmail": {"type": "string", "nullable": true}, "customerAvatar": {"type": "string", "nullable": true}, "metadata": {"type": "object", "additionalProperties": {}}}, "required": ["clickId", "eventName", "customerId", "customerName", "customerEmail", "customerAvatar"]}}}}, "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"}}}}, "/track/sale": {"post": {"operationId": "trackSale", "x-speakeasy-name-override": "sale", "summary": "Track a sale", "description": "Track a sale for a short link.", "tags": ["Track"], "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": {"customerId": {"type": "string", "minLength": 1, "maxLength": 100, "description": "This is the unique identifier for the customer in the client's app. This is used to track the customer's journey."}, "amount": {"type": "integer", "minimum": 0, "exclusiveMinimum": true, "description": "The amount of the sale. Should be passed in cents."}, "paymentProcessor": {"type": "string", "enum": ["stripe", "shopify", "paddle"], "description": "The payment processor via which the sale was made."}, "eventName": {"type": "string", "maxLength": 50, "default": "Purchase", "description": "The name of the sale event. It can be used to track different types of event for example 'Purchase', 'Upgrade', 'Payment', etc.", "example": "Purchase"}, "invoiceId": {"type": "string", "nullable": true, "default": null, "description": "The invoice ID of the sale."}, "currency": {"type": "string", "default": "usd", "description": "The currency of the sale. Accepts ISO 4217 currency codes."}, "metadata": {"type": "object", "nullable": true, "additionalProperties": {}, "default": null, "description": "Additional metadata to be stored with the sale event."}}, "required": ["customerId", "amount", "paymentProcessor"]}}}}, "responses": {"200": {"description": "A sale was tracked.", "content": {"application/json": {"schema": {"type": "object", "properties": {"eventName": {"type": "string"}, "customerId": {"type": "string"}, "amount": {"type": "number"}, "paymentProcessor": {"type": "string"}, "invoiceId": {"type": "string", "nullable": true}, "currency": {"type": "string"}, "metadata": {"type": "object", "nullable": true, "additionalProperties": {}}}, "required": ["eventName", "customerId", "amount", "paymentProcessor", "invoiceId", "currency", "metadata"]}}}}, "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"}}}}, "/track/customer": {"post": {"operationId": "trackCustomer", "x-speakeasy-name-override": "customer", "summary": "Track a customer", "description": "Track a customer for an authenticated workspace.", "tags": ["Track"], "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": {"customerId": {"type": "string", "minLength": 1, "maxLength": 100, "description": "This is the unique identifier for the customer in the client's app. This is used to track the customer's journey."}, "customerName": {"type": "string", "maxLength": 100, "description": "Name of the customer in the client's app."}, "customerEmail": {"type": "string", "format": "email", "maxLength": 100, "description": "Email of the customer in the client's app."}, "customerAvatar": {"type": "string", "maxLength": 100, "description": "Avatar of the customer in the client's app."}}, "required": ["customerId"]}}}}, "responses": {"200": {"description": "A customer was tracked.", "content": {"application/json": {"schema": {"type": "object", "properties": {"customerId": {"type": "string"}, "customerName": {"type": "string", "nullable": true}, "customerEmail": {"type": "string", "nullable": true}, "customerAvatar": {"type": "string", "nullable": true}}, "required": ["customerId", "customerName", "customerEmail", "customerAvatar"]}}}}, "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."}, "doIndex": {"type": "boolean", "default": false, "description": "Whether to allow search engines to index the short link."}, "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."}, "leads": {"type": "number", "default": 0, "description": "[BETA]: The number of leads the short links has generated."}, "sales": {"type": "number", "default": 0, "description": "[BETA]: The number of sales the short links has generated."}, "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", "doIndex", "ios", "android", "geo", "publicStats", "tagId", "tags", "comments", "shortLink", "qrCode", "utm_source", "utm_medium", "utm_campaign", "utm_term", "utm_content", "userId", "workspaceId", "clicks", "lastClicked", "leads", "sales", "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."}, "stripeConnectId": {"type": "string", "nullable": true, "description": "[BETA]: The Stripe Connect ID of 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."}, "betaTester": {"type": "boolean", "description": "Whether the workspace is enrolled in the beta testing program."}}, "required": ["id", "name", "slug", "logo", "usage", "usageLimit", "linksUsage", "linksLimit", "domainsLimit", "tagsLimit", "usersLimit", "plan", "stripeId", "billingCycleStart", "stripeConnectId", "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"}, "createdAt": {"type": "string", "description": "The date the domain was created."}, "updatedAt": {"type": "string", "description": "The date the domain was last updated."}}, "required": ["id", "slug", "verified", "primary", "archived", "placeholder", "expiredUrl", "createdAt", "updatedAt"]}, "linkGeoTargeting": {"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 }`."}, "countryCode": {"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."}, "ClicksCount": {"type": "object", "properties": {"clicks": {"type": "number", "description": "The total number of clicks"}}, "required": ["clicks"], "title": "ClicksCount"}, "ClicksTimeseries": {"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"]}, "ClicksCountries": {"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"]}, "ClicksCities": {"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"]}, "ClicksDevices": {"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"]}, "ClicksBrowsers": {"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"]}, "ClicksOS": {"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"]}, "ClicksReferers": {"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"]}, "ClicksTopLinks": {"type": "object", "properties": {"link": {"type": "string", "description": "The unique ID of the short link", "deprecated": true}, "id": {"type": "string", "description": "The unique ID of the short link"}, "domain": {"type": "string", "description": "The domain of the short link"}, "key": {"type": "string", "description": "The key of the short link"}, "shortLink": {"type": "string", "description": "The short link URL"}, "url": {"type": "string", "description": "The destination URL of the short link"}, "createdAt": {"type": "string", "description": "The creation timestamp of the short link"}, "clicks": {"type": "number", "description": "The number of clicks from this link"}}, "required": ["link", "id", "domain", "key", "shortLink", "url", "createdAt", "clicks"]}, "ClicksTopUrls": {"type": "object", "properties": {"url": {"type": "string", "description": "The destination URL"}, "clicks": {"type": "number", "description": "The number of clicks from this URL"}}, "required": ["url", "clicks"]}, "LeadsCount": {"type": "object", "properties": {"leads": {"type": "number", "description": "The total number of leads"}}, "required": ["leads"], "title": "LeadsCount"}, "LeadsTimeseries": {"type": "object", "properties": {"start": {"type": "string", "description": "The starting timestamp of the interval"}, "leads": {"type": "number", "description": "The number of leads in the interval"}}, "required": ["start", "leads"]}, "LeadsCountries": {"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"}, "leads": {"type": "number", "description": "The number of leads from this country"}}, "required": ["country", "leads"]}, "LeadsCities": {"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"}, "leads": {"type": "number", "description": "The number of leads from this city"}}, "required": ["city", "country", "leads"]}, "LeadsDevices": {"type": "object", "properties": {"device": {"type": "string", "description": "The name of the device"}, "leads": {"type": "number", "description": "The number of leads from this device"}}, "required": ["device", "leads"]}, "LeadsBrowsers": {"type": "object", "properties": {"browser": {"type": "string", "description": "The name of the browser"}, "leads": {"type": "number", "description": "The number of leads from this browser"}}, "required": ["browser", "leads"]}, "LeadsOS": {"type": "object", "properties": {"os": {"type": "string", "description": "The name of the OS"}, "leads": {"type": "number", "description": "The number of leads from this OS"}}, "required": ["os", "leads"]}, "LeadsReferers": {"type": "object", "properties": {"referer": {"type": "string", "description": "The name of the referer. If unknown, this will be `(direct)`"}, "leads": {"type": "number", "description": "The number of leads from this referer"}}, "required": ["referer", "leads"]}, "LeadsTopLinks": {"type": "object", "properties": {"link": {"type": "string", "description": "The unique ID of the short link", "deprecated": true}, "id": {"type": "string", "description": "The unique ID of the short link"}, "domain": {"type": "string", "description": "The domain of the short link"}, "key": {"type": "string", "description": "The key of the short link"}, "shortLink": {"type": "string", "description": "The short link URL"}, "url": {"type": "string", "description": "The destination URL of the short link"}, "createdAt": {"type": "string", "description": "The creation timestamp of the short link"}, "leads": {"type": "number", "description": "The number of leads from this link"}}, "required": ["link", "id", "domain", "key", "shortLink", "url", "createdAt", "leads"]}, "LeadsTopUrls": {"type": "object", "properties": {"url": {"type": "string", "description": "The destination URL"}, "leads": {"type": "number", "description": "The number of leads from this URL"}}, "required": ["url", "leads"]}, "SalesCount": {"type": "object", "properties": {"sales": {"type": "number", "description": "The total number of sales"}, "amount": {"type": "number", "description": "The total amount of sales"}}, "required": ["sales", "amount"], "title": "SalesCount"}, "SalesTimeseries": {"type": "object", "properties": {"start": {"type": "string", "description": "The starting timestamp of the interval"}, "sales": {"type": "number", "description": "The number of sales in the interval"}, "amount": {"type": "number", "description": "The total amount of sales in the interval"}}, "required": ["start", "sales", "amount"]}, "SalesCountries": {"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"}, "sales": {"type": "number", "description": "The number of sales from this country"}, "amount": {"type": "number", "description": "The total amount of sales from this country"}}, "required": ["country", "sales", "amount"]}, "SalesCities": {"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"}, "sales": {"type": "number", "description": "The number of sales from this city"}, "amount": {"type": "number", "description": "The total amount of sales from this city"}}, "required": ["city", "country", "sales", "amount"]}, "SalesDevices": {"type": "object", "properties": {"device": {"type": "string", "description": "The name of the device"}, "sales": {"type": "number", "description": "The number of sales from this device"}, "amount": {"type": "number", "description": "The total amount of sales from this device"}}, "required": ["device", "sales", "amount"]}, "SalesBrowsers": {"type": "object", "properties": {"browser": {"type": "string", "description": "The name of the browser"}, "sales": {"type": "number", "description": "The number of sales from this browser"}, "amount": {"type": "number", "description": "The total amount of sales from this browser"}}, "required": ["browser", "sales", "amount"]}, "SalesOS": {"type": "object", "properties": {"os": {"type": "string", "description": "The name of the OS"}, "sales": {"type": "number", "description": "The number of sales from this OS"}, "amount": {"type": "number", "description": "The total amount of sales from this OS"}}, "required": ["os", "sales", "amount"]}, "SalesReferers": {"type": "object", "properties": {"referer": {"type": "string", "description": "The name of the referer. If unknown, this will be `(direct)`"}, "sales": {"type": "number", "description": "The number of sales from this referer"}, "amount": {"type": "number", "description": "The total amount of sales from this referer"}}, "required": ["referer", "sales", "amount"]}, "SalesTopLinks": {"type": "object", "properties": {"link": {"type": "string", "description": "The unique ID of the short link", "deprecated": true}, "id": {"type": "string", "description": "The unique ID of the short link"}, "domain": {"type": "string", "description": "The domain of the short link"}, "key": {"type": "string", "description": "The key of the short link"}, "shortLink": {"type": "string", "description": "The short link URL"}, "url": {"type": "string", "description": "The destination URL of the short link"}, "createdAt": {"type": "string", "description": "The creation timestamp of the short link"}, "sales": {"type": "number", "description": "The number of sales from this link"}, "amount": {"type": "number", "description": "The total amount of sales from this link"}}, "required": ["link", "id", "domain", "key", "shortLink", "url", "createdAt", "sales", "amount"]}, "SalesTopUrls": {"type": "object", "properties": {"url": {"type": "string", "description": "The destination URL"}, "sales": {"type": "number", "description": "The number of sales from this URL"}, "amount": {"type": "number", "description": "The total amount of sales from this URL"}}, "required": ["url", "sales", "amount"]}}, "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"]}}}}}}}