{"openapi":"3.1.0","info":{"title":"Polar (BYOK) API","version":"0.1.0","description":"Polar (BYOK) lets an AI assistant read your own Polar data through the Polar API with a key you supply (Polar organization access token (read scopes)). Read-only: 9 tools (list_benefits, get_benefit, list_discounts, get_discount, list_checkout_links, list_custom_fields, list_webhook_endpoints, get_webhook_endpoint, get_metrics_limits). The BYOK key travels with each request, is used for that one...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-polar-config.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-polar-config/docs"},"termsOfService":"https://connectorbay.com/byok-polar-config/terms"},"servers":[{"url":"https://byok-polar-config.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-polar-config/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_benefits":{"post":{"operationId":"list_benefits","summary":"List the benefits customers get with products (license keys, downloads, Discord or GitHub access, meter credits, custom)","description":"List the benefits customers get with products (license keys, downloads, Discord or GitHub access, meter credits, custom) with type, description and visibility. Needs benefits:read. Use for \"Which benefits can I attach to my Polar products\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only items of this organization (UUID); omit to use every organization the token can see.","title":"Organization Id"},"type":{"anyOf":[{"enum":["custom","discord","github_repository","downloadables","license_keys","meter_credit","feature_flag","slack_shared_channel"],"type":"string"},{"type":"null"}],"default":null,"description":"Only benefits of this type.","title":"Type"},"query":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only benefits whose description contains this text.","title":"Query"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"Results per page (1 to 100; provider default 10).","title":"Limit"}},"title":"list_benefitsArguments","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_benefit":{"post":{"operationId":"get_benefit","summary":"Get one benefit by id: type, description, visibility, organization and type-specific properties. Use for \"Show the Polar","description":"Get one benefit by id: type, description, visibility, organization and type-specific properties. Use for \"Show the Polar benefit b1\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"id":{"description":"Benefit id (UUID).","maxLength":200,"title":"Id","type":"string"}},"required":["id"],"title":"get_benefitArguments","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_discounts":{"post":{"operationId":"list_discounts","summary":"List discount codes with fixed or percentage size (basis points), duration, validity window, redemption limit and redemp","description":"List discount codes with fixed or percentage size (basis points), duration, validity window, redemption limit and redemption count. Needs discounts:read. Use for \"Which Polar discounts are active and how often were they used\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only items of this organization (UUID); omit to use every organization the token can see.","title":"Organization Id"},"query":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only discounts whose name or code contains this text.","title":"Query"},"sorting":{"anyOf":[{"enum":["created_at","-created_at","name","-name","code","-code","redemptions_count","-redemptions_count","ends_at","-ends_at"],"type":"string"},{"type":"null"}],"default":"-created_at","description":"Order by created_at, name, code, redemptions_count or ends_at; prefix with - for descending.","title":"Sorting"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"Results per page (1 to 100; provider default 10).","title":"Limit"}},"title":"list_discountsArguments","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_discount":{"post":{"operationId":"get_discount","summary":"Get one discount by id: name, code, type, amount or basis points, duration, validity window and redemption counts. Use f","description":"Get one discount by id: name, code, type, amount or basis points, duration, validity window and redemption counts. Use for \"Show the Polar discount d1\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"id":{"description":"Discount id (UUID).","maxLength":200,"title":"Id","type":"string"}},"required":["id"],"title":"get_discountArguments","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_checkout_links":{"post":{"operationId":"list_checkout_links","summary":"List reusable checkout links with label, products, trial settings, discount, whether discount codes and billing addresse","description":"List reusable checkout links with label, products, trial settings, discount, whether discount codes and billing addresses are asked for, and the link URL. Needs checkout_links:read. Use for \"What checkout links do I have in Polar\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only items of this organization (UUID); omit to use every organization the token can see.","title":"Organization Id"},"product_id":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only links that include this product id (UUID).","title":"Product Id"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"Results per page (1 to 100; provider default 10).","title":"Limit"}},"title":"list_checkout_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/list_custom_fields":{"post":{"operationId":"list_custom_fields","summary":"List the custom fields you can ask for at checkout (text, number, date, checkbox, select) with slug, name and type. Need","description":"List the custom fields you can ask for at checkout (text, number, date, checkbox, select) with slug, name and type. Needs custom_fields:read. Use for \"Which custom checkout fields are defined in Polar\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only items of this organization (UUID); omit to use every organization the token can see.","title":"Organization Id"},"query":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only fields whose name or slug contains this text.","title":"Query"},"type":{"anyOf":[{"enum":["text","number","date","checkbox","select"],"type":"string"},{"type":"null"}],"default":null,"description":"Only fields of this type.","title":"Type"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"Results per page (1 to 100; provider default 10).","title":"Limit"}},"title":"list_custom_fieldsArguments","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_webhook_endpoints":{"post":{"operationId":"list_webhook_endpoints","summary":"List webhook endpoints with URL, payload format, subscribed events, enabled flag and API version. The signing secret is ","description":"List webhook endpoints with URL, payload format, subscribed events, enabled flag and API version. The signing secret is not kept. Needs webhooks:read. Use for \"Where does my Polar organization send webhooks\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"organization_id":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only items of this organization (UUID); omit to use every organization the token can see.","title":"Organization Id"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"Results per page (1 to 100; provider default 10).","title":"Limit"}},"title":"list_webhook_endpointsArguments","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_webhook_endpoint":{"post":{"operationId":"get_webhook_endpoint","summary":"Get one webhook endpoint by id: URL, format, events, enabled flag and API version (no signing secret). Use for \"Show the","description":"Get one webhook endpoint by id: URL, format, events, enabled flag and API version (no signing secret). Use for \"Show the Polar webhook endpoint w1\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"id":{"description":"Webhook endpoint id (UUID).","maxLength":200,"title":"Id","type":"string"}},"required":["id"],"title":"get_webhook_endpointArguments","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_metrics_limits":{"post":{"operationId":"get_metrics_limits","summary":"Show the earliest date metrics are available and the minimum and maximum day ranges allowed per interval (hour, day, wee","description":"Show the earliest date metrics are available and the minimum and maximum day ranges allowed per interval (hour, day, week, month, year). Use for \"What date ranges can I request from Polar metrics\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_metrics_limitsArguments","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}}}}