{"openapi":"1.0.0","info":{"title":"UnifyTracker API","description":"UnifyTracker is a platform you can track every user touch point of your product .","contact":{"email":"support@mg.infotobiz.com","name":"UnifyTracker Support","url":"https://unifytracker.com/docs"},"version":"0.0.1"},"servers":[{"url":"https://api.unifytracker.com/api/","description":"Production API"}],"paths":{"/track":{"post":{"description":"Create a new link for the authenticated project.","operationId":"createLink","security":[{"bearerToken":[]}],"summary":"Create a new link","parameters":[{"name":"projectSlug","description":"The slug for the project to create links for. E.g. for app.dub.co/acme, the projectSlug is 'acme'.","in":"query","required":true,"schema":{"description":"The slug for the project to create links for. E.g. for app.dub.co/acme, the projectSlug is 'acme'.","type":"string"}}],"requestBody":{"description":"Details of the link to create.","required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkBody","required":["domain","url"]}}}},"responses":{"200":{"description":"The created link","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Link"}}}}}}}},"components":{"schemas":{"Link":{"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"cuid","description":"The unique ID of the short link."}}},{"$ref":"#/components/schemas/LinkBody"},{"$ref":"#/components/schemas/LinkResponse"}]},"LinkBody":{"type":"object","properties":{"domain":{"type":"string","description":"The domain of the short link."},"key":{"type":"string","description":"The short link slug. If not provided, a random 7-character slug will be generated."},"url":{"type":"string","description":"The destination URL of the short link."},"archived":{"type":"boolean","description":"Whether the short link is archived.","default":false},"expiresAt":{"type":"string","format":"date-time","description":"The date and time when the short link will expire in ISO-8601 format. Must be in the future.","default":null,"nullable":true},"password":{"type":"string","description":"The password required to access the destination URL of the short link.","default":null,"nullable":true},"proxy":{"type":"boolean","description":"Whether the short link uses Custom Social Media Cards feature.","default":false},"title":{"type":"string","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.","default":null,"nullable":true},"description":{"type":"string","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.","default":null,"nullable":true},"image":{"type":"string","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.","default":null,"nullable":true},"rewrite":{"type":"boolean","description":"Whether the short link uses link cloaking.","default":false},"ios":{"type":"string","description":"The iOS destination URL for the short link for iOS device targeting.","default":null,"nullable":true},"android":{"type":"string","description":"The Android destination URL for the short link for Android device targeting.","default":null,"nullable":true},"geo":{"type":"object","description":"Geo targeting information for the short link in JSON format {[COUNTRY]: \"https://example.com\" }. Learn more: https://dub.sh/geo","additionalProperties":{"type":"string","format":"uri"},"default":null,"nullable":true},"publicStats":{"type":"boolean","description":"Whether the short link's stats are publicly accessible.","default":false},"tagId":{"type":"string","format":"cuid","description":"The unique id of the tag assigned to the short link.","default":null,"nullable":true},"comments":{"type":"string","description":"The comments for the short link.","default":null,"nullable":true}}},"LinkResponse":{"type":"object","properties":{"utm_source":{"type":"string","description":"The UTM source of the short link.","default":null,"nullable":true},"utm_medium":{"type":"string","description":"The UTM medium of the short link.","default":null,"nullable":true},"utm_campaign":{"type":"string","description":"The UTM campaign of the short link.","default":null,"nullable":true},"utm_term":{"type":"string","description":"The UTM term of the short link.","default":null,"nullable":true},"utm_content":{"type":"string","description":"The UTM content of the short link.","default":null,"nullable":true},"userId":{"type":"string","format":"cuid","description":"The user ID of the creator of the short link."},"projectId":{"type":"string","format":"cuid","description":"The project ID of the short link."},"clicks":{"type":"number","description":"The number of clicks on the short link.","default":0,"readOnly":true},"lastClicked":{"type":"string","format":"date-time","description":"The date and time when the short link was last clicked.","default":null,"nullable":true,"readOnly":true},"createdAt":{"type":"string","format":"date-time","description":"The date and time when the short link was created.","readOnly":true},"updatedAt":{"type":"string","format":"date-time","description":"The date and time when the short link was last updated.","readOnly":true}}},"Project":{"type":"object","properties":{"id":{"type":"string","format":"cuid","description":"The unique ID of the project."},"name":{"type":"string","description":"The name of the project."},"slug":{"type":"string","description":"The slug of the project."},"logo":{"type":"string","description":"The logo of the project.","default":null,"nullable":true},"usage":{"type":"number","description":"The usage of the project.","default":0,"readOnly":true},"usageLimit":{"type":"number","description":"The usage limit of the project.","default":0,"readOnly":true},"plan":{"type":"string","description":"The plan of the project.","default":"free","readOnly":true},"stripeId":{"type":"string","description":"The Stripe ID of the project.","default":null,"nullable":true,"readOnly":true},"billingCycleStart":{"type":"number","description":"The date and time when the billing cycle starts for the project.","default":null,"nullable":true,"readOnly":true},"createdAt":{"type":"string","format":"date-time","description":"The date and time when the project was created.","readOnly":true}}},"ProjectDetails":{"allOf":[{"$ref":"#/components/schemas/Project"},{"type":"object","properties":{"users":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","description":"The role of the authenticated user in the project."}},"description":"The role of the authenticated user in the project."},"description":"The role of the authenticated user in the project."},"domains":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"The domain of the project."}},"description":"The domains of the project."},"description":"The domains of the project."}}}]},"Tag":{"type":"object","properties":{"id":{"type":"string","format":"cuid","description":"The unique ID of the tag."},"name":{"type":"string","description":"The name of the tag."},"color":{"type":"string","description":"The color of the tag."}}}},"securitySchemes":{"bearerToken":{"type":"http","description":"Default authentication mechanism","scheme":"bearer"}}}}