{"openapi":"3.1.0","info":{"title":"Dub (BYOK) API","version":"0.1.0","description":"Dub (BYOK) lets an AI assistant read your own Dub data through the Dub API with a key you supply (Dub API key). Read-only: 7 tools (list_links, count_links, get_link, get_analytics, list_events, list_tags, list_folders). The BYOK key travels with each request, is used for that one call only and is never stored, logged or cached; it is only ever sent to api.dub.co. Unofficial connector by Unify...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-dub.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-dub/docs"},"termsOfService":"https://connectorbay.com/byok-dub/terms"},"servers":[{"url":"https://byok-dub.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-dub/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_links":{"post":{"operationId":"list_links","summary":"List the short links of the workspace with destination, short URL, clicks, leads, sales, tags and dates. Up to 100 per p","description":"List the short links of the workspace with destination, short URL, clicks, leads, sales, tags and dates. Up to 100 per page; pass a link ID as starting_after for the next page. Use for \"What are my most recent Dub short links\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"domain":{"anyOf":[{"maxLength":253,"type":"string"},{"type":"null"}],"default":null,"description":"Only links on this domain, for example 'dub.sh'.","title":"Domain"},"tag_ids":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated tag IDs to require.","title":"Tag Ids"},"tag_names":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated tag names to require (case-insensitive).","title":"Tag Names"},"folder_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only links in this folder ID.","title":"Folder Id"},"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Text matched against the slug and destination URL.","title":"Search"},"show_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to include archived links (default false).","title":"Show Archived"},"user_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only links created by this user ID.","title":"User Id"},"starting_after":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Link ID after which to continue (cursor for the next page).","title":"Starting After"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"How many links per page (1 to 100, default 100).","title":"Page Size"}},"title":"list_linksArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/count_links":{"post":{"operationId":"count_links","summary":"Count the links of the workspace, optionally filtered, or grouped by domain, tag, user or folder. Use for \"How many shor","description":"Count the links of the workspace, optionally filtered, or grouped by domain, tag, user or folder. Use for \"How many short links do I have on Dub\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"domain":{"anyOf":[{"maxLength":253,"type":"string"},{"type":"null"}],"default":null,"description":"Only links on this domain, for example 'dub.sh'.","title":"Domain"},"tag_ids":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated tag IDs to require.","title":"Tag Ids"},"tag_names":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated tag names to require (case-insensitive).","title":"Tag Names"},"folder_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only links in this folder ID.","title":"Folder Id"},"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Text matched against the slug and destination URL.","title":"Search"},"show_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to include archived links (default false).","title":"Show Archived"},"group_by":{"anyOf":[{"enum":["domain","tagId","userId","folderId"],"type":"string"},{"type":"null"}],"default":null,"description":"Group the counts by domain, tagId, userId or folderId.","title":"Group By"}},"title":"count_linksArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_link":{"post":{"operationId":"get_link","summary":"Get one short link by domain and key, by link ID or by external ID: destination, clicks, leads, sales, tags and settings","description":"Get one short link by domain and key, by link ID or by external ID: destination, clicks, leads, sales, tags and settings. Give one identifier (domain with key, or link_id, or external_id). Use for \"Show the details of the Dub link dub.sh/abc\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"domain":{"anyOf":[{"maxLength":253,"type":"string"},{"type":"null"}],"default":null,"description":"Domain of the short link, for example 'dub.sh' (use together with key).","title":"Domain"},"key":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Slug of the short link, for example 'abc' (use together with domain).","title":"Key"},"link_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Unique link ID.","title":"Link Id"},"external_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Your own ID for the link, with the 'ext_' prefix.","title":"External Id"}},"title":"get_linkArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_analytics":{"post":{"operationId":"get_analytics","summary":"Get click, lead or sale analytics for the workspace or one link, as a total, a time series or a breakdown (countries, de","description":"Get click, lead or sale analytics for the workspace or one link, as a total, a time series or a breakdown (countries, devices, browsers, referrers, top links). Needs a Pro plan or higher. Use for \"How many clicks did my Dub links get in the last 30 days\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"event":{"anyOf":[{"enum":["clicks","leads","sales","composite"],"type":"string"},{"type":"null"}],"default":null,"description":"What to count: clicks (default), leads, sales or composite.","title":"Event"},"group_by":{"anyOf":[{"enum":["count","timeseries","continents","countries","cities","devices","browsers","os","referers","top_links","top_urls"],"type":"string"},{"type":"null"}],"default":null,"description":"How to group: count (default), timeseries, continents, countries, cities, devices, browsers, os, referers, top_links or top_urls.","title":"Group By"},"interval":{"anyOf":[{"enum":["24h","7d","30d","90d","1y","mtd","qtd","ytd","all"],"type":"string"},{"type":"null"}],"default":null,"description":"Time window: 24h (default), 7d, 30d, 90d, 1y, mtd, qtd, ytd or all.","title":"Interval"},"start":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Start of a custom range (ISO 8601); overrides interval.","title":"Start"},"end":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"End of a custom range (ISO 8601); overrides interval.","title":"End"},"timezone":{"anyOf":[{"maxLength":50,"type":"string"},{"type":"null"}],"default":null,"description":"IANA time zone name, for example 'Europe/Berlin' (default UTC).","title":"Timezone"},"domain":{"anyOf":[{"maxLength":253,"type":"string"},{"type":"null"}],"default":null,"description":"Only links on this domain.","title":"Domain"},"key":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only this link slug (needs domain).","title":"Key"},"link_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only this link ID.","title":"Link Id"},"tag_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only links with this tag ID.","title":"Tag Id"},"country":{"anyOf":[{"maxLength":2,"type":"string"},{"type":"null"}],"default":null,"description":"Only this two-letter country code.","title":"Country"}},"title":"get_analyticsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_events":{"post":{"operationId":"list_events","summary":"List individual click, lead or sale events (time, country, city, device, browser, referrer, link). Needs a Business plan","description":"List individual click, lead or sale events (time, country, city, device, browser, referrer, link). Needs a Business plan or higher. Use for \"Show the latest clicks on my Dub links\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"event":{"anyOf":[{"enum":["clicks","leads","sales"],"type":"string"},{"type":"null"}],"default":null,"description":"Event type: clicks (default), leads or sales.","title":"Event"},"interval":{"anyOf":[{"enum":["24h","7d","30d","90d","1y","mtd","qtd","ytd","all"],"type":"string"},{"type":"null"}],"default":null,"description":"Time window: 24h (default), 7d, 30d, 90d, 1y, mtd, qtd, ytd or all.","title":"Interval"},"domain":{"anyOf":[{"maxLength":253,"type":"string"},{"type":"null"}],"default":null,"description":"Only links on this domain.","title":"Domain"},"key":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only this link slug (needs domain).","title":"Key"},"link_id":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only this link ID.","title":"Link Id"},"sort_order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"Order by time: desc (default) or asc.","title":"Sort Order"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"limit":{"anyOf":[{"maximum":1000,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Events per page (1 to 1000, default 100).","title":"Limit"}},"title":"list_eventsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_tags":{"post":{"operationId":"list_tags","summary":"List the tags of the workspace with ID, name and colour. Use for \"Which tags do I use on Dub\".","description":"List the tags of the workspace with ID, name and colour. Use for \"Which tags do I use on Dub\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"sort_by":{"anyOf":[{"enum":["name","createdAt"],"type":"string"},{"type":"null"}],"default":null,"description":"Order by name (default) or createdAt.","title":"Sort By"},"sort_order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"asc (default) or desc.","title":"Sort Order"},"search":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only tags matching this text.","title":"Search"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Page number, starting at 1.","title":"Page"},"page_size":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":100,"description":"Tags per page (1 to 100, default 100).","title":"Page Size"}},"title":"list_tagsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_folders":{"post":{"operationId":"list_folders","summary":"List the link folders of the workspace with name, description, type and access level. Use for \"Which folders do I have o","description":"List the link folders of the workspace with name, description, type and access level. Use for \"Which folders do I have on Dub\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"search":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only folders matching this text.","title":"Search"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Page number, starting at 1.","title":"Page"},"page_size":{"anyOf":[{"maximum":50,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"Folders per page (1 to 50, default 50).","title":"Page Size"}},"title":"list_foldersArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}