{"openapi":"3.1.0","info":{"title":"Baremetrics (BYOK) API","version":"0.1.0","description":"Baremetrics (BYOK) lets an AI assistant read your own Baremetrics data through the Baremetrics API with a key you supply (Baremetrics API key). Read-only: 12 tools (get_account, list_sources, get_metrics_summary, get_metric, list_customers, get_customer, list_plans, list_subscriptions, get_subscription, list_charges, list_annotations, list_goals). The BYOK key travels with each request, is used...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-baremetrics.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-baremetrics/docs"},"termsOfService":"https://connectorbay.com/byok-baremetrics/terms"},"servers":[{"url":"https://byok-baremetrics.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-baremetrics/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/get_account":{"post":{"operationId":"get_account","summary":"Show the Baremetrics account: company name, default currency and creation time. Use for \"Which Baremetrics account and c","description":"Show the Baremetrics account: company name, default currency and creation time. Use for \"Which Baremetrics account and currency am I using\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"get_accountArguments","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_sources":{"post":{"operationId":"list_sources","summary":"List the billing sources (Stripe, Recurly, Braintree or custom) connected to Baremetrics; their ids are needed by the cu","description":"List the billing sources (Stripe, Recurly, Braintree or custom) connected to Baremetrics; their ids are needed by the customer, plan, subscription and charge tools. Use for \"Which billing sources are connected to Baremetrics\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_sourcesArguments","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_summary":{"post":{"operationId":"get_metrics_summary","summary":"Get all key metrics per day for a date range: MRR, ARR, active customers, new customers, churn, LTV, ARPU, refunds, upgr","description":"Get all key metrics per day for a date range: MRR, ARR, active customers, new customers, churn, LTV, ARPU, refunds, upgrades and downgrades. Amounts are integer cents. Use for \"Give me daily MRR, ARR and churn figures for September 2026\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"start_date":{"description":"First day, YYYY-MM-DD.","maxLength":10,"title":"Start Date","type":"string"},"end_date":{"description":"Last day, YYYY-MM-DD.","maxLength":10,"title":"End Date","type":"string"}},"required":["start_date","end_date"],"title":"get_metrics_summaryArguments","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_metric":{"post":{"operationId":"get_metric","summary":"Get one metric per day for a date range with the value and the value from a number of days earlier, for example mrr, arr","description":"Get one metric per day for a date range with the value and the value from a number of days earlier, for example mrr, arr, ltv, user_churn, new_customers, quick_ratio or trial_conversion. Amounts are integer cents. Use for \"Show my MRR for each day in September 2026 compared with 30 days earlier\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"metric":{"description":"Metric name: active_customers, active_subscriptions, active_trials, arpu, arr, cancellations, churned_customers, converted_trials, coupons, downgrades, failed_charges, fees, ltv, mrr, mrr_growth_rate, net_revenue, net_revenue_churn, new_customers, new_subscriptions, new_trials, other_revenue, plan_quantities, quick_ratio, reactivations, refunds, revenue_churn, trial_conversion, trial_time_to_cancelation, trial_time_to_conversion, upgrades or user_churn.","maxLength":200,"title":"Metric","type":"string"},"start_date":{"description":"First day, YYYY-MM-DD.","maxLength":10,"title":"Start Date","type":"string"},"end_date":{"description":"Last day, YYYY-MM-DD.","maxLength":10,"title":"End Date","type":"string"},"compare_to":{"anyOf":[{"maximum":3650,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Number of days ago to compare each value to.","title":"Compare To"}},"required":["metric","start_date","end_date"],"title":"get_metricArguments","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_customers":{"post":{"operationId":"list_customers","summary":"List customers of a source with lifetime value, current MRR and active or canceled state, optionally searched by id, ema","description":"List customers of a source with lifetime value, current MRR and active or canceled state, optionally searched by id, email or name, sorted by creation time or LTV. Use for \"Who are my highest lifetime value customers in Baremetrics\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"source_id":{"description":"Baremetrics source id (from list_sources), for example the id of your Stripe source.","maxLength":200,"title":"Source Id","type":"string"},"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Text to search customers (matches oid, email, notes and name) for.","title":"Search"},"sort":{"anyOf":[{"enum":["created","ltv"],"type":"string"},{"type":"null"}],"default":"created","description":"Sort by created or ltv.","title":"Sort"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"asc","description":"asc or desc.","title":"Order"},"per_page":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Items per page (default 30, maximum 200).","title":"Per Page"},"page":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Page number as shown in meta.pagination.page of the previous answer (the first page is 0).","title":"Page"}},"required":["source_id"],"title":"list_customersArguments","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_customer":{"post":{"operationId":"get_customer","summary":"Get one customer of a source by its id (oid) with lifetime value, current MRR and active or canceled state. Use for \"Sho","description":"Get one customer of a source by its id (oid) with lifetime value, current MRR and active or canceled state. Use for \"Show Baremetrics customer customer_1\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"source_id":{"description":"Baremetrics source id (from list_sources), for example the id of your Stripe source.","maxLength":200,"title":"Source Id","type":"string"},"oid":{"description":"Customer id (oid) as stored in the source.","maxLength":200,"title":"Oid","type":"string"}},"required":["source_id","oid"],"title":"get_customerArguments","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_plans":{"post":{"operationId":"list_plans","summary":"List the plans of a source with interval, active flag, setup fees and prices per currency (cents). Use for \"What plans d","description":"List the plans of a source with interval, active flag, setup fees and prices per currency (cents). Use for \"What plans do I have in Baremetrics\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"source_id":{"description":"Baremetrics source id (from list_sources), for example the id of your Stripe source.","maxLength":200,"title":"Source Id","type":"string"},"search":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Text to search plans (matches name and oid) for.","title":"Search"},"per_page":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Items per page (default 30, maximum 200).","title":"Per Page"},"page":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Page number as shown in meta.pagination.page of the previous answer (the first page is 0).","title":"Page"}},"required":["source_id"],"title":"list_plansArguments","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_subscriptions":{"post":{"operationId":"list_subscriptions","summary":"List the subscriptions of a source, optionally for one customer, with plan, quantity, discount and start and cancel time","description":"List the subscriptions of a source, optionally for one customer, with plan, quantity, discount and start and cancel times. Use for \"Which subscriptions does customer_1 have in Baremetrics\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"source_id":{"description":"Baremetrics source id (from list_sources), for example the id of your Stripe source.","maxLength":200,"title":"Source Id","type":"string"},"customer_oid":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only subscriptions of this customer id.","title":"Customer Oid"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"desc","description":"desc (newest first) or asc.","title":"Order"},"per_page":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Items per page (default 30, maximum 200).","title":"Per Page"},"page":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Page number as shown in meta.pagination.page of the previous answer (the first page is 0).","title":"Page"}},"required":["source_id"],"title":"list_subscriptionsArguments","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_subscription":{"post":{"operationId":"get_subscription","summary":"Get one subscription of a source by its id (oid) with plan, quantity, discount and start and cancel times. Use for \"Show","description":"Get one subscription of a source by its id (oid) with plan, quantity, discount and start and cancel times. Use for \"Show Baremetrics subscription subscription_1\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"source_id":{"description":"Baremetrics source id (from list_sources), for example the id of your Stripe source.","maxLength":200,"title":"Source Id","type":"string"},"oid":{"description":"Subscription id (oid) as stored in the source.","maxLength":200,"title":"Oid","type":"string"}},"required":["source_id","oid"],"title":"get_subscriptionArguments","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_charges":{"post":{"operationId":"list_charges","summary":"List charges of a source, optionally for a time window, subscription or customer, with status, amount, fee and currency ","description":"List charges of a source, optionally for a time window, subscription or customer, with status, amount, fee and currency (cents). Use for \"What charges did customer_1 pay on Baremetrics\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"source_id":{"description":"Baremetrics source id (from list_sources), for example the id of your Stripe source.","maxLength":200,"title":"Source Id","type":"string"},"start":{"anyOf":[{"maxLength":12,"type":"string"},{"type":"null"}],"default":null,"description":"Only charges created at or after this Unix timestamp (seconds).","title":"Start"},"end":{"anyOf":[{"maxLength":12,"type":"string"},{"type":"null"}],"default":null,"description":"Only charges created at or before this Unix timestamp (seconds).","title":"End"},"subscription_oid":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only charges of this subscription id.","title":"Subscription Oid"},"customer_oid":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Only charges of this customer id.","title":"Customer Oid"},"per_page":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Items per page (default 30, maximum 200).","title":"Per Page"},"page":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Page number as shown in meta.pagination.page of the previous answer (the first page is 0).","title":"Page"}},"required":["source_id"],"title":"list_chargesArguments","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_annotations":{"post":{"operationId":"list_annotations","summary":"List the annotations (notes pinned to dates on a metric chart) with metric, text and date. Use for \"What annotations are","description":"List the annotations (notes pinned to dates on a metric chart) with metric, text and date. Use for \"What annotations are on my Baremetrics charts\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_annotationsArguments","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_goals":{"post":{"operationId":"list_goals","summary":"List the revenue or metric goals with metric, start and end amounts and dates. Use for \"What goals have I set in Baremet","description":"List the revenue or metric goals with metric, start and end amounts and dates. Use for \"What goals have I set in Baremetrics\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_goalsArguments","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}}}}