{"openapi":"3.0.3","info":{"title":"Pimms API","description":"Pimms | Tracking beyond Clicks","version":"0.0.1","contact":{"name":"Pimms Support","email":"alexandre@pimms.io","url":"https://pimms.io/api"},"license":{"name":"AGPL-3.0 license","url":"https://github.com/getpimms/pimms/blob/main/LICENSE.md"}},"servers":[{"url":"https://api.pimms.io","description":"Production API"}],"paths":{"/links":{"post":{"operationId":"createLink","x-speakeasy-name-override":"create","x-speakeasy-usage-example":true,"summary":"Create a new link","description":"Create a new link for the authenticated workspace.","tags":["Links"],"security":[{"token":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Destination URL the deep link redirects to. Supports standard webpages and in-app routing for mobile apps.","example":"https://pimms.io"},"domain":{"type":"string","maxLength":190,"description":"Custom domain for your branded deep link. Defaults to the workspace’s primary domain or 'pim.ms'."},"key":{"type":"string","maxLength":190,"description":"Custom slug for the short URL. If omitted, an automatic 7-character key is generated."},"externalId":{"type":"string","nullable":true,"minLength":1,"maxLength":255,"description":"External identifier for syncing link data with your internal CRM or analytics tools. Passed in query parameters prefixed by 'ext_'.","example":"123456"},"prefix":{"type":"string","description":"Custom URL path prefix for grouping auto-generated slugs (e.g., '/promo/' resulting in '/promo/abc123'). Ignored if 'key' is specified."},"trackConversion":{"type":"boolean","description":"Enable detailed conversion tracking to attribute actions like signups or purchases directly to this link."},"archived":{"type":"boolean","description":"Archive the link to hide it from primary analytics while keeping it active for redirects."},"tagIds":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"List of existing tag IDs to categorize and filter links by campaigns, audiences, or purposes.","example":["clux0rgak00011..."]},"tagNames":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"New or existing tag names to assign for improved readability and organization."},"comments":{"type":"string","nullable":true,"description":"Internal notes for team members about link context, purpose, or specific campaign details."},"expiresAt":{"type":"string","nullable":true,"description":"ISO 8601 timestamp when the link should stop redirecting users."},"expiredUrl":{"type":"string","nullable":true,"description":"Fallback destination URL after link expiration, preventing broken user experiences."},"title":{"type":"string","nullable":true,"description":"Custom Open Graph (OG) title to optimize social media sharing and improve link previews."},"description":{"type":"string","nullable":true,"description":"Custom Open Graph description for better engagement when shared on social platforms."},"image":{"type":"string","nullable":true,"description":"URL for a custom OG image to enhance visual appeal and click-through rates on social media."},"video":{"type":"string","nullable":true,"description":"Custom video URL for rich media previews via Open Graph when sharing links."},"ios":{"type":"string","nullable":true,"description":"The iOS destination URL for the short link for iOS device targeting."},"android":{"type":"string","nullable":true,"description":"The Android destination URL for the short link for Android device targeting."},"doIndex":{"type":"boolean","description":"Allow search engine indexing of the deep link. Defaults to false for privacy."},"utm_source":{"type":"string","nullable":true,"description":"UTM source parameter for tracking the origin of traffic (e.g., 'linkedin', 'facebook', 'newsletter')."},"utm_medium":{"type":"string","nullable":true,"description":"UTM medium parameter identifying traffic medium such as 'post', 'email', 'social', or 'cpc'."},"utm_campaign":{"type":"string","nullable":true,"description":"UTM campaign parameter for tracking specific marketing initiatives or promotions."},"utm_term":{"type":"string","nullable":true,"description":"UTM term parameter for keyword analysis, often used in paid search campaigns."},"utm_content":{"type":"string","nullable":true,"description":"UTM content parameter distinguishing different content variations or link placements within a campaign."},"ref":{"type":"string","nullable":true,"description":"Custom referral parameter appended as '?ref=' for downstream attribution and analysis."},"webhookIds":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Webhook IDs to trigger real-time notifications upon link clicks, ideal for integrating with analytics or marketing automation tools."}},"required":["url"]}}}},"responses":{"200":{"description":"The created link","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique internal identifier for the deep link."},"domain":{"type":"string","description":"Domain used for the deep link, e.g., 'yourbrand.com' or 'pim.ms'."},"key":{"type":"string","description":"Short URL slug appended after the domain, uniquely identifying the link."},"url":{"type":"string","format":"uri","description":"Complete original destination URL or mobile app route to which the link redirects users."},"trackConversion":{"type":"boolean","default":false,"description":"Indicates whether this link actively tracks conversion events like leads or sales."},"archived":{"type":"boolean","default":false,"description":"Determines if the link is archived, thus excluded from standard analytics views."},"expiresAt":{"type":"string","nullable":true,"description":"Expiration timestamp in ISO 8601 format; after this, the link redirects to an expired URL or returns a 404."},"title":{"type":"string","nullable":true,"description":"OG title for optimized social media link previews, fetched or set manually."},"description":{"type":"string","nullable":true,"description":"OG description for enhanced social previews, either automatically fetched or manually customized."},"image":{"type":"string","nullable":true,"description":"URL to the OG image displayed in social previews, improving shareability."},"video":{"type":"string","nullable":true,"description":"Optional video URL used in rich media previews via Open Graph."},"ios":{"type":"string","nullable":true,"description":"The iOS destination URL for the short link for iOS device targeting."},"android":{"type":"string","nullable":true,"description":"The Android destination URL for the short link for Android device targeting."},"tags":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the tag."},"name":{"type":"string","description":"The name of the tag."},"color":{"type":"string","enum":["red","yellow","green","blue","purple","pink","brown"],"description":"The color of the tag."}},"required":["id","name","color"],"title":"Tag"},"description":"Associated tags for organizing links by campaigns, audiences, or other criteria."},"webhookIds":{"type":"array","items":{"type":"string"},"description":"Webhooks triggered on each click event for real-time tracking and integration purposes."},"comments":{"type":"string","nullable":true,"description":"Internal team notes describing the context, strategy, or use of the link."},"shortLink":{"type":"string","format":"uri","description":"Fully constructed deep link URL including domain and protocol."},"qrCode":{"type":"string","format":"uri","description":"Direct link to the dynamically generated QR code for offline or print campaigns."},"utm_source":{"type":"string","nullable":true,"description":"Assigned UTM source parameter for tracking marketing origins."},"utm_medium":{"type":"string","nullable":true,"description":"Assigned UTM medium for categorizing the traffic source."},"utm_campaign":{"type":"string","nullable":true,"description":"Assigned UTM campaign for detailed campaign-level tracking."},"utm_term":{"type":"string","nullable":true,"description":"Assigned UTM term parameter used for keyword or search tracking."},"utm_content":{"type":"string","nullable":true,"description":"Assigned UTM content for distinguishing content variations within the same campaign."},"userId":{"type":"string","nullable":true,"description":"Identifier of the user who created the link."},"workspaceId":{"type":"string","description":"Identifier of the workspace that the link belongs to."},"clicks":{"type":"number","default":0,"description":"Total click count tracking user engagements."},"lastClicked":{"type":"string","nullable":true,"description":"Timestamp of the most recent click event."},"leads":{"type":"number","default":0,"description":"Total conversions attributed directly to this link."},"createdAt":{"type":"string","description":"Timestamp when the link was first created."},"updatedAt":{"type":"string","description":"Timestamp when the link was last modified."}},"required":["id","domain","key","url","trackConversion","archived","expiresAt","title","description","image","video","ios","android","tags","webhookIds","comments","shortLink","qrCode","utm_source","utm_medium","utm_campaign","utm_term","utm_content","userId","workspaceId","clicks","lastClicked","leads","createdAt","updatedAt"],"title":"Link"}}}},"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":{"type":"string","description":"Destination URL the deep link redirects to. Supports standard webpages and in-app routing for mobile apps.","example":"https://pimms.io"},"domain":{"type":"string","maxLength":190,"description":"Custom domain for your branded deep link. Defaults to the workspace’s primary domain or 'pim.ms'."},"key":{"type":"string","maxLength":190,"description":"Custom slug for the short URL. If omitted, an automatic 7-character key is generated."},"externalId":{"type":"string","nullable":true,"minLength":1,"maxLength":255,"description":"External identifier for syncing link data with your internal CRM or analytics tools. Passed in query parameters prefixed by 'ext_'.","example":"123456"},"prefix":{"type":"string","description":"Custom URL path prefix for grouping auto-generated slugs (e.g., '/promo/' resulting in '/promo/abc123'). Ignored if 'key' is specified."},"trackConversion":{"type":"boolean","description":"Enable detailed conversion tracking to attribute actions like signups or purchases directly to this link."},"archived":{"type":"boolean","description":"Archive the link to hide it from primary analytics while keeping it active for redirects."},"tagIds":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"List of existing tag IDs to categorize and filter links by campaigns, audiences, or purposes.","example":["clux0rgak00011..."]},"tagNames":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"New or existing tag names to assign for improved readability and organization."},"comments":{"type":"string","nullable":true,"description":"Internal notes for team members about link context, purpose, or specific campaign details."},"expiresAt":{"type":"string","nullable":true,"description":"ISO 8601 timestamp when the link should stop redirecting users."},"expiredUrl":{"type":"string","nullable":true,"description":"Fallback destination URL after link expiration, preventing broken user experiences."},"title":{"type":"string","nullable":true,"description":"Custom Open Graph (OG) title to optimize social media sharing and improve link previews."},"description":{"type":"string","nullable":true,"description":"Custom Open Graph description for better engagement when shared on social platforms."},"image":{"type":"string","nullable":true,"description":"URL for a custom OG image to enhance visual appeal and click-through rates on social media."},"video":{"type":"string","nullable":true,"description":"Custom video URL for rich media previews via Open Graph when sharing links."},"ios":{"type":"string","nullable":true,"description":"The iOS destination URL for the short link for iOS device targeting."},"android":{"type":"string","nullable":true,"description":"The Android destination URL for the short link for Android device targeting."},"doIndex":{"type":"boolean","description":"Allow search engine indexing of the deep link. Defaults to false for privacy."},"utm_source":{"type":"string","nullable":true,"description":"UTM source parameter for tracking the origin of traffic (e.g., 'linkedin', 'facebook', 'newsletter')."},"utm_medium":{"type":"string","nullable":true,"description":"UTM medium parameter identifying traffic medium such as 'post', 'email', 'social', or 'cpc'."},"utm_campaign":{"type":"string","nullable":true,"description":"UTM campaign parameter for tracking specific marketing initiatives or promotions."},"utm_term":{"type":"string","nullable":true,"description":"UTM term parameter for keyword analysis, often used in paid search campaigns."},"utm_content":{"type":"string","nullable":true,"description":"UTM content parameter distinguishing different content variations or link placements within a campaign."},"ref":{"type":"string","nullable":true,"description":"Custom referral parameter appended as '?ref=' for downstream attribution and analysis."},"webhookIds":{"type":"array","nullable":true,"items":{"type":"string"},"description":"Webhook IDs to trigger real-time notifications upon link clicks, ideal for integrating with analytics or marketing automation tools."}},"required":["url"]}}}},"responses":{"200":{"description":"The upserted link","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Unique internal identifier for the deep link."},"domain":{"type":"string","description":"Domain used for the deep link, e.g., 'yourbrand.com' or 'pim.ms'."},"key":{"type":"string","description":"Short URL slug appended after the domain, uniquely identifying the link."},"url":{"type":"string","format":"uri","description":"Complete original destination URL or mobile app route to which the link redirects users."},"trackConversion":{"type":"boolean","default":false,"description":"Indicates whether this link actively tracks conversion events like leads or sales."},"archived":{"type":"boolean","default":false,"description":"Determines if the link is archived, thus excluded from standard analytics views."},"expiresAt":{"type":"string","nullable":true,"description":"Expiration timestamp in ISO 8601 format; after this, the link redirects to an expired URL or returns a 404."},"title":{"type":"string","nullable":true,"description":"OG title for optimized social media link previews, fetched or set manually."},"description":{"type":"string","nullable":true,"description":"OG description for enhanced social previews, either automatically fetched or manually customized."},"image":{"type":"string","nullable":true,"description":"URL to the OG image displayed in social previews, improving shareability."},"video":{"type":"string","nullable":true,"description":"Optional video URL used in rich media previews via Open Graph."},"ios":{"type":"string","nullable":true,"description":"The iOS destination URL for the short link for iOS device targeting."},"android":{"type":"string","nullable":true,"description":"The Android destination URL for the short link for Android device targeting."},"tags":{"type":"array","nullable":true,"items":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the tag."},"name":{"type":"string","description":"The name of the tag."},"color":{"type":"string","enum":["red","yellow","green","blue","purple","pink","brown"],"description":"The color of the tag."}},"required":["id","name","color"],"title":"Tag"},"description":"Associated tags for organizing links by campaigns, audiences, or other criteria."},"webhookIds":{"type":"array","items":{"type":"string"},"description":"Webhooks triggered on each click event for real-time tracking and integration purposes."},"comments":{"type":"string","nullable":true,"description":"Internal team notes describing the context, strategy, or use of the link."},"shortLink":{"type":"string","format":"uri","description":"Fully constructed deep link URL including domain and protocol."},"qrCode":{"type":"string","format":"uri","description":"Direct link to the dynamically generated QR code for offline or print campaigns."},"utm_source":{"type":"string","nullable":true,"description":"Assigned UTM source parameter for tracking marketing origins."},"utm_medium":{"type":"string","nullable":true,"description":"Assigned UTM medium for categorizing the traffic source."},"utm_campaign":{"type":"string","nullable":true,"description":"Assigned UTM campaign for detailed campaign-level tracking."},"utm_term":{"type":"string","nullable":true,"description":"Assigned UTM term parameter used for keyword or search tracking."},"utm_content":{"type":"string","nullable":true,"description":"Assigned UTM content for distinguishing content variations within the same campaign."},"userId":{"type":"string","nullable":true,"description":"Identifier of the user who created the link."},"workspaceId":{"type":"string","description":"Identifier of the workspace that the link belongs to."},"clicks":{"type":"number","default":0,"description":"Total click count tracking user engagements."},"lastClicked":{"type":"string","nullable":true,"description":"Timestamp of the most recent click event."},"leads":{"type":"number","default":0,"description":"Total conversions attributed directly to this link."},"createdAt":{"type":"string","description":"Timestamp when the link was first created."},"updatedAt":{"type":"string","description":"Timestamp when the link was last modified."}},"required":["id","domain","key","url","trackConversion","archived","expiresAt","title","description","image","video","ios","android","tags","webhookIds","comments","shortLink","qrCode","utm_source","utm_medium","utm_campaign","utm_term","utm_content","userId","workspaceId","clicks","lastClicked","leads","createdAt","updatedAt"],"title":"Link"}}}},"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","description":"The type of event to retrieve analytics for. Defaults to `clicks`.","schema":{"type":"string","enum":["clicks","leads","sales","composite"],"default":"clicks","description":"The type of event to retrieve analytics for. Defaults to `clicks`."}},{"in":"query","name":"groupBy","description":"The parameter to group the analytics data points by. Defaults to `count` if undefined.","schema":{"type":"string","enum":["count","timeseries","link_timeseries","continents","regions","countries","cities","devices","browsers","os","trigger","triggers","referers","referer_urls","channels","top_links","top_urls","utm_combinations","utm_sources","utm_mediums","utm_campaigns","utm_terms","utm_contents"],"default":"count","description":"The parameter to group the analytics data points by. Defaults to `count` if undefined."}},{"in":"query","name":"sortMetric","description":"Optional secondary sort metric for list endpoints (used for deterministic ordering and top-N selection).","schema":{"type":"string","enum":["clicks","leads","sales","saleAmount"],"description":"Optional secondary sort metric for list endpoints (used for deterministic ordering and top-N selection)."}},{"in":"query","name":"domain","description":"The domain to filter analytics for.","schema":{"type":"string","description":"The domain to filter analytics for."}},{"in":"query","name":"key","description":"The short link slug.","schema":{"type":"string","description":"The short link slug."}},{"in":"query","name":"linkId","description":"The unique ID of the short link on PiMMs.","schema":{"type":"string","description":"The unique ID of the short link on PiMMs."}},{"in":"query","name":"externalId","description":"This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter.","schema":{"type":"string","description":"This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter."}},{"in":"query","name":"tenantId","description":"The ID of the tenant that created the link inside your system.","schema":{"type":"string","description":"The ID of the tenant that created the link inside your system."}},{"in":"query","name":"programId","description":"The ID of the program to retrieve analytics for.","schema":{"type":"string","description":"The ID of the program to retrieve analytics for."}},{"in":"query","name":"partnerId","description":"The ID of the partner to retrieve analytics for.","schema":{"type":"string","description":"The ID of the partner to retrieve analytics for."}},{"in":"query","name":"customerId","description":"The ID of the customer to retrieve analytics for.","schema":{"type":"string","description":"The ID of the customer to retrieve analytics for."}},{"in":"query","name":"interval","description":"The interval to retrieve analytics for. If undefined, defaults to 24h.","schema":{"type":"string","enum":["24h","7d","30d","90d","6m","1y","mtd","qtd","ytd","all"],"description":"The interval to retrieve analytics for. If undefined, defaults to 24h."}},{"in":"query","name":"start","description":"The start date and time when to retrieve analytics from. Takes precedence over `interval`.","schema":{"type":"string","description":"The start date and time when to retrieve analytics from. Takes precedence over `interval`."}},{"in":"query","name":"end","description":"The end date and time when to retrieve analytics from. If not provided, defaults to the current date. Takes precedence over `interval`.","schema":{"type":"string","description":"The end date and time when to retrieve analytics from. If not provided, defaults to the current date. Takes precedence over `interval`."}},{"in":"query","name":"timezone","description":"The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC.","schema":{"type":"string","description":"The IANA time zone code for aligning timeseries granularity (e.g. America/New_York). Defaults to UTC.","example":"America/New_York","default":"UTC"}},{"in":"query","name":"country","description":"The country to retrieve analytics for.","schema":{"$ref":"#/components/schemas/countryCode"}},{"in":"query","name":"city","description":"The city to retrieve analytics for.","schema":{"type":"string","description":"The city to retrieve analytics for.","example":"New York"}},{"in":"query","name":"region","description":"The ISO 3166-2 region code to retrieve analytics for.","schema":{"$ref":"#/components/schemas/regionCode"}},{"in":"query","name":"continent","description":"The continent to retrieve analytics for.","schema":{"$ref":"#/components/schemas/continentCode"}},{"in":"query","name":"device","description":"The device to retrieve analytics for.","schema":{"type":"string","description":"The device to retrieve analytics for.","example":"Desktop"}},{"in":"query","name":"browser","description":"The browser to retrieve analytics for.","schema":{"type":"string","description":"The browser to retrieve analytics for.","example":"Chrome"}},{"in":"query","name":"os","description":"The OS to retrieve analytics for.","schema":{"type":"string","description":"The OS to retrieve analytics for.","example":"Windows"}},{"in":"query","name":"trigger","description":"The trigger to retrieve analytics for. If undefined, return both QR and link clicks.","schema":{"type":"string","enum":["qr","link"],"description":"The trigger to retrieve analytics for. If undefined, return both QR and link clicks."}},{"in":"query","name":"referer","description":"The referers to retrieve analytics for. Can be multiple referers as comma-separated list.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The referers to retrieve analytics for. Can be multiple referers as comma-separated list."}},{"in":"query","name":"refererUrl","description":"The full referer URL to retrieve analytics for.","schema":{"type":"string","description":"The full referer URL to retrieve analytics for.","example":"https://pimms.io/blog"}},{"in":"query","name":"url","description":"The URL to retrieve analytics for.","schema":{"type":"string","description":"The URL to retrieve analytics for."}},{"in":"query","name":"tagId","description":"Deprecated. Use `tagIds` instead. The tag ID to retrieve analytics for.","schema":{"type":"string","description":"Deprecated. Use `tagIds` instead. The tag ID to retrieve analytics for.","deprecated":true}},{"in":"query","name":"tagIds","description":"The tag IDs to retrieve analytics for.","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"The tag IDs to retrieve analytics for."}},{"in":"query","name":"folderId","description":"The folder ID to retrieve analytics for. If not provided, return analytics for unsorted links.","schema":{"type":"string","description":"The folder ID to retrieve analytics for. If not provided, return analytics for unsorted links."}},{"in":"query","name":"qr","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.","schema":{"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.","deprecated":true}},{"in":"query","name":"root","description":"Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both.","schema":{"type":"boolean","description":"Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both."}},{"in":"query","name":"utm_source","description":"The UTM source to filter analytics by.","schema":{"type":"string","nullable":true,"maxLength":190,"description":"The UTM source to filter analytics by."}},{"in":"query","name":"utm_medium","description":"The UTM medium to filter analytics by.","schema":{"type":"string","nullable":true,"maxLength":190,"description":"The UTM medium to filter analytics by."}},{"in":"query","name":"utm_campaign","description":"The UTM campaign to filter analytics by.","schema":{"type":"string","nullable":true,"maxLength":190,"description":"The UTM campaign to filter analytics by."}},{"in":"query","name":"utm_term","description":"The UTM term to filter analytics by.","schema":{"type":"string","nullable":true,"maxLength":190,"description":"The UTM term to filter analytics by."}},{"in":"query","name":"utm_content","description":"The UTM content to filter analytics by.","schema":{"type":"string","nullable":true,"maxLength":190,"description":"The UTM content to filter analytics by."}}],"responses":{"200":{"description":"Analytics data","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/AnalyticsCount"},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsTimeseries"},"title":"AnalyticsTimeseries"},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsContinents"},"title":"AnalyticsContinents"},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsCountries"},"title":"AnalyticsCountries"},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsRegions"},"title":"AnalyticsRegions"},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsCities"},"title":"AnalyticsCities"},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsDevices"},"title":"AnalyticsDevices"},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsBrowsers"},"title":"AnalyticsBrowsers"},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsOS"},"title":"AnalyticsOS"},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsTriggers"},"title":"AnalyticsTriggers"},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsReferers"},"title":"AnalyticsReferers"},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsRefererUrls"},"title":"AnalyticsRefererUrls"},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsTopLinks"},"title":"AnalyticsTopLinks"},{"type":"array","items":{"$ref":"#/components/schemas/AnalyticsTopUrls"},"title":"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"}}}},"/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","minLength":1,"description":"Unique identifier for the click event in PIMMS, typically retrieved from the 'pimms_id' browser cookie for accurate attribution."},"eventName":{"type":"string","minLength":1,"maxLength":50,"description":"Name of the specific lead or conversion event you want to track (e.g., 'Sign up', 'Free Trial Registration').","example":"Sign up"},"externalId":{"type":"string","maxLength":100,"default":"","description":"A unique identifier from your internal system (such as user ID) to link customer journeys across platforms."},"customerName":{"type":"string","nullable":true,"maxLength":100,"default":null,"description":"Optional customer name, useful for personalized reporting and CRM integrations."},"customerEmail":{"type":"string","nullable":true,"format":"email","maxLength":100,"default":null,"description":"Customer email address to enhance CRM synchronization and facilitate personalized marketing efforts."},"customerAvatar":{"type":"string","nullable":true,"default":null,"description":"URL to the customer's avatar image, used for richer user profiles in integrated CRM or analytics platforms."},"metadata":{"type":"object","nullable":true,"additionalProperties":{},"default":null,"description":"Additional structured data or context about the lead event, aiding advanced segmentation and reporting."}},"required":["clickId","eventName"]}}}},"responses":{"200":{"description":"A lead was tracked.","content":{"application/json":{"schema":{"type":"object","properties":{"click":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the recorded click event associated with this lead."}},"required":["id"]},"customer":{"type":"object","properties":{"name":{"type":"string","nullable":true,"description":"Customer name provided during the lead event."},"email":{"type":"string","nullable":true,"description":"Customer email provided during the lead event."},"avatar":{"type":"string","nullable":true,"description":"Customer avatar URL provided during the lead event."},"externalId":{"type":"string","nullable":true,"description":"External ID from your internal database linking this lead to your own customer records."}},"required":["name","email","avatar","externalId"]}},"required":["click","customer"]}}}},"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":{"externalId":{"type":"string","maxLength":100,"default":"","description":"This is the unique identifier for the customer in the client's app. This is used to track the customer's journey."},"amount":{"type":"integer","minimum":0,"description":"The amount of the sale. Should be passed in cents."},"paymentProcessor":{"type":"string","description":"The payment processor via which the sale was made."},"eventName":{"type":"string","maxLength":50,"default":"Purchase","description":"The name of the sale event. It can be used to track different types of event for example 'Purchase', 'Upgrade', 'Payment', etc.","example":"Purchase"},"invoiceId":{"type":"string","nullable":true,"default":null,"description":"The invoice ID of the sale."},"currency":{"type":"string","default":"usd","description":"The currency of the sale. Accepts ISO 4217 currency codes."},"metadata":{"type":"object","nullable":true,"additionalProperties":{},"default":null,"description":"Additional metadata to be stored with the sale event."}},"required":["amount","paymentProcessor"]}}}},"responses":{"200":{"description":"A sale was tracked.","content":{"application/json":{"schema":{"type":"object","properties":{"eventName":{"type":"string"},"customer":{"type":"object","nullable":true,"properties":{"id":{"type":"string"},"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"avatar":{"type":"string","nullable":true},"externalId":{"type":"string","nullable":true}},"required":["id","name","email","avatar","externalId"]},"sale":{"type":"object","nullable":true,"properties":{"amount":{"type":"number"},"currency":{"type":"string"},"paymentProcessor":{"type":"string"},"invoiceId":{"type":"string","nullable":true},"metadata":{"type":"object","nullable":true,"additionalProperties":{}}},"required":["amount","currency","paymentProcessor","invoiceId","metadata"]}},"required":["eventName","customer","sale"]}}}},"400":{"$ref":"#/components/responses/400"},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"409":{"$ref":"#/components/responses/409"},"410":{"$ref":"#/components/responses/410"},"422":{"$ref":"#/components/responses/422"},"429":{"$ref":"#/components/responses/429"},"500":{"$ref":"#/components/responses/500"}}}},"/qr":{"get":{"operationId":"getQRCode","x-speakeasy-name-override":"get","summary":"Retrieve a QR code","description":"Retrieve a QR code for a link.","tags":["QR Codes"],"parameters":[{"in":"query","name":"url","description":"The URL to generate a QR code for.","schema":{"type":"string","description":"The URL to generate a QR code for."},"required":true},{"in":"query","name":"logo","description":"The logo to include in the QR code. Can only be used with a paid plan on PiMMs","schema":{"type":"string","description":"The logo to include in the QR code. Can only be used with a paid plan on PiMMs"}},{"in":"query","name":"size","description":"The size of the QR code in pixels. Defaults to `600` if not provided.","schema":{"type":"number","default":600,"description":"The size of the QR code in pixels. Defaults to `600` if not provided."}},{"in":"query","name":"level","description":"The level of error correction to use for the QR code. Defaults to `L` if not provided.","schema":{"type":"string","enum":["L","M","Q","H"],"default":"L","description":"The level of error correction to use for the QR code. Defaults to `L` if not provided."}},{"in":"query","name":"fgColor","description":"The foreground color of the QR code in hex format. Defaults to `#000000` if not provided.","schema":{"type":"string","default":"#000000","description":"The foreground color of the QR code in hex format. Defaults to `#000000` if not provided."}},{"in":"query","name":"bgColor","description":"The background color of the QR code in hex format. Defaults to `#ffffff` if not provided.","schema":{"type":"string","default":"#FFFFFF","description":"The background color of the QR code in hex format. Defaults to `#ffffff` if not provided."}},{"in":"query","name":"hideLogo","description":"Whether to hide the logo in the QR code. Can only be used with a paid plan on PiMMs.","schema":{"type":"boolean","default":"false","description":"Whether to hide the logo in the QR code. Can only be used with a paid plan on PiMMs."}},{"in":"query","name":"margin","description":"The size of the margin around the QR code. Defaults to 2 if not provided.","schema":{"type":"number","default":2,"description":"The size of the margin around the QR code. Defaults to 2 if not provided."}},{"in":"query","name":"includeMargin","description":"DEPRECATED: Margin is included by default. Use the `margin` prop to customize the margin size.","schema":{"type":"boolean","default":"true","description":"DEPRECATED: Margin is included by default. Use the `margin` prop to customize the margin size.","deprecated":true}}],"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"}}}}},"components":{"securitySchemes":{"token":{"type":"http","description":"Default authentication mechanism","scheme":"bearer","x-speakeasy-example":"PIMMS_API_KEY"}},"schemas":{"countryCode":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The country to retrieve analytics for."},"regionCode":{"type":"string","description":"The ISO 3166-2 region code to retrieve analytics for."},"continentCode":{"type":"string","enum":["AF","AN","AS","EU","NA","OC","SA"],"description":"The continent to retrieve analytics for."},"AnalyticsCount":{"type":"object","properties":{"clicks":{"type":"number","description":"The total number of clicks","default":0},"leads":{"type":"number","description":"The total number of leads","default":0},"sales":{"type":"number","description":"The total number of sales","default":0},"saleAmount":{"type":"number","description":"The total amount of sales, in cents","default":0}},"required":["clicks","leads","sales","saleAmount"],"title":"AnalyticsCount"},"AnalyticsTimeseries":{"type":"object","properties":{"start":{"type":"string","description":"The starting timestamp of the interval"},"clicks":{"type":"number","description":"The number of clicks in the interval","default":0},"leads":{"type":"number","description":"The number of leads in the interval","default":0},"sales":{"type":"number","description":"The number of sales in the interval","default":0},"saleAmount":{"type":"number","description":"The total amount of sales in the interval, in cents","default":0}},"required":["start","clicks","leads","sales","saleAmount"]},"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":{"type":"number","description":"The number of clicks from this continent","default":0},"leads":{"type":"number","description":"The number of leads from this continent","default":0},"sales":{"type":"number","description":"The number of sales from this continent","default":0},"saleAmount":{"type":"number","description":"The total amount of sales from this continent, in cents","default":0}},"required":["continent","clicks","leads","sales","saleAmount"]},"AnalyticsCountries":{"type":"object","properties":{"country":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The 2-letter ISO 3166-1 country code for the country associated with the location of the user. Learn more: https://d.to/geo"},"region":{"type":"string","enum":["*"],"default":"*"},"city":{"type":"string","enum":["*"],"default":"*"},"clicks":{"type":"number","description":"The number of clicks from this country","default":0},"leads":{"type":"number","description":"The number of leads from this country","default":0},"sales":{"type":"number","description":"The number of sales from this country","default":0},"saleAmount":{"type":"number","description":"The total amount of sales from this country, in cents","default":0}},"required":["country","region","city","clicks","leads","sales","saleAmount"]},"AnalyticsRegions":{"type":"object","properties":{"country":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The 2-letter country code of the region"},"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","enum":["*"],"default":"*"},"clicks":{"type":"number","description":"The number of clicks from this region","default":0},"leads":{"type":"number","description":"The number of leads from this region","default":0},"sales":{"type":"number","description":"The number of sales from this region","default":0},"saleAmount":{"type":"number","description":"The total amount of sales from this region, in cents","default":0}},"required":["country","region","city","clicks","leads","sales","saleAmount"]},"AnalyticsCities":{"type":"object","properties":{"country":{"type":"string","enum":["AF","AL","DZ","AS","AD","AO","AI","AQ","AG","AR","AM","AW","AU","AT","AZ","BS","BH","BD","BB","BY","BE","BZ","BJ","BM","BT","BO","BA","BW","BV","BR","IO","BN","BG","BF","BI","KH","CM","CA","CV","KY","CF","TD","CL","CN","CX","CC","CO","KM","CG","CD","CK","CR","CI","HR","CU","CY","CZ","DK","DJ","DM","DO","EC","EG","SV","GQ","ER","EE","ET","FK","FO","FJ","FI","FR","GF","PF","TF","GA","GM","GE","DE","GH","GI","GR","GL","GD","GP","GU","GT","GN","GW","GY","HT","HM","VA","HN","HK","HU","IS","IN","ID","IR","IQ","IE","IL","IT","JM","JP","JO","KZ","KE","KI","KP","KR","KW","KG","LA","LV","LB","LS","LR","LY","LI","LT","LU","MO","MG","MW","MY","MV","ML","MT","MH","MQ","MR","MU","YT","MX","FM","MD","MC","MN","MS","MA","MZ","MM","NA","NR","NP","NL","NC","NZ","NI","NE","NG","NU","NF","MK","MP","NO","OM","PK","PW","PS","PA","PG","PY","PE","PH","PN","PL","PT","PR","QA","RE","RO","RU","RW","SH","KN","LC","PM","VC","WS","SM","ST","SA","SN","SC","SL","SG","SK","SI","SB","SO","ZA","GS","ES","LK","SD","SR","SJ","SZ","SE","CH","SY","TW","TJ","TZ","TH","TL","TG","TK","TO","TT","TN","TR","TM","TC","TV","UG","UA","AE","GB","US","UM","UY","UZ","VU","VE","VN","VG","VI","WF","EH","YE","ZM","ZW","AX","BQ","CW","GG","IM","JE","ME","BL","MF","RS","SX","SS","XK"],"description":"The 2-letter country code of the city"},"region":{"type":"string","enum":["*"],"default":"*"},"city":{"type":"string","description":"The name of the city"},"clicks":{"type":"number","description":"The number of clicks from this city","default":0},"leads":{"type":"number","description":"The number of leads from this city","default":0},"sales":{"type":"number","description":"The number of sales from this city","default":0},"saleAmount":{"type":"number","description":"The total amount of sales from this city, in cents","default":0}},"required":["country","region","city","clicks","leads","sales","saleAmount"]},"AnalyticsDevices":{"type":"object","properties":{"device":{"type":"string","description":"The name of the device"},"clicks":{"type":"number","description":"The number of clicks from this device","default":0},"leads":{"type":"number","description":"The number of leads from this device","default":0},"sales":{"type":"number","description":"The number of sales from this device","default":0},"saleAmount":{"type":"number","description":"The total amount of sales from this device, in cents","default":0}},"required":["device","clicks","leads","sales","saleAmount"]},"AnalyticsBrowsers":{"type":"object","properties":{"browser":{"type":"string","description":"The name of the browser"},"clicks":{"type":"number","description":"The number of clicks from this browser","default":0},"leads":{"type":"number","description":"The number of leads from this browser","default":0},"sales":{"type":"number","description":"The number of sales from this browser","default":0},"saleAmount":{"type":"number","description":"The total amount of sales from this browser, in cents","default":0}},"required":["browser","clicks","leads","sales","saleAmount"]},"AnalyticsOS":{"type":"object","properties":{"os":{"type":"string","description":"The name of the OS"},"clicks":{"type":"number","description":"The number of clicks from this OS","default":0},"leads":{"type":"number","description":"The number of leads from this OS","default":0},"sales":{"type":"number","description":"The number of sales from this OS","default":0},"saleAmount":{"type":"number","description":"The total amount of sales from this OS, in cents","default":0}},"required":["os","clicks","leads","sales","saleAmount"]},"AnalyticsTriggers":{"type":"object","properties":{"trigger":{"type":"string","enum":["qr","link"],"description":"The type of trigger method: link click or QR scan"},"clicks":{"type":"number","description":"The number of clicks from this trigger method","default":0},"leads":{"type":"number","description":"The number of leads from this trigger method","default":0},"sales":{"type":"number","description":"The number of sales from this trigger method","default":0},"saleAmount":{"type":"number","description":"The total amount of sales from this trigger method, in cents","default":0}},"required":["trigger","clicks","leads","sales","saleAmount"]},"AnalyticsReferers":{"type":"object","properties":{"referer":{"type":"string","description":"The name of the referer. If unknown, this will be `(direct)`"},"clicks":{"type":"number","description":"The number of clicks from this referer","default":0},"leads":{"type":"number","description":"The number of leads from this referer","default":0},"sales":{"type":"number","description":"The number of sales from this referer","default":0},"saleAmount":{"type":"number","description":"The total amount of sales from this referer, in cents","default":0}},"required":["referer","clicks","leads","sales","saleAmount"]},"AnalyticsRefererUrls":{"type":"object","properties":{"refererUrl":{"type":"string","description":"The full URL of the referer. If unknown, this will be `(direct)`"},"clicks":{"type":"number","description":"The number of clicks from this referer to this URL","default":0},"leads":{"type":"number","description":"The number of leads from this referer to this URL","default":0},"sales":{"type":"number","description":"The number of sales from this referer to this URL","default":0},"saleAmount":{"type":"number","description":"The total amount of sales from this referer to this URL, in cents","default":0}},"required":["refererUrl","clicks","leads","sales","saleAmount"]},"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":{"type":"string","nullable":true,"description":"The comments of the short link"},"title":{"type":"string","nullable":true,"description":"The custom link preview title (og:title)"},"createdAt":{"type":"string","description":"The creation timestamp of the short link"},"clicks":{"type":"number","description":"The number of clicks from this link","default":0},"leads":{"type":"number","description":"The number of leads from this link","default":0},"sales":{"type":"number","description":"The number of sales from this link","default":0},"saleAmount":{"type":"number","description":"The total amount of sales from this link, in cents","default":0}},"required":["link","id","domain","key","shortLink","url","createdAt","clicks","leads","sales","saleAmount"]},"AnalyticsTopUrls":{"type":"object","properties":{"url":{"type":"string","description":"The destination URL"},"clicks":{"type":"number","description":"The number of clicks from this URL","default":0},"leads":{"type":"number","description":"The number of leads from this URL","default":0},"sales":{"type":"number","description":"The number of sales from this URL","default":0},"saleAmount":{"type":"number","description":"The total amount of sales from this URL, in cents","default":0}},"required":["url","clicks","leads","sales","saleAmount"]}},"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."}},"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."}},"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."}},"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."}},"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."}},"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."}},"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."}},"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."}},"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."}},"required":["code","message"]}},"required":["error"]}}}}}}}