The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
add the API docs
Kiran K3e11f1f6631e
diff --git a/apps/docs/api-reference/endpoint/record-customer.mdx b/apps/docs/api-reference/endpoint/record-customer.mdxnew file mode 100644index 0000000000..d20cfb0227--- /dev/null+++ b/apps/docs/api-reference/endpoint/record-customer.mdx@@ -0,0 +1,4 @@+---+openapi: post /track/customer+og:title: "Track a customer with the Dub.co API - API Reference"+---diff --git a/apps/docs/api-reference/endpoint/record-lead.mdx b/apps/docs/api-reference/endpoint/record-lead.mdxnew file mode 100644index 0000000000..aeb4d3703c--- /dev/null+++ b/apps/docs/api-reference/endpoint/record-lead.mdx@@ -0,0 +1,4 @@+---+openapi: post /track/lead+og:title: "Track a lead with the Dub.co API - API Reference"+---diff --git a/apps/docs/api-reference/endpoint/record-sale.mdx b/apps/docs/api-reference/endpoint/record-sale.mdxnew file mode 100644index 0000000000..47c2af8870--- /dev/null+++ b/apps/docs/api-reference/endpoint/record-sale.mdx@@ -0,0 +1,4 @@+---+openapi: post /track/sale+og:title: "Track a sale with the Dub.co API - API Reference"+---diff --git a/apps/web/lib/zod/schemas/leads.ts b/apps/web/lib/zod/schemas/leads.tsindex b51e791db4..eccc3f4687 100644--- a/apps/web/lib/zod/schemas/leads.ts+++ b/apps/web/lib/zod/schemas/leads.ts@@ -6,12 +6,17 @@ export const trackLeadRequestSchema = z.object({clickId: z.string({ required_error: "clickId is required" }).trim()- .min(1, "clickId is required"),+ .min(1, "clickId is required")+ .describe(+ "The ID of the click in th Dub. You can read this value from `dclid` cookie.",+ ),eventName: z.string({ required_error: "eventName is required" }).trim().min(1, "eventName is required")- .max(50),+ .max(50)+ .describe("The name of the event to track.")+ .openapi({ example: "Signup" }),customerId: z.string({ required_error: "customerId is required" }).trim()