{"openapi":"3.1.0","info":{"title":"Reflag (BYOK) API","version":"0.1.0","description":"Reflag (BYOK) lets an AI assistant read your own Reflag data through the Reflag API with a key you supply (Reflag management API key). Read-only: 7 tools (list_apps, get_app, list_flags, list_environments, get_environment, get_company_flags, get_user_flags). 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...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-reflag.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-reflag/docs"},"termsOfService":"https://connectorbay.com/byok-reflag/terms"},"servers":[{"url":"https://byok-reflag.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-reflag/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_apps":{"post":{"operationId":"list_apps","summary":"List the Reflag apps the key can access, each with its organization and environments. Use for \"Which Reflag apps and env","description":"List the Reflag apps the key can access, each with its organization and environments. Use for \"Which Reflag apps and environments do I have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only apps of this organization id.","title":"Org Id"}},"title":"list_appsArguments","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_app":{"post":{"operationId":"get_app","summary":"Get one app: organization, flag key format, release stages and segments. Use for \"What stages and segments does my Refla","description":"Get one app: organization, flag key format, release stages and segments. Use for \"What stages and segments does my Reflag app have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"app_id":{"description":"Reflag app id (from list_apps).","maxLength":200,"title":"App Id","type":"string"}},"required":["app_id"],"title":"get_appArguments","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_flags":{"post":{"operationId":"list_flags","summary":"List all flags of an app with key, name, stage, stale and archived state, creation date and last check or track times. U","description":"List all flags of an app with key, name, stage, stale and archived state, creation date and last check or track times. Use for \"Which Reflag flags are stale or no longer checked\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"app_id":{"description":"Reflag app id (from list_apps).","maxLength":200,"title":"App Id","type":"string"}},"required":["app_id"],"title":"list_flagsArguments","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_environments":{"post":{"operationId":"list_environments","summary":"List the environments of an app (for example production, staging) with ids and flag state version. Use for \"Which enviro","description":"List the environments of an app (for example production, staging) with ids and flag state version. Use for \"Which environments does my Reflag app have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"app_id":{"description":"Reflag app id (from list_apps).","maxLength":200,"title":"App Id","type":"string"},"sort_by":{"anyOf":[{"enum":["name","order"],"type":"string"},{"type":"null"}],"default":"order","description":"Sort by name or order.","title":"Sort By"},"sort_order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":"asc","description":"Sort direction: asc or desc.","title":"Sort Order"}},"required":["app_id"],"title":"list_environmentsArguments","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_environment":{"post":{"operationId":"get_environment","summary":"Get one environment: name, production flag, order and flag state version. Use for \"Is Reflag environment env123 the prod","description":"Get one environment: name, production flag, order and flag state version. Use for \"Is Reflag environment env123 the production one\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"app_id":{"description":"Reflag app id (from list_apps).","maxLength":200,"title":"App Id","type":"string"},"env_id":{"description":"Reflag environment id (from list_environments).","maxLength":200,"title":"Env Id","type":"string"}},"required":["app_id","env_id"],"title":"get_environmentArguments","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_company_flags":{"post":{"operationId":"get_company_flags","summary":"Show every flag with its on or off value, specific targeting and exposure counts for one company in an environment. Use ","description":"Show every flag with its on or off value, specific targeting and exposure counts for one company in an environment. Use for \"Which Reflag flags are on for company acme-corp in production\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"app_id":{"description":"Reflag app id (from list_apps).","maxLength":200,"title":"App Id","type":"string"},"env_id":{"description":"Reflag environment id (from list_environments).","maxLength":200,"title":"Env Id","type":"string"},"company_id":{"description":"Company id as used in your application.","maxLength":200,"title":"Company Id","type":"string"}},"required":["app_id","env_id","company_id"],"title":"get_company_flagsArguments","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_user_flags":{"post":{"operationId":"get_user_flags","summary":"Show every flag with its on or off value, specific targeting and exposure counts for one user in an environment. Use for","description":"Show every flag with its on or off value, specific targeting and exposure counts for one user in an environment. Use for \"Which Reflag flags are on for user user-123 in production\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"app_id":{"description":"Reflag app id (from list_apps).","maxLength":200,"title":"App Id","type":"string"},"env_id":{"description":"Reflag environment id (from list_environments).","maxLength":200,"title":"Env Id","type":"string"},"user_id":{"description":"User id as used in your application.","maxLength":200,"title":"User Id","type":"string"}},"required":["app_id","env_id","user_id"],"title":"get_user_flagsArguments","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}}}}