Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

add docs

Steven Tey00d4cff580f9
diff --git a/apps/docs/api-reference/endpoint/upsert-a-link.mdx b/apps/docs/api-reference/endpoint/upsert-a-link.mdx
new file mode 100644
index 0000000000..703cf5ee1d
--- /dev/null
+++ b/apps/docs/api-reference/endpoint/upsert-a-link.mdx
@@ -0,0 +1,4 @@
+---
+openapi: put /links/upsert
+og:title: "Upsert a link with the Dub.co API - API Reference"
+---
diff --git a/apps/docs/mint.json b/apps/docs/mint.json
index 83faed97b8..98f114e6f2 100644
--- a/apps/docs/mint.json
+++ b/apps/docs/mint.json
@@ -83,7 +83,8 @@
"api-reference/endpoint/delete-a-link",
"api-reference/endpoint/retrieve-a-list-of-links",
"api-reference/endpoint/retrieve-number-of-links",
- "api-reference/endpoint/bulk-create-links"
+ "api-reference/endpoint/bulk-create-links",
+ "api-reference/endpoint/upsert-a-link"
]
},
{
diff --git a/apps/web/lib/openapi/links/update-link.ts b/apps/web/lib/openapi/links/update-link.ts
index 477b5b0639..bee81d222c 100644
--- a/apps/web/lib/openapi/links/update-link.ts
+++ b/apps/web/lib/openapi/links/update-link.ts
@@ -9,7 +9,8 @@ export const updateLink: ZodOpenApiOperationObject = {
"x-speakeasy-name-override": "update",
"x-speakeasy-max-method-params": 2,
summary: "Update a link",
- description: "Update a link for the authenticated workspace.",
+ description:
+ "Update a link for the authenticated workspace. If there's no change, returns as is.",
requestParams: {
query: workspaceParamsSchema,
path: z.object({
diff --git a/apps/web/lib/openapi/links/upsert-link.ts b/apps/web/lib/openapi/links/upsert-link.ts
index f76eca088a..4e652e5911 100644
--- a/apps/web/lib/openapi/links/upsert-link.ts
+++ b/apps/web/lib/openapi/links/upsert-link.ts
@@ -9,7 +9,7 @@ export const upsertLink: ZodOpenApiOperationObject = {
"x-speakeasy-usage-example": true,
summary: "Upsert a link",
description:
- "Upsert a link for the authenticated workspace. If a link with the same URL already exists, it will be updated. Otherwise, a new link will be created.",
+ "Upsert a link for the authenticated workspace by its URL. If a link with the same URL already exists, returns as is if there's no change, or update it. Otherwise, a new link will be created.",
requestParams: {
query: workspaceParamsSchema,
},