{"openapi":"3.0.0","info":{"version":"1.0.0","title":"URL Shortener API","description":"Use the Shortener.dev URL shortener API to create and manage short links from your own code, in any language that can send an HTTPS request: Node.js, Python, PHP, Go, C#, Java and more.\n\nWith the API you can:\n\n- Shorten long URLs with a custom alias (back-half) or an auto-generated one\n- Add [UTM parameters](https://shortener.dev/docs/utm-parameters), an [expiration date](https://shortener.dev/docs/link-expiration), a [password](https://shortener.dev/docs/password-protected-links), [iOS and Android app links](https://shortener.dev/docs/ios-android-app-links) and [geo targeting](https://shortener.dev/docs/geo-targeting)\n- Add and [verify the domains](https://shortener.dev/docs/verify-domain) your links point to\n- Read click analytics by date, referrer, country, browser, OS and device\n\nStep-by-step guides are in the [Shortener.dev docs](https://shortener.dev/docs).\n\n## Base URL\n\nAll endpoints are under `https://api.shortener.dev/v1` and are served over HTTPS only.\n\n## Authentication\n\nSend your API key in the `Authorization` header as a bearer token. [Create an API key](https://app.shortener.dev/settings/api-keys) in the dashboard under Settings, then API Keys.\n\n```\ncurl https://api.shortener.dev/v1/links \\\n  -H 'Authorization: Bearer YOUR_API_KEY'\n```\n\n## Errors\n\nErrors return a JSON body with a `message`, for example `{\"message\": \"Domain not verified: example.com\"}`. A `402` means the plan limit is reached, `403` means the destination domain is not verified, and `429` means too many requests.\n"},"security":[{"Bearer":[]}],"tags":[{"name":"Links","description":"Create, update and manage short links with custom alias, UTM parameters, expiration, password protection, app deep links and geo-targeting"},{"name":"Domains","description":"Add and verify the domains you own. Short links can be created only for destination URLs on verified or whitelisted domains"},{"name":"Projects","description":"Organize short links by campaign, client or brand"},{"name":"Analytics","description":"Click analytics of short links by date, referrer, country, city, browser, OS and device"},{"name":"Reports","description":"Raw click log export with visitor details"},{"name":"Users","description":"Manage team members of your account"}],"servers":[{"url":"https://api.shortener.dev/v1","description":"API"}],"components":{"securitySchemes":{"Bearer":{"type":"http","scheme":"bearer","description":"API key or bearer token from sign in"}},"parameters":{}},"paths":{"/v1/links":{"get":{"tags":["Links"],"summary":"List short links","description":"Get a paginated list of short links in your account, newest first. Use `search` to find a short link by its key or long destination URL.","parameters":[{"schema":{"type":"integer","nullable":true,"minimum":0,"default":0,"example":0,"description":"Number of records to skip for pagination"},"required":false,"description":"Number of records to skip for pagination","name":"offset","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":1000,"example":25,"description":"Maximum number of records to return (1-1000)"},"required":false,"description":"Maximum number of records to return (1-1000)","name":"limit","in":"query"},{"schema":{"type":"string","maxLength":512,"example":"github","description":"Search by short link key or destination URL"},"required":false,"description":"Search by short link key or destination URL","name":"search","in":"query"}],"responses":{"200":{"description":"Paginated list of short links","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer","example":1,"description":"Total number of records available"},"limit":{"type":"integer","example":25},"offset":{"type":"integer","example":0},"returned":{"type":"integer","example":1,"description":"Number of records in this response"},"result":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9_-]{2,32}$","example":"sale-26","description":"Custom alias (back-half) of the short URL, e.g. `srt1.link/sale-26`. 2-32 characters of letters, numbers, `-` or `_`. Auto-generated when not provided"},"project_id":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true,"example":1,"description":"Project to organize the short link in"},"url":{"type":"string","minLength":10,"format":"uri","example":"https://example.com/blog/url-shortener-guide","description":"Long destination URL to shorten. The domain must be [verified](#tag/Domains) in your account or whitelisted"},"short_url":{"type":"string","example":"https://srt1.link/summer-sale","description":"The generated short URL to share","readOnly":true},"expire_at":{"type":"string","nullable":true,"format":"date-time","example":"2030-12-31T23:59:00Z","description":"Expire the short link automatically at this UTC date-time. Leave empty for a link that never expires"},"params":{"type":"object","additionalProperties":{"type":"string"},"example":{"utm_source":"newsletter","utm_medium":"email"},"description":"UTM parameters appended to the destination URL for campaign conversion tracking in Google Analytics"},"title":{"type":"string","nullable":true,"maxLength":60,"example":"The complete guide to URL shortening","description":"Social media preview (Open Graph) title"},"description":{"type":"string","nullable":true,"maxLength":155,"example":"Learn how to create branded short links and track clicks.","description":"Social media preview (Open Graph) description"},"image":{"anyOf":[{"type":"string","nullable":true,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}],"example":"https://example.com/images/og-banner.png","description":"Social media preview (Open Graph) image URL. Must end with .jpg, .png, .gif, .bmp or .webp"},"password":{"type":"string","nullable":true,"maxLength":32,"example":"s3cret","description":"Restrict access with a [password protected short link](https://shortener.dev/docs/password-protected-links)"},"ios":{"anyOf":[{"type":"string","nullable":true,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}],"example":"https://apps.apple.com/us/app/example/id000000000","description":"Deep link for iPhone and iPad visitors, e.g. your app on the Apple App Store"},"android":{"anyOf":[{"type":"string","nullable":true,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}],"example":"https://play.google.com/store/apps/details?id=com.example","description":"Deep link for Android visitors, e.g. your app on Google Play Store"},"geo":{"type":"array","nullable":true,"items":{"type":"object","properties":{"country":{"type":"string","nullable":true,"minLength":2,"maxLength":2,"example":"US","description":"ISO 3166-1 alpha-2 country code of the visitor"},"url":{"type":"string","format":"uri","example":"https://example.com/us","description":"Destination URL for visitors from this country"}},"required":["country","url"]},"maxItems":195,"default":[],"description":"Redirect visitors by country with [geo-targeted short links](https://shortener.dev/docs/geo-targeting)"},"is_enabled":{"anyOf":[{"type":"boolean"},{"type":"integer","minimum":0,"maximum":1}],"example":true,"description":"Disabled short links stop redirecting visitors"},"created_at":{"type":"string","nullable":true,"example":"2026-01-01T10:00:00Z","description":"UTC date-time when the short link was created","readOnly":true},"updated_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","description":"UTC date-time when the short link was last updated","readOnly":true}},"required":["url"],"description":"A short link that redirects visitors to a long destination URL, with optional UTM tracking, expiration, password, app deep links and geo-targeting"}}},"required":["total","limit","offset","returned","result"]}}}},"400":{"description":"Bad request, the request body or parameters are invalid","content":{"application/json":{"example":{"message":"url: Invalid URL"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}},"post":{"tags":["Links"],"summary":"Create a short link","description":"Shorten a long URL into a short link with an optional custom alias, expiration date, UTM parameters, password, social media preview, iOS/Android deep links and geo-targeting. The destination URL domain must be verified in your account or whitelisted.","requestBody":{"required":true,"content":{"application/json":{"example":{"url":"https://example.com/blog/url-shortener-guide"},"schema":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9_-]{2,32}$","example":"sale-26","description":"Custom alias (back-half) of the short URL, e.g. `srt1.link/sale-26`. 2-32 characters of letters, numbers, `-` or `_`. Auto-generated when not provided"},"project_id":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true,"example":1,"description":"Project to organize the short link in"},"url":{"type":"string","minLength":10,"format":"uri","example":"https://example.com/blog/url-shortener-guide","description":"Long destination URL to shorten. The domain must be [verified](#tag/Domains) in your account or whitelisted"},"short_url":{"type":"string","example":"https://srt1.link/summer-sale","description":"The generated short URL to share","readOnly":true},"expire_at":{"type":"string","nullable":true,"format":"date-time","example":"2030-12-31T23:59:00Z","description":"Expire the short link automatically at this UTC date-time. Leave empty for a link that never expires"},"params":{"type":"object","additionalProperties":{"type":"string"},"example":{"utm_source":"newsletter","utm_medium":"email"},"description":"UTM parameters appended to the destination URL for campaign conversion tracking in Google Analytics"},"title":{"type":"string","nullable":true,"maxLength":60,"example":"The complete guide to URL shortening","description":"Social media preview (Open Graph) title"},"description":{"type":"string","nullable":true,"maxLength":155,"example":"Learn how to create branded short links and track clicks.","description":"Social media preview (Open Graph) description"},"image":{"anyOf":[{"type":"string","nullable":true,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}],"example":"https://example.com/images/og-banner.png","description":"Social media preview (Open Graph) image URL. Must end with .jpg, .png, .gif, .bmp or .webp"},"password":{"type":"string","nullable":true,"maxLength":32,"example":"s3cret","description":"Restrict access with a [password protected short link](https://shortener.dev/docs/password-protected-links)"},"ios":{"anyOf":[{"type":"string","nullable":true,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}],"example":"https://apps.apple.com/us/app/example/id000000000","description":"Deep link for iPhone and iPad visitors, e.g. your app on the Apple App Store"},"android":{"anyOf":[{"type":"string","nullable":true,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}],"example":"https://play.google.com/store/apps/details?id=com.example","description":"Deep link for Android visitors, e.g. your app on Google Play Store"},"geo":{"type":"array","nullable":true,"items":{"type":"object","properties":{"country":{"type":"string","nullable":true,"minLength":2,"maxLength":2,"example":"US","description":"ISO 3166-1 alpha-2 country code of the visitor"},"url":{"type":"string","format":"uri","example":"https://example.com/us","description":"Destination URL for visitors from this country"}},"required":["country","url"]},"maxItems":195,"default":[],"description":"Redirect visitors by country with [geo-targeted short links](https://shortener.dev/docs/geo-targeting)"},"is_enabled":{"anyOf":[{"type":"boolean"},{"type":"integer","minimum":0,"maximum":1}],"example":true,"description":"Disabled short links stop redirecting visitors"},"created_at":{"type":"string","nullable":true,"example":"2026-01-01T10:00:00Z","description":"UTC date-time when the short link was created","readOnly":true},"updated_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","description":"UTC date-time when the short link was last updated","readOnly":true}},"required":["url"],"description":"A short link that redirects visitors to a long destination URL, with optional UTM tracking, expiration, password, app deep links and geo-targeting"}}}},"responses":{"200":{"description":"The created short link","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9_-]{2,32}$","example":"sale-26","description":"Custom alias (back-half) of the short URL, e.g. `srt1.link/sale-26`. 2-32 characters of letters, numbers, `-` or `_`. Auto-generated when not provided"},"project_id":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true,"example":1,"description":"Project to organize the short link in"},"url":{"type":"string","minLength":10,"format":"uri","example":"https://example.com/blog/url-shortener-guide","description":"Long destination URL to shorten. The domain must be [verified](#tag/Domains) in your account or whitelisted"},"short_url":{"type":"string","example":"https://srt1.link/summer-sale","description":"The generated short URL to share","readOnly":true},"expire_at":{"type":"string","nullable":true,"format":"date-time","example":"2030-12-31T23:59:00Z","description":"Expire the short link automatically at this UTC date-time. Leave empty for a link that never expires"},"params":{"type":"object","additionalProperties":{"type":"string"},"example":{"utm_source":"newsletter","utm_medium":"email"},"description":"UTM parameters appended to the destination URL for campaign conversion tracking in Google Analytics"},"title":{"type":"string","nullable":true,"maxLength":60,"example":"The complete guide to URL shortening","description":"Social media preview (Open Graph) title"},"description":{"type":"string","nullable":true,"maxLength":155,"example":"Learn how to create branded short links and track clicks.","description":"Social media preview (Open Graph) description"},"image":{"anyOf":[{"type":"string","nullable":true,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}],"example":"https://example.com/images/og-banner.png","description":"Social media preview (Open Graph) image URL. Must end with .jpg, .png, .gif, .bmp or .webp"},"password":{"type":"string","nullable":true,"maxLength":32,"example":"s3cret","description":"Restrict access with a [password protected short link](https://shortener.dev/docs/password-protected-links)"},"ios":{"anyOf":[{"type":"string","nullable":true,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}],"example":"https://apps.apple.com/us/app/example/id000000000","description":"Deep link for iPhone and iPad visitors, e.g. your app on the Apple App Store"},"android":{"anyOf":[{"type":"string","nullable":true,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}],"example":"https://play.google.com/store/apps/details?id=com.example","description":"Deep link for Android visitors, e.g. your app on Google Play Store"},"geo":{"type":"array","nullable":true,"items":{"type":"object","properties":{"country":{"type":"string","nullable":true,"minLength":2,"maxLength":2,"example":"US","description":"ISO 3166-1 alpha-2 country code of the visitor"},"url":{"type":"string","format":"uri","example":"https://example.com/us","description":"Destination URL for visitors from this country"}},"required":["country","url"]},"maxItems":195,"default":[],"description":"Redirect visitors by country with [geo-targeted short links](https://shortener.dev/docs/geo-targeting)"},"is_enabled":{"anyOf":[{"type":"boolean"},{"type":"integer","minimum":0,"maximum":1}],"example":true,"description":"Disabled short links stop redirecting visitors"},"created_at":{"type":"string","nullable":true,"example":"2026-01-01T10:00:00Z","description":"UTC date-time when the short link was created","readOnly":true},"updated_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","description":"UTC date-time when the short link was last updated","readOnly":true}},"required":["url"],"description":"A short link that redirects visitors to a long destination URL, with optional UTM tracking, expiration, password, app deep links and geo-targeting"}}}},"400":{"description":"Bad request, the request body or parameters are invalid","content":{"application/json":{"example":{"message":"url: Invalid URL"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"402":{"description":"Payment required, the current plan limit has been reached","content":{"application/json":{"example":{"message":"The Free plan is limited to 10 links only, please upgrade"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"403":{"description":"Forbidden, the domain or resource is not allowed","content":{"application/json":{"example":{"message":"Domain not verified: example.com"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}}},"/v1/links/{key}":{"get":{"tags":["Links"],"summary":"Get a short link","description":"Retrieve a short link by its key, including the long destination URL and all link settings.","parameters":[{"schema":{"type":"string","maxLength":32,"example":"summer-sale","description":"Short link key (the back-half of the short URL)"},"required":true,"description":"Short link key (the back-half of the short URL)","name":"key","in":"path"}],"responses":{"200":{"description":"The short link","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9_-]{2,32}$","example":"sale-26","description":"Custom alias (back-half) of the short URL, e.g. `srt1.link/sale-26`. 2-32 characters of letters, numbers, `-` or `_`. Auto-generated when not provided"},"project_id":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true,"example":1,"description":"Project to organize the short link in"},"url":{"type":"string","minLength":10,"format":"uri","example":"https://example.com/blog/url-shortener-guide","description":"Long destination URL to shorten. The domain must be [verified](#tag/Domains) in your account or whitelisted"},"short_url":{"type":"string","example":"https://srt1.link/summer-sale","description":"The generated short URL to share","readOnly":true},"expire_at":{"type":"string","nullable":true,"format":"date-time","example":"2030-12-31T23:59:00Z","description":"Expire the short link automatically at this UTC date-time. Leave empty for a link that never expires"},"params":{"type":"object","additionalProperties":{"type":"string"},"example":{"utm_source":"newsletter","utm_medium":"email"},"description":"UTM parameters appended to the destination URL for campaign conversion tracking in Google Analytics"},"title":{"type":"string","nullable":true,"maxLength":60,"example":"The complete guide to URL shortening","description":"Social media preview (Open Graph) title"},"description":{"type":"string","nullable":true,"maxLength":155,"example":"Learn how to create branded short links and track clicks.","description":"Social media preview (Open Graph) description"},"image":{"anyOf":[{"type":"string","nullable":true,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}],"example":"https://example.com/images/og-banner.png","description":"Social media preview (Open Graph) image URL. Must end with .jpg, .png, .gif, .bmp or .webp"},"password":{"type":"string","nullable":true,"maxLength":32,"example":"s3cret","description":"Restrict access with a [password protected short link](https://shortener.dev/docs/password-protected-links)"},"ios":{"anyOf":[{"type":"string","nullable":true,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}],"example":"https://apps.apple.com/us/app/example/id000000000","description":"Deep link for iPhone and iPad visitors, e.g. your app on the Apple App Store"},"android":{"anyOf":[{"type":"string","nullable":true,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}],"example":"https://play.google.com/store/apps/details?id=com.example","description":"Deep link for Android visitors, e.g. your app on Google Play Store"},"geo":{"type":"array","nullable":true,"items":{"type":"object","properties":{"country":{"type":"string","nullable":true,"minLength":2,"maxLength":2,"example":"US","description":"ISO 3166-1 alpha-2 country code of the visitor"},"url":{"type":"string","format":"uri","example":"https://example.com/us","description":"Destination URL for visitors from this country"}},"required":["country","url"]},"maxItems":195,"default":[],"description":"Redirect visitors by country with [geo-targeted short links](https://shortener.dev/docs/geo-targeting)"},"is_enabled":{"anyOf":[{"type":"boolean"},{"type":"integer","minimum":0,"maximum":1}],"example":true,"description":"Disabled short links stop redirecting visitors"},"created_at":{"type":"string","nullable":true,"example":"2026-01-01T10:00:00Z","description":"UTC date-time when the short link was created","readOnly":true},"updated_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","description":"UTC date-time when the short link was last updated","readOnly":true}},"required":["url"],"description":"A short link that redirects visitors to a long destination URL, with optional UTM tracking, expiration, password, app deep links and geo-targeting"}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"404":{"description":"Not found, no record exists with the given id","content":{"application/json":{"example":{"message":"No data found"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}},"put":{"tags":["Links"],"summary":"Update a short link","description":"Change the destination URL or settings of an existing short link. The short URL stays the same, so printed QR codes and shared links keep working.","parameters":[{"schema":{"type":"string","maxLength":32,"example":"summer-sale","description":"Short link key (the back-half of the short URL)"},"required":true,"description":"Short link key (the back-half of the short URL)","name":"key","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"url":"https://example.com/blog/url-shortener-guide?ref=update"},"schema":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9_-]{2,32}$","example":"sale-26","description":"Custom alias (back-half) of the short URL, e.g. `srt1.link/sale-26`. 2-32 characters of letters, numbers, `-` or `_`. Auto-generated when not provided"},"project_id":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true,"example":1,"description":"Project to organize the short link in"},"url":{"type":"string","minLength":10,"format":"uri","example":"https://example.com/blog/url-shortener-guide","description":"Long destination URL to shorten. The domain must be [verified](#tag/Domains) in your account or whitelisted"},"short_url":{"type":"string","example":"https://srt1.link/summer-sale","description":"The generated short URL to share","readOnly":true},"expire_at":{"type":"string","nullable":true,"format":"date-time","example":"2030-12-31T23:59:00Z","description":"Expire the short link automatically at this UTC date-time. Leave empty for a link that never expires"},"params":{"type":"object","additionalProperties":{"type":"string"},"example":{"utm_source":"newsletter","utm_medium":"email"},"description":"UTM parameters appended to the destination URL for campaign conversion tracking in Google Analytics"},"title":{"type":"string","nullable":true,"maxLength":60,"example":"The complete guide to URL shortening","description":"Social media preview (Open Graph) title"},"description":{"type":"string","nullable":true,"maxLength":155,"example":"Learn how to create branded short links and track clicks.","description":"Social media preview (Open Graph) description"},"image":{"anyOf":[{"type":"string","nullable":true,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}],"example":"https://example.com/images/og-banner.png","description":"Social media preview (Open Graph) image URL. Must end with .jpg, .png, .gif, .bmp or .webp"},"password":{"type":"string","nullable":true,"maxLength":32,"example":"s3cret","description":"Restrict access with a [password protected short link](https://shortener.dev/docs/password-protected-links)"},"ios":{"anyOf":[{"type":"string","nullable":true,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}],"example":"https://apps.apple.com/us/app/example/id000000000","description":"Deep link for iPhone and iPad visitors, e.g. your app on the Apple App Store"},"android":{"anyOf":[{"type":"string","nullable":true,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}],"example":"https://play.google.com/store/apps/details?id=com.example","description":"Deep link for Android visitors, e.g. your app on Google Play Store"},"geo":{"type":"array","nullable":true,"items":{"type":"object","properties":{"country":{"type":"string","nullable":true,"minLength":2,"maxLength":2,"example":"US","description":"ISO 3166-1 alpha-2 country code of the visitor"},"url":{"type":"string","format":"uri","example":"https://example.com/us","description":"Destination URL for visitors from this country"}},"required":["country","url"]},"maxItems":195,"default":[],"description":"Redirect visitors by country with [geo-targeted short links](https://shortener.dev/docs/geo-targeting)"},"is_enabled":{"anyOf":[{"type":"boolean"},{"type":"integer","minimum":0,"maximum":1}],"example":true,"description":"Disabled short links stop redirecting visitors"},"created_at":{"type":"string","nullable":true,"example":"2026-01-01T10:00:00Z","description":"UTC date-time when the short link was created","readOnly":true},"updated_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","description":"UTC date-time when the short link was last updated","readOnly":true}},"required":["url"],"description":"A short link that redirects visitors to a long destination URL, with optional UTM tracking, expiration, password, app deep links and geo-targeting"}}}},"responses":{"200":{"description":"The updated short link","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","pattern":"^[A-Za-z0-9_-]{2,32}$","example":"sale-26","description":"Custom alias (back-half) of the short URL, e.g. `srt1.link/sale-26`. 2-32 characters of letters, numbers, `-` or `_`. Auto-generated when not provided"},"project_id":{"type":"integer","nullable":true,"minimum":0,"exclusiveMinimum":true,"example":1,"description":"Project to organize the short link in"},"url":{"type":"string","minLength":10,"format":"uri","example":"https://example.com/blog/url-shortener-guide","description":"Long destination URL to shorten. The domain must be [verified](#tag/Domains) in your account or whitelisted"},"short_url":{"type":"string","example":"https://srt1.link/summer-sale","description":"The generated short URL to share","readOnly":true},"expire_at":{"type":"string","nullable":true,"format":"date-time","example":"2030-12-31T23:59:00Z","description":"Expire the short link automatically at this UTC date-time. Leave empty for a link that never expires"},"params":{"type":"object","additionalProperties":{"type":"string"},"example":{"utm_source":"newsletter","utm_medium":"email"},"description":"UTM parameters appended to the destination URL for campaign conversion tracking in Google Analytics"},"title":{"type":"string","nullable":true,"maxLength":60,"example":"The complete guide to URL shortening","description":"Social media preview (Open Graph) title"},"description":{"type":"string","nullable":true,"maxLength":155,"example":"Learn how to create branded short links and track clicks.","description":"Social media preview (Open Graph) description"},"image":{"anyOf":[{"type":"string","nullable":true,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}],"example":"https://example.com/images/og-banner.png","description":"Social media preview (Open Graph) image URL. Must end with .jpg, .png, .gif, .bmp or .webp"},"password":{"type":"string","nullable":true,"maxLength":32,"example":"s3cret","description":"Restrict access with a [password protected short link](https://shortener.dev/docs/password-protected-links)"},"ios":{"anyOf":[{"type":"string","nullable":true,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}],"example":"https://apps.apple.com/us/app/example/id000000000","description":"Deep link for iPhone and iPad visitors, e.g. your app on the Apple App Store"},"android":{"anyOf":[{"type":"string","nullable":true,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}],"example":"https://play.google.com/store/apps/details?id=com.example","description":"Deep link for Android visitors, e.g. your app on Google Play Store"},"geo":{"type":"array","nullable":true,"items":{"type":"object","properties":{"country":{"type":"string","nullable":true,"minLength":2,"maxLength":2,"example":"US","description":"ISO 3166-1 alpha-2 country code of the visitor"},"url":{"type":"string","format":"uri","example":"https://example.com/us","description":"Destination URL for visitors from this country"}},"required":["country","url"]},"maxItems":195,"default":[],"description":"Redirect visitors by country with [geo-targeted short links](https://shortener.dev/docs/geo-targeting)"},"is_enabled":{"anyOf":[{"type":"boolean"},{"type":"integer","minimum":0,"maximum":1}],"example":true,"description":"Disabled short links stop redirecting visitors"},"created_at":{"type":"string","nullable":true,"example":"2026-01-01T10:00:00Z","description":"UTC date-time when the short link was created","readOnly":true},"updated_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","description":"UTC date-time when the short link was last updated","readOnly":true}},"required":["url"],"description":"A short link that redirects visitors to a long destination URL, with optional UTM tracking, expiration, password, app deep links and geo-targeting"}}}},"400":{"description":"Bad request, the request body or parameters are invalid","content":{"application/json":{"example":{"message":"url: Invalid URL"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"403":{"description":"Forbidden, the domain or resource is not allowed","content":{"application/json":{"example":{"message":"Domain not verified: example.com"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"404":{"description":"Not found, no record exists with the given id","content":{"application/json":{"example":{"message":"No data found"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}},"delete":{"tags":["Links"],"summary":"Delete a short link","description":"Permanently delete a short link. Visitors opening the short URL will no longer be redirected.","parameters":[{"schema":{"type":"string","maxLength":32,"example":"summer-sale","description":"Short link key (the back-half of the short URL)"},"required":true,"description":"Short link key (the back-half of the short URL)","name":"key","in":"path"}],"responses":{"200":{"description":"Short link deleted","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"404":{"description":"Not found, no record exists with the given id","content":{"application/json":{"example":{"message":"No data found"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}}},"/v1/projects":{"get":{"tags":["Projects"],"summary":"List projects","description":"Get all projects in your account with the number of short links in each project.","parameters":[{"schema":{"type":"integer","nullable":true,"minimum":0,"default":0,"example":0,"description":"Number of records to skip for pagination"},"required":false,"description":"Number of records to skip for pagination","name":"offset","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":1000,"example":25,"description":"Maximum number of records to return (1-1000)"},"required":false,"description":"Maximum number of records to return (1-1000)","name":"limit","in":"query"}],"responses":{"200":{"description":"Paginated list of projects","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer","example":1,"description":"Total number of records available"},"limit":{"type":"integer","example":25},"offset":{"type":"integer","example":0},"returned":{"type":"integer","example":1,"description":"Number of records in this response"},"result":{"type":"array","items":{"type":"object","properties":{"project_id":{"type":"integer","example":1,"description":"Unique project id","readOnly":true},"user_id":{"type":"integer","nullable":true,"example":1,"description":"Team member who owns this project. Current user by default"},"name":{"type":"string","minLength":1,"maxLength":64,"example":"Summer campaign","description":"Project name, e.g. a campaign, client or brand"},"color":{"type":"string","nullable":true,"maxLength":7,"example":"#E0F2FE","description":"Hex color code to label the project. Random when empty"},"icon":{"anyOf":[{"type":"string","nullable":true,"maxLength":124,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}],"example":"https://example.com/icon.png","description":"Project icon URL. Must be a png, jpg or svg image"},"total_links":{"type":"integer","example":12,"description":"Number of short links in the project","readOnly":true},"created_at":{"type":"string","nullable":true,"example":"2026-01-01T10:00:00Z","description":"UTC date-time when the project was created","readOnly":true},"updated_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","description":"UTC date-time when the project was last updated","readOnly":true}},"required":["name"],"description":"Projects group short links by campaign, client or brand for easier management and analytics"}}},"required":["total","limit","offset","returned","result"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}},"post":{"tags":["Projects"],"summary":"Create a project","description":"Create a project to group short links by marketing campaign, client or brand, and filter click analytics by project. Available on paid plans.","requestBody":{"required":true,"content":{"application/json":{"example":{"name":"Summer campaign"},"schema":{"type":"object","properties":{"project_id":{"type":"integer","example":1,"description":"Unique project id","readOnly":true},"user_id":{"type":"integer","nullable":true,"example":1,"description":"Team member who owns this project. Current user by default"},"name":{"type":"string","minLength":1,"maxLength":64,"example":"Summer campaign","description":"Project name, e.g. a campaign, client or brand"},"color":{"type":"string","nullable":true,"maxLength":7,"example":"#E0F2FE","description":"Hex color code to label the project. Random when empty"},"icon":{"anyOf":[{"type":"string","nullable":true,"maxLength":124,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}],"example":"https://example.com/icon.png","description":"Project icon URL. Must be a png, jpg or svg image"},"total_links":{"type":"integer","example":12,"description":"Number of short links in the project","readOnly":true},"created_at":{"type":"string","nullable":true,"example":"2026-01-01T10:00:00Z","description":"UTC date-time when the project was created","readOnly":true},"updated_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","description":"UTC date-time when the project was last updated","readOnly":true}},"required":["name"],"description":"Projects group short links by campaign, client or brand for easier management and analytics"}}}},"responses":{"200":{"description":"The created project","content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"integer","example":1,"description":"Unique project id","readOnly":true},"user_id":{"type":"integer","nullable":true,"example":1,"description":"Team member who owns this project. Current user by default"},"name":{"type":"string","minLength":1,"maxLength":64,"example":"Summer campaign","description":"Project name, e.g. a campaign, client or brand"},"color":{"type":"string","nullable":true,"maxLength":7,"example":"#E0F2FE","description":"Hex color code to label the project. Random when empty"},"icon":{"anyOf":[{"type":"string","nullable":true,"maxLength":124,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}],"example":"https://example.com/icon.png","description":"Project icon URL. Must be a png, jpg or svg image"},"total_links":{"type":"integer","example":12,"description":"Number of short links in the project","readOnly":true},"created_at":{"type":"string","nullable":true,"example":"2026-01-01T10:00:00Z","description":"UTC date-time when the project was created","readOnly":true},"updated_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","description":"UTC date-time when the project was last updated","readOnly":true}},"required":["name"],"description":"Projects group short links by campaign, client or brand for easier management and analytics"}}}},"400":{"description":"Bad request, the request body or parameters are invalid","content":{"application/json":{"example":{"message":"url: Invalid URL"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"402":{"description":"Payment required, the current plan limit has been reached","content":{"application/json":{"example":{"message":"The Free plan is limited to 10 links only, please upgrade"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}}},"/v1/projects/{id}":{"get":{"tags":["Projects"],"summary":"Get a project","description":"Retrieve a project by id.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The project","content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"integer","example":1,"description":"Unique project id","readOnly":true},"user_id":{"type":"integer","nullable":true,"example":1,"description":"Team member who owns this project. Current user by default"},"name":{"type":"string","minLength":1,"maxLength":64,"example":"Summer campaign","description":"Project name, e.g. a campaign, client or brand"},"color":{"type":"string","nullable":true,"maxLength":7,"example":"#E0F2FE","description":"Hex color code to label the project. Random when empty"},"icon":{"anyOf":[{"type":"string","nullable":true,"maxLength":124,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}],"example":"https://example.com/icon.png","description":"Project icon URL. Must be a png, jpg or svg image"},"total_links":{"type":"integer","example":12,"description":"Number of short links in the project","readOnly":true},"created_at":{"type":"string","nullable":true,"example":"2026-01-01T10:00:00Z","description":"UTC date-time when the project was created","readOnly":true},"updated_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","description":"UTC date-time when the project was last updated","readOnly":true}},"required":["name"],"description":"Projects group short links by campaign, client or brand for easier management and analytics"}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"404":{"description":"Not found, no record exists with the given id","content":{"application/json":{"example":{"message":"No data found"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}},"put":{"tags":["Projects"],"summary":"Update a project","description":"Rename a project or change its color and icon.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"name":"Summer campaign 2026"},"schema":{"type":"object","properties":{"project_id":{"type":"integer","example":1,"description":"Unique project id","readOnly":true},"user_id":{"type":"integer","nullable":true,"example":1,"description":"Team member who owns this project. Current user by default"},"name":{"type":"string","minLength":1,"maxLength":64,"example":"Summer campaign","description":"Project name, e.g. a campaign, client or brand"},"color":{"type":"string","nullable":true,"maxLength":7,"example":"#E0F2FE","description":"Hex color code to label the project. Random when empty"},"icon":{"anyOf":[{"type":"string","nullable":true,"maxLength":124,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}],"example":"https://example.com/icon.png","description":"Project icon URL. Must be a png, jpg or svg image"},"total_links":{"type":"integer","example":12,"description":"Number of short links in the project","readOnly":true},"created_at":{"type":"string","nullable":true,"example":"2026-01-01T10:00:00Z","description":"UTC date-time when the project was created","readOnly":true},"updated_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","description":"UTC date-time when the project was last updated","readOnly":true}},"required":["name"],"description":"Projects group short links by campaign, client or brand for easier management and analytics"}}}},"responses":{"200":{"description":"The updated project","content":{"application/json":{"schema":{"type":"object","properties":{"project_id":{"type":"integer","example":1,"description":"Unique project id","readOnly":true},"user_id":{"type":"integer","nullable":true,"example":1,"description":"Team member who owns this project. Current user by default"},"name":{"type":"string","minLength":1,"maxLength":64,"example":"Summer campaign","description":"Project name, e.g. a campaign, client or brand"},"color":{"type":"string","nullable":true,"maxLength":7,"example":"#E0F2FE","description":"Hex color code to label the project. Random when empty"},"icon":{"anyOf":[{"type":"string","nullable":true,"maxLength":124,"format":"uri"},{"type":"string","enum":[""]},{"nullable":true}],"example":"https://example.com/icon.png","description":"Project icon URL. Must be a png, jpg or svg image"},"total_links":{"type":"integer","example":12,"description":"Number of short links in the project","readOnly":true},"created_at":{"type":"string","nullable":true,"example":"2026-01-01T10:00:00Z","description":"UTC date-time when the project was created","readOnly":true},"updated_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","description":"UTC date-time when the project was last updated","readOnly":true}},"required":["name"],"description":"Projects group short links by campaign, client or brand for easier management and analytics"}}}},"400":{"description":"Bad request, the request body or parameters are invalid","content":{"application/json":{"example":{"message":"url: Invalid URL"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"404":{"description":"Not found, no record exists with the given id","content":{"application/json":{"example":{"message":"No data found"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}},"delete":{"tags":["Projects"],"summary":"Delete a project","description":"Permanently delete a project along with all the short links in it.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Project deleted","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"404":{"description":"Not found, no record exists with the given id","content":{"application/json":{"example":{"message":"No data found"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}}},"/v1/domains":{"get":{"tags":["Domains"],"summary":"List domains","description":"Get all domains added to your account with their ownership verification status. Short links can be created only for destination URLs on verified domains.","parameters":[{"schema":{"type":"integer","nullable":true,"minimum":0,"default":0,"example":0,"description":"Number of records to skip for pagination"},"required":false,"description":"Number of records to skip for pagination","name":"offset","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":1000,"example":25,"description":"Maximum number of records to return (1-1000)"},"required":false,"description":"Maximum number of records to return (1-1000)","name":"limit","in":"query"}],"responses":{"200":{"description":"Paginated list of domains","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer","example":1,"description":"Total number of records available"},"limit":{"type":"integer","example":25},"offset":{"type":"integer","example":0},"returned":{"type":"integer","example":1,"description":"Number of records in this response"},"result":{"type":"array","items":{"type":"object","properties":{"domain_id":{"type":"integer","example":1,"description":"Unique domain id","readOnly":true},"user_id":{"type":"integer","nullable":true,"example":1,"description":"Team member who owns this domain. Current user by default"},"domain":{"type":"string","example":"example.com","description":"Domain or subdomain you own, e.g. `example.com`. Verifying a domain also allows short links to all of its subdomains"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"number"}],"example":false,"description":"Use as the default domain"},"is_verified":{"anyOf":[{"type":"boolean"},{"type":"number"}],"example":true,"description":"Short links can be created only for destination URLs on verified domains","readOnly":true},"created_at":{"type":"string","nullable":true,"example":"2026-01-01T10:00:00Z","description":"UTC date-time when the domain was added","readOnly":true},"updated_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","description":"UTC date-time when the domain was last updated","readOnly":true}},"required":["domain"],"description":"A domain you own. Verify the ownership to shorten links pointing to it"}}},"required":["total","limit","offset","returned","result"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}},"post":{"tags":["Domains"],"summary":"Add a domain","description":"Add a domain you own to your account. Then verify the ownership with an email OTP sent to an address on that domain, or with Google Search Console, to create short links for it. The number of domains is limited by your plan.","requestBody":{"required":true,"content":{"application/json":{"example":{"domain":"example.com"},"schema":{"type":"object","properties":{"domain_id":{"type":"integer","example":1,"description":"Unique domain id","readOnly":true},"user_id":{"type":"integer","nullable":true,"example":1,"description":"Team member who owns this domain. Current user by default"},"domain":{"type":"string","example":"example.com","description":"Domain or subdomain you own, e.g. `example.com`. Verifying a domain also allows short links to all of its subdomains"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"number"}],"example":false,"description":"Use as the default domain"},"is_verified":{"anyOf":[{"type":"boolean"},{"type":"number"}],"example":true,"description":"Short links can be created only for destination URLs on verified domains","readOnly":true},"created_at":{"type":"string","nullable":true,"example":"2026-01-01T10:00:00Z","description":"UTC date-time when the domain was added","readOnly":true},"updated_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","description":"UTC date-time when the domain was last updated","readOnly":true}},"required":["domain"],"description":"A domain you own. Verify the ownership to shorten links pointing to it"}}}},"responses":{"200":{"description":"The added (unverified) domain","content":{"application/json":{"schema":{"type":"object","properties":{"domain_id":{"type":"integer","example":1,"description":"Unique domain id","readOnly":true},"user_id":{"type":"integer","nullable":true,"example":1,"description":"Team member who owns this domain. Current user by default"},"domain":{"type":"string","example":"example.com","description":"Domain or subdomain you own, e.g. `example.com`. Verifying a domain also allows short links to all of its subdomains"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"number"}],"example":false,"description":"Use as the default domain"},"is_verified":{"anyOf":[{"type":"boolean"},{"type":"number"}],"example":true,"description":"Short links can be created only for destination URLs on verified domains","readOnly":true},"created_at":{"type":"string","nullable":true,"example":"2026-01-01T10:00:00Z","description":"UTC date-time when the domain was added","readOnly":true},"updated_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","description":"UTC date-time when the domain was last updated","readOnly":true}},"required":["domain"],"description":"A domain you own. Verify the ownership to shorten links pointing to it"}}}},"400":{"description":"Bad request, the request body or parameters are invalid","content":{"application/json":{"example":{"message":"url: Invalid URL"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"402":{"description":"Payment required, the current plan limit has been reached","content":{"application/json":{"example":{"message":"The Free plan is limited to 10 links only, please upgrade"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}}},"/v1/domains/whitelisted":{"get":{"tags":["Domains"],"summary":"List whitelisted domains","description":"Popular domains (e.g. `linkedin.com`, `youtube.com`) allowed for every account without ownership verification, including their subdomains.","responses":{"200":{"description":"List of whitelisted domains","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer","example":1,"description":"Total number of records available"},"limit":{"type":"integer","example":25},"offset":{"type":"integer","example":0},"returned":{"type":"integer","example":1,"description":"Number of records in this response"},"result":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string","example":"linkedin.com","description":"Domain allowed (`whitelisted`) or denied (`blocked`) for every account, including its subdomains"},"type":{"type":"string","enum":["whitelisted","blocked"],"example":"whitelisted"},"created_at":{"type":"string","nullable":true,"readOnly":true},"is_builtin":{"type":"boolean","description":"Whitelisted in code (popular domains), cannot be removed from the API","readOnly":true}},"required":["domain","type"]}}},"required":["total","limit","offset","returned","result"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}}},"/v1/domains/{id}":{"get":{"tags":["Domains"],"summary":"Get a domain","description":"Retrieve a domain and its ownership verification status.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The domain","content":{"application/json":{"schema":{"type":"object","properties":{"domain_id":{"type":"integer","example":1,"description":"Unique domain id","readOnly":true},"user_id":{"type":"integer","nullable":true,"example":1,"description":"Team member who owns this domain. Current user by default"},"domain":{"type":"string","example":"example.com","description":"Domain or subdomain you own, e.g. `example.com`. Verifying a domain also allows short links to all of its subdomains"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"number"}],"example":false,"description":"Use as the default domain"},"is_verified":{"anyOf":[{"type":"boolean"},{"type":"number"}],"example":true,"description":"Short links can be created only for destination URLs on verified domains","readOnly":true},"created_at":{"type":"string","nullable":true,"example":"2026-01-01T10:00:00Z","description":"UTC date-time when the domain was added","readOnly":true},"updated_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","description":"UTC date-time when the domain was last updated","readOnly":true}},"required":["domain"],"description":"A domain you own. Verify the ownership to shorten links pointing to it"}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"404":{"description":"Not found, no record exists with the given id","content":{"application/json":{"example":{"message":"No data found"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}},"put":{"tags":["Domains"],"summary":"Update a domain","description":"Assign the domain to another team member or set it as default. The domain name itself cannot be changed, remove and add it again instead.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"is_default":true},"schema":{"type":"object","properties":{"user_id":{"type":"integer","nullable":true,"example":1,"description":"Team member who owns this domain. Current user by default"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"number"}],"example":false,"description":"Use as the default domain"}}}}}},"responses":{"200":{"description":"The updated domain","content":{"application/json":{"schema":{"type":"object","properties":{"domain_id":{"type":"integer","example":1,"description":"Unique domain id","readOnly":true},"user_id":{"type":"integer","nullable":true,"example":1,"description":"Team member who owns this domain. Current user by default"},"domain":{"type":"string","example":"example.com","description":"Domain or subdomain you own, e.g. `example.com`. Verifying a domain also allows short links to all of its subdomains"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"number"}],"example":false,"description":"Use as the default domain"},"is_verified":{"anyOf":[{"type":"boolean"},{"type":"number"}],"example":true,"description":"Short links can be created only for destination URLs on verified domains","readOnly":true},"created_at":{"type":"string","nullable":true,"example":"2026-01-01T10:00:00Z","description":"UTC date-time when the domain was added","readOnly":true},"updated_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","description":"UTC date-time when the domain was last updated","readOnly":true}},"required":["domain"],"description":"A domain you own. Verify the ownership to shorten links pointing to it"}}}},"400":{"description":"Bad request, the request body or parameters are invalid","content":{"application/json":{"example":{"message":"url: Invalid URL"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"404":{"description":"Not found, no record exists with the given id","content":{"application/json":{"example":{"message":"No data found"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}},"delete":{"tags":["Domains"],"summary":"Remove a domain","description":"Remove a domain from your account. New short links to this domain cannot be created until it is added and verified again. Removed domains are archived for audit and still count towards the domain limit of your plan. Adding a removed domain again restores it.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Domain removed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"404":{"description":"Not found, no record exists with the given id","content":{"application/json":{"example":{"message":"No data found"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}}},"/v1/domains/{id}/otp":{"post":{"tags":["Domains"],"summary":"Send domain verification code","description":"Send a 6-digit one-time code to an email address on the domain (e.g. `admin@example.com` for `example.com`) to prove the domain ownership. The code is valid for 10 minutes. Public and disposable email providers are not accepted.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"email":"admin@example.com"},"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":100,"format":"email","example":"admin@example.com","description":"An email address on the same domain, e.g. `admin@example.com` for `example.com`. A 6-digit verification code is sent to it"}},"required":["email"]}}}},"responses":{"200":{"description":"Verification code sent","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"400":{"description":"Bad request, the request body or parameters are invalid","content":{"application/json":{"example":{"message":"url: Invalid URL"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"404":{"description":"Not found, no record exists with the given id","content":{"application/json":{"example":{"message":"No data found"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"429":{"description":"Too many requests, rate limit exceeded","content":{"application/json":{"example":{"message":"Too many requests"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}}},"/v1/domains/{id}/verify":{"post":{"tags":["Domains"],"summary":"Verify domain with code","description":"Verify the domain ownership with the 6-digit code received by email. Once verified, short links can be created for the domain and all of its subdomains.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"code":123456},"schema":{"type":"object","properties":{"code":{"type":"integer","minimum":100000,"maximum":999999,"example":123456,"description":"The 6-digit code received on the domain email address"}},"required":["code"]}}}},"responses":{"200":{"description":"The verified domain","content":{"application/json":{"schema":{"type":"object","properties":{"domain_id":{"type":"integer","example":1,"description":"Unique domain id","readOnly":true},"user_id":{"type":"integer","nullable":true,"example":1,"description":"Team member who owns this domain. Current user by default"},"domain":{"type":"string","example":"example.com","description":"Domain or subdomain you own, e.g. `example.com`. Verifying a domain also allows short links to all of its subdomains"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"number"}],"example":false,"description":"Use as the default domain"},"is_verified":{"anyOf":[{"type":"boolean"},{"type":"number"}],"example":true,"description":"Short links can be created only for destination URLs on verified domains","readOnly":true},"created_at":{"type":"string","nullable":true,"example":"2026-01-01T10:00:00Z","description":"UTC date-time when the domain was added","readOnly":true},"updated_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","description":"UTC date-time when the domain was last updated","readOnly":true}},"required":["domain"],"description":"A domain you own. Verify the ownership to shorten links pointing to it"}}}},"400":{"description":"Bad request, the request body or parameters are invalid","content":{"application/json":{"example":{"message":"url: Invalid URL"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"404":{"description":"Not found, no record exists with the given id","content":{"application/json":{"example":{"message":"No data found"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}}},"/v1/domains/{id}/google":{"get":{"tags":["Domains"],"summary":"Verify domain with Google Search Console","description":"Get a Google sign-in URL to verify the domain ownership with Google Search Console. Open the URL in a browser and sign in with a Google account that owns the domain property (`sc-domain:example.com`) or the `https://example.com/` URL-prefix property. You will be redirected back to the app after verification.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Google consent URL to open in the browser","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri","example":"https://accounts.google.com/o/oauth2/v2/auth?..."}},"required":["url"]}}}},"400":{"description":"Bad request, the request body or parameters are invalid","content":{"application/json":{"example":{"message":"url: Invalid URL"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"404":{"description":"Not found, no record exists with the given id","content":{"application/json":{"example":{"message":"No data found"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}}},"/v1/analytics":{"get":{"tags":["Analytics"],"summary":"Clicks over time","description":"Get the daily number of clicks on your short links for the selected period. Filter by short link or project to measure a single campaign.","parameters":[{"schema":{"type":"string","example":"https://srt1.link/github","description":"Filter the report by a short link URL or key"},"required":false,"description":"Filter the report by a short link URL or key","name":"url","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":90,"default":7,"example":7,"description":"Number of days to include in the report, limited by the plan analytics history"},"required":false,"description":"Number of days to include in the report, limited by the plan analytics history","name":"interval","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1,"description":"Filter the report by project"},"required":false,"description":"Filter the report by project","name":"project_id","in":"query"}],"responses":{"200":{"description":"Clicks per day","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","example":"2026-01-01"},"clicks":{"type":"number","example":120}},"required":["date","clicks"]}}}}},"400":{"description":"Bad request, the request body or parameters are invalid","content":{"application/json":{"example":{"message":"url: Invalid URL"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"402":{"description":"Payment required, the current plan limit has been reached","content":{"application/json":{"example":{"message":"The Free plan is limited to 10 links only, please upgrade"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}}},"/v1/analytics/top":{"get":{"tags":["Analytics"],"summary":"Top short links","description":"Get the 10 most clicked short links in the selected period.","parameters":[{"schema":{"type":"string","example":"https://srt1.link/github","description":"Filter the report by a short link URL or key"},"required":false,"description":"Filter the report by a short link URL or key","name":"url","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":90,"default":7,"example":7,"description":"Number of days to include in the report, limited by the plan analytics history"},"required":false,"description":"Number of days to include in the report, limited by the plan analytics history","name":"interval","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1,"description":"Filter the report by project"},"required":false,"description":"Filter the report by project","name":"project_id","in":"query"}],"responses":{"200":{"description":"Top short links","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","example":"https://srt1.link/summer-sale"},"clicks":{"type":"number","example":42}},"required":["url","clicks"]}}}}},"400":{"description":"Bad request, the request body or parameters are invalid","content":{"application/json":{"example":{"message":"url: Invalid URL"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"402":{"description":"Payment required, the current plan limit has been reached","content":{"application/json":{"example":{"message":"The Free plan is limited to 10 links only, please upgrade"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}}},"/v1/analytics/referer":{"get":{"tags":["Analytics"],"summary":"Clicks by referrer","description":"Get the top 10 websites and social networks sending clicks to your short links. Clicks without a referrer are reported as `(direct)`.","parameters":[{"schema":{"type":"string","example":"https://srt1.link/github","description":"Filter the report by a short link URL or key"},"required":false,"description":"Filter the report by a short link URL or key","name":"url","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":90,"default":7,"example":7,"description":"Number of days to include in the report, limited by the plan analytics history"},"required":false,"description":"Number of days to include in the report, limited by the plan analytics history","name":"interval","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1,"description":"Filter the report by project"},"required":false,"description":"Filter the report by project","name":"project_id","in":"query"}],"responses":{"200":{"description":"Clicks by referrer","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"referer":{"type":"string","example":"linkedin.com"},"clicks":{"type":"number","example":42}},"required":["referer","clicks"]}}}}},"400":{"description":"Bad request, the request body or parameters are invalid","content":{"application/json":{"example":{"message":"url: Invalid URL"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"402":{"description":"Payment required, the current plan limit has been reached","content":{"application/json":{"example":{"message":"The Free plan is limited to 10 links only, please upgrade"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}}},"/v1/analytics/country":{"get":{"tags":["Analytics"],"summary":"Clicks by country","description":"Get the top 10 countries of visitors clicking your short links, as ISO 3166-1 alpha-2 codes.","parameters":[{"schema":{"type":"string","example":"https://srt1.link/github","description":"Filter the report by a short link URL or key"},"required":false,"description":"Filter the report by a short link URL or key","name":"url","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":90,"default":7,"example":7,"description":"Number of days to include in the report, limited by the plan analytics history"},"required":false,"description":"Number of days to include in the report, limited by the plan analytics history","name":"interval","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1,"description":"Filter the report by project"},"required":false,"description":"Filter the report by project","name":"project_id","in":"query"}],"responses":{"200":{"description":"Clicks by country","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","example":"US"},"clicks":{"type":"number","example":42}},"required":["country","clicks"]}}}}},"400":{"description":"Bad request, the request body or parameters are invalid","content":{"application/json":{"example":{"message":"url: Invalid URL"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"402":{"description":"Payment required, the current plan limit has been reached","content":{"application/json":{"example":{"message":"The Free plan is limited to 10 links only, please upgrade"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}}},"/v1/analytics/city":{"get":{"tags":["Analytics"],"summary":"Clicks by city","description":"Get the top 10 cities of visitors clicking your short links.","parameters":[{"schema":{"type":"string","example":"https://srt1.link/github","description":"Filter the report by a short link URL or key"},"required":false,"description":"Filter the report by a short link URL or key","name":"url","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":90,"default":7,"example":7,"description":"Number of days to include in the report, limited by the plan analytics history"},"required":false,"description":"Number of days to include in the report, limited by the plan analytics history","name":"interval","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1,"description":"Filter the report by project"},"required":false,"description":"Filter the report by project","name":"project_id","in":"query"}],"responses":{"200":{"description":"Clicks by city","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"city":{"type":"string","example":"New York"},"clicks":{"type":"number","example":42}},"required":["city","clicks"]}}}}},"400":{"description":"Bad request, the request body or parameters are invalid","content":{"application/json":{"example":{"message":"url: Invalid URL"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"402":{"description":"Payment required, the current plan limit has been reached","content":{"application/json":{"example":{"message":"The Free plan is limited to 10 links only, please upgrade"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}}},"/v1/analytics/browser":{"get":{"tags":["Analytics"],"summary":"Clicks by browser","description":"Get the top 10 web browsers used to open your short links.","parameters":[{"schema":{"type":"string","example":"https://srt1.link/github","description":"Filter the report by a short link URL or key"},"required":false,"description":"Filter the report by a short link URL or key","name":"url","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":90,"default":7,"example":7,"description":"Number of days to include in the report, limited by the plan analytics history"},"required":false,"description":"Number of days to include in the report, limited by the plan analytics history","name":"interval","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1,"description":"Filter the report by project"},"required":false,"description":"Filter the report by project","name":"project_id","in":"query"}],"responses":{"200":{"description":"Clicks by browser","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"browser":{"type":"string","example":"Chrome"},"clicks":{"type":"number","example":42}},"required":["browser","clicks"]}}}}},"400":{"description":"Bad request, the request body or parameters are invalid","content":{"application/json":{"example":{"message":"url: Invalid URL"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"402":{"description":"Payment required, the current plan limit has been reached","content":{"application/json":{"example":{"message":"The Free plan is limited to 10 links only, please upgrade"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}}},"/v1/analytics/os":{"get":{"tags":["Analytics"],"summary":"Clicks by operating system","description":"Get the top 10 operating systems (iOS, Android, Windows, macOS...) of visitors clicking your short links.","parameters":[{"schema":{"type":"string","example":"https://srt1.link/github","description":"Filter the report by a short link URL or key"},"required":false,"description":"Filter the report by a short link URL or key","name":"url","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":90,"default":7,"example":7,"description":"Number of days to include in the report, limited by the plan analytics history"},"required":false,"description":"Number of days to include in the report, limited by the plan analytics history","name":"interval","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1,"description":"Filter the report by project"},"required":false,"description":"Filter the report by project","name":"project_id","in":"query"}],"responses":{"200":{"description":"Clicks by operating system","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"os":{"type":"string","example":"iOS"},"clicks":{"type":"number","example":42}},"required":["os","clicks"]}}}}},"400":{"description":"Bad request, the request body or parameters are invalid","content":{"application/json":{"example":{"message":"url: Invalid URL"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"402":{"description":"Payment required, the current plan limit has been reached","content":{"application/json":{"example":{"message":"The Free plan is limited to 10 links only, please upgrade"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}}},"/v1/analytics/device":{"get":{"tags":["Analytics"],"summary":"Clicks by device type","description":"Get the clicks split by device type: mobile, tablet or desktop.","parameters":[{"schema":{"type":"string","example":"https://srt1.link/github","description":"Filter the report by a short link URL or key"},"required":false,"description":"Filter the report by a short link URL or key","name":"url","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":90,"default":7,"example":7,"description":"Number of days to include in the report, limited by the plan analytics history"},"required":false,"description":"Number of days to include in the report, limited by the plan analytics history","name":"interval","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1,"description":"Filter the report by project"},"required":false,"description":"Filter the report by project","name":"project_id","in":"query"}],"responses":{"200":{"description":"Clicks by device type","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"device":{"type":"string","example":"mobile"},"clicks":{"type":"number","example":42}},"required":["device","clicks"]}}}}},"400":{"description":"Bad request, the request body or parameters are invalid","content":{"application/json":{"example":{"message":"url: Invalid URL"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"402":{"description":"Payment required, the current plan limit has been reached","content":{"application/json":{"example":{"message":"The Free plan is limited to 10 links only, please upgrade"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}}},"/v1/analytics/clicks":{"get":{"tags":["Analytics"],"summary":"Clicks by short link","description":"Get the total number of clicks in the last 30 days for up to 25 short links at once. Pass `key` repeatedly, e.g. `?key=summer-sale&key=github`.","parameters":[{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"example":["summer-sale","github"]},"required":true,"name":"key","in":"query"}],"responses":{"200":{"description":"Clicks per short link key","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","example":"summer-sale"},"clicks":{"type":"number","example":42}},"required":["key","clicks"]}}}}},"400":{"description":"Bad request, the request body or parameters are invalid","content":{"application/json":{"example":{"message":"url: Invalid URL"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}}},"/v1/reports":{"get":{"tags":["Reports"],"summary":"Raw click log","description":"Export the latest clicks on your short links from the last 30 days with timestamp, country, city, referrer, browser, OS and device of each visitor. Useful to feed click data into your own BI tool or CRM.","parameters":[{"schema":{"type":"integer","nullable":true,"minimum":0,"default":0,"example":0,"description":"Number of records to skip for pagination"},"required":false,"description":"Number of records to skip for pagination","name":"offset","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":1000,"example":25,"description":"Maximum number of records to return (1-1000)"},"required":false,"description":"Maximum number of records to return (1-1000)","name":"limit","in":"query"}],"responses":{"200":{"description":"Paginated list of clicks, newest first","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer","example":1,"description":"Total number of records available"},"limit":{"type":"integer","example":25},"offset":{"type":"integer","example":0},"returned":{"type":"integer","example":1,"description":"Number of records in this response"},"result":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string","example":"2026-01-01T10:00:00Z","description":"UTC date-time of the click"},"url":{"type":"string","example":"https://srt1.link/summer-sale"},"country":{"type":"string","example":"US"},"city":{"type":"string","example":"New York"},"region":{"type":"string","example":"NY"},"referer":{"type":"string","example":"linkedin.com"},"browser":{"type":"string","example":"Chrome"},"os":{"type":"string","example":"macOS"},"device":{"type":"string","example":"desktop"},"ip":{"type":"string","example":"203.0.113.10"}},"required":["timestamp","url","country","city","region","referer","browser","os","device","ip"],"description":"A single click on a short link with visitor details"}}},"required":["total","limit","offset","returned","result"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"402":{"description":"Payment required, the current plan limit has been reached","content":{"application/json":{"example":{"message":"The Free plan is limited to 10 links only, please upgrade"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}}},"/v1/users":{"get":{"tags":["Users"],"summary":"List team members","description":"Get all team members who can create and manage short links in your account.","parameters":[{"schema":{"type":"integer","nullable":true,"minimum":0,"default":0,"example":0,"description":"Number of records to skip for pagination"},"required":false,"description":"Number of records to skip for pagination","name":"offset","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":1000,"default":1000,"example":25,"description":"Maximum number of records to return (1-1000)"},"required":false,"description":"Maximum number of records to return (1-1000)","name":"limit","in":"query"}],"responses":{"200":{"description":"Paginated list of team members","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer","example":1,"description":"Total number of records available"},"limit":{"type":"integer","example":25},"offset":{"type":"integer","example":0},"returned":{"type":"integer","example":1,"description":"Number of records in this response"},"result":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"integer","example":2,"description":"Unique user id","readOnly":true},"name":{"type":"string","minLength":1,"maxLength":64,"example":"John Smith","description":"Full name of the team member"},"email":{"type":"string","maxLength":100,"format":"email","example":"john@example.com","description":"Email address of the team member, must be unique"},"role":{"type":"string","enum":["Owner","Admin","Staff","Custom"],"default":"Admin","example":"Admin","description":"Role of the team member in the account"},"status":{"type":"string","enum":["active","disabled","suspended","expired"],"default":"active","example":"active","description":"Disabled users cannot sign in or use the API"},"is_verified":{"anyOf":[{"type":"boolean"},{"type":"number"}],"readOnly":true},"last_login_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","readOnly":true},"created_at":{"type":"string","nullable":true,"example":"2026-01-01T10:00:00Z","readOnly":true},"updated_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","readOnly":true}},"required":["name","email"],"description":"A team member with access to the account short links"}}},"required":["total","limit","offset","returned","result"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}},"post":{"tags":["Users"],"summary":"Invite a team member","description":"Add a team member to your account to collaborate on short links, projects and analytics. A random password is generated and returned once.","requestBody":{"required":true,"content":{"application/json":{"example":{"name":"John Smith","email":"john@example.com"},"schema":{"type":"object","properties":{"user_id":{"type":"integer","example":2,"description":"Unique user id","readOnly":true},"name":{"type":"string","minLength":1,"maxLength":64,"example":"John Smith","description":"Full name of the team member"},"email":{"type":"string","maxLength":100,"format":"email","example":"john@example.com","description":"Email address of the team member, must be unique"},"role":{"type":"string","enum":["Owner","Admin","Staff","Custom"],"default":"Admin","example":"Admin","description":"Role of the team member in the account"},"status":{"type":"string","enum":["active","disabled","suspended","expired"],"default":"active","example":"active","description":"Disabled users cannot sign in or use the API"},"is_verified":{"anyOf":[{"type":"boolean"},{"type":"number"}],"readOnly":true},"last_login_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","readOnly":true},"created_at":{"type":"string","nullable":true,"example":"2026-01-01T10:00:00Z","readOnly":true},"updated_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","readOnly":true}},"required":["name","email"],"description":"A team member with access to the account short links"}}}},"responses":{"200":{"description":"The added team member with a generated password","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"user_id":{"type":"integer","example":2,"description":"Unique user id","readOnly":true},"name":{"type":"string","minLength":1,"maxLength":64,"example":"John Smith","description":"Full name of the team member"},"email":{"type":"string","maxLength":100,"format":"email","example":"john@example.com","description":"Email address of the team member, must be unique"},"role":{"type":"string","enum":["Owner","Admin","Staff","Custom"],"default":"Admin","example":"Admin","description":"Role of the team member in the account"},"status":{"type":"string","enum":["active","disabled","suspended","expired"],"default":"active","example":"active","description":"Disabled users cannot sign in or use the API"},"is_verified":{"anyOf":[{"type":"boolean"},{"type":"number"}],"readOnly":true},"last_login_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","readOnly":true},"created_at":{"type":"string","nullable":true,"example":"2026-01-01T10:00:00Z","readOnly":true},"updated_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","readOnly":true}},"required":["name","email"],"description":"A team member with access to the account short links"},{"type":"object","properties":{"password":{"type":"string","example":"Xk3pQ9vLmA"}},"required":["password"]}],"description":"A team member with access to the account short links"}}}},"400":{"description":"Bad request, the request body or parameters are invalid","content":{"application/json":{"example":{"message":"url: Invalid URL"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"402":{"description":"Payment required, the current plan limit has been reached","content":{"application/json":{"example":{"message":"The Free plan is limited to 10 links only, please upgrade"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}}},"/v1/users/{id}":{"get":{"tags":["Users"],"summary":"Get a team member","description":"Retrieve a team member by id.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The team member","content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"integer","example":2,"description":"Unique user id","readOnly":true},"name":{"type":"string","minLength":1,"maxLength":64,"example":"John Smith","description":"Full name of the team member"},"email":{"type":"string","maxLength":100,"format":"email","example":"john@example.com","description":"Email address of the team member, must be unique"},"role":{"type":"string","enum":["Owner","Admin","Staff","Custom"],"default":"Admin","example":"Admin","description":"Role of the team member in the account"},"status":{"type":"string","enum":["active","disabled","suspended","expired"],"default":"active","example":"active","description":"Disabled users cannot sign in or use the API"},"is_verified":{"anyOf":[{"type":"boolean"},{"type":"number"}],"readOnly":true},"last_login_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","readOnly":true},"created_at":{"type":"string","nullable":true,"example":"2026-01-01T10:00:00Z","readOnly":true},"updated_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","readOnly":true}},"required":["name","email"],"description":"A team member with access to the account short links"}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"404":{"description":"Not found, no record exists with the given id","content":{"application/json":{"example":{"message":"No data found"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}},"put":{"tags":["Users"],"summary":"Update a team member","description":"Change the name, role or status of a team member. Email cannot be changed. Set `status` to `disabled` to revoke access.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"name":"John Smith","role":"Admin","status":"active"},"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64,"example":"John Smith","description":"Full name of the team member"},"role":{"type":"string","enum":["Owner","Admin","Staff","Custom"],"default":"Admin","example":"Admin","description":"Role of the team member in the account"},"status":{"type":"string","enum":["active","disabled","suspended","expired"],"default":"active","example":"active","description":"Disabled users cannot sign in or use the API"}},"required":["name"],"description":"Fields of a team member that can be updated"}}}},"responses":{"200":{"description":"The updated team member","content":{"application/json":{"schema":{"type":"object","properties":{"user_id":{"type":"integer","example":2,"description":"Unique user id","readOnly":true},"name":{"type":"string","minLength":1,"maxLength":64,"example":"John Smith","description":"Full name of the team member"},"email":{"type":"string","maxLength":100,"format":"email","example":"john@example.com","description":"Email address of the team member, must be unique"},"role":{"type":"string","enum":["Owner","Admin","Staff","Custom"],"default":"Admin","example":"Admin","description":"Role of the team member in the account"},"status":{"type":"string","enum":["active","disabled","suspended","expired"],"default":"active","example":"active","description":"Disabled users cannot sign in or use the API"},"is_verified":{"anyOf":[{"type":"boolean"},{"type":"number"}],"readOnly":true},"last_login_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","readOnly":true},"created_at":{"type":"string","nullable":true,"example":"2026-01-01T10:00:00Z","readOnly":true},"updated_at":{"type":"string","nullable":true,"example":"2026-01-02T10:00:00Z","readOnly":true}},"required":["name","email"],"description":"A team member with access to the account short links"}}}},"400":{"description":"Bad request, the request body or parameters are invalid","content":{"application/json":{"example":{"message":"url: Invalid URL"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"404":{"description":"Not found, no record exists with the given id","content":{"application/json":{"example":{"message":"No data found"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}},"delete":{"tags":["Users"],"summary":"Remove a team member","description":"Remove a team member from your account. Their short links are deleted as well.","parameters":[{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"example":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Team member removed","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"401":{"description":"Unauthorized, the API key or bearer token is missing or invalid","content":{"application/json":{"example":{"message":"Unauthorized"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}},"404":{"description":"Not found, no record exists with the given id","content":{"application/json":{"example":{"message":"No data found"},"schema":{"type":"object","properties":{"message":{"type":"string","example":"Deleted successfully"}},"required":["message"]}}}}}}}}}