{"openapi":"3.0.3","info":{"title":"Lynkr API","description":"Lynkr is the link attribution platform for short links, conversion tracking, and affiliate programs.","version":"0.0.1","contact":{"name":"Lynkr Support","email":"support@lynkr.cc","url":"https://lynkr.cc/support"},"license":{"name":"AGPL-3.0 license","url":"https://github.com/dubinc/dub/blob/main/LICENSE.md"}},"servers":[{"url":"https://api.lynkr.cc","description":"Production API"}],"paths":{"/links":{"post":{"operationId":"createLink","x-speakeasy-name-override":"create","x-speakeasy-usage-example":true,"summary":"Create a link","description":"Create a link for the authenticated workspace.","tags":["Links"],"security":[{"token":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"description":"The destination URL of the short link.","example":"https://google.com","maxLength":32000,"type":"string"},"domain":{"description":"The domain of the short link (without protocol). If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains).","type":"string","maxLength":190},"key":{"description":"The short link slug. If not provided, a random 7-character slug will be generated.","type":"string","maxLength":190},"keyLength":{"description":"The length of the short link slug. Defaults to 7 if not provided. When used with `prefix`, the total length of the key will be `prefix.length + keyLength`.","type":"number","minimum":3,"maximum":190},"externalId":{"description":"The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace.","example":"123456","nullable":true,"type":"string","minLength":1,"maxLength":255},"tenantId":{"description":"The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant.","nullable":true,"type":"string","maxLength":255},"programId":{"description":"The ID of the program the short link is associated with.","nullable":true,"type":"string"},"partnerId":{"description":"The ID of the partner the short link is associated with.","nullable":true,"type":"string"},"prefix":{"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.","type":"string"},"trackConversion":{"description":"Whether to track conversions for the short link. Defaults to `false` if not provided.","type":"boolean"},"archived":{"description":"Whether the short link is archived. Defaults to `false` if not provided.","type":"boolean"},"tagIds":{"description":"The unique IDs of the tags assigned to the short link.","example":["clux0rgak00011..."],"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"tagNames":{"description":"The unique name of the tags assigned to the short link (case insensitive).","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"folderId":{"description":"The unique ID existing folder to assign the short link to.","nullable":true,"type":"string"},"comments":{"description":"The comments for the short link.","nullable":true,"type":"string"},"expiresAt":{"description":"The date and time when the short link will expire at.","nullable":true,"type":"string"},"expiredUrl":{"description":"The URL to redirect to when the short link has expired.","maxLength":32000,"nullable":true,"type":"string"},"password":{"description":"The password required to access the destination URL of the short link.","nullable":true,"type":"string"},"proxy":{"description":"Whether the short link uses Custom Link Previews feature. Defaults to `false` if not provided.","type":"boolean"},"title":{"description":"The custom link preview title (og:title). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"description":{"description":"The custom link preview description (og:description). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"image":{"description":"The custom link preview image (og:image). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"video":{"description":"The custom link preview video (og:video). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"rewrite":{"description":"Whether the short link uses link cloaking. Defaults to `false` if not provided.","type":"boolean"},"ios":{"description":"The iOS destination URL for the short link for iOS device targeting.","nullable":true,"type":"string","maxLength":32000},"android":{"description":"The Android destination URL for the short link for Android device targeting.","nullable":true,"type":"string","maxLength":32000},"geo":{"$ref":"#/components/schemas/linkGeoTargeting"},"doIndex":{"description":"Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex","type":"boolean"},"utm_source":{"description":"The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL.","nullable":true,"type":"string"},"utm_medium":{"description":"The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL.","nullable":true,"type":"string"},"utm_campaign":{"description":"The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL.","nullable":true,"type":"string"},"utm_term":{"description":"The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL.","nullable":true,"type":"string"},"utm_content":{"description":"The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL.","nullable":true,"type":"string"},"ref":{"description":"The referral tag of the short link. If set, this will populate or override the `ref` query parameter in the destination URL.","nullable":true,"type":"string"},"webhookIds":{"description":"An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data.","nullable":true,"type":"array","items":{"type":"string"}},"testVariants":{"nullable":true,"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"percentage":{"type":"number","minimum":10,"maximum":90}},"required":["url","percentage"]},"description":"An array of A/B test URLs and the percentage of traffic to send to each URL.","example":[{"url":"https://example.com/variant-1","percentage":50},{"url":"https://example.com/variant-2","percentage":50}]},"testStartedAt":{"description":"The date and time when the tests started.","nullable":true,"type":"string"},"testCompletedAt":{"description":"The date and time when the tests were or will be completed.","nullable":true,"type":"string"},"publicStats":{"description":"Deprecated: Use `dashboard` instead. Whether the short link's stats are publicly accessible. Defaults to `false` if not provided.","deprecated":true,"type":"boolean"},"tagId":{"description":"Deprecated: Use `tagIds` instead. The unique ID of the tag assigned to the short link.","deprecated":true,"nullable":true,"type":"string"}},"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","x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"pageSize","in":"parameters","type":"limit"}],"outputs":{"results":"$"}},"summary":"Retrieve a list of links","description":"Retrieve a paginated list of links for the authenticated workspace.","tags":["Links"],"security":[{"token":[]}],"parameters":[{"in":"query","name":"domain","schema":{"description":"The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned.","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","schema":{"description":"Deprecated: Use `tagIds` instead. The tag ID to filter the links by.","deprecated":true,"type":"string"},"description":"Deprecated: Use `tagIds` instead. The tag ID to filter the links by."},{"in":"query","name":"tagIds","schema":{"description":"The tag IDs to filter the links by.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"style":"form","explode":false,"description":"The tag IDs to filter the links by."},{"in":"query","name":"tagNames","schema":{"description":"The unique name of the tags assigned to the short link (case insensitive).","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"style":"form","explode":false,"description":"The unique name of the tags assigned to the short link (case insensitive)."},{"in":"query","name":"folderId","schema":{"description":"The folder ID to filter the links by.","type":"string"},"description":"The folder ID to filter the links by."},{"in":"query","name":"search","schema":{"description":"The search term to filter the links by. The search term will be matched against the short link slug and the destination url.","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","schema":{"description":"The user ID to filter the links by.","type":"string"},"description":"The user ID to filter the links by."},{"in":"query","name":"tenantId","schema":{"description":"The ID of the tenant that created the link inside your system. If set, will only return links for the specified tenant.","type":"string"},"description":"The ID of the tenant that created the link inside your system. If set, will only return links for the specified tenant."},{"in":"query","name":"showArchived","schema":{"default":false,"description":"Whether to include archived links in the response. Defaults to `false` if not provided.","type":"boolean"},"description":"Whether to include archived links in the response. Defaults to `false` if not provided."},{"in":"query","name":"withTags","schema":{"default":false,"description":"DEPRECATED. Filter for links that have at least one tag assigned to them.","deprecated":true,"type":"boolean"},"description":"DEPRECATED. Filter for links that have at least one tag assigned to them."},{"in":"query","name":"sortBy","schema":{"default":"createdAt","description":"The field to sort the links by. The default is `createdAt`.","type":"string","enum":["createdAt","clicks","saleAmount","lastClicked"]},"description":"The field to sort the links by. The default is `createdAt`."},{"in":"query","name":"sortOrder","schema":{"default":"desc","description":"The sort order. The default is `desc`.","type":"string","enum":["asc","desc"]},"description":"The sort order. The default is `desc`."},{"in":"query","name":"sort","schema":{"default":"createdAt","description":"DEPRECATED. Use `sortBy` instead.","deprecated":true,"type":"string","enum":["createdAt","clicks","saleAmount","lastClicked"]},"description":"DEPRECATED. Use `sortBy` instead."},{"in":"query","name":"page","schema":{"default":1,"description":"The page number for pagination.","example":1,"type":"number","minimum":0,"exclusiveMinimum":true},"description":"The page number for pagination."},{"in":"query","name":"pageSize","schema":{"default":100,"description":"The number of items per page.","example":50,"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":100},"description":"The number of items per page."}],"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 links count","description":"Retrieve the number of links for the authenticated workspace.","tags":["Links"],"security":[{"token":[]}],"parameters":[{"in":"query","name":"domain","schema":{"description":"The domain to filter the links by. E.g. `ac.me`. If not provided, all links for the workspace will be returned.","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","schema":{"description":"Deprecated: Use `tagIds` instead. The tag ID to filter the links by.","deprecated":true,"type":"string"},"description":"Deprecated: Use `tagIds` instead. The tag ID to filter the links by."},{"in":"query","name":"tagIds","schema":{"description":"The tag IDs to filter the links by.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"style":"form","explode":false,"description":"The tag IDs to filter the links by."},{"in":"query","name":"tagNames","schema":{"description":"The unique name of the tags assigned to the short link (case insensitive).","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"style":"form","explode":false,"description":"The unique name of the tags assigned to the short link (case insensitive)."},{"in":"query","name":"folderId","schema":{"description":"The folder ID to filter the links by.","type":"string"},"description":"The folder ID to filter the links by."},{"in":"query","name":"search","schema":{"description":"The search term to filter the links by. The search term will be matched against the short link slug and the destination url.","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","schema":{"description":"The user ID to filter the links by.","type":"string"},"description":"The user ID to filter the links by."},{"in":"query","name":"tenantId","schema":{"description":"The ID of the tenant that created the link inside your system. If set, will only return links for the specified tenant.","type":"string"},"description":"The ID of the tenant that created the link inside your system. If set, will only return links for the specified tenant."},{"in":"query","name":"showArchived","schema":{"default":false,"description":"Whether to include archived links in the response. Defaults to `false` if not provided.","type":"boolean"},"description":"Whether to include archived links in the response. Defaults to `false` if not provided."},{"in":"query","name":"withTags","schema":{"default":false,"description":"DEPRECATED. Filter for links that have at least one tag assigned to them.","deprecated":true,"type":"boolean"},"description":"DEPRECATED. Filter for links that have at least one tag assigned to them."},{"in":"query","name":"groupBy","schema":{"description":"The field to group the links by.","anyOf":[{"type":"string","enum":["domain"]},{"type":"string","enum":["tagId"]},{"type":"string","enum":["userId"]},{"type":"string","enum":["folderId"]}]},"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":"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","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","schema":{"description":"The unique ID of the short link.","example":"clux0rgak00011...","type":"string"},"description":"The unique ID of the short link."},{"in":"query","name":"externalId","schema":{"description":"This is the ID of the link in the your database.","example":"123456","type":"string"},"description":"This is the ID of the link in the your database."}],"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","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,"description":"The id of the link to update. You may use either `linkId` (obtained via `/links/info` endpoint) or `externalId` prefixed with `ext_`."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"description":"The destination URL of the short link.","example":"https://google.com","maxLength":32000,"type":"string"},"domain":{"description":"The domain of the short link (without protocol). If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains).","type":"string","maxLength":190},"key":{"description":"The short link slug. If not provided, a random 7-character slug will be generated.","type":"string","maxLength":190},"externalId":{"description":"The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace.","example":"123456","nullable":true,"type":"string","minLength":1,"maxLength":255},"tenantId":{"description":"The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant.","nullable":true,"type":"string","maxLength":255},"programId":{"description":"The ID of the program the short link is associated with.","nullable":true,"type":"string"},"partnerId":{"description":"The ID of the partner the short link is associated with.","nullable":true,"type":"string"},"trackConversion":{"description":"Whether to track conversions for the short link. Defaults to `false` if not provided.","type":"boolean"},"archived":{"description":"Whether the short link is archived. Defaults to `false` if not provided.","type":"boolean"},"tagIds":{"description":"The unique IDs of the tags assigned to the short link.","example":["clux0rgak00011..."],"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"tagNames":{"description":"The unique name of the tags assigned to the short link (case insensitive).","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"folderId":{"description":"The unique ID existing folder to assign the short link to.","nullable":true,"type":"string"},"comments":{"description":"The comments for the short link.","nullable":true,"type":"string"},"expiresAt":{"description":"The date and time when the short link will expire at.","nullable":true,"type":"string"},"expiredUrl":{"description":"The URL to redirect to when the short link has expired.","maxLength":32000,"nullable":true,"type":"string"},"password":{"description":"The password required to access the destination URL of the short link.","nullable":true,"type":"string"},"proxy":{"description":"Whether the short link uses Custom Link Previews feature. Defaults to `false` if not provided.","type":"boolean"},"title":{"description":"The custom link preview title (og:title). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"description":{"description":"The custom link preview description (og:description). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"image":{"nullable":true,"anyOf":[{"type":"string","pattern":"^data:image\\/(png|jpeg|jpg|gif|webp);base64,"},{"type":"string","format":"uri"}]},"video":{"description":"The custom link preview video (og:video). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"rewrite":{"description":"Whether the short link uses link cloaking. Defaults to `false` if not provided.","type":"boolean"},"ios":{"description":"The iOS destination URL for the short link for iOS device targeting.","nullable":true,"type":"string","maxLength":32000},"android":{"description":"The Android destination URL for the short link for Android device targeting.","nullable":true,"type":"string","maxLength":32000},"geo":{"allOf":[{"$ref":"#/components/schemas/linkGeoTargeting"}]},"doIndex":{"description":"Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex","type":"boolean"},"utm_source":{"description":"The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL.","nullable":true,"type":"string"},"utm_medium":{"description":"The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL.","nullable":true,"type":"string"},"utm_campaign":{"description":"The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL.","nullable":true,"type":"string"},"utm_term":{"description":"The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL.","nullable":true,"type":"string"},"utm_content":{"description":"The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL.","nullable":true,"type":"string"},"ref":{"description":"The referral tag of the short link. If set, this will populate or override the `ref` query parameter in the destination URL.","nullable":true,"type":"string"},"webhookIds":{"description":"An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data.","nullable":true,"type":"array","items":{"type":"string"}},"testVariants":{"nullable":true,"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"percentage":{"type":"number","minimum":10,"maximum":90}},"required":["url","percentage"]},"description":"An array of A/B test URLs and the percentage of traffic to send to each URL.","example":[{"url":"https://example.com/variant-1","percentage":50},{"url":"https://example.com/variant-2","percentage":50}]},"testStartedAt":{"description":"The date and time when the tests started.","nullable":true,"type":"string"},"testCompletedAt":{"description":"The date and time when the tests were or will be completed.","nullable":true,"type":"string"},"publicStats":{"description":"Deprecated: Use `dashboard` instead. Whether the short link's stats are publicly accessible. Defaults to `false` if not provided.","deprecated":true,"type":"boolean"},"tagId":{"description":"Deprecated: Use `tagIds` instead. The unique ID of the tag assigned to the short link.","deprecated":true,"nullable":true,"type":"string"}}}}}},"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","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,"description":"The id of the link to delete. You may use either `linkId` (obtained via `/links/info` endpoint) or `externalId` prefixed with `ext_`."}],"responses":{"200":{"description":"The deleted link ID.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the link."}},"required":["id"],"additionalProperties":false}}}},"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":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"url":{"description":"The destination URL of the short link.","example":"https://google.com","maxLength":32000,"type":"string"},"domain":{"description":"The domain of the short link (without protocol). If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains).","type":"string","maxLength":190},"key":{"description":"The short link slug. If not provided, a random 7-character slug will be generated.","type":"string","maxLength":190},"keyLength":{"description":"The length of the short link slug. Defaults to 7 if not provided. When used with `prefix`, the total length of the key will be `prefix.length + keyLength`.","type":"number","minimum":3,"maximum":190},"externalId":{"description":"The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace.","example":"123456","nullable":true,"type":"string","minLength":1,"maxLength":255},"tenantId":{"description":"The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant.","nullable":true,"type":"string","maxLength":255},"programId":{"description":"The ID of the program the short link is associated with.","nullable":true,"type":"string"},"partnerId":{"description":"The ID of the partner the short link is associated with.","nullable":true,"type":"string"},"prefix":{"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.","type":"string"},"trackConversion":{"description":"Whether to track conversions for the short link. Defaults to `false` if not provided.","type":"boolean"},"archived":{"description":"Whether the short link is archived. Defaults to `false` if not provided.","type":"boolean"},"tagIds":{"description":"The unique IDs of the tags assigned to the short link.","example":["clux0rgak00011..."],"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"tagNames":{"description":"The unique name of the tags assigned to the short link (case insensitive).","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"folderId":{"description":"The unique ID existing folder to assign the short link to.","nullable":true,"type":"string"},"comments":{"description":"The comments for the short link.","nullable":true,"type":"string"},"expiresAt":{"description":"The date and time when the short link will expire at.","nullable":true,"type":"string"},"expiredUrl":{"description":"The URL to redirect to when the short link has expired.","maxLength":32000,"nullable":true,"type":"string"},"password":{"description":"The password required to access the destination URL of the short link.","nullable":true,"type":"string"},"proxy":{"description":"Whether the short link uses Custom Link Previews feature. Defaults to `false` if not provided.","type":"boolean"},"title":{"description":"The custom link preview title (og:title). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"description":{"description":"The custom link preview description (og:description). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"image":{"description":"The custom link preview image (og:image). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"video":{"description":"The custom link preview video (og:video). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"rewrite":{"description":"Whether the short link uses link cloaking. Defaults to `false` if not provided.","type":"boolean"},"ios":{"description":"The iOS destination URL for the short link for iOS device targeting.","nullable":true,"type":"string","maxLength":32000},"android":{"description":"The Android destination URL for the short link for Android device targeting.","nullable":true,"type":"string","maxLength":32000},"geo":{"$ref":"#/components/schemas/linkGeoTargeting"},"doIndex":{"description":"Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex","type":"boolean"},"utm_source":{"description":"The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL.","nullable":true,"type":"string"},"utm_medium":{"description":"The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL.","nullable":true,"type":"string"},"utm_campaign":{"description":"The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL.","nullable":true,"type":"string"},"utm_term":{"description":"The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL.","nullable":true,"type":"string"},"utm_content":{"description":"The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL.","nullable":true,"type":"string"},"ref":{"description":"The referral tag of the short link. If set, this will populate or override the `ref` query parameter in the destination URL.","nullable":true,"type":"string"},"webhookIds":{"description":"An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data.","nullable":true,"type":"array","items":{"type":"string"}},"testVariants":{"nullable":true,"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"percentage":{"type":"number","minimum":10,"maximum":90}},"required":["url","percentage"]},"description":"An array of A/B test URLs and the percentage of traffic to send to each URL.","example":[{"url":"https://example.com/variant-1","percentage":50},{"url":"https://example.com/variant-2","percentage":50}]},"testStartedAt":{"description":"The date and time when the tests started.","nullable":true,"type":"string"},"testCompletedAt":{"description":"The date and time when the tests were or will be completed.","nullable":true,"type":"string"},"publicStats":{"description":"Deprecated: Use `dashboard` instead. Whether the short link's stats are publicly accessible. Defaults to `false` if not provided.","deprecated":true,"type":"boolean"},"tagId":{"description":"Deprecated: Use `tagIds` instead. The unique ID of the tag assigned to the short link.","deprecated":true,"nullable":true,"type":"string"}},"required":["url"]}}}}},"responses":{"200":{"description":"The created links","content":{"application/json":{"schema":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/LinkSchema"},{"$ref":"#/components/schemas/LinkErrorSchema"}]}}}}},"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"}}},"patch":{"operationId":"bulkUpdateLinks","x-speakeasy-name-override":"updateMany","summary":"Bulk update links","description":"Bulk update up to 100 links with the same data for the authenticated workspace.","tags":["Links"],"security":[{"token":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"linkIds":{"default":[],"maxItems":100,"type":"array","items":{"type":"string"},"description":"The IDs of the links to update. Takes precedence over `externalIds`."},"externalIds":{"default":[],"maxItems":100,"type":"array","items":{"type":"string"},"description":"The external IDs of the links to update as stored in your database."},"data":{"type":"object","properties":{"url":{"description":"The destination URL of the short link.","example":"https://google.com","type":"string","maxLength":32000},"tenantId":{"description":"The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant.","nullable":true,"type":"string","maxLength":255},"programId":{"description":"The ID of the program the short link is associated with.","nullable":true,"type":"string"},"partnerId":{"description":"The ID of the partner the short link is associated with.","nullable":true,"type":"string"},"trackConversion":{"description":"Whether to track conversions for the short link. Defaults to `false` if not provided.","type":"boolean"},"archived":{"description":"Whether the short link is archived. Defaults to `false` if not provided.","type":"boolean"},"tagIds":{"description":"The unique IDs of the tags assigned to the short link.","example":["clux0rgak00011..."],"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"tagNames":{"description":"The unique name of the tags assigned to the short link (case insensitive).","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"folderId":{"description":"The unique ID existing folder to assign the short link to.","nullable":true,"type":"string"},"comments":{"description":"The comments for the short link.","nullable":true,"type":"string"},"expiresAt":{"description":"The date and time when the short link will expire at.","nullable":true,"type":"string"},"expiredUrl":{"description":"The URL to redirect to when the short link has expired.","maxLength":32000,"nullable":true,"type":"string"},"password":{"description":"The password required to access the destination URL of the short link.","nullable":true,"type":"string"},"proxy":{"description":"Whether the short link uses Custom Link Previews feature. Defaults to `false` if not provided.","type":"boolean"},"title":{"description":"The custom link preview title (og:title). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"description":{"description":"The custom link preview description (og:description). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"image":{"description":"The custom link preview image (og:image). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"video":{"description":"The custom link preview video (og:video). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"rewrite":{"description":"Whether the short link uses link cloaking. Defaults to `false` if not provided.","type":"boolean"},"ios":{"description":"The iOS destination URL for the short link for iOS device targeting.","nullable":true,"type":"string","maxLength":32000},"android":{"description":"The Android destination URL for the short link for Android device targeting.","nullable":true,"type":"string","maxLength":32000},"geo":{"$ref":"#/components/schemas/linkGeoTargeting"},"doIndex":{"description":"Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex","type":"boolean"},"utm_source":{"description":"The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL.","nullable":true,"type":"string"},"utm_medium":{"description":"The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL.","nullable":true,"type":"string"},"utm_campaign":{"description":"The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL.","nullable":true,"type":"string"},"utm_term":{"description":"The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL.","nullable":true,"type":"string"},"utm_content":{"description":"The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL.","nullable":true,"type":"string"},"ref":{"description":"The referral tag of the short link. If set, this will populate or override the `ref` query parameter in the destination URL.","nullable":true,"type":"string"},"webhookIds":{"description":"An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data.","nullable":true,"type":"array","items":{"type":"string"}},"testVariants":{"nullable":true,"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"percentage":{"type":"number","minimum":10,"maximum":90}},"required":["url","percentage"]},"description":"An array of A/B test URLs and the percentage of traffic to send to each URL.","example":[{"url":"https://example.com/variant-1","percentage":50},{"url":"https://example.com/variant-2","percentage":50}]},"testStartedAt":{"description":"The date and time when the tests started.","nullable":true,"type":"string"},"testCompletedAt":{"description":"The date and time when the tests were or will be completed.","nullable":true,"type":"string"},"publicStats":{"description":"Deprecated: Use `dashboard` instead. Whether the short link's stats are publicly accessible. Defaults to `false` if not provided.","deprecated":true,"type":"boolean"},"tagId":{"description":"Deprecated: Use `tagIds` instead. The unique ID of the tag assigned to the short link.","deprecated":true,"nullable":true,"type":"string"}}}},"required":["data"]}}}},"responses":{"200":{"description":"The updated 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"}}},"delete":{"operationId":"bulkDeleteLinks","x-speakeasy-name-override":"deleteMany","summary":"Bulk delete links","description":"Bulk delete up to 100 links for the authenticated workspace.","tags":["Links"],"security":[{"token":[]}],"parameters":[{"in":"query","name":"linkIds","schema":{"type":"array","items":{"type":"string"},"example":["clux0rgak00011...","clux0rgak00022..."],"description":"Comma-separated list of link IDs to delete. Maximum of 100 IDs. Non-existing IDs will be ignored."},"explode":false,"style":"form","required":true,"description":"Comma-separated list of link IDs to delete. Maximum of 100 IDs. Non-existing IDs will be ignored."}],"responses":{"200":{"description":"The deleted links count.","content":{"application/json":{"schema":{"type":"object","properties":{"deletedCount":{"type":"number","description":"The number of links deleted."}},"required":["deletedCount"],"additionalProperties":false}}}},"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":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"description":"The destination URL of the short link.","example":"https://google.com","maxLength":32000,"type":"string"},"domain":{"description":"The domain of the short link (without protocol). If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains).","type":"string","maxLength":190},"key":{"description":"The short link slug. If not provided, a random 7-character slug will be generated.","type":"string","maxLength":190},"keyLength":{"description":"The length of the short link slug. Defaults to 7 if not provided. When used with `prefix`, the total length of the key will be `prefix.length + keyLength`.","type":"number","minimum":3,"maximum":190},"externalId":{"description":"The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace.","example":"123456","nullable":true,"type":"string","minLength":1,"maxLength":255},"tenantId":{"description":"The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant.","nullable":true,"type":"string","maxLength":255},"programId":{"description":"The ID of the program the short link is associated with.","nullable":true,"type":"string"},"partnerId":{"description":"The ID of the partner the short link is associated with.","nullable":true,"type":"string"},"prefix":{"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.","type":"string"},"trackConversion":{"description":"Whether to track conversions for the short link. Defaults to `false` if not provided.","type":"boolean"},"archived":{"description":"Whether the short link is archived. Defaults to `false` if not provided.","type":"boolean"},"tagIds":{"description":"The unique IDs of the tags assigned to the short link.","example":["clux0rgak00011..."],"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"tagNames":{"description":"The unique name of the tags assigned to the short link (case insensitive).","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"folderId":{"description":"The unique ID existing folder to assign the short link to.","nullable":true,"type":"string"},"comments":{"description":"The comments for the short link.","nullable":true,"type":"string"},"expiresAt":{"description":"The date and time when the short link will expire at.","nullable":true,"type":"string"},"expiredUrl":{"description":"The URL to redirect to when the short link has expired.","maxLength":32000,"nullable":true,"type":"string"},"password":{"description":"The password required to access the destination URL of the short link.","nullable":true,"type":"string"},"proxy":{"description":"Whether the short link uses Custom Link Previews feature. Defaults to `false` if not provided.","type":"boolean"},"title":{"description":"The custom link preview title (og:title). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"description":{"description":"The custom link preview description (og:description). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"image":{"description":"The custom link preview image (og:image). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"video":{"description":"The custom link preview video (og:video). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"rewrite":{"description":"Whether the short link uses link cloaking. Defaults to `false` if not provided.","type":"boolean"},"ios":{"description":"The iOS destination URL for the short link for iOS device targeting.","nullable":true,"type":"string","maxLength":32000},"android":{"description":"The Android destination URL for the short link for Android device targeting.","nullable":true,"type":"string","maxLength":32000},"geo":{"$ref":"#/components/schemas/linkGeoTargeting"},"doIndex":{"description":"Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex","type":"boolean"},"utm_source":{"description":"The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL.","nullable":true,"type":"string"},"utm_medium":{"description":"The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL.","nullable":true,"type":"string"},"utm_campaign":{"description":"The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL.","nullable":true,"type":"string"},"utm_term":{"description":"The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL.","nullable":true,"type":"string"},"utm_content":{"description":"The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL.","nullable":true,"type":"string"},"ref":{"description":"The referral tag of the short link. If set, this will populate or override the `ref` query parameter in the destination URL.","nullable":true,"type":"string"},"webhookIds":{"description":"An array of webhook IDs to trigger when the link is clicked. These webhooks will receive click event data.","nullable":true,"type":"array","items":{"type":"string"}},"testVariants":{"nullable":true,"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"percentage":{"type":"number","minimum":10,"maximum":90}},"required":["url","percentage"]},"description":"An array of A/B test URLs and the percentage of traffic to send to each URL.","example":[{"url":"https://example.com/variant-1","percentage":50},{"url":"https://example.com/variant-2","percentage":50}]},"testStartedAt":{"description":"The date and time when the tests started.","nullable":true,"type":"string"},"testCompletedAt":{"description":"The date and time when the tests were or will be completed.","nullable":true,"type":"string"},"publicStats":{"description":"Deprecated: Use `dashboard` instead. Whether the short link's stats are publicly accessible. Defaults to `false` if not provided.","deprecated":true,"type":"boolean"},"tagId":{"description":"Deprecated: Use `tagIds` instead. The unique ID of the tag assigned to the short link.","deprecated":true,"nullable":true,"type":"string"}},"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"}}}},"/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":"event","schema":{"default":"clicks","description":"The type of event to retrieve analytics for. Defaults to `clicks`.","example":"leads","type":"string","enum":["clicks","leads","sales","composite"]},"description":"The type of event to retrieve analytics for. Defaults to `clicks`."},{"in":"query","name":"groupBy","schema":{"default":"count","description":"The parameter to group the analytics data points by. Defaults to `count` if undefined.","type":"string","enum":["count","timeseries","continents","regions","countries","cities","devices","browsers","os","trigger","triggers","referers","referer_urls","top_folders","top_link_tags","top_domains","top_links","top_urls","top_base_urls","top_partners","top_groups","utm_sources","utm_mediums","utm_campaigns","utm_terms","utm_contents"]},"description":"The parameter to group the analytics data points by. Defaults to `count` if undefined."},{"in":"query","name":"domain","schema":{"description":"The domain to filter analytics for.","type":"string"},"description":"The domain to filter analytics for."},{"in":"query","name":"key","schema":{"description":"The slug of the short link to retrieve analytics for. Must be used along with the corresponding `domain` of the short link to fetch analytics for a specific short link.","type":"string"},"description":"The slug of the short link to retrieve analytics for. Must be used along with the corresponding `domain` of the short link to fetch analytics for a specific short link."},{"in":"query","name":"linkId","schema":{"description":"The unique ID of the short link on Dub to retrieve analytics for.","type":"string"},"description":"The unique ID of the short link on Dub to retrieve analytics for."},{"in":"query","name":"externalId","schema":{"description":"The ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter.","type":"string"},"description":"The ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter."},{"in":"query","name":"tenantId","schema":{"description":"The ID of the tenant that created the link inside your system.","type":"string"},"description":"The ID of the tenant that created the link inside your system."},{"in":"query","name":"programId","schema":{"description":"The ID of the program to retrieve analytics for.","type":"string"},"description":"The ID of the program to retrieve analytics for."},{"in":"query","name":"partnerId","schema":{"description":"The ID of the partner to retrieve analytics for.","type":"string"},"description":"The ID of the partner to retrieve analytics for."},{"in":"query","name":"customerId","schema":{"description":"The ID of the customer to retrieve analytics for.","type":"string"},"description":"The ID of the customer to retrieve analytics for."},{"in":"query","name":"interval","schema":{"description":"The interval to retrieve analytics for. If undefined, defaults to 24h.","type":"string","enum":["24h","7d","30d","90d","1y","mtd","qtd","ytd","all"]},"description":"The interval to retrieve analytics for. If undefined, defaults to 24h."},{"in":"query","name":"start","schema":{"description":"The start date and time when to retrieve analytics from. If set, takes precedence over `interval`.","type":"string"},"description":"The start date and time when to retrieve analytics from. If set, takes precedence over `interval`."},{"in":"query","name":"end","schema":{"description":"The end date and time when to retrieve analytics from. If not provided, defaults to the current date. If set along with `start`, takes precedence over `interval`.","type":"string"},"description":"The end date and time when to retrieve analytics from. If not provided, defaults to the current date. If set along with `start`, takes precedence over `interval`."},{"in":"query","name":"timezone","schema":{"description":"The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC.","example":"America/New_York","default":"UTC","type":"string"},"description":"The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC."},{"in":"query","name":"country","schema":{"description":"The country to retrieve analytics for. Must be passed as a 2-letter ISO 3166-1 country code. See https://d.to/geo for more information.","type":"string"},"description":"The country to retrieve analytics for. Must be passed as a 2-letter ISO 3166-1 country code. See https://d.to/geo for more information."},{"in":"query","name":"city","schema":{"description":"The city to retrieve analytics for.","example":"New York","type":"string"},"description":"The city to retrieve analytics for."},{"in":"query","name":"region","schema":{"description":"The ISO 3166-2 region code to retrieve analytics for.","type":"string"},"description":"The ISO 3166-2 region code to retrieve analytics for."},{"in":"query","name":"continent","schema":{"description":"The continent to retrieve analytics for.","type":"string","enum":["AF","AN","AS","EU","NA","OC","SA"]},"description":"The continent to retrieve analytics for."},{"in":"query","name":"device","schema":{"description":"The device to retrieve analytics for.","example":"Desktop","type":"string"},"description":"The device to retrieve analytics for."},{"in":"query","name":"browser","schema":{"description":"The browser to retrieve analytics for.","example":"Chrome","type":"string"},"description":"The browser to retrieve analytics for."},{"in":"query","name":"os","schema":{"description":"The OS to retrieve analytics for.","example":"Windows","type":"string"},"description":"The OS to retrieve analytics for."},{"in":"query","name":"trigger","schema":{"description":"The trigger to retrieve analytics for. If undefined, returns all trigger types.","type":"string","enum":["qr","link","pageview","deeplink"]},"description":"The trigger to retrieve analytics for. If undefined, returns all trigger types."},{"in":"query","name":"referer","schema":{"description":"The referer hostname to retrieve analytics for.","example":"google.com","type":"string"},"description":"The referer hostname to retrieve analytics for."},{"in":"query","name":"refererUrl","schema":{"description":"The full referer URL to retrieve analytics for.","example":"https://lynkr.cc/blog","type":"string"},"description":"The full referer URL to retrieve analytics for."},{"in":"query","name":"url","schema":{"description":"The URL to retrieve analytics for.","type":"string"},"description":"The URL to retrieve analytics for."},{"in":"query","name":"tagIds","schema":{"description":"The tag IDs to retrieve analytics for.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"description":"The tag IDs to retrieve analytics for."},{"in":"query","name":"folderId","schema":{"description":"The folder ID to retrieve analytics for. If not provided, return analytics for unsorted links.","type":"string"},"description":"The folder ID to retrieve analytics for. If not provided, return analytics for unsorted links."},{"in":"query","name":"groupId","schema":{"description":"The group ID to retrieve analytics for.","type":"string"},"description":"The group ID to retrieve analytics for."},{"in":"query","name":"root","schema":{"description":"Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both.","type":"boolean"},"description":"Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both."},{"in":"query","name":"saleType","schema":{"description":"Filter sales by type: 'new' for first-time purchases, 'recurring' for repeat purchases. If undefined, returns both.","type":"string","enum":["new","recurring"]},"description":"Filter sales by type: 'new' for first-time purchases, 'recurring' for repeat purchases. If undefined, returns both."},{"in":"query","name":"query","schema":{"description":"Search the events by a custom metadata value. Only available for lead and sale events.","example":"metadata['key']:'value'","type":"string","maxLength":10000},"description":"Search the events by a custom metadata value. Only available for lead and sale events."},{"in":"query","name":"tagId","schema":{"description":"Deprecated: Use `tagIds` instead. The tag ID to retrieve analytics for.","deprecated":true,"type":"string"},"description":"Deprecated: Use `tagIds` instead. The tag ID to retrieve analytics for."},{"in":"query","name":"qr","schema":{"description":"Deprecated: Use the `trigger` field instead. Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both.","deprecated":true,"type":"boolean"},"description":"Deprecated: Use the `trigger` field instead. 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":"utm_source","schema":{"description":"The UTM source of the short link.","nullable":true,"type":"string","maxLength":190},"description":"The UTM source of the short link."},{"in":"query","name":"utm_medium","schema":{"description":"The UTM medium of the short link.","nullable":true,"type":"string","maxLength":190},"description":"The UTM medium of the short link."},{"in":"query","name":"utm_campaign","schema":{"description":"The UTM campaign of the short link.","nullable":true,"type":"string","maxLength":190},"description":"The UTM campaign of the short link."},{"in":"query","name":"utm_term","schema":{"description":"The UTM term of the short link.","nullable":true,"type":"string","maxLength":190},"description":"The UTM term of the short link."},{"in":"query","name":"utm_content","schema":{"description":"The UTM content of the short link.","nullable":true,"type":"string","maxLength":190},"description":"The UTM content of the short link."},{"in":"query","name":"ref","schema":{"description":"The ref of the short link.","nullable":true,"type":"string","maxLength":190},"description":"The ref of the short link."}],"responses":{"200":{"description":"Analytics data","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AnalyticsCount"},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsTimeseries"}},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsContinents"}},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsCountries"}},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsRegions"}},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsCities"}},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsDevices"}},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsBrowsers"}},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsOS"}},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsTriggers"}},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsReferers"}},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsRefererUrls"}},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsTopLinks"}},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsTopUrls"}}]}}}},"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"}}}},"/events":{"get":{"operationId":"listEvents","x-speakeasy-name-override":"list","summary":"Retrieve a list of events","description":"Retrieve a paginated list of events for the authenticated workspace.","tags":["Events"],"security":[{"token":[]}],"parameters":[{"in":"query","name":"event","schema":{"default":"clicks","description":"The type of event to retrieve analytics for. Defaults to 'clicks'.","type":"string","enum":["clicks","leads","sales"]},"description":"The type of event to retrieve analytics for. Defaults to 'clicks'."},{"in":"query","name":"domain","schema":{"description":"The domain to filter analytics for.","type":"string"},"description":"The domain to filter analytics for."},{"in":"query","name":"key","schema":{"description":"The slug of the short link to retrieve analytics for. Must be used along with the corresponding `domain` of the short link to fetch analytics for a specific short link.","type":"string"},"description":"The slug of the short link to retrieve analytics for. Must be used along with the corresponding `domain` of the short link to fetch analytics for a specific short link."},{"in":"query","name":"linkId","schema":{"description":"The unique ID of the short link on Dub to retrieve analytics for.","type":"string"},"description":"The unique ID of the short link on Dub to retrieve analytics for."},{"in":"query","name":"externalId","schema":{"description":"The ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter.","type":"string"},"description":"The ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter."},{"in":"query","name":"tenantId","schema":{"description":"The ID of the tenant that created the link inside your system.","type":"string"},"description":"The ID of the tenant that created the link inside your system."},{"in":"query","name":"programId","schema":{"description":"The ID of the program to retrieve analytics for.","type":"string"},"description":"The ID of the program to retrieve analytics for."},{"in":"query","name":"partnerId","schema":{"description":"The ID of the partner to retrieve analytics for.","type":"string"},"description":"The ID of the partner to retrieve analytics for."},{"in":"query","name":"customerId","schema":{"description":"The ID of the customer to retrieve analytics for.","type":"string"},"description":"The ID of the customer to retrieve analytics for."},{"in":"query","name":"interval","schema":{"description":"The interval to retrieve analytics for. If undefined, defaults to 24h.","type":"string","enum":["24h","7d","30d","90d","1y","mtd","qtd","ytd","all"]},"description":"The interval to retrieve analytics for. If undefined, defaults to 24h."},{"in":"query","name":"start","schema":{"description":"The start date and time when to retrieve analytics from. If set, takes precedence over `interval`.","type":"string"},"description":"The start date and time when to retrieve analytics from. If set, takes precedence over `interval`."},{"in":"query","name":"end","schema":{"description":"The end date and time when to retrieve analytics from. If not provided, defaults to the current date. If set along with `start`, takes precedence over `interval`.","type":"string"},"description":"The end date and time when to retrieve analytics from. If not provided, defaults to the current date. If set along with `start`, takes precedence over `interval`."},{"in":"query","name":"timezone","schema":{"description":"The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC.","example":"America/New_York","default":"UTC","type":"string"},"description":"The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC."},{"in":"query","name":"country","schema":{"description":"The country to retrieve analytics for. Must be passed as a 2-letter ISO 3166-1 country code. See https://d.to/geo for more information.","type":"string"},"description":"The country to retrieve analytics for. Must be passed as a 2-letter ISO 3166-1 country code. See https://d.to/geo for more information."},{"in":"query","name":"city","schema":{"description":"The city to retrieve analytics for.","example":"New York","type":"string"},"description":"The city to retrieve analytics for."},{"in":"query","name":"region","schema":{"description":"The ISO 3166-2 region code to retrieve analytics for.","type":"string"},"description":"The ISO 3166-2 region code to retrieve analytics for."},{"in":"query","name":"continent","schema":{"description":"The continent to retrieve analytics for.","type":"string","enum":["AF","AN","AS","EU","NA","OC","SA"]},"description":"The continent to retrieve analytics for."},{"in":"query","name":"device","schema":{"description":"The device to retrieve analytics for.","example":"Desktop","type":"string"},"description":"The device to retrieve analytics for."},{"in":"query","name":"browser","schema":{"description":"The browser to retrieve analytics for.","example":"Chrome","type":"string"},"description":"The browser to retrieve analytics for."},{"in":"query","name":"os","schema":{"description":"The OS to retrieve analytics for.","example":"Windows","type":"string"},"description":"The OS to retrieve analytics for."},{"in":"query","name":"trigger","schema":{"description":"The trigger to retrieve analytics for. If undefined, returns all trigger types.","type":"string","enum":["qr","link","pageview","deeplink"]},"description":"The trigger to retrieve analytics for. If undefined, returns all trigger types."},{"in":"query","name":"referer","schema":{"description":"The referer hostname to retrieve analytics for.","example":"google.com","type":"string"},"description":"The referer hostname to retrieve analytics for."},{"in":"query","name":"refererUrl","schema":{"description":"The full referer URL to retrieve analytics for.","example":"https://lynkr.cc/blog","type":"string"},"description":"The full referer URL to retrieve analytics for."},{"in":"query","name":"url","schema":{"description":"The URL to retrieve analytics for.","type":"string"},"description":"The URL to retrieve analytics for."},{"in":"query","name":"tagIds","schema":{"description":"The tag IDs to retrieve analytics for.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"description":"The tag IDs to retrieve analytics for."},{"in":"query","name":"folderId","schema":{"description":"The folder ID to retrieve analytics for. If not provided, return analytics for unsorted links.","type":"string"},"description":"The folder ID to retrieve analytics for. If not provided, return analytics for unsorted links."},{"in":"query","name":"groupId","schema":{"description":"The group ID to retrieve analytics for.","type":"string"},"description":"The group ID to retrieve analytics for."},{"in":"query","name":"root","schema":{"description":"Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both.","type":"boolean"},"description":"Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both."},{"in":"query","name":"saleType","schema":{"description":"Filter sales by type: 'new' for first-time purchases, 'recurring' for repeat purchases. If undefined, returns both.","type":"string","enum":["new","recurring"]},"description":"Filter sales by type: 'new' for first-time purchases, 'recurring' for repeat purchases. If undefined, returns both."},{"in":"query","name":"query","schema":{"description":"Search the events by a custom metadata value. Only available for lead and sale events.","example":"metadata['key']:'value'","type":"string","maxLength":10000},"description":"Search the events by a custom metadata value. Only available for lead and sale events."},{"in":"query","name":"tagId","schema":{"description":"Deprecated: Use `tagIds` instead. The tag ID to retrieve analytics for.","deprecated":true,"type":"string"},"description":"Deprecated: Use `tagIds` instead. The tag ID to retrieve analytics for."},{"in":"query","name":"qr","schema":{"description":"Deprecated: Use the `trigger` field instead. Filter for QR code scans. If true, filter for QR codes only. If false, filter for links only. If undefined, return both.","deprecated":true,"type":"boolean"},"description":"Deprecated: Use the `trigger` field instead. 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":"utm_source","schema":{"description":"The UTM source of the short link.","nullable":true,"type":"string","maxLength":190},"description":"The UTM source of the short link."},{"in":"query","name":"utm_medium","schema":{"description":"The UTM medium of the short link.","nullable":true,"type":"string","maxLength":190},"description":"The UTM medium of the short link."},{"in":"query","name":"utm_campaign","schema":{"description":"The UTM campaign of the short link.","nullable":true,"type":"string","maxLength":190},"description":"The UTM campaign of the short link."},{"in":"query","name":"utm_term","schema":{"description":"The UTM term of the short link.","nullable":true,"type":"string","maxLength":190},"description":"The UTM term of the short link."},{"in":"query","name":"utm_content","schema":{"description":"The UTM content of the short link.","nullable":true,"type":"string","maxLength":190},"description":"The UTM content of the short link."},{"in":"query","name":"ref","schema":{"description":"The ref of the short link.","nullable":true,"type":"string","maxLength":190},"description":"The ref of the short link."},{"in":"query","name":"page","schema":{"default":1,"type":"number"}},{"in":"query","name":"limit","schema":{"default":100,"type":"number","maximum":1000}},{"in":"query","name":"sortOrder","schema":{"description":"The sort order. The default is `desc`.","default":"desc","type":"string","enum":["asc","desc"]},"description":"The sort order. The default is `desc`."},{"in":"query","name":"sortBy","schema":{"default":"timestamp","description":"The field to sort the events by. The default is `timestamp`.","type":"string","enum":["timestamp"]},"description":"The field to sort the events by. The default is `timestamp`."},{"in":"query","name":"order","schema":{"description":"DEPRECATED. Use `sortOrder` instead.","deprecated":true,"default":"desc","type":"string","enum":["asc","desc"]},"description":"DEPRECATED. Use `sortOrder` instead."}],"responses":{"200":{"description":"A list of events","content":{"application/json":{"schema":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"event":{"type":"string","enum":["click"]},"timestamp":{"type":"string"},"click":{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"string"},"url":{"type":"string"},"country":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"continent":{"type":"string"},"device":{"type":"string"},"browser":{"type":"string"},"os":{"type":"string"},"trigger":{"nullable":true,"type":"string"},"referer":{"type":"string"},"refererUrl":{"type":"string"},"qr":{"type":"boolean"},"ip":{"type":"string"}},"required":["id","timestamp","url","country","city","region","continent","device","browser","os","referer","refererUrl","qr","ip"],"additionalProperties":false},"link":{"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."},"url":{"type":"string"},"trackConversion":{"type":"boolean"},"externalId":{"nullable":true,"description":"The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace.","type":"string"},"tenantId":{"nullable":true,"description":"The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant.","type":"string"},"programId":{"nullable":true,"description":"The ID of the program the short link is associated with.","type":"string"},"partnerId":{"nullable":true,"description":"The ID of the partner the short link is associated with.","type":"string"},"archived":{"type":"boolean"},"expiresAt":{"type":"string"},"expiredUrl":{"nullable":true,"type":"string"},"disabledAt":{"type":"string"},"password":{"nullable":true,"description":"The password required to access the destination URL of the short link.","type":"string"},"proxy":{"type":"boolean"},"title":{"nullable":true,"description":"The title of the short link. Will be used for Custom Link Previews if `proxy` is true.","type":"string"},"description":{"nullable":true,"description":"The description of the short link. Will be used for Custom Link Previews if `proxy` is true.","type":"string"},"image":{"nullable":true,"description":"The image of the short link. Will be used for Custom Link Previews if `proxy` is true.","type":"string"},"video":{"nullable":true,"description":"The custom link preview video (og:video). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","type":"string"},"rewrite":{"type":"boolean"},"doIndex":{"type":"boolean"},"ios":{"nullable":true,"description":"The iOS destination URL for the short link for iOS device targeting.","type":"string"},"android":{"nullable":true,"description":"The Android destination URL for the short link for Android device targeting.","type":"string"},"geo":{"nullable":true,"description":"Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. See https://d.to/geo for more information.","type":"object","additionalProperties":{"type":"string","format":"uri"}},"publicStats":{"type":"boolean"},"tags":{"nullable":true,"description":"The tags assigned to the short link.","type":"array","items":{"$ref":"#/components/schemas/LinkTagSchemaOutput"}},"folderId":{"nullable":true,"description":"The unique ID of the folder assigned to the short link.","type":"string"},"webhookIds":{"type":"array","items":{"type":"string"},"description":"The IDs of the webhooks that the short link is associated with."},"comments":{"nullable":true,"description":"The comments for the short link.","type":"string"},"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.lynkr.cc/qr?url=https://dub.sh/try`)."},"utm_source":{"nullable":true,"description":"The UTM source of the short link.","type":"string"},"utm_medium":{"nullable":true,"description":"The UTM medium of the short link.","type":"string"},"utm_campaign":{"nullable":true,"description":"The UTM campaign of the short link.","type":"string"},"utm_term":{"nullable":true,"description":"The UTM term of the short link.","type":"string"},"utm_content":{"nullable":true,"description":"The UTM content of the short link.","type":"string"},"testVariants":{"nullable":true,"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"percentage":{"type":"number","minimum":10,"maximum":90}},"required":["url","percentage"],"additionalProperties":false},"description":"An array of A/B test URLs and the percentage of traffic to send to each URL.","example":[{"url":"https://example.com/variant-1","percentage":50},{"url":"https://example.com/variant-2","percentage":50}]},"testStartedAt":{"type":"string"},"testCompletedAt":{"type":"string"},"userId":{"nullable":true,"type":"string"},"workspaceId":{"type":"string","description":"The workspace ID of the short link."},"clicks":{"default":0,"description":"The number of clicks on the short link.","type":"number"},"leads":{"default":0,"description":"The number of leads the short link has generated.","type":"number"},"conversions":{"default":0,"description":"The number of leads that converted to paying customers.","type":"number"},"sales":{"default":0,"description":"The total number of sales (includes recurring sales) generated by the short link.","type":"number"},"saleAmount":{"default":0,"description":"The total dollar value of sales (in cents) generated by the short link.","type":"number"},"lastClicked":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"tagId":{"nullable":true,"description":"Deprecated: Use `tags` instead. The unique ID of the tag assigned to the short link.","deprecated":true,"type":"string"},"projectId":{"type":"string","description":"Deprecated: Use `workspaceId` instead. The project ID of the short link.","deprecated":true}},"required":["id","domain","key","url","trackConversion","externalId","tenantId","programId","partnerId","archived","expiresAt","expiredUrl","disabledAt","password","proxy","title","description","image","video","rewrite","doIndex","ios","android","geo","publicStats","tags","folderId","webhookIds","comments","shortLink","qrCode","utm_source","utm_medium","utm_campaign","utm_term","utm_content","testStartedAt","testCompletedAt","userId","workspaceId","clicks","leads","conversions","sales","saleAmount","lastClicked","createdAt","updatedAt","tagId","projectId"],"additionalProperties":false},"click_id":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.id` instead."},"link_id":{"type":"string","deprecated":true,"description":"Deprecated: Use `link.id` instead."},"domain":{"type":"string","deprecated":true,"description":"Deprecated: Use `link.domain` instead."},"key":{"type":"string","deprecated":true,"description":"Deprecated: Use `link.key` instead."},"url":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.url` instead."},"continent":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.continent` instead."},"country":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.country` instead."},"city":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.city` instead."},"device":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.device` instead."},"browser":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.browser` instead."},"os":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.os` instead."},"qr":{"type":"number","deprecated":true,"description":"Deprecated: Use `click.qr` instead."},"ip":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.ip` instead."}},"required":["event","timestamp","click","link","click_id","link_id","domain","key","url","continent","country","city","device","browser","os","qr","ip"],"additionalProperties":false,"title":"ClickEvent"},{"type":"object","properties":{"event":{"type":"string","enum":["lead"]},"timestamp":{"type":"string"},"eventId":{"type":"string"},"eventName":{"type":"string"},"metadata":{"nullable":true},"click":{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"string"},"url":{"type":"string"},"country":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"continent":{"type":"string"},"device":{"type":"string"},"browser":{"type":"string"},"os":{"type":"string"},"trigger":{"nullable":true,"type":"string"},"referer":{"type":"string"},"refererUrl":{"type":"string"},"qr":{"type":"boolean"},"ip":{"type":"string"}},"required":["id","timestamp","url","country","city","region","continent","device","browser","os","referer","refererUrl","qr","ip"],"additionalProperties":false},"link":{"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."},"url":{"type":"string"},"trackConversion":{"type":"boolean"},"externalId":{"nullable":true,"description":"The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace.","type":"string"},"tenantId":{"nullable":true,"description":"The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant.","type":"string"},"programId":{"nullable":true,"description":"The ID of the program the short link is associated with.","type":"string"},"partnerId":{"nullable":true,"description":"The ID of the partner the short link is associated with.","type":"string"},"archived":{"type":"boolean"},"expiresAt":{"type":"string"},"expiredUrl":{"nullable":true,"type":"string"},"disabledAt":{"type":"string"},"password":{"nullable":true,"description":"The password required to access the destination URL of the short link.","type":"string"},"proxy":{"type":"boolean"},"title":{"nullable":true,"description":"The title of the short link. Will be used for Custom Link Previews if `proxy` is true.","type":"string"},"description":{"nullable":true,"description":"The description of the short link. Will be used for Custom Link Previews if `proxy` is true.","type":"string"},"image":{"nullable":true,"description":"The image of the short link. Will be used for Custom Link Previews if `proxy` is true.","type":"string"},"video":{"nullable":true,"description":"The custom link preview video (og:video). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","type":"string"},"rewrite":{"type":"boolean"},"doIndex":{"type":"boolean"},"ios":{"nullable":true,"description":"The iOS destination URL for the short link for iOS device targeting.","type":"string"},"android":{"nullable":true,"description":"The Android destination URL for the short link for Android device targeting.","type":"string"},"geo":{"nullable":true,"description":"Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. See https://d.to/geo for more information.","type":"object","additionalProperties":{"type":"string","format":"uri"}},"publicStats":{"type":"boolean"},"tags":{"nullable":true,"description":"The tags assigned to the short link.","type":"array","items":{"$ref":"#/components/schemas/LinkTagSchemaOutput"}},"folderId":{"nullable":true,"description":"The unique ID of the folder assigned to the short link.","type":"string"},"webhookIds":{"type":"array","items":{"type":"string"},"description":"The IDs of the webhooks that the short link is associated with."},"comments":{"nullable":true,"description":"The comments for the short link.","type":"string"},"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.lynkr.cc/qr?url=https://dub.sh/try`)."},"utm_source":{"nullable":true,"description":"The UTM source of the short link.","type":"string"},"utm_medium":{"nullable":true,"description":"The UTM medium of the short link.","type":"string"},"utm_campaign":{"nullable":true,"description":"The UTM campaign of the short link.","type":"string"},"utm_term":{"nullable":true,"description":"The UTM term of the short link.","type":"string"},"utm_content":{"nullable":true,"description":"The UTM content of the short link.","type":"string"},"testVariants":{"nullable":true,"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"percentage":{"type":"number","minimum":10,"maximum":90}},"required":["url","percentage"],"additionalProperties":false},"description":"An array of A/B test URLs and the percentage of traffic to send to each URL.","example":[{"url":"https://example.com/variant-1","percentage":50},{"url":"https://example.com/variant-2","percentage":50}]},"testStartedAt":{"type":"string"},"testCompletedAt":{"type":"string"},"userId":{"nullable":true,"type":"string"},"workspaceId":{"type":"string","description":"The workspace ID of the short link."},"clicks":{"default":0,"description":"The number of clicks on the short link.","type":"number"},"leads":{"default":0,"description":"The number of leads the short link has generated.","type":"number"},"conversions":{"default":0,"description":"The number of leads that converted to paying customers.","type":"number"},"sales":{"default":0,"description":"The total number of sales (includes recurring sales) generated by the short link.","type":"number"},"saleAmount":{"default":0,"description":"The total dollar value of sales (in cents) generated by the short link.","type":"number"},"lastClicked":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"tagId":{"nullable":true,"description":"Deprecated: Use `tags` instead. The unique ID of the tag assigned to the short link.","deprecated":true,"type":"string"},"projectId":{"type":"string","description":"Deprecated: Use `workspaceId` instead. The project ID of the short link.","deprecated":true}},"required":["id","domain","key","url","trackConversion","externalId","tenantId","programId","partnerId","archived","expiresAt","expiredUrl","disabledAt","password","proxy","title","description","image","video","rewrite","doIndex","ios","android","geo","publicStats","tags","folderId","webhookIds","comments","shortLink","qrCode","utm_source","utm_medium","utm_campaign","utm_term","utm_content","testStartedAt","testCompletedAt","userId","workspaceId","clicks","leads","conversions","sales","saleAmount","lastClicked","createdAt","updatedAt","tagId","projectId"],"additionalProperties":false},"customer":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`)."},"name":{"type":"string","description":"Name of the customer."},"email":{"description":"Email of the customer.","nullable":true,"type":"string"},"avatar":{"description":"Avatar URL of the customer.","nullable":true,"type":"string"},"externalId":{"type":"string","description":"Unique identifier for the customer in the client's app."},"stripeCustomerId":{"description":"The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.","nullable":true,"type":"string"},"country":{"description":"Country of the customer.","nullable":true,"type":"string"},"sales":{"description":"Total number of sales for the customer.","nullable":true,"type":"number"},"saleAmount":{"description":"Total amount of sales for the customer.","nullable":true,"type":"number"},"createdAt":{"description":"The date the customer was created (usually the signup date or trial start date).","type":"string"},"firstSaleAt":{"description":"The date the customer made their first sale. Useful for calculating the time to first sale and LTV.","nullable":true,"type":"string"},"subscriptionCanceledAt":{"description":"The date the customer canceled their subscription. Useful for calculating LTV and churn rate.","nullable":true,"type":"string"}},"required":["id","name","externalId","createdAt"],"additionalProperties":false},"click_id":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.id` instead."},"link_id":{"type":"string","deprecated":true,"description":"Deprecated: Use `link.id` instead."},"domain":{"type":"string","deprecated":true,"description":"Deprecated: Use `link.domain` instead."},"key":{"type":"string","deprecated":true,"description":"Deprecated: Use `link.key` instead."},"url":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.url` instead."},"continent":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.continent` instead."},"country":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.country` instead."},"city":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.city` instead."},"device":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.device` instead."},"browser":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.browser` instead."},"os":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.os` instead."},"qr":{"type":"number","deprecated":true,"description":"Deprecated: Use `click.qr` instead."},"ip":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.ip` instead."}},"required":["event","timestamp","eventId","eventName","click","link","customer","click_id","link_id","domain","key","url","continent","country","city","device","browser","os","qr","ip"],"additionalProperties":false,"title":"LeadEvent"},{"type":"object","properties":{"event":{"type":"string","enum":["sale"]},"timestamp":{"type":"string"},"eventId":{"type":"string"},"eventName":{"type":"string"},"sale":{"type":"object","properties":{"amount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The amount of the sale in cents (for all two-decimal currencies). If the sale is in a zero-decimal currency, pass the full integer value (e.g. `1437` JPY). Learn more: https://d.to/currency"},"invoiceId":{"default":null,"description":"The invoice ID of the sale. Can be used as a idempotency key – only one sale event can be recorded for a given invoice ID.","nullable":true,"type":"string"},"paymentProcessor":{"default":"custom","description":"The payment processor via which the sale was made.","type":"string","enum":["stripe","shopify","polar","paddle","revenuecat","custom"]}},"required":["amount","invoiceId","paymentProcessor"],"additionalProperties":false},"metadata":{"nullable":true},"link":{"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."},"url":{"type":"string"},"trackConversion":{"type":"boolean"},"externalId":{"nullable":true,"description":"The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace.","type":"string"},"tenantId":{"nullable":true,"description":"The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant.","type":"string"},"programId":{"nullable":true,"description":"The ID of the program the short link is associated with.","type":"string"},"partnerId":{"nullable":true,"description":"The ID of the partner the short link is associated with.","type":"string"},"archived":{"type":"boolean"},"expiresAt":{"type":"string"},"expiredUrl":{"nullable":true,"type":"string"},"disabledAt":{"type":"string"},"password":{"nullable":true,"description":"The password required to access the destination URL of the short link.","type":"string"},"proxy":{"type":"boolean"},"title":{"nullable":true,"description":"The title of the short link. Will be used for Custom Link Previews if `proxy` is true.","type":"string"},"description":{"nullable":true,"description":"The description of the short link. Will be used for Custom Link Previews if `proxy` is true.","type":"string"},"image":{"nullable":true,"description":"The image of the short link. Will be used for Custom Link Previews if `proxy` is true.","type":"string"},"video":{"nullable":true,"description":"The custom link preview video (og:video). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","type":"string"},"rewrite":{"type":"boolean"},"doIndex":{"type":"boolean"},"ios":{"nullable":true,"description":"The iOS destination URL for the short link for iOS device targeting.","type":"string"},"android":{"nullable":true,"description":"The Android destination URL for the short link for Android device targeting.","type":"string"},"geo":{"nullable":true,"description":"Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. See https://d.to/geo for more information.","type":"object","additionalProperties":{"type":"string","format":"uri"}},"publicStats":{"type":"boolean"},"tags":{"nullable":true,"description":"The tags assigned to the short link.","type":"array","items":{"$ref":"#/components/schemas/LinkTagSchemaOutput"}},"folderId":{"nullable":true,"description":"The unique ID of the folder assigned to the short link.","type":"string"},"webhookIds":{"type":"array","items":{"type":"string"},"description":"The IDs of the webhooks that the short link is associated with."},"comments":{"nullable":true,"description":"The comments for the short link.","type":"string"},"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.lynkr.cc/qr?url=https://dub.sh/try`)."},"utm_source":{"nullable":true,"description":"The UTM source of the short link.","type":"string"},"utm_medium":{"nullable":true,"description":"The UTM medium of the short link.","type":"string"},"utm_campaign":{"nullable":true,"description":"The UTM campaign of the short link.","type":"string"},"utm_term":{"nullable":true,"description":"The UTM term of the short link.","type":"string"},"utm_content":{"nullable":true,"description":"The UTM content of the short link.","type":"string"},"testVariants":{"nullable":true,"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"percentage":{"type":"number","minimum":10,"maximum":90}},"required":["url","percentage"],"additionalProperties":false},"description":"An array of A/B test URLs and the percentage of traffic to send to each URL.","example":[{"url":"https://example.com/variant-1","percentage":50},{"url":"https://example.com/variant-2","percentage":50}]},"testStartedAt":{"type":"string"},"testCompletedAt":{"type":"string"},"userId":{"nullable":true,"type":"string"},"workspaceId":{"type":"string","description":"The workspace ID of the short link."},"clicks":{"default":0,"description":"The number of clicks on the short link.","type":"number"},"leads":{"default":0,"description":"The number of leads the short link has generated.","type":"number"},"conversions":{"default":0,"description":"The number of leads that converted to paying customers.","type":"number"},"sales":{"default":0,"description":"The total number of sales (includes recurring sales) generated by the short link.","type":"number"},"saleAmount":{"default":0,"description":"The total dollar value of sales (in cents) generated by the short link.","type":"number"},"lastClicked":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"tagId":{"nullable":true,"description":"Deprecated: Use `tags` instead. The unique ID of the tag assigned to the short link.","deprecated":true,"type":"string"},"projectId":{"type":"string","description":"Deprecated: Use `workspaceId` instead. The project ID of the short link.","deprecated":true}},"required":["id","domain","key","url","trackConversion","externalId","tenantId","programId","partnerId","archived","expiresAt","expiredUrl","disabledAt","password","proxy","title","description","image","video","rewrite","doIndex","ios","android","geo","publicStats","tags","folderId","webhookIds","comments","shortLink","qrCode","utm_source","utm_medium","utm_campaign","utm_term","utm_content","testStartedAt","testCompletedAt","userId","workspaceId","clicks","leads","conversions","sales","saleAmount","lastClicked","createdAt","updatedAt","tagId","projectId"],"additionalProperties":false},"click":{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"string"},"url":{"type":"string"},"country":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"continent":{"type":"string"},"device":{"type":"string"},"browser":{"type":"string"},"os":{"type":"string"},"trigger":{"nullable":true,"type":"string"},"referer":{"type":"string"},"refererUrl":{"type":"string"},"qr":{"type":"boolean"},"ip":{"type":"string"}},"required":["id","timestamp","url","country","city","region","continent","device","browser","os","referer","refererUrl","qr","ip"],"additionalProperties":false},"customer":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`)."},"name":{"type":"string","description":"Name of the customer."},"email":{"description":"Email of the customer.","nullable":true,"type":"string"},"avatar":{"description":"Avatar URL of the customer.","nullable":true,"type":"string"},"externalId":{"type":"string","description":"Unique identifier for the customer in the client's app."},"stripeCustomerId":{"description":"The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.","nullable":true,"type":"string"},"country":{"description":"Country of the customer.","nullable":true,"type":"string"},"sales":{"description":"Total number of sales for the customer.","nullable":true,"type":"number"},"saleAmount":{"description":"Total amount of sales for the customer.","nullable":true,"type":"number"},"createdAt":{"description":"The date the customer was created (usually the signup date or trial start date).","type":"string"},"firstSaleAt":{"description":"The date the customer made their first sale. Useful for calculating the time to first sale and LTV.","nullable":true,"type":"string"},"subscriptionCanceledAt":{"description":"The date the customer canceled their subscription. Useful for calculating LTV and churn rate.","nullable":true,"type":"string"}},"required":["id","name","externalId","createdAt"],"additionalProperties":false},"saleAmount":{"type":"number","description":"Deprecated: Use `sale.amount` instead.","deprecated":true},"invoice_id":{"type":"string","description":"Deprecated: Use `sale.invoiceId` instead.","deprecated":true},"payment_processor":{"type":"string","description":"Deprecated: Use `sale.paymentProcessor` instead.","deprecated":true},"click_id":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.id` instead."},"link_id":{"type":"string","deprecated":true,"description":"Deprecated: Use `link.id` instead."},"domain":{"type":"string","deprecated":true,"description":"Deprecated: Use `link.domain` instead."},"key":{"type":"string","deprecated":true,"description":"Deprecated: Use `link.key` instead."},"url":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.url` instead."},"continent":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.continent` instead."},"country":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.country` instead."},"city":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.city` instead."},"device":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.device` instead."},"browser":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.browser` instead."},"os":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.os` instead."},"qr":{"type":"number","deprecated":true,"description":"Deprecated: Use `click.qr` instead."},"ip":{"type":"string","deprecated":true,"description":"Deprecated: Use `click.ip` instead."}},"required":["event","timestamp","eventId","eventName","sale","link","click","customer","saleAmount","invoice_id","payment_processor","click_id","link_id","domain","key","url","continent","country","city","device","browser","os","qr","ip"],"additionalProperties":false,"title":"SaleEvent"}],"type":"object"}}}}},"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 tag","description":"Create a tag for the authenticated workspace.","tags":["Tags"],"security":[{"token":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"The name of the tag to create."},"color":{"type":"string","enum":["red","yellow","green","blue","purple","brown","pink"],"description":"The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, brown."},"tag":{"type":"string","minLength":1,"description":"The name of the tag to create.","deprecated":true}}}}}},"responses":{"201":{"description":"The created tag","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkTagSchemaOutput"}}}},"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":"sortBy","schema":{"default":"name","description":"The field to sort the tags by.","type":"string","enum":["name","createdAt"]},"description":"The field to sort the tags by."},{"in":"query","name":"sortOrder","schema":{"default":"asc","description":"The order to sort the tags by.","type":"string","enum":["asc","desc"]},"description":"The order to sort the tags by."},{"in":"query","name":"search","schema":{"description":"The search term to filter the tags by.","type":"string"},"description":"The search term to filter the tags by."},{"in":"query","name":"ids","schema":{"description":"IDs of tags to filter by.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"description":"IDs of tags to filter by."},{"in":"query","name":"page","schema":{"default":1,"description":"The page number for pagination.","example":1,"type":"number","minimum":0,"exclusiveMinimum":true},"description":"The page number for pagination."},{"in":"query","name":"pageSize","schema":{"default":100,"description":"The number of items per page.","example":50,"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":100},"description":"The number of items per page."}],"responses":{"200":{"description":"A list of tags","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LinkTagSchemaOutput"}}}}},"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/{id}":{"patch":{"operationId":"updateTag","x-speakeasy-name-override":"update","x-speakeasy-max-method-params":2,"summary":"Update a tag","description":"Update a tag in the workspace.","tags":["Tags"],"security":[{"token":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The ID of the tag to update."},"required":true,"description":"The ID of the tag to update."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50,"description":"The name of the tag to create."},"color":{"type":"string","enum":["red","yellow","green","blue","purple","brown","pink"],"description":"The color of the tag. If not provided, a random color will be used from the list: red, yellow, green, blue, purple, brown."},"tag":{"type":"string","minLength":1,"description":"The name of the tag to create.","deprecated":true}}}}}},"responses":{"200":{"description":"The updated tag.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkTagSchemaOutput"}}}},"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":"deleteTag","x-speakeasy-name-override":"delete","x-speakeasy-max-method-params":1,"summary":"Delete a tag","description":"Delete a tag from the workspace. All existing links will still work, but they will no longer be associated with this tag.","tags":["Tags"],"security":[{"token":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The ID of the tag to delete."},"required":true,"description":"The ID of the tag to delete."}],"responses":{"200":{"description":"The deleted tag ID.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the deleted tag."}},"required":["id"],"additionalProperties":false}}}},"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"}}}},"/folders":{"post":{"operationId":"createFolder","x-speakeasy-name-override":"create","summary":"Create a folder","description":"Create a folder for the authenticated workspace.","tags":["Folders"],"security":[{"token":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":190,"description":"The name of the folder."},"description":{"description":"The description of the folder.","nullable":true,"type":"string","maxLength":500},"accessLevel":{"default":null,"description":"The access level of the folder within the workspace.","nullable":true,"type":"string","enum":["write","read"]}},"required":["name"]}}}},"responses":{"201":{"description":"The created folder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderSchema"}}}},"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":"listFolders","x-speakeasy-name-override":"list","summary":"Retrieve a list of folders","description":"Retrieve a list of folders for the authenticated workspace.","tags":["Folders"],"security":[{"token":[]}],"parameters":[{"in":"query","name":"search","schema":{"description":"The search term to filter the folders by.","type":"string"},"description":"The search term to filter the folders by."},{"in":"query","name":"page","schema":{"default":1,"description":"The page number for pagination.","example":1,"type":"number","minimum":0,"exclusiveMinimum":true},"description":"The page number for pagination."},{"in":"query","name":"pageSize","schema":{"default":50,"description":"The number of items per page.","example":50,"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":50},"description":"The number of items per page."}],"responses":{"200":{"description":"A list of folders","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FolderSchema"}}}}},"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"}}}},"/folders/{id}":{"patch":{"operationId":"updateFolder","x-speakeasy-name-override":"update","x-speakeasy-max-method-params":2,"summary":"Update a folder","description":"Update a folder in the workspace.","tags":["Folders"],"security":[{"token":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The ID of the folder to update."},"required":true,"description":"The ID of the folder to update."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":190,"description":"The name of the folder."},"description":{"description":"The description of the folder.","nullable":true,"type":"string","maxLength":500},"accessLevel":{"default":null,"description":"The access level of the folder within the workspace.","nullable":true,"type":"string","enum":["write","read"]}}}}}},"responses":{"200":{"description":"The updated folder.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderSchema"}}}},"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":"deleteFolder","x-speakeasy-name-override":"delete","x-speakeasy-max-method-params":1,"summary":"Delete a folder","description":"Delete a folder from the workspace. All existing links will still work, but they will no longer be associated with this folder.","tags":["Folders"],"security":[{"token":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The ID of the folder to delete."},"required":true,"description":"The ID of the folder to delete."}],"responses":{"200":{"description":"The deleted folder ID.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the deleted folder."}},"required":["id"],"additionalProperties":false}}}},"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":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":190,"description":"Name of the domain.","example":"acme.com"},"expiredUrl":{"description":"Redirect users to a specific URL when any link under this domain has expired.","example":"https://acme.com/expired","nullable":true,"type":"string","maxLength":32000},"notFoundUrl":{"description":"Redirect users to a specific URL when a link under this domain doesn't exist.","example":"https://acme.com/not-found","nullable":true,"type":"string","maxLength":32000},"archived":{"default":false,"description":"Whether to archive this domain. `false` will unarchive a previously archived domain.","example":false,"type":"boolean"},"placeholder":{"description":"Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.","example":"https://lynkr.cc/help/article/what-is-dub","nullable":true,"type":"string","maxLength":100},"logo":{"description":"The logo of the domain.","nullable":true,"anyOf":[{"type":"string","pattern":"^data:image\\/(png|jpeg|jpg|gif|webp);base64,"},{"type":"string","format":"uri"},{"type":"string","format":"uri"}]},"assetLinks":{"description":"assetLinks.json configuration file (for deep link support on Android).","nullable":true,"type":"string"},"appleAppSiteAssociation":{"description":"apple-app-site-association configuration file (for deep link support on iOS).","nullable":true,"type":"string"}},"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","x-speakeasy-pagination":{"type":"offsetLimit","inputs":[{"name":"page","in":"parameters","type":"page"},{"name":"pageSize","in":"parameters","type":"limit"}],"outputs":{"results":"$"}},"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":"archived","schema":{"default":false,"description":"Whether to include archived domains in the response. Defaults to `false` if not provided.","type":"boolean"},"description":"Whether to include archived domains in the response. Defaults to `false` if not provided."},{"in":"query","name":"search","schema":{"description":"The search term to filter the domains by.","type":"string"},"description":"The search term to filter the domains by."},{"in":"query","name":"page","schema":{"default":1,"description":"The page number for pagination.","example":1,"type":"number","minimum":0,"exclusiveMinimum":true},"description":"The page number for pagination."},{"in":"query","name":"pageSize","schema":{"default":50,"description":"The number of items per page.","example":50,"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":50},"description":"The number of items per page."}],"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","schema":{"type":"string","description":"The domain name.","example":"acme.com"},"required":true,"description":"The domain name."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":190,"description":"Name of the domain.","example":"acme.com"},"expiredUrl":{"description":"Redirect users to a specific URL when any link under this domain has expired.","example":"https://acme.com/expired","nullable":true,"type":"string","maxLength":32000},"notFoundUrl":{"description":"Redirect users to a specific URL when a link under this domain doesn't exist.","example":"https://acme.com/not-found","nullable":true,"type":"string","maxLength":32000},"archived":{"default":false,"description":"Whether to archive this domain. `false` will unarchive a previously archived domain.","example":false,"type":"boolean"},"placeholder":{"description":"Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.","example":"https://lynkr.cc/help/article/what-is-dub","nullable":true,"type":"string","maxLength":100},"logo":{"description":"The logo of the domain.","nullable":true,"anyOf":[{"type":"string","pattern":"^data:image\\/(png|jpeg|jpg|gif|webp);base64,"},{"type":"string","format":"uri"},{"type":"string","format":"uri"}]},"assetLinks":{"description":"assetLinks.json configuration file (for deep link support on Android).","nullable":true,"type":"string"},"appleAppSiteAssociation":{"description":"apple-app-site-association configuration file (for deep link support on iOS).","nullable":true,"type":"string"}}}}}},"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","schema":{"type":"string","description":"The domain name.","example":"acme.com"},"required":true,"description":"The domain name."}],"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"],"additionalProperties":false}}}},"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/register":{"post":{"operationId":"registerDomain","x-speakeasy-name-override":"register","summary":"Register a domain","description":"Register a domain for the authenticated workspace. Only available for Enterprise Plans.","tags":["Domains"],"security":[{"token":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"description":"The domain to claim. We only support .link domains for now.","example":"acme.link","type":"string","minLength":1,"pattern":".*\\.link$"}},"required":["domain"]}}}},"responses":{"201":{"description":"The domain was registered.","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"The domain name."},"status":{"type":"string","description":"The status of the domain registration."},"expiration":{"nullable":true,"type":"number","description":"The expiration timestamp of the domain (Unix timestamp in milliseconds)."}},"required":["domain","status","expiration"],"additionalProperties":false}}}},"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/status":{"get":{"operationId":"checkDomainStatus","x-speakeasy-name-override":"checkStatus","summary":"Check the availability of one or more domains","description":"Check if a domain name is available for purchase. You can check multiple domains at once.","tags":["Domains"],"security":[{"token":[]}],"parameters":[{"in":"query","name":"domains","schema":{"description":"The domains to search. We only support .link domains for now.","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"style":"form","explode":false,"required":true,"description":"The domains to search. We only support .link domains for now."}],"responses":{"200":{"description":"The domain status was retrieved.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","description":"The domain name."},"available":{"type":"boolean","description":"Whether the domain is available."},"price":{"nullable":true,"description":"The price description.","type":"string"},"premium":{"nullable":true,"description":"Whether the domain is a premium domain.","type":"boolean"}},"required":["domain","available","price","premium"],"additionalProperties":false}}}}},"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":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"clickId":{"type":"string","description":"The unique ID of the click that the lead conversion event is attributed to. You can read this value from `dub_id` cookie. [For deferred lead tracking]: If an empty string is provided, Dub will try to find an existing customer with the provided `customerExternalId` and use the `clickId` from the customer if found."},"eventName":{"type":"string","minLength":1,"maxLength":255,"description":"The name of the lead event to track. Can also be used as a unique identifier to associate a given lead event for a customer for a subsequent sale event (via the `leadEventName` prop in `/track/sale`).","example":"Sign up"},"customerExternalId":{"type":"string","minLength":1,"maxLength":100,"description":"The unique ID of the customer in your system. Will be used to identify and attribute all future events to this customer."},"customerName":{"default":null,"description":"The name of the customer. If not passed, a random name will be generated (e.g. “Big Red Caribou”).","nullable":true,"type":"string","maxLength":100},"customerEmail":{"default":null,"description":"The email address of the customer.","nullable":true,"type":"string","maxLength":100,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"customerAvatar":{"default":null,"description":"The avatar URL of the customer.","nullable":true,"type":"string"},"mode":{"default":"async","description":"The mode to use for tracking the lead event. `async` will not block the request; `wait` will block the request until the lead event is fully recorded in Dub; `deferred` will defer the lead event creation to a subsequent request.","type":"string","enum":["async","wait","deferred"]},"eventQuantity":{"description":"The numerical value associated with this lead event (e.g., number of provisioned seats in a free trial). If defined as N, the lead event will be tracked N times.","nullable":true,"type":"number"},"metadata":{"default":null,"description":"Additional metadata to be stored with the lead event. Max 10,000 characters.","nullable":true,"type":"object","additionalProperties":{}}},"required":["clickId","eventName","customerExternalId"]}}}},"responses":{"200":{"description":"A lead was tracked.","content":{"application/json":{"schema":{"type":"object","properties":{"click":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"link":{"nullable":true,"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."},"shortLink":{"type":"string","format":"uri","description":"The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`)."},"url":{"type":"string","format":"uri","description":"The destination URL of the short link."},"partnerId":{"nullable":true,"description":"The ID of the partner the short link is associated with.","type":"string"},"programId":{"nullable":true,"description":"The ID of the program the short link is associated with.","type":"string"},"tenantId":{"nullable":true,"description":"The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant.","type":"string"},"externalId":{"nullable":true,"description":"The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace.","type":"string"}},"required":["id","domain","key","shortLink","url","partnerId","programId","tenantId","externalId"],"additionalProperties":false},"customer":{"type":"object","properties":{"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"avatar":{"nullable":true,"type":"string"},"externalId":{"nullable":true,"type":"string"}},"required":["name","email","avatar","externalId"],"additionalProperties":false}},"required":["click","link","customer"],"additionalProperties":false}}}},"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":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customerExternalId":{"type":"string","minLength":1,"maxLength":100,"description":"The unique ID of the customer in your system. Will be used to identify and attribute all future events to this customer."},"amount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"The amount of the sale in cents (for all two-decimal currencies). If the sale is in a zero-decimal currency, pass the full integer value (e.g. `1437` JPY). Learn more: https://d.to/currency"},"currency":{"description":"The currency of the sale. Accepts ISO 4217 currency codes. Sales will be automatically converted and stored as USD at the latest exchange rates. Learn more: https://d.to/currency","default":"usd","type":"string"},"eventName":{"default":"Purchase","description":"The name of the sale event. Recommended format: `Invoice paid` or `Subscription created`.","example":"Invoice paid","type":"string","maxLength":255},"paymentProcessor":{"default":"custom","description":"The payment processor via which the sale was made.","type":"string","enum":["stripe","shopify","polar","paddle","revenuecat","custom"]},"invoiceId":{"default":null,"description":"The invoice ID of the sale. Can be used as a idempotency key – only one sale event can be recorded for a given invoice ID.","nullable":true,"type":"string"},"metadata":{"default":null,"description":"Additional metadata to be stored with the sale event. Max 10,000 characters when stringified.","nullable":true,"type":"object","additionalProperties":{}},"leadEventName":{"default":null,"description":"The name of the lead event that occurred before the sale (case-sensitive). This is used to associate the sale event with a particular lead event (instead of the latest lead event for a link-customer combination, which is the default behavior). For direct sale tracking, this field can also be used to specify the lead event name.","example":"Cloned template 1481267","nullable":true,"type":"string"},"clickId":{"description":"[For direct sale tracking]: The unique ID of the click that the sale conversion event is attributed to. You can read this value from `dub_id` cookie.","nullable":true,"type":"string"},"customerName":{"default":null,"description":"[For direct sale tracking]: The name of the customer. If not passed, a random name will be generated (e.g. “Big Red Caribou”).","nullable":true,"type":"string","maxLength":100},"customerEmail":{"default":null,"description":"[For direct sale tracking]: The email address of the customer.","nullable":true,"type":"string","maxLength":100,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"customerAvatar":{"default":null,"description":"[For direct sale tracking]: The avatar URL of the customer.","nullable":true,"type":"string"}},"required":["customerExternalId","amount"]}}}},"responses":{"200":{"description":"A sale was tracked.","content":{"application/json":{"schema":{"type":"object","properties":{"eventName":{"type":"string"},"customer":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"avatar":{"nullable":true,"type":"string"},"externalId":{"nullable":true,"type":"string"}},"required":["id","name","email","avatar","externalId"],"additionalProperties":false},"sale":{"nullable":true,"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string"},"paymentProcessor":{"type":"string"},"invoiceId":{"nullable":true,"type":"string"},"metadata":{"nullable":true,"type":"object","additionalProperties":{}}},"required":["amount","currency","paymentProcessor","invoiceId","metadata"],"additionalProperties":false}},"required":["eventName","customer","sale"],"additionalProperties":false}}}},"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/open":{"post":{"operationId":"trackOpen","x-speakeasy-ignore":true,"summary":"Track a deep link open event","description":"This endpoint is used to track when a user opens your app via a Dub-powered deep link (for both iOS and Android).","tags":["Track"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"deepLink":{"description":"The deep link that brought the user to the app. If left blank, Dub will fallback to probabilistic tracking by using the `dubDomain` parameter to check if there is an associated click event for the user's IP address. Learn more: https://d.to/ddl","type":"string","maxLength":32000},"dubDomain":{"description":"Your deep link custom domain on Dub (e.g. `acme.link`). This is used in probabilistic tracking to check if there is an associated click event for the user's IP address. Learn more: https://d.to/ddl","type":"string"}}}}}},"responses":{"200":{"description":"The response from the tracked open event.","content":{"application/json":{"schema":{"type":"object","properties":{"clickId":{"nullable":true,"description":"The click ID of the associated open event (or the prior click that led the user to the app store for probabilistic tracking). This will be `null` if the open event was not associated with a link (e.g. a direct download from the app store). Learn more: https://d.to/ddl","type":"string"},"link":{"nullable":true,"description":"The deep link that brought the user to the app. This will be `null` if the open event was not associated with a link (e.g. a direct download from the app store). Learn more: https://d.to/ddl","type":"object","properties":{"id":{"type":"string","description":"The ID of the deep link.","example":"link_xxx"},"domain":{"type":"string","description":"The domain of the deep link.","example":"acme.link"},"key":{"type":"string","description":"The key of the deep link.","example":"fb-promo"},"url":{"type":"string","description":"The URL of the deep link.","example":"https://acme.com/product/123"}},"required":["id","domain","key","url"],"additionalProperties":false}},"required":["clickId","link"],"additionalProperties":false}}}},"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"}}}},"/customers":{"get":{"operationId":"getCustomers","x-speakeasy-name-override":"list","summary":"Retrieve a list of customers","description":"Retrieve a list of customers for the authenticated workspace.","tags":["Customers"],"security":[{"token":[]}],"parameters":[{"in":"query","name":"email","schema":{"description":"A case-sensitive filter on the list based on the customer's `email` field. The value must be a string. Takes precedence over `externalId`.","type":"string"},"description":"A case-sensitive filter on the list based on the customer's `email` field. The value must be a string. Takes precedence over `externalId`."},{"in":"query","name":"externalId","schema":{"description":"A case-sensitive filter on the list based on the customer's `externalId` field. The value must be a string. Takes precedence over `search`.","type":"string"},"description":"A case-sensitive filter on the list based on the customer's `externalId` field. The value must be a string. Takes precedence over `search`."},{"in":"query","name":"search","schema":{"description":"A search query to filter customers by email, externalId, or name. If `email` or `externalId` is provided, this will be ignored.","type":"string"},"description":"A search query to filter customers by email, externalId, or name. If `email` or `externalId` is provided, this will be ignored."},{"in":"query","name":"country","schema":{"description":"A filter on the list based on the customer's `country` field.","type":"string"},"description":"A filter on the list based on the customer's `country` field."},{"in":"query","name":"linkId","schema":{"description":"A filter on the list based on the customer's `linkId` field (the referral link ID).","type":"string"},"description":"A filter on the list based on the customer's `linkId` field (the referral link ID)."},{"in":"query","name":"programId","schema":{"description":"Program ID to filter by.","type":"string"},"description":"Program ID to filter by."},{"in":"query","name":"partnerId","schema":{"description":"Partner ID to filter by.","type":"string"},"description":"Partner ID to filter by."},{"in":"query","name":"includeExpandedFields","schema":{"description":"Whether to include expanded fields on the customer (`link`, `partner`, `discount`).","type":"boolean"},"description":"Whether to include expanded fields on the customer (`link`, `partner`, `discount`)."},{"in":"query","name":"sortBy","schema":{"default":"createdAt","description":"The field to sort the customers by. The default is `createdAt`.","type":"string","enum":["createdAt","saleAmount","firstSaleAt","subscriptionCanceledAt"]},"description":"The field to sort the customers by. The default is `createdAt`."},{"in":"query","name":"sortOrder","schema":{"default":"desc","description":"The sort order. The default is `desc`.","type":"string","enum":["asc","desc"]},"description":"The sort order. The default is `desc`."},{"in":"query","name":"page","schema":{"default":1,"description":"The page number for pagination.","example":1,"type":"number","minimum":0,"exclusiveMinimum":true},"description":"The page number for pagination."},{"in":"query","name":"pageSize","schema":{"default":100,"description":"The number of items per page.","example":50,"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":100},"description":"The number of items per page."}],"responses":{"200":{"description":"The list of customers.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`)."},"name":{"type":"string","description":"Name of the customer."},"email":{"description":"Email of the customer.","nullable":true,"type":"string"},"avatar":{"description":"Avatar URL of the customer.","nullable":true,"type":"string"},"externalId":{"type":"string","description":"Unique identifier for the customer in the client's app."},"stripeCustomerId":{"description":"The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.","nullable":true,"type":"string"},"country":{"description":"Country of the customer.","nullable":true,"type":"string"},"sales":{"description":"Total number of sales for the customer.","nullable":true,"type":"number"},"saleAmount":{"description":"Total amount of sales for the customer.","nullable":true,"type":"number"},"createdAt":{"description":"The date the customer was created (usually the signup date or trial start date).","type":"string"},"firstSaleAt":{"description":"The date the customer made their first sale. Useful for calculating the time to first sale and LTV.","nullable":true,"type":"string"},"subscriptionCanceledAt":{"description":"The date the customer canceled their subscription. Useful for calculating LTV and churn rate.","nullable":true,"type":"string"},"link":{"nullable":true,"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."},"shortLink":{"type":"string","format":"uri","description":"The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`)."},"url":{"type":"string","format":"uri","description":"The destination URL of the short link."},"programId":{"nullable":true,"description":"The ID of the program the short link is associated with.","type":"string"}},"required":["id","domain","key","shortLink","url","programId"],"additionalProperties":false},"programId":{"nullable":true,"type":"string"},"partner":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"The partner's unique ID on Dub."},"name":{"type":"string","maxLength":190,"description":"The partner's full legal name."},"email":{"nullable":true,"description":"The partner's email address. Should be a unique value across Dub.","type":"string","maxLength":190},"image":{"nullable":true,"description":"The partner's avatar image.","type":"string"}},"required":["id","name","email","image"],"additionalProperties":false},"discount":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"number"},"type":{"type":"string","enum":["percentage","flat"]},"maxDuration":{"nullable":true,"type":"number"},"couponId":{"nullable":true,"type":"string"},"couponTestId":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"partnersCount":{"nullable":true,"type":"number"},"autoProvisionEnabledAt":{"nullable":true,"type":"string"}},"required":["id","amount","type","maxDuration","couponId","couponTestId"],"additionalProperties":false}},"required":["id","name","externalId","createdAt"],"additionalProperties":false}}}}},"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"}}}},"/customers/{id}":{"get":{"operationId":"getCustomer","x-speakeasy-name-override":"get","summary":"Retrieve a customer","description":"Retrieve a customer by ID for the authenticated workspace.","tags":["Customers"],"security":[{"token":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`)."},"required":true,"description":"The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`)."},{"in":"query","name":"includeExpandedFields","schema":{"description":"Whether to include expanded fields on the customer (`link`, `partner`, `discount`).","type":"boolean"},"description":"Whether to include expanded fields on the customer (`link`, `partner`, `discount`)."}],"responses":{"200":{"description":"The customer object.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`)."},"name":{"type":"string","description":"Name of the customer."},"email":{"description":"Email of the customer.","nullable":true,"type":"string"},"avatar":{"description":"Avatar URL of the customer.","nullable":true,"type":"string"},"externalId":{"type":"string","description":"Unique identifier for the customer in the client's app."},"stripeCustomerId":{"description":"The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.","nullable":true,"type":"string"},"country":{"description":"Country of the customer.","nullable":true,"type":"string"},"sales":{"description":"Total number of sales for the customer.","nullable":true,"type":"number"},"saleAmount":{"description":"Total amount of sales for the customer.","nullable":true,"type":"number"},"createdAt":{"description":"The date the customer was created (usually the signup date or trial start date).","type":"string"},"firstSaleAt":{"description":"The date the customer made their first sale. Useful for calculating the time to first sale and LTV.","nullable":true,"type":"string"},"subscriptionCanceledAt":{"description":"The date the customer canceled their subscription. Useful for calculating LTV and churn rate.","nullable":true,"type":"string"},"link":{"nullable":true,"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."},"shortLink":{"type":"string","format":"uri","description":"The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`)."},"url":{"type":"string","format":"uri","description":"The destination URL of the short link."},"programId":{"nullable":true,"description":"The ID of the program the short link is associated with.","type":"string"}},"required":["id","domain","key","shortLink","url","programId"],"additionalProperties":false},"programId":{"nullable":true,"type":"string"},"partner":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"The partner's unique ID on Dub."},"name":{"type":"string","maxLength":190,"description":"The partner's full legal name."},"email":{"nullable":true,"description":"The partner's email address. Should be a unique value across Dub.","type":"string","maxLength":190},"image":{"nullable":true,"description":"The partner's avatar image.","type":"string"}},"required":["id","name","email","image"],"additionalProperties":false},"discount":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"number"},"type":{"type":"string","enum":["percentage","flat"]},"maxDuration":{"nullable":true,"type":"number"},"couponId":{"nullable":true,"type":"string"},"couponTestId":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"partnersCount":{"nullable":true,"type":"number"},"autoProvisionEnabledAt":{"nullable":true,"type":"string"}},"required":["id","amount","type","maxDuration","couponId","couponTestId"],"additionalProperties":false}},"required":["id","name","externalId","createdAt"],"additionalProperties":false}}}},"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"}}},"patch":{"operationId":"updateCustomer","x-speakeasy-name-override":"update","x-speakeasy-max-method-params":2,"summary":"Update a customer","description":"Update a customer for the authenticated workspace.","tags":["Customers"],"security":[{"token":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`)."},"required":true,"description":"The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`)."},{"in":"query","name":"includeExpandedFields","schema":{"description":"Whether to include expanded fields on the customer (`link`, `partner`, `discount`).","type":"boolean"},"description":"Whether to include expanded fields on the customer (`link`, `partner`, `discount`)."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"description":"The customer's email address.","nullable":true,"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"description":"The customer's name. If not provided, the email address will be used, and if email is not provided, a random name will be generated.","nullable":true,"type":"string"},"avatar":{"description":"The customer's avatar URL. If not provided, a random avatar will be generated.","nullable":true,"type":"string","format":"uri"},"externalId":{"type":"string","description":"The customer's unique identifier your database. This is useful for associating subsequent conversion events from Dub's API to your internal systems."},"stripeCustomerId":{"description":"The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.","nullable":true,"type":"string"},"country":{"type":"string","description":"The customer's country in ISO 3166-1 alpha-2 format. Updating this field will only affect the customer's country in Dub's system (and has no effect on existing conversion events)."}}}}}},"responses":{"200":{"description":"The customer was updated.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`)."},"name":{"type":"string","description":"Name of the customer."},"email":{"description":"Email of the customer.","nullable":true,"type":"string"},"avatar":{"description":"Avatar URL of the customer.","nullable":true,"type":"string"},"externalId":{"type":"string","description":"Unique identifier for the customer in the client's app."},"stripeCustomerId":{"description":"The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.","nullable":true,"type":"string"},"country":{"description":"Country of the customer.","nullable":true,"type":"string"},"sales":{"description":"Total number of sales for the customer.","nullable":true,"type":"number"},"saleAmount":{"description":"Total amount of sales for the customer.","nullable":true,"type":"number"},"createdAt":{"description":"The date the customer was created (usually the signup date or trial start date).","type":"string"},"firstSaleAt":{"description":"The date the customer made their first sale. Useful for calculating the time to first sale and LTV.","nullable":true,"type":"string"},"subscriptionCanceledAt":{"description":"The date the customer canceled their subscription. Useful for calculating LTV and churn rate.","nullable":true,"type":"string"},"link":{"nullable":true,"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."},"shortLink":{"type":"string","format":"uri","description":"The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`)."},"url":{"type":"string","format":"uri","description":"The destination URL of the short link."},"programId":{"nullable":true,"description":"The ID of the program the short link is associated with.","type":"string"}},"required":["id","domain","key","shortLink","url","programId"],"additionalProperties":false},"programId":{"nullable":true,"type":"string"},"partner":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"The partner's unique ID on Dub."},"name":{"type":"string","maxLength":190,"description":"The partner's full legal name."},"email":{"nullable":true,"description":"The partner's email address. Should be a unique value across Dub.","type":"string","maxLength":190},"image":{"nullable":true,"description":"The partner's avatar image.","type":"string"}},"required":["id","name","email","image"],"additionalProperties":false},"discount":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"number"},"type":{"type":"string","enum":["percentage","flat"]},"maxDuration":{"nullable":true,"type":"number"},"couponId":{"nullable":true,"type":"string"},"couponTestId":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"partnersCount":{"nullable":true,"type":"number"},"autoProvisionEnabledAt":{"nullable":true,"type":"string"}},"required":["id","amount","type","maxDuration","couponId","couponTestId"],"additionalProperties":false}},"required":["id","name","externalId","createdAt"],"additionalProperties":false}}}},"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":"deleteCustomer","x-speakeasy-name-override":"delete","x-speakeasy-max-method-params":1,"summary":"Delete a customer","description":"Delete a customer from a workspace.","tags":["Customers"],"security":[{"token":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`)."},"required":true,"description":"The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`)."}],"responses":{"200":{"description":"The customer was deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`)."}},"required":["id"],"additionalProperties":false}}}},"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"}}}},"/partners":{"post":{"operationId":"createPartner","x-speakeasy-name-override":"create","summary":"Create or update a partner","description":"Creates or updates a partner record (upsert behavior). If a partner with the same email already exists, their program enrollment will be updated with the provided tenantId. If no existing partner is found, a new partner will be created using the supplied information.","tags":["Partners"],"security":[{"token":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"description":"The partner's full name. If undefined, the partner's email will be used in lieu of their name (e.g. `john@acme.com`)","nullable":true,"type":"string","maxLength":100},"email":{"type":"string","maxLength":190,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"The partner's email address. Partners will be able to claim their profile by signing up at `partners.lynkr.cc` with this email."},"username":{"description":"The partner's unique username in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email.","nullable":true,"type":"string","maxLength":100},"image":{"description":"The partner's avatar image. If not provided, a default avatar will be used.","nullable":true,"type":"string"},"tenantId":{"description":"The partner's unique ID in your system. Useful for retrieving the partner's links and stats later on. If not provided, the partner will be created as a standalone partner.","type":"string"},"groupId":{"description":"The group ID to add the partner to. If not provided, the partner will be added to the default group.","type":"string"},"country":{"description":"The partner's country of residence. Must be passed as a 2-letter ISO 3166-1 country code. See https://d.to/geo for more information.","nullable":true,"type":"string"},"description":{"description":"A brief description of the partner and their background. Max 5,000 characters.","nullable":true,"type":"string","maxLength":5000},"linkProps":{"description":"Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner.","type":"object","properties":{"keyLength":{"description":"The length of the short link slug. Defaults to 7 if not provided. When used with `prefix`, the total length of the key will be `prefix.length + keyLength`.","type":"number","minimum":3,"maximum":190},"externalId":{"description":"The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace.","example":"123456","nullable":true,"type":"string","minLength":1,"maxLength":255},"tenantId":{"description":"The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant.","nullable":true,"type":"string","maxLength":255},"prefix":{"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.","type":"string"},"archived":{"description":"Whether the short link is archived. Defaults to `false` if not provided.","type":"boolean"},"tagIds":{"description":"The unique IDs of the tags assigned to the short link.","example":["clux0rgak00011..."],"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"tagNames":{"description":"The unique name of the tags assigned to the short link (case insensitive).","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"comments":{"description":"The comments for the short link.","nullable":true,"type":"string"},"expiresAt":{"description":"The date and time when the short link will expire at.","nullable":true,"type":"string"},"expiredUrl":{"description":"The URL to redirect to when the short link has expired.","maxLength":32000,"nullable":true,"type":"string"},"password":{"description":"The password required to access the destination URL of the short link.","nullable":true,"type":"string"},"proxy":{"description":"Whether the short link uses Custom Link Previews feature. Defaults to `false` if not provided.","type":"boolean"},"title":{"description":"The custom link preview title (og:title). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"description":{"description":"The custom link preview description (og:description). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"image":{"description":"The custom link preview image (og:image). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"video":{"description":"The custom link preview video (og:video). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"rewrite":{"description":"Whether the short link uses link cloaking. Defaults to `false` if not provided.","type":"boolean"},"ios":{"description":"The iOS destination URL for the short link for iOS device targeting.","nullable":true,"type":"string","maxLength":32000},"android":{"description":"The Android destination URL for the short link for Android device targeting.","nullable":true,"type":"string","maxLength":32000},"doIndex":{"description":"Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex","type":"boolean"},"testVariants":{"nullable":true,"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"percentage":{"type":"number","minimum":10,"maximum":90}},"required":["url","percentage"]},"description":"An array of A/B test URLs and the percentage of traffic to send to each URL.","example":[{"url":"https://example.com/variant-1","percentage":50},{"url":"https://example.com/variant-2","percentage":50}]},"testStartedAt":{"description":"The date and time when the tests started.","nullable":true,"type":"string"},"testCompletedAt":{"description":"The date and time when the tests were or will be completed.","nullable":true,"type":"string"}}}},"required":["email"]}}}},"responses":{"201":{"description":"The created or updated partner","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The partner's unique ID on Dub."},"name":{"type":"string","maxLength":190,"description":"The partner's full legal name."},"companyName":{"nullable":true,"description":"If the partner profile type is a company, this is the partner's legal company name.","type":"string","maxLength":190},"email":{"nullable":true,"description":"The partner's email address. Should be a unique value across Dub.","type":"string","maxLength":190},"image":{"nullable":true,"description":"The partner's avatar image.","type":"string"},"description":{"description":"A brief description of the partner and their background.","nullable":true,"type":"string","maxLength":5000},"country":{"nullable":true,"description":"The partner's country (required for tax purposes).","type":"string"},"paypalEmail":{"nullable":true,"description":"The partner's PayPal email (for receiving payouts via PayPal).","type":"string"},"stripeConnectId":{"nullable":true,"description":"The partner's Stripe Connect ID (for receiving payouts via Stripe).","type":"string"},"payoutsEnabledAt":{"nullable":true,"description":"The date when the partner enabled payouts.","type":"string"},"trustedAt":{"nullable":true,"description":"The date when the partner received the trusted badge in the partner network.","type":"string"},"programId":{"type":"string","description":"The program's unique ID on Dub."},"groupId":{"description":"The partner's group ID on Dub.","nullable":true,"type":"string"},"partnerId":{"type":"string","description":"The partner's unique ID on Dub."},"tenantId":{"nullable":true,"description":"The partner's unique ID within your database. Can be useful for associating the partner with a user in your database and retrieving/update their data in the future.","type":"string"},"createdAt":{"type":"string"},"status":{"type":"string","enum":["pending","approved","rejected","invited","declined","deactivated","banned","archived"],"description":"The status of the partner's enrollment in the program."},"links":{"nullable":true,"description":"The partner's referral links in this program.","type":"array","items":{"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."},"shortLink":{"type":"string","format":"uri","description":"The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`)."},"url":{"type":"string","format":"uri","description":"The destination URL of the short link."},"clicks":{"default":0,"description":"The number of clicks on the short link.","type":"number"},"leads":{"default":0,"description":"The number of leads the short link has generated.","type":"number"},"conversions":{"default":0,"description":"The number of leads that converted to paying customers.","type":"number"},"sales":{"default":0,"description":"The total number of sales (includes recurring sales) generated by the short link.","type":"number"},"saleAmount":{"default":0,"description":"The total dollar value of sales (in cents) generated by the short link.","type":"number"}},"required":["id","domain","key","shortLink","url","clicks","leads","conversions","sales","saleAmount"],"additionalProperties":false}},"totalCommissions":{"default":0,"description":"The total commissions paid to the partner for their referrals","type":"number"},"clickRewardId":{"nullable":true,"type":"string"},"leadRewardId":{"nullable":true,"type":"string"},"saleRewardId":{"nullable":true,"type":"string"},"discountId":{"nullable":true,"type":"string"},"applicationId":{"description":"If the partner submitted an application to join the program, this is the ID of the application.","nullable":true,"type":"string"},"bannedAt":{"description":"If the partner was banned from the program, this is the date of the ban.","nullable":true,"type":"string"},"bannedReason":{"description":"If the partner was banned from the program, this is the reason for the ban.","nullable":true,"type":"string","enum":["tos_violation","inappropriate_content","fake_traffic","fraud","spam","brand_abuse"]},"referralFormData":{"nullable":true,"type":"object","properties":{"fields":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"locked":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["text"]},"constraints":{"type":"object","properties":{"maxLength":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["key","label","required","locked","position","type"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"locked":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["textarea"]},"constraints":{"type":"object","properties":{"maxLength":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"additionalProperties":false}},"required":["key","label","required","locked","position","type"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"locked":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["select"]},"options":{"minItems":2,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["label","value"],"additionalProperties":false}}},"required":["key","label","required","locked","position","type","options"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"locked":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["country"]}},"required":["key","label","required","locked","position","type"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"locked":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["date"]}},"required":["key","label","required","locked","position","type"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"locked":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["multiSelect"]},"options":{"minItems":2,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["label","value"],"additionalProperties":false}}},"required":["key","label","required","locked","position","type","options"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"locked":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["number"]}},"required":["key","label","required","locked","position","type"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"locked":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["phone"]}},"required":["key","label","required","locked","position","type"],"additionalProperties":false}],"type":"object"}}},"required":["fields"],"additionalProperties":false},"totalClicks":{"default":0,"description":"The total number of clicks on the partner's links","type":"number"},"totalLeads":{"default":0,"description":"The total number of leads generated by the partner's links","type":"number"},"totalConversions":{"default":0,"description":"The total number of leads that converted to paying customers","type":"number"},"totalSales":{"default":0,"description":"The total number of sales generated by the partner's links (includes recurring sales)","type":"number"},"totalSaleAmount":{"default":0,"description":"Total revenue generated by the partner's links","type":"number"},"netRevenue":{"default":0,"description":"Net revenue after commissions (`Total Revenue - Total Commissions`)","type":"number"},"earningsPerClick":{"description":"Earnings Per Click (EPC) (`Total Revenue ÷ Total Clicks`)","nullable":true,"type":"number"},"averageLifetimeValue":{"description":"Average lifetime value for each paying customer (`Total Revenue ÷ Total Conversions`)","nullable":true,"type":"number"},"clickToLeadRate":{"description":"Percentage of clicks that become leads (`Total Leads ÷ Total Clicks`)","nullable":true,"type":"number"},"clickToConversionRate":{"description":"Percentage of clicks that convert to paying customers (`Total Conversions ÷ Total Clicks`)","nullable":true,"type":"number"},"leadToConversionRate":{"description":"Percentage of leads that convert to paying customers (`Total Conversions ÷ Total Leads`)","nullable":true,"type":"number"},"returnOnAdSpend":{"description":"Return On Ad Spend (ROAS) (`Total Revenue ÷ Total Commissions`)","nullable":true,"type":"number"},"website":{"description":"The partner's website URL (including the https protocol).","nullable":true,"type":"string"},"youtube":{"description":"The partner's YouTube channel username (e.g. `johndoe`).","nullable":true,"type":"string"},"twitter":{"description":"The partner's Twitter username (e.g. `johndoe`).","nullable":true,"type":"string"},"linkedin":{"description":"The partner's LinkedIn username (e.g. `johndoe`).","nullable":true,"type":"string"},"instagram":{"description":"The partner's Instagram username (e.g. `johndoe`).","nullable":true,"type":"string"},"tiktok":{"description":"The partner's TikTok username (e.g. `johndoe`).","nullable":true,"type":"string"}},"required":["id","name","companyName","email","image","country","paypalEmail","stripeConnectId","payoutsEnabledAt","trustedAt","programId","partnerId","tenantId","createdAt","status","links","totalCommissions","totalClicks","totalLeads","totalConversions","totalSales","totalSaleAmount","netRevenue"],"additionalProperties":false}}}},"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":"listPartners","x-speakeasy-name-override":"list","summary":"List all partners","description":"List all partners for a partner program.","tags":["Partners"],"security":[{"token":[]}],"parameters":[{"in":"query","name":"status","schema":{"description":"A filter on the list based on the partner's `status` field.","example":"approved","type":"string","enum":["pending","approved","rejected","invited","declined","deactivated","banned","archived"]},"description":"A filter on the list based on the partner's `status` field."},{"in":"query","name":"country","schema":{"description":"A filter on the list based on the partner's `country` field.","example":"US","type":"string"},"description":"A filter on the list based on the partner's `country` field."},{"in":"query","name":"sortBy","schema":{"default":"totalSaleAmount","description":"The field to sort the partners by. The default is `totalSaleAmount`.","example":"totalSaleAmount","type":"string","enum":["createdAt","totalClicks","totalLeads","totalConversions","totalSaleAmount","totalCommissions","netRevenue","earningsPerClick","averageLifetimeValue","clickToLeadRate","clickToConversionRate","leadToConversionRate","returnOnAdSpend"]},"description":"The field to sort the partners by. The default is `totalSaleAmount`."},{"in":"query","name":"sortOrder","schema":{"default":"desc","description":"The sort order. The default is `desc`.","example":"desc","type":"string","enum":["asc","desc"]},"description":"The sort order. The default is `desc`."},{"in":"query","name":"email","schema":{"description":"Filter the partner list based on the partner's `email`. The value must be a string. Takes precedence over `search`.","example":"panic@thedis.co","type":"string"},"description":"Filter the partner list based on the partner's `email`. The value must be a string. Takes precedence over `search`."},{"in":"query","name":"tenantId","schema":{"description":"Filter the partner list based on the partner's `tenantId`. The value must be a string. Takes precedence over `email` and `search`.","example":"1K0NM7HCN944PEMZ3CQPH43H8","type":"string"},"description":"Filter the partner list based on the partner's `tenantId`. The value must be a string. Takes precedence over `email` and `search`."},{"in":"query","name":"search","schema":{"description":"A search query to filter partners by ID, name, email, or link.","example":"john","type":"string"},"description":"A search query to filter partners by ID, name, email, or link."},{"in":"query","name":"page","schema":{"default":1,"description":"The page number for pagination.","example":1,"type":"number","minimum":0,"exclusiveMinimum":true},"description":"The page number for pagination."},{"in":"query","name":"pageSize","schema":{"default":100,"description":"The number of items per page.","example":50,"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":100},"description":"The number of items per page."}],"responses":{"200":{"description":"The list of partners.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The partner's unique ID on Dub."},"name":{"type":"string","maxLength":190,"description":"The partner's full legal name."},"companyName":{"nullable":true,"description":"If the partner profile type is a company, this is the partner's legal company name.","type":"string","maxLength":190},"email":{"nullable":true,"description":"The partner's email address. Should be a unique value across Dub.","type":"string","maxLength":190},"image":{"nullable":true,"description":"The partner's avatar image.","type":"string"},"description":{"description":"A brief description of the partner and their background.","nullable":true,"type":"string","maxLength":5000},"country":{"nullable":true,"description":"The partner's country (required for tax purposes).","type":"string"},"paypalEmail":{"nullable":true,"description":"The partner's PayPal email (for receiving payouts via PayPal).","type":"string"},"stripeConnectId":{"nullable":true,"description":"The partner's Stripe Connect ID (for receiving payouts via Stripe).","type":"string"},"payoutsEnabledAt":{"nullable":true,"description":"The date when the partner enabled payouts.","type":"string"},"trustedAt":{"nullable":true,"description":"The date when the partner received the trusted badge in the partner network.","type":"string"},"programId":{"type":"string","description":"The program's unique ID on Dub."},"groupId":{"description":"The partner's group ID on Dub.","nullable":true,"type":"string"},"partnerId":{"type":"string","description":"The partner's unique ID on Dub."},"tenantId":{"nullable":true,"description":"The partner's unique ID within your database. Can be useful for associating the partner with a user in your database and retrieving/update their data in the future.","type":"string"},"createdAt":{"type":"string"},"status":{"type":"string","enum":["pending","approved","rejected","invited","declined","deactivated","banned","archived"],"description":"The status of the partner's enrollment in the program."},"links":{"nullable":true,"description":"The partner's referral links in this program.","type":"array","items":{"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."},"shortLink":{"type":"string","format":"uri","description":"The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`)."},"url":{"type":"string","format":"uri","description":"The destination URL of the short link."},"clicks":{"default":0,"description":"The number of clicks on the short link.","type":"number"},"leads":{"default":0,"description":"The number of leads the short link has generated.","type":"number"},"conversions":{"default":0,"description":"The number of leads that converted to paying customers.","type":"number"},"sales":{"default":0,"description":"The total number of sales (includes recurring sales) generated by the short link.","type":"number"},"saleAmount":{"default":0,"description":"The total dollar value of sales (in cents) generated by the short link.","type":"number"}},"required":["id","domain","key","shortLink","url","clicks","leads","conversions","sales","saleAmount"],"additionalProperties":false}},"totalCommissions":{"default":0,"description":"The total commissions paid to the partner for their referrals","type":"number"},"clickRewardId":{"nullable":true,"type":"string"},"leadRewardId":{"nullable":true,"type":"string"},"saleRewardId":{"nullable":true,"type":"string"},"discountId":{"nullable":true,"type":"string"},"applicationId":{"description":"If the partner submitted an application to join the program, this is the ID of the application.","nullable":true,"type":"string"},"bannedAt":{"description":"If the partner was banned from the program, this is the date of the ban.","nullable":true,"type":"string"},"bannedReason":{"description":"If the partner was banned from the program, this is the reason for the ban.","nullable":true,"type":"string","enum":["tos_violation","inappropriate_content","fake_traffic","fraud","spam","brand_abuse"]},"referralFormData":{"nullable":true,"type":"object","properties":{"fields":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"locked":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["text"]},"constraints":{"type":"object","properties":{"maxLength":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"pattern":{"type":"string"}},"additionalProperties":false}},"required":["key","label","required","locked","position","type"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"locked":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["textarea"]},"constraints":{"type":"object","properties":{"maxLength":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}},"additionalProperties":false}},"required":["key","label","required","locked","position","type"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"locked":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["select"]},"options":{"minItems":2,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["label","value"],"additionalProperties":false}}},"required":["key","label","required","locked","position","type","options"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"locked":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["country"]}},"required":["key","label","required","locked","position","type"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"locked":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["date"]}},"required":["key","label","required","locked","position","type"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"locked":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["multiSelect"]},"options":{"minItems":2,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["label","value"],"additionalProperties":false}}},"required":["key","label","required","locked","position","type","options"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"locked":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["number"]}},"required":["key","label","required","locked","position","type"],"additionalProperties":false},{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"locked":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["phone"]}},"required":["key","label","required","locked","position","type"],"additionalProperties":false}],"type":"object"}}},"required":["fields"],"additionalProperties":false},"totalClicks":{"default":0,"description":"The total number of clicks on the partner's links","type":"number"},"totalLeads":{"default":0,"description":"The total number of leads generated by the partner's links","type":"number"},"totalConversions":{"default":0,"description":"The total number of leads that converted to paying customers","type":"number"},"totalSales":{"default":0,"description":"The total number of sales generated by the partner's links (includes recurring sales)","type":"number"},"totalSaleAmount":{"default":0,"description":"Total revenue generated by the partner's links","type":"number"},"netRevenue":{"default":0,"description":"Net revenue after commissions (`Total Revenue - Total Commissions`)","type":"number"},"earningsPerClick":{"description":"Earnings Per Click (EPC) (`Total Revenue ÷ Total Clicks`)","nullable":true,"type":"number"},"averageLifetimeValue":{"description":"Average lifetime value for each paying customer (`Total Revenue ÷ Total Conversions`)","nullable":true,"type":"number"},"clickToLeadRate":{"description":"Percentage of clicks that become leads (`Total Leads ÷ Total Clicks`)","nullable":true,"type":"number"},"clickToConversionRate":{"description":"Percentage of clicks that convert to paying customers (`Total Conversions ÷ Total Clicks`)","nullable":true,"type":"number"},"leadToConversionRate":{"description":"Percentage of leads that convert to paying customers (`Total Conversions ÷ Total Leads`)","nullable":true,"type":"number"},"returnOnAdSpend":{"description":"Return On Ad Spend (ROAS) (`Total Revenue ÷ Total Commissions`)","nullable":true,"type":"number"},"website":{"description":"The partner's website URL (including the https protocol).","nullable":true,"type":"string"},"youtube":{"description":"The partner's YouTube channel username (e.g. `johndoe`).","nullable":true,"type":"string"},"twitter":{"description":"The partner's Twitter username (e.g. `johndoe`).","nullable":true,"type":"string"},"linkedin":{"description":"The partner's LinkedIn username (e.g. `johndoe`).","nullable":true,"type":"string"},"instagram":{"description":"The partner's Instagram username (e.g. `johndoe`).","nullable":true,"type":"string"},"tiktok":{"description":"The partner's TikTok username (e.g. `johndoe`).","nullable":true,"type":"string"}},"required":["id","name","companyName","email","image","country","paypalEmail","stripeConnectId","payoutsEnabledAt","trustedAt","programId","partnerId","tenantId","createdAt","status","links","totalCommissions","totalClicks","totalLeads","totalConversions","totalSales","totalSaleAmount","netRevenue"],"additionalProperties":false}}}}},"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"}}}},"/partners/links":{"post":{"operationId":"createPartnerLink","x-speakeasy-name-override":"createLink","summary":"Create a link for a partner","description":"Create a link for a partner that is enrolled in your program.","tags":["Partners"],"security":[{"token":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"partnerId":{"description":"The ID of the partner to create a link for. Will take precedence over `tenantId` if provided.","nullable":true,"type":"string"},"tenantId":{"description":"The ID of the partner in your system. If both `partnerId` and `tenantId` are not provided, an error will be thrown.","nullable":true,"type":"string"},"url":{"nullable":true,"description":"The URL to shorten (if not provided, the program's default URL will be used). Will throw an error if the domain doesn't match the program's default URL domain.","type":"string","maxLength":32000},"key":{"description":"The short link slug. If not provided, a random 7-character slug will be generated.","type":"string","maxLength":190},"comments":{"description":"The comments for the short link.","nullable":true,"type":"string"},"linkProps":{"description":"Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner.","type":"object","properties":{"keyLength":{"description":"The length of the short link slug. Defaults to 7 if not provided. When used with `prefix`, the total length of the key will be `prefix.length + keyLength`.","type":"number","minimum":3,"maximum":190},"externalId":{"description":"The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace.","example":"123456","nullable":true,"type":"string","minLength":1,"maxLength":255},"tenantId":{"description":"The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant.","nullable":true,"type":"string","maxLength":255},"prefix":{"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.","type":"string"},"archived":{"description":"Whether the short link is archived. Defaults to `false` if not provided.","type":"boolean"},"tagIds":{"description":"The unique IDs of the tags assigned to the short link.","example":["clux0rgak00011..."],"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"tagNames":{"description":"The unique name of the tags assigned to the short link (case insensitive).","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"comments":{"description":"The comments for the short link.","nullable":true,"type":"string"},"expiresAt":{"description":"The date and time when the short link will expire at.","nullable":true,"type":"string"},"expiredUrl":{"description":"The URL to redirect to when the short link has expired.","maxLength":32000,"nullable":true,"type":"string"},"password":{"description":"The password required to access the destination URL of the short link.","nullable":true,"type":"string"},"proxy":{"description":"Whether the short link uses Custom Link Previews feature. Defaults to `false` if not provided.","type":"boolean"},"title":{"description":"The custom link preview title (og:title). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"description":{"description":"The custom link preview description (og:description). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"image":{"description":"The custom link preview image (og:image). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"video":{"description":"The custom link preview video (og:video). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"rewrite":{"description":"Whether the short link uses link cloaking. Defaults to `false` if not provided.","type":"boolean"},"ios":{"description":"The iOS destination URL for the short link for iOS device targeting.","nullable":true,"type":"string","maxLength":32000},"android":{"description":"The Android destination URL for the short link for Android device targeting.","nullable":true,"type":"string","maxLength":32000},"doIndex":{"description":"Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex","type":"boolean"},"testVariants":{"nullable":true,"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"percentage":{"type":"number","minimum":10,"maximum":90}},"required":["url","percentage"]},"description":"An array of A/B test URLs and the percentage of traffic to send to each URL.","example":[{"url":"https://example.com/variant-1","percentage":50},{"url":"https://example.com/variant-2","percentage":50}]},"testStartedAt":{"description":"The date and time when the tests started.","nullable":true,"type":"string"},"testCompletedAt":{"description":"The date and time when the tests were or will be completed.","nullable":true,"type":"string"}}}}}}}},"responses":{"201":{"description":"The created partner 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":"retrieveLinks","x-speakeasy-name-override":"retrieveLinks","summary":"Retrieve a partner's links.","description":"Retrieve a partner's links by their partner ID or tenant ID.","tags":["Partners"],"security":[{"token":[]}],"parameters":[{"in":"query","name":"partnerId","schema":{"description":"The ID of the partner to create a link for. Will take precedence over `tenantId` if provided.","nullable":true,"type":"string"},"description":"The ID of the partner to create a link for. Will take precedence over `tenantId` if provided."},{"in":"query","name":"tenantId","schema":{"description":"The ID of the partner in your system. If both `partnerId` and `tenantId` are not provided, an error will be thrown.","nullable":true,"type":"string"},"description":"The ID of the partner in your system. If both `partnerId` and `tenantId` are not provided, an error will be thrown."}],"responses":{"200":{"description":"The retrieved partner links.","content":{"application/json":{"schema":{"type":"array","items":{"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."},"shortLink":{"type":"string","format":"uri","description":"The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`)."},"url":{"type":"string","format":"uri","description":"The destination URL of the short link."},"clicks":{"default":0,"description":"The number of clicks on the short link.","type":"number"},"leads":{"default":0,"description":"The number of leads the short link has generated.","type":"number"},"conversions":{"default":0,"description":"The number of leads that converted to paying customers.","type":"number"},"sales":{"default":0,"description":"The total number of sales (includes recurring sales) generated by the short link.","type":"number"},"saleAmount":{"default":0,"description":"The total dollar value of sales (in cents) generated by the short link.","type":"number"}},"required":["id","domain","key","shortLink","url","clicks","leads","conversions","sales","saleAmount"],"additionalProperties":false}}}}},"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"}}}},"/partners/links/upsert":{"put":{"operationId":"upsertPartnerLink","x-speakeasy-name-override":"upsertLink","summary":"Upsert a link for a partner","description":"Upsert a link for a partner that is enrolled in your program. 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":["Partners"],"security":[{"token":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"partnerId":{"description":"The ID of the partner to create a link for. Will take precedence over `tenantId` if provided.","nullable":true,"type":"string"},"tenantId":{"description":"The ID of the partner in your system. If both `partnerId` and `tenantId` are not provided, an error will be thrown.","nullable":true,"type":"string"},"url":{"description":"The URL to upsert for. Will throw an error if the domain doesn't match the program's default URL domain.","type":"string","maxLength":32000},"key":{"description":"The short link slug. If not provided, a random 7-character slug will be generated.","type":"string","maxLength":190},"comments":{"description":"The comments for the short link.","nullable":true,"type":"string"},"linkProps":{"description":"Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner.","type":"object","properties":{"keyLength":{"description":"The length of the short link slug. Defaults to 7 if not provided. When used with `prefix`, the total length of the key will be `prefix.length + keyLength`.","type":"number","minimum":3,"maximum":190},"externalId":{"description":"The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace.","example":"123456","nullable":true,"type":"string","minLength":1,"maxLength":255},"tenantId":{"description":"The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant.","nullable":true,"type":"string","maxLength":255},"prefix":{"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.","type":"string"},"archived":{"description":"Whether the short link is archived. Defaults to `false` if not provided.","type":"boolean"},"tagIds":{"description":"The unique IDs of the tags assigned to the short link.","example":["clux0rgak00011..."],"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"tagNames":{"description":"The unique name of the tags assigned to the short link (case insensitive).","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"comments":{"description":"The comments for the short link.","nullable":true,"type":"string"},"expiresAt":{"description":"The date and time when the short link will expire at.","nullable":true,"type":"string"},"expiredUrl":{"description":"The URL to redirect to when the short link has expired.","maxLength":32000,"nullable":true,"type":"string"},"password":{"description":"The password required to access the destination URL of the short link.","nullable":true,"type":"string"},"proxy":{"description":"Whether the short link uses Custom Link Previews feature. Defaults to `false` if not provided.","type":"boolean"},"title":{"description":"The custom link preview title (og:title). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"description":{"description":"The custom link preview description (og:description). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"image":{"description":"The custom link preview image (og:image). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"video":{"description":"The custom link preview video (og:video). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"rewrite":{"description":"Whether the short link uses link cloaking. Defaults to `false` if not provided.","type":"boolean"},"ios":{"description":"The iOS destination URL for the short link for iOS device targeting.","nullable":true,"type":"string","maxLength":32000},"android":{"description":"The Android destination URL for the short link for Android device targeting.","nullable":true,"type":"string","maxLength":32000},"doIndex":{"description":"Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex","type":"boolean"},"testVariants":{"nullable":true,"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"percentage":{"type":"number","minimum":10,"maximum":90}},"required":["url","percentage"]},"description":"An array of A/B test URLs and the percentage of traffic to send to each URL.","example":[{"url":"https://example.com/variant-1","percentage":50},{"url":"https://example.com/variant-2","percentage":50}]},"testStartedAt":{"description":"The date and time when the tests started.","nullable":true,"type":"string"},"testCompletedAt":{"description":"The date and time when the tests were or will be completed.","nullable":true,"type":"string"}}}},"required":["url"]}}}},"responses":{"200":{"description":"The upserted partner 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"}}}},"/partners/analytics":{"get":{"operationId":"retrievePartnerAnalytics","x-speakeasy-name-override":"analytics","summary":"Retrieve analytics for a partner","description":"Retrieve analytics for a partner within a program. The response type vary based on the `groupBy` query parameter.","tags":["Partners"],"security":[{"token":[]}],"parameters":[{"in":"query","name":"partnerId","schema":{"description":"The ID of the partner to create a link for. Will take precedence over `tenantId` if provided.","nullable":true,"type":"string"},"description":"The ID of the partner to create a link for. Will take precedence over `tenantId` if provided."},{"in":"query","name":"tenantId","schema":{"description":"The ID of the partner in your system. If both `partnerId` and `tenantId` are not provided, an error will be thrown.","nullable":true,"type":"string"},"description":"The ID of the partner in your system. If both `partnerId` and `tenantId` are not provided, an error will be thrown."},{"in":"query","name":"interval","schema":{"description":"The interval to retrieve analytics for. If undefined, defaults to 24h.","type":"string","enum":["24h","7d","30d","90d","1y","mtd","qtd","ytd","all"]},"description":"The interval to retrieve analytics for. If undefined, defaults to 24h."},{"in":"query","name":"start","schema":{"description":"The start date and time when to retrieve analytics from. If set, takes precedence over `interval`.","type":"string"},"description":"The start date and time when to retrieve analytics from. If set, takes precedence over `interval`."},{"in":"query","name":"end","schema":{"description":"The end date and time when to retrieve analytics from. If not provided, defaults to the current date. If set along with `start`, takes precedence over `interval`.","type":"string"},"description":"The end date and time when to retrieve analytics from. If not provided, defaults to the current date. If set along with `start`, takes precedence over `interval`."},{"in":"query","name":"timezone","schema":{"description":"The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC.","example":"America/New_York","default":"UTC","type":"string"},"description":"The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC."},{"in":"query","name":"query","schema":{"description":"Search the events by a custom metadata value. Only available for lead and sale events.","example":"metadata['key']:'value'","type":"string","maxLength":10000},"description":"Search the events by a custom metadata value. Only available for lead and sale events."},{"in":"query","name":"groupBy","schema":{"default":"count","description":"The parameter to group the analytics data points by. Defaults to `count` if undefined.","type":"string","enum":["top_links","timeseries","count"]},"description":"The parameter to group the analytics data points by. Defaults to `count` if undefined."}],"responses":{"200":{"description":"Partner analytics data","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PartnerAnalyticsCount"},{"type":"array","items":{"$ref":"#/components/schemas/PartnerAnalyticsTimeseries"}},{"type":"array","items":{"$ref":"#/components/schemas/PartnerAnalyticsTopLinks"}}]}}}},"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"}}}},"/partners/ban":{"post":{"operationId":"banPartner","x-speakeasy-name-override":"ban","summary":"Ban a partner","description":"Ban a partner from your program. This will disable all links and mark all commissions as canceled.","tags":["Partners"],"security":[{"token":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"partnerId":{"description":"The ID of the partner to create a link for. Will take precedence over `tenantId` if provided.","nullable":true,"type":"string"},"tenantId":{"description":"The ID of the partner in your system. If both `partnerId` and `tenantId` are not provided, an error will be thrown.","nullable":true,"type":"string"},"reason":{"type":"string","enum":["tos_violation","inappropriate_content","fake_traffic","fraud","spam","brand_abuse"]}},"required":["reason"]}}}},"responses":{"200":{"description":"The banned partner","content":{"application/json":{"schema":{"type":"object","properties":{"partnerId":{"type":"string","description":"The ID of the banned partner."}},"required":["partnerId"],"additionalProperties":false}}}},"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"}}}},"/partners/deactivate":{"post":{"operationId":"deactivatePartner","x-speakeasy-name-override":"deactivate","summary":"Deactivate a partner","description":"This will deactivate the partner from your program and disable all their active links. Their commissions and payouts will remain intact. You can reactivate them later if needed.","tags":["Partners"],"security":[{"token":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"partnerId":{"description":"The ID of the partner to create a link for. Will take precedence over `tenantId` if provided.","nullable":true,"type":"string"},"tenantId":{"description":"The ID of the partner in your system. If both `partnerId` and `tenantId` are not provided, an error will be thrown.","nullable":true,"type":"string"}}}}}},"responses":{"200":{"description":"The deactivated partner","content":{"application/json":{"schema":{"type":"object","properties":{"partnerId":{"type":"string","description":"The ID of the deactivated partner."}},"required":["partnerId"],"additionalProperties":false}}}},"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"}}}},"/commissions":{"get":{"operationId":"listCommissions","x-speakeasy-name-override":"list","summary":"Get commissions for a program.","description":"Retrieve a list of commissions for a program.","tags":["Commissions"],"security":[{"token":[]}],"parameters":[{"in":"query","name":"type","schema":{"type":"string","enum":["click","lead","sale","custom"]}},{"in":"query","name":"customerId","schema":{"description":"Filter the list of commissions by the associated customer.","type":"string"},"description":"Filter the list of commissions by the associated customer."},{"in":"query","name":"payoutId","schema":{"description":"Filter the list of commissions by the associated payout.","type":"string"},"description":"Filter the list of commissions by the associated payout."},{"in":"query","name":"partnerId","schema":{"description":"Filter the list of commissions by the associated partner. When specified, takes precedence over `tenantId`.","type":"string"},"description":"Filter the list of commissions by the associated partner. When specified, takes precedence over `tenantId`."},{"in":"query","name":"tenantId","schema":{"description":"Filter the list of commissions by the associated partner's `tenantId` (their unique ID within your database).","type":"string"},"description":"Filter the list of commissions by the associated partner's `tenantId` (their unique ID within your database)."},{"in":"query","name":"groupId","schema":{"description":"Filter the list of commissions by the associated partner group.","type":"string"},"description":"Filter the list of commissions by the associated partner group."},{"in":"query","name":"invoiceId","schema":{"description":"Filter the list of commissions by the associated invoice. Since invoiceId is unique on a per-program basis, this will only return one commission per invoice.","type":"string"},"description":"Filter the list of commissions by the associated invoice. Since invoiceId is unique on a per-program basis, this will only return one commission per invoice."},{"in":"query","name":"status","schema":{"description":"Filter the list of commissions by their corresponding status.","type":"string","enum":["pending","processed","paid","refunded","duplicate","fraud","canceled"]},"description":"Filter the list of commissions by their corresponding status."},{"in":"query","name":"sortBy","schema":{"default":"createdAt","description":"The field to sort the list of commissions by.","type":"string","enum":["createdAt","amount"]},"description":"The field to sort the list of commissions by."},{"in":"query","name":"sortOrder","schema":{"default":"desc","description":"The sort order for the list of commissions.","type":"string","enum":["asc","desc"]},"description":"The sort order for the list of commissions."},{"in":"query","name":"interval","schema":{"default":"all","description":"The interval to retrieve commissions for.","type":"string","enum":["24h","7d","30d","90d","1y","mtd","qtd","ytd","all"]},"description":"The interval to retrieve commissions for."},{"in":"query","name":"start","schema":{"description":"The start date of the date range to filter the commissions by.","type":"string"},"description":"The start date of the date range to filter the commissions by."},{"in":"query","name":"end","schema":{"description":"The end date of the date range to filter the commissions by.","type":"string"},"description":"The end date of the date range to filter the commissions by."},{"in":"query","name":"timezone","schema":{"type":"string"}},{"in":"query","name":"page","schema":{"default":1,"description":"The page number for pagination.","example":1,"type":"number","minimum":0,"exclusiveMinimum":true},"description":"The page number for pagination."},{"in":"query","name":"pageSize","schema":{"default":100,"description":"The number of items per page.","example":50,"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":100},"description":"The number of items per page."}],"responses":{"200":{"description":"The list of commissions.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The commission's unique ID on Dub.","example":"cm_1JVR7XRCSR0EDBAF39FZ4PMYE"},"type":{"type":"string","enum":["click","lead","sale","custom"]},"amount":{"type":"number"},"earnings":{"type":"number"},"currency":{"type":"string"},"status":{"type":"string","enum":["pending","processed","paid","refunded","duplicate","fraud","canceled"]},"invoiceId":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"quantity":{"type":"number"},"userId":{"description":"The user who created the manual commission.","nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"partner":{"type":"object","properties":{"id":{"type":"string","description":"The partner's unique ID on Dub."},"name":{"type":"string","maxLength":190,"description":"The partner's full legal name."},"email":{"nullable":true,"description":"The partner's email address. Should be a unique value across Dub.","type":"string","maxLength":190},"image":{"nullable":true,"description":"The partner's avatar image.","type":"string"},"payoutsEnabledAt":{"nullable":true,"description":"The date when the partner enabled payouts.","type":"string"},"country":{"nullable":true,"description":"The partner's country (required for tax purposes).","type":"string"},"groupId":{"description":"The partner's group ID on Dub.","nullable":true,"type":"string"}},"required":["id","name","email","image","payoutsEnabledAt","country"],"additionalProperties":false},"customer":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`)."},"name":{"type":"string","description":"Name of the customer."},"email":{"description":"Email of the customer.","nullable":true,"type":"string"},"avatar":{"description":"Avatar URL of the customer.","nullable":true,"type":"string"},"externalId":{"type":"string","description":"Unique identifier for the customer in the client's app."},"stripeCustomerId":{"description":"The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.","nullable":true,"type":"string"},"country":{"description":"Country of the customer.","nullable":true,"type":"string"},"sales":{"description":"Total number of sales for the customer.","nullable":true,"type":"number"},"saleAmount":{"description":"Total amount of sales for the customer.","nullable":true,"type":"number"},"createdAt":{"description":"The date the customer was created (usually the signup date or trial start date).","type":"string"},"firstSaleAt":{"description":"The date the customer made their first sale. Useful for calculating the time to first sale and LTV.","nullable":true,"type":"string"},"subscriptionCanceledAt":{"description":"The date the customer canceled their subscription. Useful for calculating LTV and churn rate.","nullable":true,"type":"string"}},"required":["id","name","externalId","createdAt"],"additionalProperties":false}},"required":["id","amount","earnings","currency","status","invoiceId","description","quantity","createdAt","updatedAt","partner"],"additionalProperties":false}}}}},"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"}}}},"/commissions/{id}":{"patch":{"operationId":"updateCommission","x-speakeasy-name-override":"update","summary":"Update a commission.","description":"Update an existing commission amount. This is useful for handling refunds (partial or full) or fraudulent sales.","tags":["Commissions"],"security":[{"token":[]}],"parameters":[{"in":"path","name":"id","schema":{"type":"string","description":"The commission's unique ID on Dub.","example":"cm_1JVR7XRCSR0EDBAF39FZ4PMYE"},"required":true,"description":"The commission's unique ID on Dub."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","minimum":0,"description":"The new absolute amount for the sale. Paid commissions cannot be updated."},"modifyAmount":{"type":"number","description":"Modify the current sale amount: use positive values to increase the amount, negative values to decrease it. Takes precedence over `amount`. Paid commissions cannot be updated."},"currency":{"description":"The currency of the sale amount to update. Accepts ISO 4217 currency codes.","default":"usd","type":"string"},"status":{"description":"Useful for marking a commission as refunded, duplicate, canceled, or fraudulent. Takes precedence over `amount` and `modifyAmount`. When a commission is marked as refunded, duplicate, canceled, or fraudulent, it will be omitted from the payout, and the payout amount will be recalculated accordingly. Paid commissions cannot be updated.","type":"string","enum":["refunded","duplicate","canceled","fraud"]}}}}}},"responses":{"200":{"description":"The updated commission.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The commission's unique ID on Dub.","example":"cm_1JVR7XRCSR0EDBAF39FZ4PMYE"},"type":{"type":"string","enum":["click","lead","sale","custom"]},"amount":{"type":"number"},"earnings":{"type":"number"},"currency":{"type":"string"},"status":{"type":"string","enum":["pending","processed","paid","refunded","duplicate","fraud","canceled"]},"invoiceId":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"quantity":{"type":"number"},"userId":{"description":"The user who created the manual commission.","nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"partner":{"type":"object","properties":{"id":{"type":"string","description":"The partner's unique ID on Dub."},"name":{"type":"string","maxLength":190,"description":"The partner's full legal name."},"email":{"nullable":true,"description":"The partner's email address. Should be a unique value across Dub.","type":"string","maxLength":190},"image":{"nullable":true,"description":"The partner's avatar image.","type":"string"},"payoutsEnabledAt":{"nullable":true,"description":"The date when the partner enabled payouts.","type":"string"},"country":{"nullable":true,"description":"The partner's country (required for tax purposes).","type":"string"},"groupId":{"description":"The partner's group ID on Dub.","nullable":true,"type":"string"}},"required":["id","name","email","image","payoutsEnabledAt","country"],"additionalProperties":false},"customer":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`)."},"name":{"type":"string","description":"Name of the customer."},"email":{"description":"Email of the customer.","nullable":true,"type":"string"},"avatar":{"description":"Avatar URL of the customer.","nullable":true,"type":"string"},"externalId":{"type":"string","description":"Unique identifier for the customer in the client's app."},"stripeCustomerId":{"description":"The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.","nullable":true,"type":"string"},"country":{"description":"Country of the customer.","nullable":true,"type":"string"},"sales":{"description":"Total number of sales for the customer.","nullable":true,"type":"number"},"saleAmount":{"description":"Total amount of sales for the customer.","nullable":true,"type":"number"},"createdAt":{"description":"The date the customer was created (usually the signup date or trial start date).","type":"string"},"firstSaleAt":{"description":"The date the customer made their first sale. Useful for calculating the time to first sale and LTV.","nullable":true,"type":"string"},"subscriptionCanceledAt":{"description":"The date the customer canceled their subscription. Useful for calculating LTV and churn rate.","nullable":true,"type":"string"}},"required":["id","name","externalId","createdAt"],"additionalProperties":false}},"required":["id","amount","earnings","currency","status","invoiceId","description","quantity","createdAt","updatedAt","partner"],"additionalProperties":false}}}},"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"}}}},"/tokens/embed/referrals":{"post":{"operationId":"createReferralsEmbedToken","x-speakeasy-name-override":"referrals","summary":"Create a referrals embed token","description":"Create a referrals embed token for the given partner/tenant.","tags":["Embed Tokens"],"security":[{"token":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"partnerId":{"type":"string"},"tenantId":{"type":"string"},"partner":{"type":"object","properties":{"name":{"description":"The partner's full name. If undefined, the partner's email will be used in lieu of their name (e.g. `john@acme.com`)","nullable":true,"type":"string","maxLength":100},"email":{"type":"string","maxLength":190,"format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"The partner's email address. Partners will be able to claim their profile by signing up at `partners.lynkr.cc` with this email."},"username":{"description":"The partner's unique username in your system (max 100 characters). This will be used to create a short link for the partner using your program's default domain. If not provided, Dub will try to generate a username from the partner's name or email.","nullable":true,"type":"string","maxLength":100},"image":{"description":"The partner's avatar image. If not provided, a default avatar will be used.","nullable":true,"type":"string"},"tenantId":{"description":"The partner's unique ID in your system. Useful for retrieving the partner's links and stats later on. If not provided, the partner will be created as a standalone partner.","type":"string"},"groupId":{"description":"The group ID to add the partner to. If not provided, the partner will be added to the default group.","type":"string"},"country":{"description":"The partner's country of residence. Must be passed as a 2-letter ISO 3166-1 country code. See https://d.to/geo for more information.","nullable":true,"type":"string"},"description":{"description":"A brief description of the partner and their background. Max 5,000 characters.","nullable":true,"type":"string","maxLength":5000},"linkProps":{"description":"Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner.","type":"object","properties":{"keyLength":{"description":"The length of the short link slug. Defaults to 7 if not provided. When used with `prefix`, the total length of the key will be `prefix.length + keyLength`.","type":"number","minimum":3,"maximum":190},"externalId":{"description":"The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace.","example":"123456","nullable":true,"type":"string","minLength":1,"maxLength":255},"tenantId":{"description":"The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant.","nullable":true,"type":"string","maxLength":255},"prefix":{"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.","type":"string"},"archived":{"description":"Whether the short link is archived. Defaults to `false` if not provided.","type":"boolean"},"tagIds":{"description":"The unique IDs of the tags assigned to the short link.","example":["clux0rgak00011..."],"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"tagNames":{"description":"The unique name of the tags assigned to the short link (case insensitive).","anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"comments":{"description":"The comments for the short link.","nullable":true,"type":"string"},"expiresAt":{"description":"The date and time when the short link will expire at.","nullable":true,"type":"string"},"expiredUrl":{"description":"The URL to redirect to when the short link has expired.","maxLength":32000,"nullable":true,"type":"string"},"password":{"description":"The password required to access the destination URL of the short link.","nullable":true,"type":"string"},"proxy":{"description":"Whether the short link uses Custom Link Previews feature. Defaults to `false` if not provided.","type":"boolean"},"title":{"description":"The custom link preview title (og:title). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"description":{"description":"The custom link preview description (og:description). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"image":{"description":"The custom link preview image (og:image). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"video":{"description":"The custom link preview video (og:video). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","nullable":true,"type":"string"},"rewrite":{"description":"Whether the short link uses link cloaking. Defaults to `false` if not provided.","type":"boolean"},"ios":{"description":"The iOS destination URL for the short link for iOS device targeting.","nullable":true,"type":"string","maxLength":32000},"android":{"description":"The Android destination URL for the short link for Android device targeting.","nullable":true,"type":"string","maxLength":32000},"doIndex":{"description":"Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex","type":"boolean"},"testVariants":{"nullable":true,"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"percentage":{"type":"number","minimum":10,"maximum":90}},"required":["url","percentage"]},"description":"An array of A/B test URLs and the percentage of traffic to send to each URL.","example":[{"url":"https://example.com/variant-1","percentage":50},{"url":"https://example.com/variant-2","percentage":50}]},"testStartedAt":{"description":"The date and time when the tests started.","nullable":true,"type":"string"},"testCompletedAt":{"description":"The date and time when the tests were or will be completed.","nullable":true,"type":"string"}}}},"required":["email"]}}}}}},"responses":{"201":{"description":"The created public embed token.","content":{"application/json":{"schema":{"type":"object","properties":{"publicToken":{"type":"string"},"expires":{"type":"string"}},"required":["publicToken","expires"],"additionalProperties":false}}}},"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","schema":{"description":"The URL to generate a QR code for.","type":"string","maxLength":32000},"required":true,"description":"The URL to generate a QR code for."},{"in":"query","name":"logo","schema":{"description":"The logo to include in the QR code. Can only be used with a paid plan on Dub.","type":"string"},"description":"The logo to include in the QR code. Can only be used with a paid plan on Dub."},{"in":"query","name":"size","schema":{"default":600,"description":"The size of the QR code in pixels. Defaults to `600` if not provided.","type":"number"},"description":"The size of the QR code in pixels. Defaults to `600` if not provided."},{"in":"query","name":"level","schema":{"default":"L","description":"The level of error correction to use for the QR code. Defaults to `L` if not provided.","type":"string","enum":["L","M","Q","H"]},"description":"The level of error correction to use for the QR code. Defaults to `L` if not provided."},{"in":"query","name":"fgColor","schema":{"default":"#000000","description":"The foreground color of the QR code in hex format. Defaults to `#000000` if not provided.","type":"string"},"description":"The foreground color of the QR code in hex format. Defaults to `#000000` if not provided."},{"in":"query","name":"bgColor","schema":{"default":"#FFFFFF","description":"The background color of the QR code in hex format. Defaults to `#ffffff` if not provided.","type":"string"},"description":"The background color of the QR code in hex format. Defaults to `#ffffff` if not provided."},{"in":"query","name":"hideLogo","schema":{"default":false,"description":"Whether to hide the logo in the QR code. Can only be used with a paid plan on Dub.","type":"boolean"},"description":"Whether to hide the logo in the QR code. Can only be used with a paid plan on Dub."},{"in":"query","name":"margin","schema":{"default":2,"description":"The size of the margin around the QR code. Defaults to 2 if not provided.","type":"number"},"description":"The size of the margin around the QR code. Defaults to 2 if not provided."},{"in":"query","name":"includeMargin","schema":{"default":true,"description":"DEPRECATED: Margin is included by default. Use the `margin` prop to customize the margin size.","deprecated":true,"type":"boolean"},"description":"DEPRECATED: Margin is included by default. Use the `margin` prop to customize the margin size."}],"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"}}}},"/bounties/{bountyId}/submissions":{"get":{"operationId":"listBountySubmissions","x-speakeasy-name-override":"listSubmissions","summary":"List bounty submissions","description":"List all submissions for a specific bounty.","tags":["Bounties"],"security":[{"token":[]}],"parameters":[{"in":"path","name":"bountyId","schema":{"type":"string","description":"The ID of the bounty"},"required":true,"description":"The ID of the bounty"},{"in":"query","name":"status","schema":{"description":"The status of the submissions to list.","type":"string","enum":["draft","submitted","approved","rejected"]},"description":"The status of the submissions to list."},{"in":"query","name":"groupId","schema":{"description":"The ID of the group to list submissions for.","type":"string"},"description":"The ID of the group to list submissions for."},{"in":"query","name":"partnerId","schema":{"description":"The ID of the partner to list submissions for.","type":"string"},"description":"The ID of the partner to list submissions for."},{"in":"query","name":"sortBy","schema":{"default":"completedAt","description":"The field to sort the submissions by.","type":"string","enum":["completedAt","performanceCount"]},"description":"The field to sort the submissions by."},{"in":"query","name":"sortOrder","schema":{"default":"asc","description":"The order to sort the submissions by.","type":"string","enum":["asc","desc"]},"description":"The order to sort the submissions by."},{"in":"query","name":"page","schema":{"default":1,"description":"The page number for pagination.","example":1,"type":"number","minimum":0,"exclusiveMinimum":true},"description":"The page number for pagination."},{"in":"query","name":"pageSize","schema":{"default":100,"description":"The number of items per page.","example":50,"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":100},"description":"The number of items per page."}],"responses":{"200":{"description":"The list of bounty submissions.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the bounty submission"},"bountyId":{"type":"string","description":"The ID of the bounty"},"partnerId":{"type":"string","description":"The ID of the partner"},"description":{"nullable":true,"description":"The description of the submission","type":"string"},"urls":{"nullable":true,"description":"The URLs submitted for the submission","type":"array","items":{"type":"string"}},"files":{"nullable":true,"description":"The files uploaded for the submission","type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"The URL of the uploaded file."},"fileName":{"type":"string","description":"The original file name."},"size":{"type":"number","description":"The file size in bytes."}},"required":["url","fileName","size"],"additionalProperties":false}},"status":{"type":"string","enum":["draft","submitted","approved","rejected"],"description":"The status of the submission"},"performanceCount":{"nullable":true,"description":"The performance count of the submission","type":"number"},"createdAt":{"description":"The date and time the submission was created","type":"string"},"completedAt":{"nullable":true,"description":"The date and time the submission was completed","type":"string"},"reviewedAt":{"nullable":true,"description":"The date and time the submission was reviewed","type":"string"},"rejectionReason":{"nullable":true,"description":"The reason for rejecting the submission","type":"string"},"rejectionNote":{"nullable":true,"description":"The note for rejecting the submission","type":"string"}},"required":["id","bountyId","partnerId","description","urls","files","status","performanceCount","createdAt","completedAt","reviewedAt","rejectionReason","rejectionNote"],"additionalProperties":false}}}}},"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"}}}},"/bounties/{bountyId}/submissions/{submissionId}/approve":{"post":{"operationId":"approveBountySubmission","x-speakeasy-name-override":"approveSubmission","summary":"Approve a bounty submission","description":"Approve a bounty submission. Optionally specify a custom reward amount.","tags":["Bounties"],"security":[{"token":[]}],"parameters":[{"in":"path","name":"bountyId","schema":{"type":"string","description":"The ID of the bounty"},"required":true,"description":"The ID of the bounty"},{"in":"path","name":"submissionId","schema":{"type":"string","description":"The ID of the bounty submission"},"required":true,"description":"The ID of the bounty submission"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"rewardAmount":{"description":"The reward amount for the performance-based bounty. Applicable if the bounty reward amount is not set.","nullable":true,"type":"number"}}}}}},"responses":{"200":{"description":"The approved bounty submission.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the bounty submission"},"bountyId":{"type":"string","description":"The ID of the bounty"},"partnerId":{"type":"string","description":"The ID of the partner"},"description":{"nullable":true,"description":"The description of the submission","type":"string"},"urls":{"nullable":true,"description":"The URLs submitted for the submission","type":"array","items":{"type":"string"}},"files":{"nullable":true,"description":"The files uploaded for the submission","type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"The URL of the uploaded file."},"fileName":{"type":"string","description":"The original file name."},"size":{"type":"number","description":"The file size in bytes."}},"required":["url","fileName","size"],"additionalProperties":false}},"status":{"type":"string","enum":["draft","submitted","approved","rejected"],"description":"The status of the submission"},"performanceCount":{"nullable":true,"description":"The performance count of the submission","type":"number"},"createdAt":{"description":"The date and time the submission was created","type":"string"},"completedAt":{"nullable":true,"description":"The date and time the submission was completed","type":"string"},"reviewedAt":{"nullable":true,"description":"The date and time the submission was reviewed","type":"string"},"rejectionReason":{"nullable":true,"description":"The reason for rejecting the submission","type":"string"},"rejectionNote":{"nullable":true,"description":"The note for rejecting the submission","type":"string"}},"required":["id","bountyId","partnerId","description","urls","files","status","performanceCount","createdAt","completedAt","reviewedAt","rejectionReason","rejectionNote"],"additionalProperties":false}}}},"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"}}}},"/bounties/{bountyId}/submissions/{submissionId}/reject":{"post":{"operationId":"rejectBountySubmission","x-speakeasy-name-override":"rejectSubmission","summary":"Reject a bounty submission","description":"Reject a bounty submission with a specified reason and optional note.","tags":["Bounties"],"security":[{"token":[]}],"parameters":[{"in":"path","name":"bountyId","schema":{"type":"string","description":"The ID of the bounty"},"required":true,"description":"The ID of the bounty"},{"in":"path","name":"submissionId","schema":{"type":"string","description":"The ID of the bounty submission"},"required":true,"description":"The ID of the bounty submission"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"rejectionReason":{"description":"The reason for rejecting the submission.","type":"string","enum":["invalidProof","duplicateSubmission","outOfTimeWindow","didNotMeetCriteria","other"]},"rejectionNote":{"description":"The note for rejecting the submission.","type":"string","maxLength":5000}}}}}},"responses":{"200":{"description":"The rejected bounty submission.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the bounty submission"},"bountyId":{"type":"string","description":"The ID of the bounty"},"partnerId":{"type":"string","description":"The ID of the partner"},"description":{"nullable":true,"description":"The description of the submission","type":"string"},"urls":{"nullable":true,"description":"The URLs submitted for the submission","type":"array","items":{"type":"string"}},"files":{"nullable":true,"description":"The files uploaded for the submission","type":"array","items":{"type":"object","properties":{"url":{"type":"string","description":"The URL of the uploaded file."},"fileName":{"type":"string","description":"The original file name."},"size":{"type":"number","description":"The file size in bytes."}},"required":["url","fileName","size"],"additionalProperties":false}},"status":{"type":"string","enum":["draft","submitted","approved","rejected"],"description":"The status of the submission"},"performanceCount":{"nullable":true,"description":"The performance count of the submission","type":"number"},"createdAt":{"description":"The date and time the submission was created","type":"string"},"completedAt":{"nullable":true,"description":"The date and time the submission was completed","type":"string"},"reviewedAt":{"nullable":true,"description":"The date and time the submission was reviewed","type":"string"},"rejectionReason":{"nullable":true,"description":"The reason for rejecting the submission","type":"string"},"rejectionNote":{"nullable":true,"description":"The note for rejecting the submission","type":"string"}},"required":["id","bountyId","partnerId","description","urls","files","status","performanceCount","createdAt","completedAt","reviewedAt","rejectionReason","rejectionNote"],"additionalProperties":false}}}},"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"}}}}},"components":{"schemas":{"linkGeoTargeting":{"description":"Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. See https://d.to/geo for more information.","nullable":true,"type":"object","additionalProperties":{"type":"string","maxLength":32000}},"LinkWebhookEvent":{"type":"object","properties":{"id":{"type":"string"},"event":{"anyOf":[{"type":"string","enum":["link.created"]},{"type":"string","enum":["link.updated"]},{"type":"string","enum":["link.deleted"]}]},"createdAt":{"type":"string"},"data":{"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."},"url":{"type":"string"},"trackConversion":{"type":"boolean"},"externalId":{"nullable":true,"description":"The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace.","type":"string"},"tenantId":{"nullable":true,"description":"The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant.","type":"string"},"programId":{"nullable":true,"description":"The ID of the program the short link is associated with.","type":"string"},"partnerId":{"nullable":true,"description":"The ID of the partner the short link is associated with.","type":"string"},"archived":{"type":"boolean"},"expiresAt":{"type":"string"},"expiredUrl":{"nullable":true,"type":"string"},"disabledAt":{"type":"string"},"password":{"nullable":true,"description":"The password required to access the destination URL of the short link.","type":"string"},"proxy":{"type":"boolean"},"title":{"nullable":true,"description":"The title of the short link. Will be used for Custom Link Previews if `proxy` is true.","type":"string"},"description":{"nullable":true,"description":"The description of the short link. Will be used for Custom Link Previews if `proxy` is true.","type":"string"},"image":{"nullable":true,"description":"The image of the short link. Will be used for Custom Link Previews if `proxy` is true.","type":"string"},"video":{"nullable":true,"description":"The custom link preview video (og:video). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","type":"string"},"rewrite":{"type":"boolean"},"doIndex":{"type":"boolean"},"ios":{"nullable":true,"description":"The iOS destination URL for the short link for iOS device targeting.","type":"string"},"android":{"nullable":true,"description":"The Android destination URL for the short link for Android device targeting.","type":"string"},"geo":{"nullable":true,"description":"Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. See https://d.to/geo for more information.","type":"object","additionalProperties":{"type":"string","format":"uri"}},"publicStats":{"type":"boolean"},"tags":{"nullable":true,"description":"The tags assigned to the short link.","type":"array","items":{"$ref":"#/components/schemas/LinkTagSchema"}},"folderId":{"nullable":true,"description":"The unique ID of the folder assigned to the short link.","type":"string"},"webhookIds":{"type":"array","items":{"type":"string"},"description":"The IDs of the webhooks that the short link is associated with."},"comments":{"nullable":true,"description":"The comments for the short link.","type":"string"},"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.lynkr.cc/qr?url=https://dub.sh/try`)."},"utm_source":{"nullable":true,"description":"The UTM source of the short link.","type":"string"},"utm_medium":{"nullable":true,"description":"The UTM medium of the short link.","type":"string"},"utm_campaign":{"nullable":true,"description":"The UTM campaign of the short link.","type":"string"},"utm_term":{"nullable":true,"description":"The UTM term of the short link.","type":"string"},"utm_content":{"nullable":true,"description":"The UTM content of the short link.","type":"string"},"testVariants":{"nullable":true,"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"percentage":{"type":"number","minimum":10,"maximum":90}},"required":["url","percentage"]},"description":"An array of A/B test URLs and the percentage of traffic to send to each URL.","example":[{"url":"https://example.com/variant-1","percentage":50},{"url":"https://example.com/variant-2","percentage":50}]},"testStartedAt":{"type":"string"},"testCompletedAt":{"type":"string"},"userId":{"nullable":true,"type":"string"},"workspaceId":{"type":"string","description":"The workspace ID of the short link."},"clicks":{"default":0,"description":"The number of clicks on the short link.","type":"number"},"leads":{"default":0,"description":"The number of leads the short link has generated.","type":"number"},"conversions":{"default":0,"description":"The number of leads that converted to paying customers.","type":"number"},"sales":{"default":0,"description":"The total number of sales (includes recurring sales) generated by the short link.","type":"number"},"saleAmount":{"default":0,"description":"The total dollar value of sales (in cents) generated by the short link.","type":"number"},"lastClicked":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"tagId":{"nullable":true,"description":"Deprecated: Use `tags` instead. The unique ID of the tag assigned to the short link.","deprecated":true,"type":"string"},"projectId":{"type":"string","description":"Deprecated: Use `workspaceId` instead. The project ID of the short link.","deprecated":true}},"required":["id","domain","key","url","trackConversion","externalId","tenantId","programId","partnerId","archived","expiresAt","expiredUrl","disabledAt","password","proxy","title","description","image","video","rewrite","doIndex","ios","android","geo","publicStats","tags","folderId","webhookIds","comments","shortLink","qrCode","utm_source","utm_medium","utm_campaign","utm_term","utm_content","testStartedAt","testCompletedAt","userId","workspaceId","lastClicked","createdAt","updatedAt","tagId","projectId"]}},"required":["id","event","createdAt","data"],"description":"Triggered when a link is created, updated, or deleted."},"LinkClickedEvent":{"type":"object","properties":{"id":{"type":"string"},"event":{"type":"string","enum":["link.clicked"]},"createdAt":{"type":"string"},"data":{"type":"object","properties":{"click":{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"string"},"url":{"type":"string"},"country":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"continent":{"type":"string"},"device":{"type":"string"},"browser":{"type":"string"},"os":{"type":"string"},"trigger":{"nullable":true,"type":"string"},"referer":{"type":"string"},"refererUrl":{"type":"string"},"qr":{"type":"boolean"},"ip":{"type":"string"}},"required":["id","timestamp","url","country","city","region","continent","device","browser","os","referer","refererUrl","qr","ip"]},"link":{"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."},"url":{"type":"string"},"trackConversion":{"type":"boolean"},"externalId":{"nullable":true,"description":"The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace.","type":"string"},"tenantId":{"nullable":true,"description":"The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant.","type":"string"},"programId":{"nullable":true,"description":"The ID of the program the short link is associated with.","type":"string"},"partnerId":{"nullable":true,"description":"The ID of the partner the short link is associated with.","type":"string"},"archived":{"type":"boolean"},"expiresAt":{"type":"string"},"expiredUrl":{"nullable":true,"type":"string"},"disabledAt":{"type":"string"},"password":{"nullable":true,"description":"The password required to access the destination URL of the short link.","type":"string"},"proxy":{"type":"boolean"},"title":{"nullable":true,"description":"The title of the short link. Will be used for Custom Link Previews if `proxy` is true.","type":"string"},"description":{"nullable":true,"description":"The description of the short link. Will be used for Custom Link Previews if `proxy` is true.","type":"string"},"image":{"nullable":true,"description":"The image of the short link. Will be used for Custom Link Previews if `proxy` is true.","type":"string"},"video":{"nullable":true,"description":"The custom link preview video (og:video). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","type":"string"},"rewrite":{"type":"boolean"},"doIndex":{"type":"boolean"},"ios":{"nullable":true,"description":"The iOS destination URL for the short link for iOS device targeting.","type":"string"},"android":{"nullable":true,"description":"The Android destination URL for the short link for Android device targeting.","type":"string"},"geo":{"nullable":true,"description":"Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. See https://d.to/geo for more information.","type":"object","additionalProperties":{"type":"string","format":"uri"}},"publicStats":{"type":"boolean"},"tags":{"nullable":true,"description":"The tags assigned to the short link.","type":"array","items":{"$ref":"#/components/schemas/LinkTagSchema"}},"folderId":{"nullable":true,"description":"The unique ID of the folder assigned to the short link.","type":"string"},"webhookIds":{"type":"array","items":{"type":"string"},"description":"The IDs of the webhooks that the short link is associated with."},"comments":{"nullable":true,"description":"The comments for the short link.","type":"string"},"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.lynkr.cc/qr?url=https://dub.sh/try`)."},"utm_source":{"nullable":true,"description":"The UTM source of the short link.","type":"string"},"utm_medium":{"nullable":true,"description":"The UTM medium of the short link.","type":"string"},"utm_campaign":{"nullable":true,"description":"The UTM campaign of the short link.","type":"string"},"utm_term":{"nullable":true,"description":"The UTM term of the short link.","type":"string"},"utm_content":{"nullable":true,"description":"The UTM content of the short link.","type":"string"},"testVariants":{"nullable":true,"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"percentage":{"type":"number","minimum":10,"maximum":90}},"required":["url","percentage"]},"description":"An array of A/B test URLs and the percentage of traffic to send to each URL.","example":[{"url":"https://example.com/variant-1","percentage":50},{"url":"https://example.com/variant-2","percentage":50}]},"testStartedAt":{"type":"string"},"testCompletedAt":{"type":"string"},"userId":{"nullable":true,"type":"string"},"workspaceId":{"type":"string","description":"The workspace ID of the short link."},"clicks":{"default":0,"description":"The number of clicks on the short link.","type":"number"},"leads":{"default":0,"description":"The number of leads the short link has generated.","type":"number"},"conversions":{"default":0,"description":"The number of leads that converted to paying customers.","type":"number"},"sales":{"default":0,"description":"The total number of sales (includes recurring sales) generated by the short link.","type":"number"},"saleAmount":{"default":0,"description":"The total dollar value of sales (in cents) generated by the short link.","type":"number"},"lastClicked":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"tagId":{"nullable":true,"description":"Deprecated: Use `tags` instead. The unique ID of the tag assigned to the short link.","deprecated":true,"type":"string"},"projectId":{"type":"string","description":"Deprecated: Use `workspaceId` instead. The project ID of the short link.","deprecated":true}},"required":["id","domain","key","url","trackConversion","externalId","tenantId","programId","partnerId","archived","expiresAt","expiredUrl","disabledAt","password","proxy","title","description","image","video","rewrite","doIndex","ios","android","geo","publicStats","tags","folderId","webhookIds","comments","shortLink","qrCode","utm_source","utm_medium","utm_campaign","utm_term","utm_content","testStartedAt","testCompletedAt","userId","workspaceId","lastClicked","createdAt","updatedAt","tagId","projectId"]}},"required":["click","link"]}},"required":["id","event","createdAt","data"],"description":"Triggered when a link is clicked."},"LeadCreatedEvent":{"type":"object","properties":{"id":{"type":"string"},"event":{"type":"string","enum":["lead.created"]},"createdAt":{"type":"string"},"data":{"type":"object","properties":{"eventName":{"type":"string"},"customer":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`)."},"name":{"type":"string","description":"Name of the customer."},"email":{"description":"Email of the customer.","nullable":true,"type":"string"},"avatar":{"description":"Avatar URL of the customer.","nullable":true,"type":"string"},"externalId":{"type":"string","description":"Unique identifier for the customer in the client's app."},"stripeCustomerId":{"description":"The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.","nullable":true,"type":"string"},"country":{"description":"Country of the customer.","nullable":true,"type":"string"},"sales":{"description":"Total number of sales for the customer.","nullable":true,"type":"number"},"saleAmount":{"description":"Total amount of sales for the customer.","nullable":true,"type":"number"},"createdAt":{"description":"The date the customer was created (usually the signup date or trial start date).","type":"string"},"firstSaleAt":{"description":"The date the customer made their first sale. Useful for calculating the time to first sale and LTV.","nullable":true,"type":"string"},"subscriptionCanceledAt":{"description":"The date the customer canceled their subscription. Useful for calculating LTV and churn rate.","nullable":true,"type":"string"}},"required":["id","name","externalId","createdAt"]},"click":{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"string"},"url":{"type":"string"},"country":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"continent":{"type":"string"},"device":{"type":"string"},"browser":{"type":"string"},"os":{"type":"string"},"trigger":{"nullable":true,"type":"string"},"referer":{"type":"string"},"refererUrl":{"type":"string"},"qr":{"type":"boolean"},"ip":{"type":"string"}},"required":["id","timestamp","url","country","city","region","continent","device","browser","os","referer","refererUrl","qr","ip"]},"link":{"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."},"url":{"type":"string"},"trackConversion":{"type":"boolean"},"externalId":{"nullable":true,"description":"The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace.","type":"string"},"tenantId":{"nullable":true,"description":"The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant.","type":"string"},"programId":{"nullable":true,"description":"The ID of the program the short link is associated with.","type":"string"},"partnerId":{"nullable":true,"description":"The ID of the partner the short link is associated with.","type":"string"},"archived":{"type":"boolean"},"expiresAt":{"type":"string"},"expiredUrl":{"nullable":true,"type":"string"},"disabledAt":{"type":"string"},"password":{"nullable":true,"description":"The password required to access the destination URL of the short link.","type":"string"},"proxy":{"type":"boolean"},"title":{"nullable":true,"description":"The title of the short link. Will be used for Custom Link Previews if `proxy` is true.","type":"string"},"description":{"nullable":true,"description":"The description of the short link. Will be used for Custom Link Previews if `proxy` is true.","type":"string"},"image":{"nullable":true,"description":"The image of the short link. Will be used for Custom Link Previews if `proxy` is true.","type":"string"},"video":{"nullable":true,"description":"The custom link preview video (og:video). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","type":"string"},"rewrite":{"type":"boolean"},"doIndex":{"type":"boolean"},"ios":{"nullable":true,"description":"The iOS destination URL for the short link for iOS device targeting.","type":"string"},"android":{"nullable":true,"description":"The Android destination URL for the short link for Android device targeting.","type":"string"},"geo":{"nullable":true,"description":"Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. See https://d.to/geo for more information.","type":"object","additionalProperties":{"type":"string","format":"uri"}},"publicStats":{"type":"boolean"},"tags":{"nullable":true,"description":"The tags assigned to the short link.","type":"array","items":{"$ref":"#/components/schemas/LinkTagSchema"}},"folderId":{"nullable":true,"description":"The unique ID of the folder assigned to the short link.","type":"string"},"webhookIds":{"type":"array","items":{"type":"string"},"description":"The IDs of the webhooks that the short link is associated with."},"comments":{"nullable":true,"description":"The comments for the short link.","type":"string"},"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.lynkr.cc/qr?url=https://dub.sh/try`)."},"utm_source":{"nullable":true,"description":"The UTM source of the short link.","type":"string"},"utm_medium":{"nullable":true,"description":"The UTM medium of the short link.","type":"string"},"utm_campaign":{"nullable":true,"description":"The UTM campaign of the short link.","type":"string"},"utm_term":{"nullable":true,"description":"The UTM term of the short link.","type":"string"},"utm_content":{"nullable":true,"description":"The UTM content of the short link.","type":"string"},"testVariants":{"nullable":true,"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"percentage":{"type":"number","minimum":10,"maximum":90}},"required":["url","percentage"]},"description":"An array of A/B test URLs and the percentage of traffic to send to each URL.","example":[{"url":"https://example.com/variant-1","percentage":50},{"url":"https://example.com/variant-2","percentage":50}]},"testStartedAt":{"type":"string"},"testCompletedAt":{"type":"string"},"userId":{"nullable":true,"type":"string"},"workspaceId":{"type":"string","description":"The workspace ID of the short link."},"clicks":{"default":0,"description":"The number of clicks on the short link.","type":"number"},"leads":{"default":0,"description":"The number of leads the short link has generated.","type":"number"},"conversions":{"default":0,"description":"The number of leads that converted to paying customers.","type":"number"},"sales":{"default":0,"description":"The total number of sales (includes recurring sales) generated by the short link.","type":"number"},"saleAmount":{"default":0,"description":"The total dollar value of sales (in cents) generated by the short link.","type":"number"},"lastClicked":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"tagId":{"nullable":true,"description":"Deprecated: Use `tags` instead. The unique ID of the tag assigned to the short link.","deprecated":true,"type":"string"},"projectId":{"type":"string","description":"Deprecated: Use `workspaceId` instead. The project ID of the short link.","deprecated":true}},"required":["id","domain","key","url","trackConversion","externalId","tenantId","programId","partnerId","archived","expiresAt","expiredUrl","disabledAt","password","proxy","title","description","image","video","rewrite","doIndex","ios","android","geo","publicStats","tags","folderId","webhookIds","comments","shortLink","qrCode","utm_source","utm_medium","utm_campaign","utm_term","utm_content","testStartedAt","testCompletedAt","userId","workspaceId","lastClicked","createdAt","updatedAt","tagId","projectId"]},"partner":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"The partner's unique ID on Dub."},"name":{"type":"string","maxLength":190,"description":"The partner's full legal name."},"email":{"nullable":true,"description":"The partner's email address. Should be a unique value across Dub.","type":"string","maxLength":190},"image":{"nullable":true,"description":"The partner's avatar image.","type":"string"},"payoutsEnabledAt":{"nullable":true,"description":"The date when the partner enabled payouts.","type":"string"},"country":{"nullable":true,"description":"The partner's country (required for tax purposes).","type":"string"},"groupId":{"nullable":true,"type":"string"},"totalClicks":{"type":"number"},"totalLeads":{"type":"number"},"totalConversions":{"type":"number"},"totalSales":{"type":"number"},"totalSaleAmount":{"type":"number"},"totalCommissions":{"type":"number"}},"required":["id","name","email","image","payoutsEnabledAt","country","totalClicks","totalLeads","totalConversions","totalSales","totalSaleAmount","totalCommissions"]},"metadata":{"default":null,"nullable":true,"type":"object","additionalProperties":{}}},"required":["eventName","customer","click","link"]}},"required":["id","event","createdAt","data"],"description":"Triggered when a lead is created."},"SaleCreatedEvent":{"type":"object","properties":{"id":{"type":"string"},"event":{"type":"string","enum":["sale.created"]},"createdAt":{"type":"string"},"data":{"type":"object","properties":{"eventName":{"type":"string"},"customer":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`)."},"name":{"type":"string","description":"Name of the customer."},"email":{"description":"Email of the customer.","nullable":true,"type":"string"},"avatar":{"description":"Avatar URL of the customer.","nullable":true,"type":"string"},"externalId":{"type":"string","description":"Unique identifier for the customer in the client's app."},"stripeCustomerId":{"description":"The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.","nullable":true,"type":"string"},"country":{"description":"Country of the customer.","nullable":true,"type":"string"},"sales":{"description":"Total number of sales for the customer.","nullable":true,"type":"number"},"saleAmount":{"description":"Total amount of sales for the customer.","nullable":true,"type":"number"},"createdAt":{"description":"The date the customer was created (usually the signup date or trial start date).","type":"string"},"firstSaleAt":{"description":"The date the customer made their first sale. Useful for calculating the time to first sale and LTV.","nullable":true,"type":"string"},"subscriptionCanceledAt":{"description":"The date the customer canceled their subscription. Useful for calculating LTV and churn rate.","nullable":true,"type":"string"}},"required":["id","name","externalId","createdAt"]},"click":{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"string"},"url":{"type":"string"},"country":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"continent":{"type":"string"},"device":{"type":"string"},"browser":{"type":"string"},"os":{"type":"string"},"trigger":{"nullable":true,"type":"string"},"referer":{"type":"string"},"refererUrl":{"type":"string"},"qr":{"type":"boolean"},"ip":{"type":"string"}},"required":["id","timestamp","url","country","city","region","continent","device","browser","os","referer","refererUrl","qr","ip"]},"link":{"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."},"url":{"type":"string"},"trackConversion":{"type":"boolean"},"externalId":{"nullable":true,"description":"The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace.","type":"string"},"tenantId":{"nullable":true,"description":"The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant.","type":"string"},"programId":{"nullable":true,"description":"The ID of the program the short link is associated with.","type":"string"},"partnerId":{"nullable":true,"description":"The ID of the partner the short link is associated with.","type":"string"},"archived":{"type":"boolean"},"expiresAt":{"type":"string"},"expiredUrl":{"nullable":true,"type":"string"},"disabledAt":{"type":"string"},"password":{"nullable":true,"description":"The password required to access the destination URL of the short link.","type":"string"},"proxy":{"type":"boolean"},"title":{"nullable":true,"description":"The title of the short link. Will be used for Custom Link Previews if `proxy` is true.","type":"string"},"description":{"nullable":true,"description":"The description of the short link. Will be used for Custom Link Previews if `proxy` is true.","type":"string"},"image":{"nullable":true,"description":"The image of the short link. Will be used for Custom Link Previews if `proxy` is true.","type":"string"},"video":{"nullable":true,"description":"The custom link preview video (og:video). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","type":"string"},"rewrite":{"type":"boolean"},"doIndex":{"type":"boolean"},"ios":{"nullable":true,"description":"The iOS destination URL for the short link for iOS device targeting.","type":"string"},"android":{"nullable":true,"description":"The Android destination URL for the short link for Android device targeting.","type":"string"},"geo":{"nullable":true,"description":"Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. See https://d.to/geo for more information.","type":"object","additionalProperties":{"type":"string","format":"uri"}},"publicStats":{"type":"boolean"},"tags":{"nullable":true,"description":"The tags assigned to the short link.","type":"array","items":{"$ref":"#/components/schemas/LinkTagSchema"}},"folderId":{"nullable":true,"description":"The unique ID of the folder assigned to the short link.","type":"string"},"webhookIds":{"type":"array","items":{"type":"string"},"description":"The IDs of the webhooks that the short link is associated with."},"comments":{"nullable":true,"description":"The comments for the short link.","type":"string"},"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.lynkr.cc/qr?url=https://dub.sh/try`)."},"utm_source":{"nullable":true,"description":"The UTM source of the short link.","type":"string"},"utm_medium":{"nullable":true,"description":"The UTM medium of the short link.","type":"string"},"utm_campaign":{"nullable":true,"description":"The UTM campaign of the short link.","type":"string"},"utm_term":{"nullable":true,"description":"The UTM term of the short link.","type":"string"},"utm_content":{"nullable":true,"description":"The UTM content of the short link.","type":"string"},"testVariants":{"nullable":true,"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"percentage":{"type":"number","minimum":10,"maximum":90}},"required":["url","percentage"]},"description":"An array of A/B test URLs and the percentage of traffic to send to each URL.","example":[{"url":"https://example.com/variant-1","percentage":50},{"url":"https://example.com/variant-2","percentage":50}]},"testStartedAt":{"type":"string"},"testCompletedAt":{"type":"string"},"userId":{"nullable":true,"type":"string"},"workspaceId":{"type":"string","description":"The workspace ID of the short link."},"clicks":{"default":0,"description":"The number of clicks on the short link.","type":"number"},"leads":{"default":0,"description":"The number of leads the short link has generated.","type":"number"},"conversions":{"default":0,"description":"The number of leads that converted to paying customers.","type":"number"},"sales":{"default":0,"description":"The total number of sales (includes recurring sales) generated by the short link.","type":"number"},"saleAmount":{"default":0,"description":"The total dollar value of sales (in cents) generated by the short link.","type":"number"},"lastClicked":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"tagId":{"nullable":true,"description":"Deprecated: Use `tags` instead. The unique ID of the tag assigned to the short link.","deprecated":true,"type":"string"},"projectId":{"type":"string","description":"Deprecated: Use `workspaceId` instead. The project ID of the short link.","deprecated":true}},"required":["id","domain","key","url","trackConversion","externalId","tenantId","programId","partnerId","archived","expiresAt","expiredUrl","disabledAt","password","proxy","title","description","image","video","rewrite","doIndex","ios","android","geo","publicStats","tags","folderId","webhookIds","comments","shortLink","qrCode","utm_source","utm_medium","utm_campaign","utm_term","utm_content","testStartedAt","testCompletedAt","userId","workspaceId","lastClicked","createdAt","updatedAt","tagId","projectId"]},"sale":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string"},"paymentProcessor":{"type":"string"},"invoiceId":{"nullable":true,"type":"string"}},"required":["amount","currency","paymentProcessor","invoiceId"]},"partner":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"The partner's unique ID on Dub."},"name":{"type":"string","maxLength":190,"description":"The partner's full legal name."},"email":{"nullable":true,"description":"The partner's email address. Should be a unique value across Dub.","type":"string","maxLength":190},"image":{"nullable":true,"description":"The partner's avatar image.","type":"string"},"payoutsEnabledAt":{"nullable":true,"description":"The date when the partner enabled payouts.","type":"string"},"country":{"nullable":true,"description":"The partner's country (required for tax purposes).","type":"string"},"groupId":{"nullable":true,"type":"string"},"totalClicks":{"type":"number"},"totalLeads":{"type":"number"},"totalConversions":{"type":"number"},"totalSales":{"type":"number"},"totalSaleAmount":{"type":"number"},"totalCommissions":{"type":"number"}},"required":["id","name","email","image","payoutsEnabledAt","country","totalClicks","totalLeads","totalConversions","totalSales","totalSaleAmount","totalCommissions"]},"metadata":{"default":null,"nullable":true,"type":"object","additionalProperties":{}}},"required":["eventName","customer","click","link","sale"]}},"required":["id","event","createdAt","data"],"description":"Triggered when a sale is created."},"PartnerEnrolledEvent":{"type":"object","properties":{"id":{"type":"string"},"event":{"type":"string","enum":["partner.enrolled"]},"createdAt":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string","description":"The partner's unique ID on Dub."},"name":{"type":"string","maxLength":190,"description":"The partner's full legal name."},"companyName":{"nullable":true,"description":"If the partner profile type is a company, this is the partner's legal company name.","type":"string","maxLength":190},"email":{"nullable":true,"description":"The partner's email address. Should be a unique value across Dub.","type":"string","maxLength":190},"image":{"nullable":true,"description":"The partner's avatar image.","type":"string"},"description":{"description":"A brief description of the partner and their background.","nullable":true,"type":"string","maxLength":5000},"country":{"nullable":true,"description":"The partner's country (required for tax purposes).","type":"string"},"paypalEmail":{"nullable":true,"description":"The partner's PayPal email (for receiving payouts via PayPal).","type":"string"},"stripeConnectId":{"nullable":true,"description":"The partner's Stripe Connect ID (for receiving payouts via Stripe).","type":"string"},"payoutsEnabledAt":{"nullable":true,"description":"The date when the partner enabled payouts.","type":"string"},"trustedAt":{"nullable":true,"description":"The date when the partner received the trusted badge in the partner network.","type":"string"},"programId":{"type":"string","description":"The program's unique ID on Dub."},"groupId":{"description":"The partner's group ID on Dub.","nullable":true,"type":"string"},"partnerId":{"type":"string","description":"The partner's unique ID on Dub."},"tenantId":{"nullable":true,"description":"The partner's unique ID within your database. Can be useful for associating the partner with a user in your database and retrieving/update their data in the future.","type":"string"},"createdAt":{"type":"string"},"status":{"type":"string","enum":["pending","approved","rejected","invited","declined","deactivated","banned","archived"],"description":"The status of the partner's enrollment in the program."},"links":{"nullable":true,"description":"The partner's referral links in this program.","type":"array","items":{"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."},"shortLink":{"type":"string","format":"uri","description":"The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`)."},"url":{"type":"string","format":"uri","description":"The destination URL of the short link."},"clicks":{"default":0,"description":"The number of clicks on the short link.","type":"number"},"leads":{"default":0,"description":"The number of leads the short link has generated.","type":"number"},"conversions":{"default":0,"description":"The number of leads that converted to paying customers.","type":"number"},"sales":{"default":0,"description":"The total number of sales (includes recurring sales) generated by the short link.","type":"number"},"saleAmount":{"default":0,"description":"The total dollar value of sales (in cents) generated by the short link.","type":"number"}},"required":["id","domain","key","shortLink","url"]}},"totalCommissions":{"default":0,"description":"The total commissions paid to the partner for their referrals","type":"number"},"clickRewardId":{"nullable":true,"type":"string"},"leadRewardId":{"nullable":true,"type":"string"},"saleRewardId":{"nullable":true,"type":"string"},"discountId":{"nullable":true,"type":"string"},"applicationId":{"description":"If the partner submitted an application to join the program, this is the ID of the application.","nullable":true,"type":"string"},"bannedAt":{"description":"If the partner was banned from the program, this is the date of the ban.","nullable":true,"type":"string"},"bannedReason":{"description":"If the partner was banned from the program, this is the reason for the ban.","nullable":true,"type":"string","enum":["tos_violation","inappropriate_content","fake_traffic","fraud","spam","brand_abuse"]},"referralFormData":{"nullable":true,"type":"object","properties":{"fields":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"locked":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["text"]},"constraints":{"type":"object","properties":{"maxLength":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991},"pattern":{"type":"string"}}}},"required":["key","label","required","locked","position","type"]},{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"locked":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["textarea"]},"constraints":{"type":"object","properties":{"maxLength":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991}}}},"required":["key","label","required","locked","position","type"]},{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"locked":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["select"]},"options":{"minItems":2,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["label","value"]}}},"required":["key","label","required","locked","position","type","options"]},{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"locked":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["country"]}},"required":["key","label","required","locked","position","type"]},{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"locked":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["date"]}},"required":["key","label","required","locked","position","type"]},{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"locked":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["multiSelect"]},"options":{"minItems":2,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["label","value"]}}},"required":["key","label","required","locked","position","type","options"]},{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"locked":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["number"]}},"required":["key","label","required","locked","position","type"]},{"type":"object","properties":{"key":{"type":"string","minLength":1},"label":{"type":"string","minLength":1},"required":{"type":"boolean"},"locked":{"type":"boolean"},"position":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["phone"]}},"required":["key","label","required","locked","position","type"]}],"type":"object"}}},"required":["fields"]},"totalClicks":{"default":0,"description":"The total number of clicks on the partner's links","type":"number"},"totalLeads":{"default":0,"description":"The total number of leads generated by the partner's links","type":"number"},"totalConversions":{"default":0,"description":"The total number of leads that converted to paying customers","type":"number"},"totalSales":{"default":0,"description":"The total number of sales generated by the partner's links (includes recurring sales)","type":"number"},"totalSaleAmount":{"default":0,"description":"Total revenue generated by the partner's links","type":"number"},"netRevenue":{"default":0,"description":"Net revenue after commissions (`Total Revenue - Total Commissions`)","type":"number"},"earningsPerClick":{"description":"Earnings Per Click (EPC) (`Total Revenue ÷ Total Clicks`)","nullable":true,"type":"number"},"averageLifetimeValue":{"description":"Average lifetime value for each paying customer (`Total Revenue ÷ Total Conversions`)","nullable":true,"type":"number"},"clickToLeadRate":{"description":"Percentage of clicks that become leads (`Total Leads ÷ Total Clicks`)","nullable":true,"type":"number"},"clickToConversionRate":{"description":"Percentage of clicks that convert to paying customers (`Total Conversions ÷ Total Clicks`)","nullable":true,"type":"number"},"leadToConversionRate":{"description":"Percentage of leads that convert to paying customers (`Total Conversions ÷ Total Leads`)","nullable":true,"type":"number"},"returnOnAdSpend":{"description":"Return On Ad Spend (ROAS) (`Total Revenue ÷ Total Commissions`)","nullable":true,"type":"number"},"website":{"description":"The partner's website URL (including the https protocol).","nullable":true,"type":"string"},"youtube":{"description":"The partner's YouTube channel username (e.g. `johndoe`).","nullable":true,"type":"string"},"twitter":{"description":"The partner's Twitter username (e.g. `johndoe`).","nullable":true,"type":"string"},"linkedin":{"description":"The partner's LinkedIn username (e.g. `johndoe`).","nullable":true,"type":"string"},"instagram":{"description":"The partner's Instagram username (e.g. `johndoe`).","nullable":true,"type":"string"},"tiktok":{"description":"The partner's TikTok username (e.g. `johndoe`).","nullable":true,"type":"string"}},"required":["id","name","companyName","email","image","country","paypalEmail","stripeConnectId","payoutsEnabledAt","trustedAt","programId","partnerId","tenantId","createdAt","status","links"]}},"required":["id","event","createdAt","data"],"description":"Triggered when a partner is enrolled."},"PartnerApplicationSubmittedEvent":{"type":"object","properties":{"id":{"type":"string"},"event":{"type":"string","enum":["partner.application_submitted"]},"createdAt":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string"},"partner":{"type":"object","properties":{"id":{"type":"string","description":"The partner's unique ID on Dub."},"name":{"type":"string","maxLength":190,"description":"The partner's full legal name."},"companyName":{"nullable":true,"description":"If the partner profile type is a company, this is the partner's legal company name.","type":"string","maxLength":190},"email":{"nullable":true,"description":"The partner's email address. Should be a unique value across Dub.","type":"string","maxLength":190},"image":{"nullable":true,"description":"The partner's avatar image.","type":"string"},"description":{"description":"A brief description of the partner and their background.","nullable":true,"type":"string","maxLength":5000},"country":{"nullable":true,"description":"The partner's country (required for tax purposes).","type":"string"},"groupId":{"description":"The partner's group ID on Dub.","nullable":true,"type":"string"},"status":{"type":"string","enum":["pending","approved","rejected","invited","declined","deactivated","banned","archived"],"description":"The status of the partner's enrollment in the program."},"website":{"description":"The partner's website URL (including the https protocol).","nullable":true,"type":"string"},"youtube":{"description":"The partner's YouTube channel username (e.g. `johndoe`).","nullable":true,"type":"string"},"twitter":{"description":"The partner's Twitter username (e.g. `johndoe`).","nullable":true,"type":"string"},"linkedin":{"description":"The partner's LinkedIn username (e.g. `johndoe`).","nullable":true,"type":"string"},"instagram":{"description":"The partner's Instagram username (e.g. `johndoe`).","nullable":true,"type":"string"},"tiktok":{"description":"The partner's TikTok username (e.g. `johndoe`).","nullable":true,"type":"string"}},"required":["id","name","companyName","email","image","country","status"]},"applicationFormData":{"nullable":true,"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"nullable":true,"type":"string"}},"required":["label","value"]}}},"required":["id","createdAt","partner","applicationFormData"]}},"required":["id","event","createdAt","data"],"description":"Triggered when a partner submits an application to join a program."},"CommissionCreatedEvent":{"type":"object","properties":{"id":{"type":"string"},"event":{"type":"string","enum":["commission.created"]},"createdAt":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string","description":"The commission's unique ID on Dub.","example":"cm_1JVR7XRCSR0EDBAF39FZ4PMYE"},"type":{"type":"string","enum":["click","lead","sale","custom"]},"amount":{"type":"number"},"earnings":{"type":"number"},"currency":{"type":"string"},"status":{"type":"string","enum":["pending","processed","paid","refunded","duplicate","fraud","canceled"]},"invoiceId":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"quantity":{"type":"number"},"userId":{"description":"The user who created the manual commission.","nullable":true,"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"partner":{"type":"object","properties":{"id":{"type":"string","description":"The partner's unique ID on Dub."},"name":{"type":"string","maxLength":190,"description":"The partner's full legal name."},"email":{"nullable":true,"description":"The partner's email address. Should be a unique value across Dub.","type":"string","maxLength":190},"image":{"nullable":true,"description":"The partner's avatar image.","type":"string"},"payoutsEnabledAt":{"nullable":true,"description":"The date when the partner enabled payouts.","type":"string"},"country":{"nullable":true,"description":"The partner's country (required for tax purposes).","type":"string"},"groupId":{"nullable":true,"type":"string"},"totalClicks":{"type":"number"},"totalLeads":{"type":"number"},"totalConversions":{"type":"number"},"totalSales":{"type":"number"},"totalSaleAmount":{"type":"number"},"totalCommissions":{"type":"number"}},"required":["id","name","email","image","payoutsEnabledAt","country","totalClicks","totalLeads","totalConversions","totalSales","totalSaleAmount","totalCommissions"]},"customer":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the customer. You may use either the customer's `id` on Dub (obtained via `/customers` endpoint) or their `externalId` (unique ID within your system, prefixed with `ext_`, e.g. `ext_123`)."},"name":{"type":"string","description":"Name of the customer."},"email":{"description":"Email of the customer.","nullable":true,"type":"string"},"avatar":{"description":"Avatar URL of the customer.","nullable":true,"type":"string"},"externalId":{"type":"string","description":"Unique identifier for the customer in the client's app."},"stripeCustomerId":{"description":"The customer's Stripe customer ID. This is useful for attributing recurring sale events to the partner who referred the customer.","nullable":true,"type":"string"},"country":{"description":"Country of the customer.","nullable":true,"type":"string"},"sales":{"description":"Total number of sales for the customer.","nullable":true,"type":"number"},"saleAmount":{"description":"Total amount of sales for the customer.","nullable":true,"type":"number"},"createdAt":{"description":"The date the customer was created (usually the signup date or trial start date).","type":"string"},"firstSaleAt":{"description":"The date the customer made their first sale. Useful for calculating the time to first sale and LTV.","nullable":true,"type":"string"},"subscriptionCanceledAt":{"description":"The date the customer canceled their subscription. Useful for calculating LTV and churn rate.","nullable":true,"type":"string"}},"required":["id","name","externalId","createdAt"]},"link":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"The unique ID of 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`)."},"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."}},"required":["id","shortLink","domain","key"]}},"required":["id","amount","earnings","currency","status","invoiceId","description","quantity","createdAt","updatedAt","partner","link"]}},"required":["id","event","createdAt","data"],"description":"Triggered when a commission is created for a partner."},"LinkTagSchema":{"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","brown","pink"],"description":"The color of the tag."}},"required":["id","name","color"],"title":"LinkTag"},"AnalyticsCount":{"type":"object","properties":{"clicks":{"default":0,"type":"number","description":"The total number of clicks"},"leads":{"default":0,"type":"number","description":"The total number of leads"},"sales":{"default":0,"type":"number","description":"The total number of sales"},"saleAmount":{"default":0,"type":"number","description":"The total amount of sales, in cents"}},"required":["clicks","leads","sales","saleAmount"],"additionalProperties":false},"AnalyticsTimeseries":{"type":"object","properties":{"start":{"type":"string","description":"The starting timestamp of the interval"},"clicks":{"default":0,"type":"number","description":"The number of clicks in the interval"},"leads":{"default":0,"type":"number","description":"The number of leads in the interval"},"sales":{"default":0,"type":"number","description":"The number of sales in the interval"},"saleAmount":{"default":0,"type":"number","description":"The total amount of sales in the interval, in cents"}},"required":["start","clicks","leads","sales","saleAmount"],"additionalProperties":false},"AnalyticsContinents":{"type":"object","properties":{"continent":{"type":"string","enum":["AF","AN","AS","EU","NA","OC","SA"],"description":"The 2-letter ISO 3166-1 code representing the continent associated with the location of the user."},"clicks":{"default":0,"type":"number","description":"The number of clicks from this continent"},"leads":{"default":0,"type":"number","description":"The number of leads from this continent"},"sales":{"default":0,"type":"number","description":"The number of sales from this continent"},"saleAmount":{"default":0,"type":"number","description":"The total amount of sales from this continent, in cents"}},"required":["continent","clicks","leads","sales","saleAmount"],"additionalProperties":false},"AnalyticsCountries":{"type":"object","properties":{"country":{"type":"string","description":"The 2-letter ISO 3166-1 country code of the country. Learn more: https://d.to/geo"},"region":{"default":"*","type":"string","enum":["*"]},"city":{"default":"*","type":"string","enum":["*"]},"clicks":{"default":0,"type":"number","description":"The number of clicks from this country"},"leads":{"default":0,"type":"number","description":"The number of leads from this country"},"sales":{"default":0,"type":"number","description":"The number of sales from this country"},"saleAmount":{"default":0,"type":"number","description":"The total amount of sales from this country, in cents"}},"required":["country","region","city","clicks","leads","sales","saleAmount"],"additionalProperties":false},"AnalyticsRegions":{"type":"object","properties":{"country":{"type":"string","description":"The 2-letter ISO 3166-1 country code of the country. Learn more: https://d.to/geo"},"region":{"type":"string","description":"The 2-letter ISO 3166-2 region code of the region."},"city":{"default":"*","type":"string","enum":["*"]},"clicks":{"default":0,"type":"number","description":"The number of clicks from this region"},"leads":{"default":0,"type":"number","description":"The number of leads from this region"},"sales":{"default":0,"type":"number","description":"The number of sales from this region"},"saleAmount":{"default":0,"type":"number","description":"The total amount of sales from this region, in cents"}},"required":["country","region","city","clicks","leads","sales","saleAmount"],"additionalProperties":false},"AnalyticsCities":{"type":"object","properties":{"country":{"type":"string","description":"The 2-letter ISO 3166-1 country code of the country where this city is located. Learn more: https://d.to/geo"},"region":{"type":"string","description":"The 2-letter ISO 3166-2 region code representing the region associated with the location of the user."},"city":{"type":"string","description":"The name of the city"},"clicks":{"default":0,"type":"number","description":"The number of clicks from this city"},"leads":{"default":0,"type":"number","description":"The number of leads from this city"},"sales":{"default":0,"type":"number","description":"The number of sales from this city"},"saleAmount":{"default":0,"type":"number","description":"The total amount of sales from this city, in cents"}},"required":["country","region","city","clicks","leads","sales","saleAmount"],"additionalProperties":false},"AnalyticsDevices":{"type":"object","properties":{"device":{"type":"string","description":"The name of the device"},"clicks":{"default":0,"type":"number","description":"The number of clicks from this device"},"leads":{"default":0,"type":"number","description":"The number of leads from this device"},"sales":{"default":0,"type":"number","description":"The number of sales from this device"},"saleAmount":{"default":0,"type":"number","description":"The total amount of sales from this device, in cents"}},"required":["device","clicks","leads","sales","saleAmount"],"additionalProperties":false},"AnalyticsBrowsers":{"type":"object","properties":{"browser":{"type":"string","description":"The name of the browser"},"clicks":{"default":0,"type":"number","description":"The number of clicks from this browser"},"leads":{"default":0,"type":"number","description":"The number of leads from this browser"},"sales":{"default":0,"type":"number","description":"The number of sales from this browser"},"saleAmount":{"default":0,"type":"number","description":"The total amount of sales from this browser, in cents"}},"required":["browser","clicks","leads","sales","saleAmount"],"additionalProperties":false},"AnalyticsOS":{"type":"object","properties":{"os":{"type":"string","description":"The name of the OS"},"clicks":{"default":0,"type":"number","description":"The number of clicks from this OS"},"leads":{"default":0,"type":"number","description":"The number of leads from this OS"},"sales":{"default":0,"type":"number","description":"The number of sales from this OS"},"saleAmount":{"default":0,"type":"number","description":"The total amount of sales from this OS, in cents"}},"required":["os","clicks","leads","sales","saleAmount"],"additionalProperties":false},"AnalyticsTriggers":{"type":"object","properties":{"trigger":{"type":"string","enum":["qr","link","pageview","deeplink"],"description":"The type of trigger method: link click or QR scan"},"clicks":{"default":0,"type":"number","description":"The number of clicks from this trigger method"},"leads":{"default":0,"type":"number","description":"The number of leads from this trigger method"},"sales":{"default":0,"type":"number","description":"The number of sales from this trigger method"},"saleAmount":{"default":0,"type":"number","description":"The total amount of sales from this trigger method, in cents"}},"required":["trigger","clicks","leads","sales","saleAmount"],"additionalProperties":false},"AnalyticsReferers":{"type":"object","properties":{"referer":{"type":"string","description":"The name of the referer. If unknown, this will be `(direct)`"},"clicks":{"default":0,"type":"number","description":"The number of clicks from this referer"},"leads":{"default":0,"type":"number","description":"The number of leads from this referer"},"sales":{"default":0,"type":"number","description":"The number of sales from this referer"},"saleAmount":{"default":0,"type":"number","description":"The total amount of sales from this referer, in cents"}},"required":["referer","clicks","leads","sales","saleAmount"],"additionalProperties":false},"AnalyticsRefererUrls":{"type":"object","properties":{"refererUrl":{"type":"string","description":"The full URL of the referer. If unknown, this will be `(direct)`"},"clicks":{"default":0,"type":"number","description":"The number of clicks from this referer to this URL"},"leads":{"default":0,"type":"number","description":"The number of leads from this referer to this URL"},"sales":{"default":0,"type":"number","description":"The number of sales from this referer to this URL"},"saleAmount":{"default":0,"type":"number","description":"The total amount of sales from this referer to this URL, in cents"}},"required":["refererUrl","clicks","leads","sales","saleAmount"],"additionalProperties":false},"AnalyticsTopLinks":{"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"},"comments":{"description":"The comments of the short link","nullable":true,"type":"string"},"title":{"description":"The custom link preview title (og:title)","nullable":true,"type":"string"},"createdAt":{"type":"string","description":"The creation timestamp of the short link"},"clicks":{"default":0,"type":"number","description":"The number of clicks from this link"},"leads":{"default":0,"type":"number","description":"The number of leads from this link"},"sales":{"default":0,"type":"number","description":"The number of sales from this link"},"saleAmount":{"default":0,"type":"number","description":"The total amount of sales from this link, in cents"}},"required":["link","id","domain","key","shortLink","url","createdAt","clicks","leads","sales","saleAmount"],"additionalProperties":false},"AnalyticsTopUrls":{"type":"object","properties":{"url":{"type":"string","description":"The full destination URL (including query parameters)"},"clicks":{"default":0,"type":"number","description":"The number of clicks from this URL"},"leads":{"default":0,"type":"number","description":"The number of leads from this URL"},"sales":{"default":0,"type":"number","description":"The number of sales from this URL"},"saleAmount":{"default":0,"type":"number","description":"The total amount of sales from this URL, in cents"}},"required":["url","clicks","leads","sales","saleAmount"],"additionalProperties":false},"PartnerAnalyticsCount":{"type":"object","properties":{"clicks":{"default":0,"type":"number","description":"The total number of clicks"},"leads":{"default":0,"type":"number","description":"The total number of leads"},"sales":{"default":0,"type":"number","description":"The total number of sales"},"saleAmount":{"default":0,"type":"number","description":"The total amount of sales, in cents"},"earnings":{"default":0,"type":"number"}},"required":["clicks","leads","sales","saleAmount","earnings"],"additionalProperties":false,"title":"PartnerAnalyticsCount"},"PartnerAnalyticsTimeseries":{"type":"object","properties":{"start":{"type":"string","description":"The starting timestamp of the interval"},"clicks":{"default":0,"type":"number","description":"The number of clicks in the interval"},"leads":{"default":0,"type":"number","description":"The number of leads in the interval"},"sales":{"default":0,"type":"number","description":"The number of sales in the interval"},"saleAmount":{"default":0,"type":"number","description":"The total amount of sales in the interval, in cents"},"earnings":{"default":0,"type":"number"}},"required":["start","clicks","leads","sales","saleAmount","earnings"],"additionalProperties":false,"title":"PartnerAnalyticsTimeseries"},"PartnerAnalyticsTopLinks":{"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"},"comments":{"description":"The comments of the short link","nullable":true,"type":"string"},"title":{"description":"The custom link preview title (og:title)","nullable":true,"type":"string"},"createdAt":{"type":"string","description":"The creation timestamp of the short link"},"clicks":{"default":0,"type":"number","description":"The number of clicks from this link"},"leads":{"default":0,"type":"number","description":"The number of leads from this link"},"sales":{"default":0,"type":"number","description":"The number of sales from this link"},"saleAmount":{"default":0,"type":"number","description":"The total amount of sales from this link, in cents"},"earnings":{"default":0,"type":"number"}},"required":["link","id","domain","key","shortLink","url","createdAt","clicks","leads","sales","saleAmount","earnings"],"additionalProperties":false,"title":"PartnerAnalyticsTopLinks"},"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."},"url":{"type":"string","format":"uri","description":"The destination URL of the short link."},"trackConversion":{"default":false,"description":"Whether to track conversions for the short link.","type":"boolean"},"externalId":{"nullable":true,"description":"The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace.","type":"string"},"tenantId":{"nullable":true,"description":"The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant.","type":"string"},"programId":{"nullable":true,"description":"The ID of the program the short link is associated with.","type":"string"},"partnerId":{"nullable":true,"description":"The ID of the partner the short link is associated with.","type":"string"},"archived":{"default":false,"description":"Whether the short link is archived.","type":"boolean"},"expiresAt":{"nullable":true,"description":"The date and time when the short link will expire in ISO-8601 format.","type":"string"},"expiredUrl":{"nullable":true,"description":"The URL to redirect to when the short link has expired.","type":"string","format":"uri"},"disabledAt":{"nullable":true,"description":"The date and time when the short link was disabled. When a short link is disabled, it will redirect to its domain's not found URL, and its stats will be excluded from your overall stats.","type":"string"},"password":{"nullable":true,"description":"The password required to access the destination URL of the short link.","type":"string"},"proxy":{"default":false,"description":"Whether the short link uses Custom Link Previews feature.","type":"boolean"},"title":{"nullable":true,"description":"The title of the short link. Will be used for Custom Link Previews if `proxy` is true.","type":"string"},"description":{"nullable":true,"description":"The description of the short link. Will be used for Custom Link Previews if `proxy` is true.","type":"string"},"image":{"nullable":true,"description":"The image of the short link. Will be used for Custom Link Previews if `proxy` is true.","type":"string"},"video":{"nullable":true,"description":"The custom link preview video (og:video). Will be used for Custom Link Previews if `proxy` is true. Learn more: https://d.to/og","type":"string"},"rewrite":{"default":false,"description":"Whether the short link uses link cloaking.","type":"boolean"},"doIndex":{"default":false,"description":"Whether to allow search engines to index the short link.","type":"boolean"},"ios":{"nullable":true,"description":"The iOS destination URL for the short link for iOS device targeting.","type":"string"},"android":{"nullable":true,"description":"The Android destination URL for the short link for Android device targeting.","type":"string"},"geo":{"nullable":true,"description":"Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. See https://d.to/geo for more information.","type":"object","additionalProperties":{"type":"string","format":"uri"}},"publicStats":{"default":false,"description":"Whether the short link's stats are publicly accessible.","type":"boolean"},"tags":{"nullable":true,"description":"The tags assigned to the short link.","type":"array","items":{"$ref":"#/components/schemas/LinkTagSchemaOutput"}},"folderId":{"nullable":true,"description":"The unique ID of the folder assigned to the short link.","type":"string"},"webhookIds":{"type":"array","items":{"type":"string"},"description":"The IDs of the webhooks that the short link is associated with."},"comments":{"nullable":true,"description":"The comments for the short link.","type":"string"},"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.lynkr.cc/qr?url=https://dub.sh/try`)."},"utm_source":{"nullable":true,"description":"The UTM source of the short link.","type":"string"},"utm_medium":{"nullable":true,"description":"The UTM medium of the short link.","type":"string"},"utm_campaign":{"nullable":true,"description":"The UTM campaign of the short link.","type":"string"},"utm_term":{"nullable":true,"description":"The UTM term of the short link.","type":"string"},"utm_content":{"nullable":true,"description":"The UTM content of the short link.","type":"string"},"testVariants":{"nullable":true,"minItems":2,"maxItems":4,"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"percentage":{"type":"number","minimum":10,"maximum":90}},"required":["url","percentage"],"additionalProperties":false},"description":"An array of A/B test URLs and the percentage of traffic to send to each URL.","example":[{"url":"https://example.com/variant-1","percentage":50},{"url":"https://example.com/variant-2","percentage":50}]},"testStartedAt":{"description":"The date and time when the tests started.","nullable":true,"type":"string"},"testCompletedAt":{"description":"The date and time when the tests were or will be completed.","nullable":true,"type":"string"},"userId":{"nullable":true,"description":"The user ID of the creator of the short link.","type":"string"},"workspaceId":{"type":"string","description":"The workspace ID of the short link."},"clicks":{"default":0,"description":"The number of clicks on the short link.","type":"number"},"leads":{"default":0,"description":"The number of leads the short link has generated.","type":"number"},"conversions":{"default":0,"description":"The number of leads that converted to paying customers.","type":"number"},"sales":{"default":0,"description":"The total number of sales (includes recurring sales) generated by the short link.","type":"number"},"saleAmount":{"default":0,"description":"The total dollar value of sales (in cents) generated by the short link.","type":"number"},"lastClicked":{"nullable":true,"description":"The date and time when the short link was last clicked.","type":"string"},"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."},"tagId":{"nullable":true,"description":"Deprecated: Use `tags` instead. The unique ID of the tag assigned to the short link.","deprecated":true,"type":"string"},"projectId":{"type":"string","description":"Deprecated: Use `workspaceId` instead. The project ID of the short link.","deprecated":true}},"required":["id","domain","key","url","trackConversion","externalId","tenantId","programId","partnerId","archived","expiresAt","expiredUrl","disabledAt","password","proxy","title","description","image","video","rewrite","doIndex","ios","android","geo","publicStats","tags","folderId","webhookIds","comments","shortLink","qrCode","utm_source","utm_medium","utm_campaign","utm_term","utm_content","userId","workspaceId","clicks","leads","conversions","sales","saleAmount","lastClicked","createdAt","updatedAt","tagId","projectId"],"additionalProperties":false,"title":"Link"},"FolderSchema":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the folder."},"name":{"type":"string","description":"The name of the folder."},"description":{"nullable":true,"description":"The description of the folder.","type":"string"},"type":{"type":"string","enum":["default","mega"]},"accessLevel":{"default":null,"description":"The access level of the folder within the workspace.","nullable":true,"type":"string","enum":["write","read"]},"createdAt":{"description":"The date the folder was created.","type":"string"},"updatedAt":{"description":"The date the folder was updated.","type":"string"}},"required":["id","name","description","type","accessLevel","createdAt","updatedAt"],"additionalProperties":false},"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":{"default":false,"description":"Whether the domain is verified.","type":"boolean"},"primary":{"default":false,"description":"Whether the domain is the primary domain for the workspace.","type":"boolean"},"archived":{"default":false,"type":"boolean","description":"Whether the domain is archived."},"placeholder":{"nullable":true,"description":"Provide context to your teammates in the link creation modal by showing them an example of a link to be shortened.","example":"https://lynkr.cc/help/article/what-is-dub","type":"string"},"expiredUrl":{"nullable":true,"description":"The URL to redirect to when a link under this domain has expired.","example":"https://acme.com/expired","type":"string"},"notFoundUrl":{"nullable":true,"description":"The URL to redirect to when a link under this domain doesn't exist.","example":"https://acme.com/not-found","type":"string"},"logo":{"nullable":true,"description":"The logo of the domain.","type":"string"},"assetLinks":{"default":null,"description":"assetLinks.json configuration file (for deep link support on Android).","nullable":true,"type":"string"},"appleAppSiteAssociation":{"default":null,"description":"apple-app-site-association configuration file (for deep link support on iOS).","nullable":true,"type":"string"},"createdAt":{"description":"The date the domain was created.","type":"string"},"updatedAt":{"description":"The date the domain was last updated.","type":"string"},"registeredDomain":{"nullable":true,"description":"The registered domain record.","type":"object","properties":{"id":{"type":"string","description":"The ID of the registered domain record."},"autoRenewalDisabledAt":{"nullable":true,"description":"The date the domain auto-renew is disabled.","type":"string"},"createdAt":{"description":"The date the domain was created.","type":"string"},"expiresAt":{"description":"The date the domain expires.","type":"string"},"renewalFee":{"type":"number","description":"The fee to renew the domain."}},"required":["id","autoRenewalDisabledAt","createdAt","expiresAt","renewalFee"],"additionalProperties":false}},"required":["id","slug","verified","primary","archived","placeholder","expiredUrl","notFoundUrl","logo","assetLinks","appleAppSiteAssociation","createdAt","updatedAt","registeredDomain"],"additionalProperties":false},"LinkTagSchemaOutput":{"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","brown","pink"],"description":"The color of the tag."}},"required":["id","name","color"],"additionalProperties":false,"title":"LinkTag"},"WebhookEvent":{"anyOf":[{"$ref":"#/components/schemas/LinkWebhookEvent"},{"$ref":"#/components/schemas/LinkClickedEvent"},{"$ref":"#/components/schemas/LeadCreatedEvent"},{"$ref":"#/components/schemas/SaleCreatedEvent"},{"$ref":"#/components/schemas/PartnerEnrolledEvent"},{"$ref":"#/components/schemas/PartnerApplicationSubmittedEvent"},{"$ref":"#/components/schemas/CommissionCreatedEvent"}],"description":"Webhook event schema","x-speakeasy-include":true},"LinkErrorSchema":{"type":"object","properties":{"link":{"description":"The link that caused the error."},"error":{"type":"string","description":"The error message."},"code":{"type":"string","enum":["bad_request","unauthorized","forbidden","exceeded_limit","not_found","conflict","invite_pending","invite_expired","unprocessable_entity","rate_limit_exceeded","internal_server_error"],"description":"The error code."}},"required":["link","error","code"],"additionalProperties":false,"title":"LinkError"}},"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":{"x-speakeasy-error-message":true,"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://lynkr.cc/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":{"x-speakeasy-error-message":true,"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://lynkr.cc/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":{"x-speakeasy-error-message":true,"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://lynkr.cc/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":{"x-speakeasy-error-message":true,"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://lynkr.cc/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":{"x-speakeasy-error-message":true,"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://lynkr.cc/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":{"x-speakeasy-error-message":true,"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://lynkr.cc/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":{"x-speakeasy-error-message":true,"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://lynkr.cc/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":{"x-speakeasy-error-message":true,"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://lynkr.cc/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":{"x-speakeasy-error-message":true,"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://lynkr.cc/docs/api-reference/errors#internal-server_error"}},"required":["code","message"]}},"required":["error"]}}}}},"securitySchemes":{"token":{"type":"http","description":"Default authentication mechanism","scheme":"bearer","x-speakeasy-example":"DUB_API_KEY"}}}}