{"openapi":"3.1.0","info":{"title":"API Reference","version":"1.0.0"},"paths":{"/api-keys":{"get":{"operationId":"list-api-keys","summary":"List api keys","tags":["accounts"],"parameters":[{"name":"environment_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"require_environment","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"limit","in":"query","description":"Page limit (default 100)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","description":"Page offset (default 0)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounts_listApiKeys_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"create-api-key","summary":"Create api key","tags":["accounts"],"parameters":[{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounts_createApiKey_Response_201"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequestBody"}}}}}},"/api-keys/{api_key_id}":{"get":{"operationId":"get-api-key","summary":"Get api key","tags":["accounts"],"parameters":[{"name":"api_key_id","in":"path","description":"api_key_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounts_getApiKey_Response_200"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"operationId":"update-api-key","summary":"Update api key","tags":["accounts"],"parameters":[{"name":"api_key_id","in":"path","description":"api_key_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounts_updateApiKey_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateApiKeyRequestBody"}}}}},"delete":{"operationId":"delete-api-key","summary":"Delete api key","tags":["accounts"],"parameters":[{"name":"api_key_id","in":"path","description":"api_key_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounts_deleteApiKey_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/environments":{"post":{"operationId":"create-environment","summary":"Create environment","tags":["accounts"],"parameters":[{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounts_createEnvironment_Response_201"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEnvironmentRequestBody"}}}}}},"/environments/{environment_id}":{"put":{"operationId":"update-environment","summary":"Update environment","tags":["accounts"],"parameters":[{"name":"environment_id","in":"path","description":"environment_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounts_updateEnvironment_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEnvironmentRequestBody"}}}}},"delete":{"operationId":"delete-environment","summary":"Delete environment","tags":["accounts"],"parameters":[{"name":"environment_id","in":"path","description":"environment_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounts_deleteEnvironment_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/plans":{"get":{"operationId":"list-plans","summary":"List plans","tags":["plans"],"parameters":[{"name":"company_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"company_scoped_only","in":"query","description":"Only return plans that are scoped to a company (custom plans assigned to a company)","required":false,"schema":{"type":"boolean"}},{"name":"exclude_company_scoped","in":"query","description":"Exclude plans that are scoped to a company (custom plans assigned to a company)","required":false,"schema":{"type":"boolean"}},{"name":"for_fallback_plan","in":"query","description":"Filter for plans valid as fallback plans (not linked to billing)","required":false,"schema":{"type":"boolean"}},{"name":"for_initial_plan","in":"query","description":"Filter for plans valid as initial plans (not linked to billing, free, or auto-cancelling trial)","required":false,"schema":{"type":"boolean"}},{"name":"for_trial_expiry_plan","in":"query","description":"Filter for plans valid as trial expiry plans (not linked to billing or free)","required":false,"schema":{"type":"boolean"}},{"name":"has_product_id","in":"query","description":"Filter out plans that do not have a billing product ID","required":false,"schema":{"type":"boolean"}},{"name":"ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"include_draft_versions","in":"query","description":"Include billing settings from draft versions for plans which have draft version","required":false,"schema":{"type":"boolean"}},{"name":"plan_type","in":"query","description":"Filter by plan type","required":false,"schema":{"$ref":"#/components/schemas/PlanType"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"scoped_to_company_id","in":"query","description":"Filter plans scoped to a specific company (custom plans)","required":false,"schema":{"type":"string"}},{"name":"with_entitlements","in":"query","description":"Include each plan's entitlements in the response","required":false,"schema":{"type":"boolean"}},{"name":"without_entitlement_for","in":"query","description":"Filter out plans that already have a plan entitlement for the specified feature ID","required":false,"schema":{"type":"string"}},{"name":"without_paid_product_id","in":"query","description":"Filter out plans that have a paid billing product ID","required":false,"schema":{"type":"boolean"}},{"name":"limit","in":"query","description":"Page limit (default 100)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","description":"Page offset (default 0)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/plans_listPlans_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"create-plan","summary":"Create plan","tags":["plans"],"parameters":[{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/plans_createPlan_Response_201"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePlanRequestBody"}}}}}},"/plans/{plan_id}":{"get":{"operationId":"get-plan","summary":"Get plan","tags":["plans"],"parameters":[{"name":"plan_id","in":"path","description":"plan_id","required":true,"schema":{"type":"string"}},{"name":"plan_version_id","in":"query","description":"Fetch billing settings for a specific plan version","required":false,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/plans_getPlan_Response_200"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"operationId":"update-plan","summary":"Update plan","tags":["plans"],"parameters":[{"name":"plan_id","in":"path","description":"plan_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/plans_updatePlan_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePlanRequestBody"}}}}},"delete":{"operationId":"delete-plan","summary":"Delete plan","tags":["plans"],"parameters":[{"name":"plan_id","in":"path","description":"plan_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/plans_deletePlan_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/companies":{"get":{"operationId":"list-companies","summary":"List companies","tags":["companies"],"parameters":[{"name":"credit_type_ids","in":"query","description":"Filter companies by one or more credit type IDs (each ID starts with bcrd_)","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"has_scheduled_downgrade","in":"query","description":"Filter companies that have a pending scheduled downgrade","required":false,"schema":{"type":"boolean"}},{"name":"ids","in":"query","description":"Filter companies by multiple company IDs (starts with comp_)","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"monetized_subscriptions","in":"query","description":"Filter companies that have monetized subscriptions","required":false,"schema":{"type":"boolean"}},{"name":"plan_id","in":"query","description":"Filter companies by plan ID (starts with plan_)","required":false,"schema":{"type":"string"}},{"name":"plan_ids","in":"query","description":"Filter companies by one or more plan IDs (each ID starts with plan_)","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"plan_version_id","in":"query","description":"Filter companies by plan version ID (starts with plvr_)","required":false,"schema":{"type":"string"}},{"name":"plan_version_ids","in":"query","description":"Filter companies by one or more plan version IDs (each ID starts with plvr_). Takes precedence over plan_version_id when set.","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"plan_version_unpublished","in":"query","description":"Filter companies assigned to a plan version that is no longer published, meaning the plan has since moved on to a newer version","required":false,"schema":{"type":"boolean"}},{"name":"q","in":"query","description":"Search for companies by name, keys or string traits","required":false,"schema":{"type":"string"}},{"name":"sort_order_column","in":"query","description":"Column to sort by (e.g. name, created_at, last_seen_at)","required":false,"schema":{"type":"string"}},{"name":"sort_order_direction","in":"query","description":"Direction to sort by (asc or desc)","required":false,"schema":{"$ref":"#/components/schemas/SortDirection"}},{"name":"subscription_statuses","in":"query","description":"Filter companies by one or more subscription statuses","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionStatus"}}},{"name":"subscription_types","in":"query","description":"Filter companies by one or more subscription types","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionType"}}},{"name":"with_entitlement_for","in":"query","description":"Filter companies that have an entitlement (plan entitlement or company override) for the specified feature ID","required":false,"schema":{"type":"string"}},{"name":"without_feature_override_for","in":"query","description":"Filter out companies that already have a company override for the specified feature ID","required":false,"schema":{"type":"string"}},{"name":"without_plan","in":"query","description":"Filter out companies that have a plan","required":false,"schema":{"type":"boolean"}},{"name":"without_subscription","in":"query","description":"Filter out companies that have a subscription","required":false,"schema":{"type":"boolean"}},{"name":"with_subscription","in":"query","description":"Filter companies that have a subscription","required":false,"schema":{"type":"boolean"}},{"name":"limit","in":"query","description":"Page limit (default 100)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","description":"Page offset (default 0)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/companies_listCompanies_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"upsert-company","summary":"Upsert company","tags":["companies"],"parameters":[{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/companies_upsertCompany_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertCompanyRequestBody"}}}}}},"/companies/lookup":{"get":{"operationId":"lookup-company","summary":"Lookup company","description":"Company lookup is determined to resolve a company from its keys, similar to how many of our other apis work. \nThe following approaches will all work to resolve a company and any of them are appropriate:\n1. `/companies/lookup?keys={\"foo\": \"bar\", \"fizz\": \"buzz\"}`\n2. `/companies/lookup?keys[foo]=bar&keys[fizz]=buzz`\n2. `/companies/lookup?foo=bar&fizz=buzz`\n","tags":["companies"],"parameters":[{"name":"keys","in":"query","description":"Key/value pairs","required":true,"schema":{"type":"object","additionalProperties":{"type":"string"}}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/companies_lookupCompany_Response_200"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/companies/{company_id}":{"delete":{"operationId":"delete-company","summary":"Delete company","tags":["companies"],"parameters":[{"name":"company_id","in":"path","description":"company_id","required":true,"schema":{"type":"string"}},{"name":"cancel_subscription","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"prorate","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/companies_deleteCompany_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/companies/delete":{"post":{"operationId":"delete-company-by-keys","summary":"Delete company by keys","tags":["companies"],"parameters":[{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/companies_deleteCompanyByKeys_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeysRequestBody"}}}}}},"/company-memberships":{"get":{"operationId":"list-company-memberships","summary":"List company memberships","tags":["companies"],"parameters":[{"name":"company_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"user_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Page limit (default 100)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","description":"Page offset (default 0)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/companies_listCompanyMemberships_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"get-or-create-company-membership","summary":"Get or create company membership","tags":["companies"],"parameters":[{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/companies_getOrCreateCompanyMembership_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetOrCreateCompanyMembershipRequestBody"}}}}}},"/company-memberships/{company_membership_id}":{"delete":{"operationId":"delete-company-membership","summary":"Delete company membership","tags":["companies"],"parameters":[{"name":"company_membership_id","in":"path","description":"company_membership_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/companies_deleteCompanyMembership_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/company-traits":{"post":{"operationId":"upsert-company-trait","summary":"Upsert company trait","tags":["companies"],"parameters":[{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/companies_upsertCompanyTrait_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertTraitRequestBody"}}}}}},"/users":{"get":{"operationId":"list-users","summary":"List users","tags":["companies"],"parameters":[{"name":"company_id","in":"query","description":"Filter users by company ID (starts with comp_)","required":false,"schema":{"type":"string"}},{"name":"ids","in":"query","description":"Filter users by multiple user IDs (starts with user_)","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"plan_id","in":"query","description":"Filter users by plan ID (starts with plan_)","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","description":"Search for users by name, keys or string traits","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Page limit (default 100)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","description":"Page offset (default 0)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/companies_listUsers_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"upsert-user","summary":"Upsert user","tags":["companies"],"parameters":[{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/companies_upsertUser_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertUserRequestBody"}}}}}},"/users/lookup":{"get":{"operationId":"lookup-user","summary":"Lookup user","tags":["companies"],"parameters":[{"name":"keys","in":"query","description":"Key/value pairs","required":true,"schema":{"type":"object","additionalProperties":{"type":"string"}}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/companies_lookupUser_Response_200"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/users/{user_id}":{"delete":{"operationId":"delete-user","summary":"Delete user","tags":["companies"],"parameters":[{"name":"user_id","in":"path","description":"user_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/companies_deleteUser_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/users/delete":{"post":{"operationId":"delete-user-by-keys","summary":"Delete user by keys","tags":["companies"],"parameters":[{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/companies_deleteUserByKeys_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeysRequestBody"}}}}}},"/user-traits":{"post":{"operationId":"upsert-user-trait","summary":"Upsert user trait","tags":["companies"],"parameters":[{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/companies_upsertUserTrait_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertTraitRequestBody"}}}}}},"/events":{"get":{"operationId":"list-events","summary":"List events","tags":["events"],"parameters":[{"name":"company_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"event_subtype","in":"query","required":false,"schema":{"type":"string"}},{"name":"event_types","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventType"}}},{"name":"flag_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"idempotency_key","in":"query","required":false,"schema":{"type":"string"}},{"name":"user_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Page limit (default 100)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","description":"Page offset (default 0)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/events_listEvents_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"create-event","summary":"Create event","tags":["events"],"parameters":[{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/events_createEvent_Response_201"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEventRequestBody"}}}}}},"/event-batch":{"post":{"operationId":"create-event-batch","summary":"Create event batch","tags":["events"],"parameters":[{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/events_createEventBatch_Response_201"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEventBatchRequestBody"}}}}}},"/events/{event_id}":{"get":{"operationId":"get-event","summary":"Get event","tags":["events"],"parameters":[{"name":"event_id","in":"path","description":"event_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/events_getEvent_Response_200"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/features":{"get":{"operationId":"list-features","summary":"List features","tags":["features"],"parameters":[{"name":"boolean_require_event","in":"query","description":"Only return boolean features if there is an associated event. Automatically includes boolean in the feature types filter.","required":false,"schema":{"type":"boolean"}},{"name":"feature_type","in":"query","description":"Filter by one or more feature types (boolean, event, trait)","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/FeatureType"}}},{"name":"ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"managed_by","in":"query","description":"Filter for features managed by a billing provider, or by Schematic (no billing provider)","required":false,"schema":{"$ref":"#/components/schemas/BillingProviderType"}},{"name":"plan_version_id","in":"query","description":"Filter by plan version ID when used with without_plan_entitlement_for; if not provided, the latest published version is used","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","description":"Search by feature name or ID","required":false,"schema":{"type":"string"}},{"name":"without_company_override_for","in":"query","description":"Filter out features that already have a company override for the specified company ID","required":false,"schema":{"type":"string"}},{"name":"without_plan_entitlement_for","in":"query","description":"Filter out features that already have a plan entitlement for the specified plan ID","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Page limit (default 100)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","description":"Page offset (default 0)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/features_listFeatures_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"create-feature","summary":"Create feature","tags":["features"],"parameters":[{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/features_createFeature_Response_201"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFeatureRequestBody"}}}}}},"/features/{feature_id}":{"get":{"operationId":"get-feature","summary":"Get feature","tags":["features"],"parameters":[{"name":"feature_id","in":"path","description":"feature_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/features_getFeature_Response_200"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"operationId":"update-feature","summary":"Update feature","tags":["features"],"parameters":[{"name":"feature_id","in":"path","description":"feature_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/features_updateFeature_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFeatureRequestBody"}}}}},"delete":{"operationId":"delete-feature","summary":"Delete feature","tags":["features"],"parameters":[{"name":"feature_id","in":"path","description":"feature_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/features_deleteFeature_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/flags":{"get":{"operationId":"list-flags","summary":"List flags","tags":["features"],"parameters":[{"name":"feature_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"q","in":"query","description":"Search by flag name, key, or ID","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Page limit (default 100)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","description":"Page offset (default 0)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/features_listFlags_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"create-flag","summary":"Create flag","tags":["features"],"parameters":[{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/features_createFlag_Response_201"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFlagRequestBody"}}}}}},"/flags/{flag_id}":{"get":{"operationId":"get-flag","summary":"Get flag","tags":["features"],"parameters":[{"name":"flag_id","in":"path","description":"flag_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/features_getFlag_Response_200"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"operationId":"update-flag","summary":"Update flag","tags":["features"],"parameters":[{"name":"flag_id","in":"path","description":"flag_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/features_updateFlag_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFlagRequestBody"}}}}},"delete":{"operationId":"delete-flag","summary":"Delete flag","tags":["features"],"parameters":[{"name":"flag_id","in":"path","description":"flag_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/features_deleteFlag_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/flags/{flag_id}/rules":{"put":{"operationId":"update-flag-rules","summary":"Update flag rules","tags":["features"],"parameters":[{"name":"flag_id","in":"path","description":"flag_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/features_updateFlagRules_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFlagRulesRequestBody"}}}}}},"/flags/{key}/check":{"post":{"operationId":"check-flag","summary":"Check flag","tags":["features"],"parameters":[{"name":"key","in":"path","description":"key","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/features_checkFlag_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckFlagRequestBody"}}}}}},"/flags/check":{"post":{"operationId":"check-flags","summary":"Check flags","tags":["features"],"parameters":[{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/features_checkFlags_Response_201"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckFlagRequestBody"}}}}}},"/company-overrides":{"get":{"operationId":"list-company-overrides","summary":"List company overrides","tags":["entitlements"],"parameters":[{"name":"company_id","in":"query","description":"Filter company overrides by a single company ID (starting with comp_)","required":false,"schema":{"type":"string"}},{"name":"company_ids","in":"query","description":"Filter company overrides by multiple company IDs (starting with comp_)","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"feature_id","in":"query","description":"Filter company overrides by a single feature ID (starting with feat_)","required":false,"schema":{"type":"string"}},{"name":"feature_ids","in":"query","description":"Filter company overrides by multiple feature IDs (starting with feat_)","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"ids","in":"query","description":"Filter company overrides by multiple company override IDs (starting with cmov_)","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"without_expired","in":"query","description":"Filter company overrides by whether they have not expired","required":false,"schema":{"type":"boolean"}},{"name":"q","in":"query","description":"Search for company overrides by feature or company name","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Page limit (default 100)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","description":"Page offset (default 0)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entitlements_listCompanyOverrides_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"create-company-override","summary":"Create company override","tags":["entitlements"],"parameters":[{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entitlements_createCompanyOverride_Response_201"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCompanyOverrideRequestBody"}}}}}},"/company-overrides/{company_override_id}":{"get":{"operationId":"get-company-override","summary":"Get company override","tags":["entitlements"],"parameters":[{"name":"company_override_id","in":"path","description":"company_override_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entitlements_getCompanyOverride_Response_200"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"operationId":"update-company-override","summary":"Update company override","tags":["entitlements"],"parameters":[{"name":"company_override_id","in":"path","description":"company_override_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entitlements_updateCompanyOverride_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCompanyOverrideRequestBody"}}}}},"delete":{"operationId":"delete-company-override","summary":"Delete company override","tags":["entitlements"],"parameters":[{"name":"company_override_id","in":"path","description":"company_override_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entitlements_deleteCompanyOverride_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/plan-entitlements":{"get":{"operationId":"list-plan-entitlements","summary":"List plan entitlements","tags":["entitlements"],"parameters":[{"name":"feature_id","in":"query","description":"Filter plan entitlements by a single feature ID (starting with feat_)","required":false,"schema":{"type":"string"}},{"name":"feature_ids","in":"query","description":"Filter plan entitlements by multiple feature IDs (starting with feat_)","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"ids","in":"query","description":"Filter plan entitlements by multiple plan entitlement IDs (starting with pltl_)","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"plan_id","in":"query","description":"Filter plan entitlements by a single plan ID (starting with plan_)","required":false,"schema":{"type":"string"}},{"name":"plan_ids","in":"query","description":"Filter plan entitlements by multiple plan IDs (starting with plan_)","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"plan_version_id","in":"query","description":"Filter plan entitlements by a single plan version ID (starting with plvr_)","required":false,"schema":{"type":"string"}},{"name":"plan_version_ids","in":"query","description":"Filter plan entitlements by multiple plan version IDs (starting with plvr_)","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"q","in":"query","description":"Search for plan entitlements by feature or company name","required":false,"schema":{"type":"string"}},{"name":"with_metered_products","in":"query","description":"Filter plan entitlements only with metered products","required":false,"schema":{"type":"boolean"}},{"name":"limit","in":"query","description":"Page limit (default 100)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","description":"Page offset (default 0)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entitlements_listPlanEntitlements_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"create-plan-entitlement","summary":"Create plan entitlement","tags":["entitlements"],"parameters":[{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entitlements_createPlanEntitlement_Response_201"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePlanEntitlementRequestBody"}}}}}},"/plan-entitlements/{plan_entitlement_id}":{"get":{"operationId":"get-plan-entitlement","summary":"Get plan entitlement","tags":["entitlements"],"parameters":[{"name":"plan_entitlement_id","in":"path","description":"plan_entitlement_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entitlements_getPlanEntitlement_Response_200"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"operationId":"update-plan-entitlement","summary":"Update plan entitlement","tags":["entitlements"],"parameters":[{"name":"plan_entitlement_id","in":"path","description":"plan_entitlement_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entitlements_updatePlanEntitlement_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePlanEntitlementRequestBody"}}}}},"delete":{"operationId":"delete-plan-entitlement","summary":"Delete plan entitlement","tags":["entitlements"],"parameters":[{"name":"plan_entitlement_id","in":"path","description":"plan_entitlement_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entitlements_deletePlanEntitlement_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/feature-usage":{"get":{"operationId":"list-feature-usage","summary":"List feature usage","tags":["entitlements"],"parameters":[{"name":"company_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"company_keys","in":"query","required":false,"schema":{"type":"object","additionalProperties":{"type":"string"}}},{"name":"feature_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"include_usage_aggregation","in":"query","description":"Include time-bucketed usage aggregation (today, this week, this month, billing period) for credit-based entitlements. Defaults to false for performance.","required":false,"schema":{"type":"boolean"}},{"name":"managed_by","in":"query","description":"Filter for features managed by a billing provider, or by Schematic (no billing provider)","required":false,"schema":{"$ref":"#/components/schemas/BillingProviderType"}},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"without_negative_entitlements","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"limit","in":"query","description":"Page limit (default 100)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","description":"Page offset (default 0)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/entitlements_listFeatureUsage_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/billing/credits":{"get":{"operationId":"list-billing-credits","summary":"List credits","tags":["credits"],"parameters":[{"name":"ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"name","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Page limit (default 100)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","description":"Page offset (default 0)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/credits_listBillingCredits_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"create-billing-credit","summary":"Create credit","tags":["credits"],"parameters":[{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/credits_createBillingCredit_Response_201"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBillingCreditRequestBody"}}}}}},"/billing/credits/{credit_id}":{"get":{"operationId":"get-single-billing-credit","summary":"Get credit","tags":["credits"],"parameters":[{"name":"credit_id","in":"path","description":"credit_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/credits_getSingleBillingCredit_Response_200"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"operationId":"update-billing-credit","summary":"Update credit","tags":["credits"],"parameters":[{"name":"credit_id","in":"path","description":"credit_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/credits_updateBillingCredit_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBillingCreditRequestBody"}}}}},"delete":{"operationId":"soft-delete-billing-credit","summary":"Delete credit","tags":["credits"],"parameters":[{"name":"credit_id","in":"path","description":"credit_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/credits_softDeleteBillingCredit_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/billing/credits/bundles":{"get":{"operationId":"list-credit-bundles","summary":"List credit bundles","tags":["credits"],"parameters":[{"name":"ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"credit_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/BillingCreditBundleStatus"}},{"name":"bundle_type","in":"query","required":false,"schema":{"$ref":"#/components/schemas/BillingCreditBundleType"}},{"name":"limit","in":"query","description":"Page limit (default 100)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","description":"Page offset (default 0)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/credits_listCreditBundles_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"create-credit-bundle","summary":"Create credit bundle","tags":["credits"],"parameters":[{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/credits_createCreditBundle_Response_201"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCreditBundleRequestBody"}}}}}},"/billing/credits/bundles/{bundle_id}":{"get":{"operationId":"get-credit-bundle","summary":"Get credit bundle","tags":["credits"],"parameters":[{"name":"bundle_id","in":"path","description":"bundle_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/credits_getCreditBundle_Response_200"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"put":{"operationId":"update-credit-bundle-details","summary":"Update credit bundle","tags":["credits"],"parameters":[{"name":"bundle_id","in":"path","description":"bundle_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/credits_updateCreditBundleDetails_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCreditBundleDetailsRequestBody"}}}}},"delete":{"operationId":"delete-credit-bundle","summary":"Delete credit bundle","tags":["credits"],"parameters":[{"name":"bundle_id","in":"path","description":"bundle_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/credits_deleteCreditBundle_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/billing/credits/grants/company":{"post":{"operationId":"grant-billing-credits-to-company","summary":"Grant credits to company","tags":["credits"],"parameters":[{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/credits_grantBillingCreditsToCompany_Response_201"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCompanyCreditGrant"}}}}}},"/billing/credits/grants/company/list":{"get":{"operationId":"list-company-grants","summary":"List company credit grants","tags":["credits"],"parameters":[{"name":"company_id","in":"query","required":true,"schema":{"type":"string"}},{"name":"order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/CreditGrantSortOrder"}},{"name":"dir","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortDirection"}},{"name":"limit","in":"query","description":"Page limit (default 100)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","description":"Page offset (default 0)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/credits_listCompanyGrants_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/billing/credits/grants/list":{"get":{"operationId":"list-grants-for-credit","summary":"List credit grants","tags":["credits"],"parameters":[{"name":"credit_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"limit","in":"query","description":"Page limit (default 100)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","description":"Page offset (default 0)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/credits_listGrantsForCredit_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/billing/credits/grants/{grant_id}/zero-out":{"put":{"operationId":"zero-out-grant","summary":"Zero out credit grant","tags":["credits"],"parameters":[{"name":"grant_id","in":"path","description":"grant_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/credits_zeroOutGrant_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZeroOutGrantRequestBody"}}}}}},"/billing/credits/plan-grants":{"get":{"operationId":"list-billing-plan-credit-grants","summary":"List plan credit grants","tags":["credits"],"parameters":[{"name":"credit_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"plan_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"plan_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"plan_version_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"plan_version_ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"limit","in":"query","description":"Page limit (default 100)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","description":"Page offset (default 0)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/credits_listBillingPlanCreditGrants_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"post":{"operationId":"create-billing-plan-credit-grant","summary":"Create plan credit grant","tags":["credits"],"parameters":[{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/credits_createBillingPlanCreditGrant_Response_201"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBillingPlanCreditGrantRequestBody"}}}}}},"/billing/credits/plan-grants/{plan_grant_id}":{"delete":{"operationId":"delete-billing-plan-credit-grant","summary":"Delete plan credit grant","tags":["credits"],"parameters":[{"name":"plan_grant_id","in":"path","description":"plan_grant_id","required":true,"schema":{"type":"string"}},{"name":"apply_to_existing","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/credits_deleteBillingPlanCreditGrant_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/billing/credits/ledger":{"get":{"operationId":"get-credit-ledger","summary":"Get credit ledger","tags":[""],"parameters":[{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response"}}}},"/account-members":{"get":{"operationId":"list-account-members","summary":"List account members","tags":["accounts"],"parameters":[{"name":"ids","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"q","in":"query","description":"Search filter","required":false,"schema":{"type":"string"}},{"name":"role","in":"query","description":"Filter by member role","required":false,"schema":{"$ref":"#/components/schemas/AccountMemberRole"}},{"name":"limit","in":"query","description":"Page limit (default 100)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"offset","in":"query","description":"Page offset (default 0)","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounts_listAccountMembers_Response_200"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/account-members/{account_member_id}":{"get":{"operationId":"get-account-member","summary":"Get account member","tags":["accounts"],"parameters":[{"name":"account_member_id","in":"path","description":"account_member_id","required":true,"schema":{"type":"string"}},{"name":"X-Schematic-Api-Key","in":"header","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/accounts_getAccountMember_Response_200"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}},"servers":[{"url":"https://api.schematichq.com","description":"https://api.schematichq.com"}],"components":{"schemas":{"EnvironmentType":{"type":"string","enum":["development","production","staging"],"title":"EnvironmentType"},"EnvironmentResponseData":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"environment_type":{"$ref":"#/components/schemas/EnvironmentType"},"id":{"type":"string"},"name":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}},"required":["created_at","environment_type","id","name","updated_at"],"title":"EnvironmentResponseData"},"IntegrationState":{"type":"string","enum":["active","created","pending"],"title":"IntegrationState"},"IntegrationType":{"type":"string","enum":["clerk","metronome","orb","stripe","unknown","workos"],"title":"IntegrationType"},"ApiKeyIntegrationResponseData":{"type":"object","properties":{"id":{"type":"string"},"state":{"$ref":"#/components/schemas/IntegrationState"},"type":{"$ref":"#/components/schemas/IntegrationType"}},"required":["id","state","type"],"title":"ApiKeyIntegrationResponseData"},"ApiKeyScope":{"type":"string","enum":["admin","capture","read","write"],"title":"ApiKeyScope"},"ApiKeyResponseData":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"description":{"type":["string","null"]},"environment":{"$ref":"#/components/schemas/EnvironmentResponseData"},"environment_id":{"type":["string","null"]},"id":{"type":"string"},"integration":{"$ref":"#/components/schemas/ApiKeyIntegrationResponseData"},"last_used_at":{"type":["string","null"],"format":"date-time"},"name":{"type":"string"},"rate_limit_percent":{"type":["integer","null"],"format":"int64"},"readonly":{"type":"boolean"},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyScope"}},"updated_at":{"type":"string","format":"date-time"}},"required":["created_at","id","name","readonly","scopes","updated_at"],"title":"ApiKeyResponseData"},"ApiKeysGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{"environment_id":{"type":"string"},"limit":{"type":"integer","format":"int64","description":"Page limit (default 100)"},"offset":{"type":"integer","format":"int64","description":"Page offset (default 0)"},"require_environment":{"type":"boolean"}},"description":"Input parameters","title":"ApiKeysGetResponsesContentApplicationJsonSchemaParams"},"accounts_listApiKeys_Response_200":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyResponseData"}},"params":{"$ref":"#/components/schemas/ApiKeysGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"accounts_listApiKeys_Response_200"},"ApiError":{"type":"object","properties":{"error":{"type":"string","description":"Error message"}},"required":["error"],"title":"ApiError"},"ApiKeysApiKeyIdGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"ApiKeysApiKeyIdGetResponsesContentApplicationJsonSchemaParams"},"accounts_getApiKey_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiKeyResponseData"},"params":{"$ref":"#/components/schemas/ApiKeysApiKeyIdGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"accounts_getApiKey_Response_200"},"CreateApiKeyRequestBody":{"type":"object","properties":{"description":{"type":["string","null"]},"environment_id":{"type":["string","null"]},"name":{"type":"string"},"rate_limit_percent":{"type":["integer","null"],"format":"int64"},"readonly":{"type":["boolean","null"]}},"required":["name"],"title":"CreateApiKeyRequestBody"},"ApiKeyCreateResponseData":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"description":{"type":["string","null"]},"environment":{"$ref":"#/components/schemas/EnvironmentResponseData"},"environment_id":{"type":["string","null"]},"id":{"type":"string"},"integration":{"$ref":"#/components/schemas/ApiKeyIntegrationResponseData"},"last_used_at":{"type":["string","null"],"format":"date-time"},"name":{"type":"string"},"rate_limit_percent":{"type":["integer","null"],"format":"int64"},"readonly":{"type":"boolean"},"scopes":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyScope"}},"secret":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}},"required":["created_at","id","name","readonly","scopes","secret","updated_at"],"title":"ApiKeyCreateResponseData"},"ApiKeysPostResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"ApiKeysPostResponsesContentApplicationJsonSchemaParams"},"accounts_createApiKey_Response_201":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiKeyCreateResponseData"},"params":{"$ref":"#/components/schemas/ApiKeysPostResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"accounts_createApiKey_Response_201"},"UpdateApiKeyRequestBody":{"type":"object","properties":{"description":{"type":["string","null"]},"name":{"type":["string","null"]},"rate_limit_percent":{"type":["integer","null"],"format":"int64"}},"title":"UpdateApiKeyRequestBody"},"ApiKeysApiKeyIdPutResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"ApiKeysApiKeyIdPutResponsesContentApplicationJsonSchemaParams"},"accounts_updateApiKey_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/ApiKeyResponseData"},"params":{"$ref":"#/components/schemas/ApiKeysApiKeyIdPutResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"accounts_updateApiKey_Response_200"},"DeleteResponse":{"type":"object","properties":{"deleted":{"type":"boolean","description":"Whether the delete was successful"}},"title":"DeleteResponse"},"ApiKeysApiKeyIdDeleteResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"ApiKeysApiKeyIdDeleteResponsesContentApplicationJsonSchemaParams"},"accounts_deleteApiKey_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeleteResponse"},"params":{"$ref":"#/components/schemas/ApiKeysApiKeyIdDeleteResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"accounts_deleteApiKey_Response_200"},"CreateEnvironmentRequestBody":{"type":"object","properties":{"environment_type":{"$ref":"#/components/schemas/EnvironmentType"},"name":{"type":"string"}},"required":["environment_type","name"],"title":"CreateEnvironmentRequestBody"},"EnvironmentDetailResponseData":{"type":"object","properties":{"api_keys":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyResponseData"}},"created_at":{"type":"string","format":"date-time"},"environment_type":{"$ref":"#/components/schemas/EnvironmentType"},"id":{"type":"string"},"name":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}},"required":["api_keys","created_at","environment_type","id","name","updated_at"],"title":"EnvironmentDetailResponseData"},"EnvironmentsPostResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"EnvironmentsPostResponsesContentApplicationJsonSchemaParams"},"accounts_createEnvironment_Response_201":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EnvironmentDetailResponseData"},"params":{"$ref":"#/components/schemas/EnvironmentsPostResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"accounts_createEnvironment_Response_201"},"UpdateEnvironmentRequestBody":{"type":"object","properties":{"environment_type":{"oneOf":[{"$ref":"#/components/schemas/EnvironmentType"},{"type":"null"}]},"name":{"type":["string","null"]}},"title":"UpdateEnvironmentRequestBody"},"EnvironmentsEnvironmentIdPutResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"EnvironmentsEnvironmentIdPutResponsesContentApplicationJsonSchemaParams"},"accounts_updateEnvironment_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EnvironmentResponseData"},"params":{"$ref":"#/components/schemas/EnvironmentsEnvironmentIdPutResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"accounts_updateEnvironment_Response_200"},"EnvironmentsEnvironmentIdDeleteResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"EnvironmentsEnvironmentIdDeleteResponsesContentApplicationJsonSchemaParams"},"accounts_deleteEnvironment_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeleteResponse"},"params":{"$ref":"#/components/schemas/EnvironmentsEnvironmentIdDeleteResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"accounts_deleteEnvironment_Response_200"},"PlanType":{"type":"string","enum":["plan","add_on"],"title":"PlanType"},"PlanIcon":{"type":"string","enum":["amber","blue","blueGray","blueGreen","cyan","emerald","fuchsia","gray","green","indigo","lightBlue","lime","orange","pink","purple","red","redOrange","rose","sky","slate","teal","trueGray","violet","warmGray","yellow"],"title":"PlanIcon"},"PlanVersionStatus":{"type":"string","enum":["published","draft","archived"],"title":"PlanVersionStatus"},"PlanVersionResponseData":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"description":{"type":"string"},"environment_id":{"type":"string"},"icon":{"$ref":"#/components/schemas/PlanIcon"},"id":{"type":"string"},"name":{"type":"string"},"original_plan_id":{"type":["string","null"]},"plan_type":{"$ref":"#/components/schemas/PlanType"},"status":{"$ref":"#/components/schemas/PlanVersionStatus"},"updated_at":{"type":"string","format":"date-time"},"version":{"type":"integer","format":"int64"}},"required":["created_at","description","environment_id","icon","id","name","plan_type","status","updated_at","version"],"title":"PlanVersionResponseData"},"BillingProviderType":{"type":"string","enum":["metronome","orb","schematic","stripe"],"title":"BillingProviderType"},"BillingLinkedResourceResponseData":{"type":"object","properties":{"billing_provider":{"$ref":"#/components/schemas/BillingProviderType"},"external_resource_id":{"type":"string"},"originator":{"$ref":"#/components/schemas/BillingProviderType"}},"required":["billing_provider","external_resource_id","originator"],"title":"BillingLinkedResourceResponseData"},"BillingProductPriceInterval":{"type":"string","enum":["day","month","one-time","year"],"title":"BillingProductPriceInterval"},"BillingPriceScheme":{"type":"string","enum":["per_unit","tiered"],"title":"BillingPriceScheme"},"BillingPriceResponseData":{"type":"object","properties":{"currency":{"type":"string"},"external_price_id":{"type":"string"},"id":{"type":"string"},"interval":{"$ref":"#/components/schemas/BillingProductPriceInterval"},"interval_count":{"type":"integer","format":"int64"},"nickname":{"type":["string","null"]},"price":{"type":"integer","format":"int64"},"price_decimal":{"type":["string","null"]},"provider_type":{"$ref":"#/components/schemas/BillingProviderType"},"scheme":{"$ref":"#/components/schemas/BillingPriceScheme"}},"required":["currency","external_price_id","id","interval","interval_count","price","provider_type","scheme"],"title":"BillingPriceResponseData"},"BillingProductDetailResponseData":{"type":"object","properties":{"account_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"currency":{"type":["string","null"],"description":"Deprecated; currencies are associated with prices, not products"},"environment_id":{"type":"string"},"external_id":{"type":"string"},"is_active":{"type":"boolean"},"name":{"type":"string"},"price":{"type":"number","format":"double"},"price_decimal":{"type":["string","null"]},"prices":{"type":"array","items":{"$ref":"#/components/schemas/BillingPriceResponseData"}},"product_id":{"type":"string"},"provider_type":{"$ref":"#/components/schemas/BillingProviderType"},"quantity":{"type":"number","format":"double"},"subscription_count":{"type":"integer","format":"int64"},"updated_at":{"type":"string","format":"date-time"}},"required":["account_id","created_at","environment_id","external_id","is_active","name","price","prices","product_id","provider_type","quantity","subscription_count","updated_at"],"title":"BillingProductDetailResponseData"},"BillingStrategy":{"type":"string","enum":["schematic_managed","provider_managed","no_billing"],"title":"BillingStrategy"},"PlanCatalogMembershipResponseData":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"title":"PlanCatalogMembershipResponseData"},"ChargeType":{"type":"string","enum":["free","none","one_time","recurring"],"title":"ChargeType"},"BillingCreditBurnStrategy":{"type":"string","enum":["expiration_priority","first_in_first_out","last_in_first_out","plan_first_then_credit_bundles_first_in_first_out"],"title":"BillingCreditBurnStrategy"},"CreditCurrencyPriceResponseData":{"type":"object","properties":{"currency":{"type":"string"},"price":{"$ref":"#/components/schemas/BillingPriceResponseData"}},"required":["currency"],"title":"CreditCurrencyPriceResponseData"},"BillingCreditExpiryUnit":{"type":"string","enum":["billing_periods","days"],"title":"BillingCreditExpiryUnit"},"BillingCreditRolloverPolicy":{"type":"string","enum":["expire","none","rollover"],"title":"BillingCreditRolloverPolicy"},"BillingProductResponseData":{"type":"object","properties":{"account_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"currency":{"type":["string","null"],"description":"Deprecated; currencies are associated with prices, not products"},"environment_id":{"type":"string"},"external_id":{"type":"string"},"is_active":{"type":"boolean"},"name":{"type":"string"},"price":{"type":"number","format":"double"},"price_decimal":{"type":["string","null"]},"product_id":{"type":"string"},"provider_type":{"$ref":"#/components/schemas/BillingProviderType"},"quantity":{"type":"number","format":"double"},"updated_at":{"type":"string","format":"date-time"}},"required":["account_id","created_at","environment_id","external_id","is_active","name","price","product_id","provider_type","quantity","updated_at"],"title":"BillingProductResponseData"},"BillingCreditResponseData":{"type":"object","properties":{"burn_strategy":{"$ref":"#/components/schemas/BillingCreditBurnStrategy"},"cost_editable":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"currency_prices":{"type":"array","items":{"$ref":"#/components/schemas/CreditCurrencyPriceResponseData"}},"default_expiry_unit":{"$ref":"#/components/schemas/BillingCreditExpiryUnit"},"default_expiry_unit_count":{"type":["integer","null"],"format":"int64"},"default_rollover_policy":{"$ref":"#/components/schemas/BillingCreditRolloverPolicy"},"description":{"type":"string"},"icon":{"type":["string","null"]},"id":{"type":"string"},"name":{"type":"string"},"plural_name":{"type":["string","null"]},"price":{"$ref":"#/components/schemas/BillingPriceResponseData"},"product":{"$ref":"#/components/schemas/BillingProductResponseData"},"singular_name":{"type":["string","null"]},"updated_at":{"type":"string","format":"date-time"}},"required":["burn_strategy","cost_editable","created_at","currency_prices","default_expiry_unit","default_rollover_policy","description","id","name","updated_at"],"title":"BillingCreditResponseData"},"PlanCurrencyPricesResponseData":{"type":"object","properties":{"currency":{"type":"string"},"monthly_price":{"$ref":"#/components/schemas/BillingPriceResponseData"},"one_time_price":{"$ref":"#/components/schemas/BillingPriceResponseData"},"quarterly_price":{"$ref":"#/components/schemas/BillingPriceResponseData"},"yearly_price":{"$ref":"#/components/schemas/BillingPriceResponseData"}},"required":["currency"],"title":"PlanCurrencyPricesResponseData"},"BillingProductPriceTierResponseData":{"type":"object","properties":{"flat_amount":{"type":["integer","null"],"format":"int64"},"per_unit_price":{"type":["integer","null"],"format":"int64"},"per_unit_price_decimal":{"type":["string","null"]},"up_to":{"type":["integer","null"],"format":"int64"}},"title":"BillingProductPriceTierResponseData"},"BillingTiersMode":{"type":"string","enum":["graduated","volume"],"title":"BillingTiersMode"},"BillingPriceUsageType":{"type":"string","enum":["licensed","metered"],"title":"BillingPriceUsageType"},"BillingPriceView":{"type":"object","properties":{"billing_scheme":{"$ref":"#/components/schemas/BillingPriceScheme"},"created_at":{"type":"string","format":"date-time"},"currency":{"type":"string"},"id":{"type":"string"},"interval":{"$ref":"#/components/schemas/BillingProductPriceInterval"},"interval_count":{"type":"integer","format":"int64"},"is_active":{"type":"boolean"},"meter_event_name":{"type":["string","null"]},"meter_event_payload_key":{"type":["string","null"]},"meter_id":{"type":["string","null"]},"nickname":{"type":["string","null"]},"package_size":{"type":"integer","format":"int64"},"price":{"type":"integer","format":"int64"},"price_decimal":{"type":["string","null"]},"price_external_id":{"type":"string"},"price_id":{"type":"string"},"price_tier":{"type":"array","items":{"$ref":"#/components/schemas/BillingProductPriceTierResponseData"}},"product_external_id":{"type":"string"},"product_id":{"type":"string"},"product_name":{"type":"string"},"provider_type":{"$ref":"#/components/schemas/BillingProviderType"},"tiers_mode":{"oneOf":[{"$ref":"#/components/schemas/BillingTiersMode"},{"type":"null"}]},"updated_at":{"type":"string","format":"date-time"},"usage_type":{"$ref":"#/components/schemas/BillingPriceUsageType"}},"required":["billing_scheme","created_at","currency","id","interval","interval_count","is_active","package_size","price","price_external_id","price_id","price_tier","product_external_id","product_id","product_name","provider_type","updated_at","usage_type"],"title":"BillingPriceView"},"EntitlementCurrencyPricesResponseData":{"type":"object","properties":{"currency":{"type":"string"},"monthly_price":{"$ref":"#/components/schemas/BillingPriceView"},"quarterly_price":{"$ref":"#/components/schemas/BillingPriceView"},"yearly_price":{"$ref":"#/components/schemas/BillingPriceView"}},"required":["currency"],"title":"EntitlementCurrencyPricesResponseData"},"FeatureType":{"type":"string","enum":["boolean","event","license","trait"],"title":"FeatureType"},"FeatureLifecyclePhase":{"type":"string","enum":["add_on","alpha","beta","deprecated","ga","inactive","in_plan","internal_testing","legacy"],"title":"FeatureLifecyclePhase"},"FeatureResponseData":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"description":{"type":"string"},"event_subtype":{"type":["string","null"]},"feature_type":{"$ref":"#/components/schemas/FeatureType"},"icon":{"type":"string"},"id":{"type":"string"},"license_id":{"type":["string","null"],"description":"The license sold through this feature. Set only on features of type license, and created automatically with them."},"lifecycle_phase":{"oneOf":[{"$ref":"#/components/schemas/FeatureLifecyclePhase"},{"type":"null"}]},"maintainer_account_member_id":{"type":["string","null"]},"name":{"type":"string"},"plural_name":{"type":["string","null"]},"singular_name":{"type":["string","null"]},"trait_id":{"type":["string","null"]},"updated_at":{"type":"string","format":"date-time"},"usage_limit_trait_id":{"type":["string","null"],"description":"Set when the feature carries a pay-in-advance quantity. Provisioned lazily for other feature types, and at creation for license features."}},"required":["created_at","description","feature_type","icon","id","name","updated_at"],"title":"FeatureResponseData"},"MetricPeriod":{"type":"string","enum":["all_time","current_day","current_month","current_week"],"title":"MetricPeriod"},"MetricPeriodMonthReset":{"type":"string","enum":["billing_cycle","first_of_month"],"title":"MetricPeriodMonthReset"},"PlanResponseData":{"type":"object","properties":{"audience_type":{"type":["string","null"]},"company_id":{"type":["string","null"]},"copied_from_plan_id":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"description":{"type":"string"},"icon":{"$ref":"#/components/schemas/PlanIcon"},"id":{"type":"string"},"name":{"type":"string"},"plan_type":{"$ref":"#/components/schemas/PlanType"},"updated_at":{"type":"string","format":"date-time"}},"required":["created_at","description","icon","id","name","plan_type","updated_at"],"title":"PlanResponseData"},"EntitlementPriceBehavior":{"type":"string","enum":["credit_burndown","overage","pay_as_you_go","pay_in_advance","tier"],"title":"EntitlementPriceBehavior"},"EntityType":{"type":"string","enum":["company","user"],"title":"EntityType"},"TraitType":{"type":"string","enum":["boolean","currency","date","number","string","url"],"title":"TraitType"},"EntityTraitDefinitionResponseData":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"display_name":{"type":"string"},"entity_type":{"$ref":"#/components/schemas/EntityType"},"hierarchy":{"type":"array","items":{"type":"string"}},"id":{"type":"string"},"trait_type":{"$ref":"#/components/schemas/TraitType"},"updated_at":{"type":"string","format":"date-time"}},"required":["created_at","display_name","entity_type","hierarchy","id","trait_type","updated_at"],"title":"EntityTraitDefinitionResponseData"},"EntitlementValueType":{"type":"string","enum":["boolean","credit","numeric","trait","unknown","unlimited"],"title":"EntitlementValueType"},"WarningTierResponseData":{"type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"value":{"type":"integer","format":"int64"}},"required":["id","key","value"],"title":"WarningTierResponseData"},"PlanEntitlementResponseData":{"type":"object","properties":{"billing_linked_resource":{"$ref":"#/components/schemas/BillingLinkedResourceResponseData"},"billing_threshold":{"type":["integer","null"],"format":"int64"},"consumption_rate":{"type":["number","null"],"format":"double"},"created_at":{"type":"string","format":"date-time"},"currency_prices":{"type":"array","items":{"$ref":"#/components/schemas/EntitlementCurrencyPricesResponseData"}},"environment_id":{"type":"string"},"feature":{"$ref":"#/components/schemas/FeatureResponseData"},"feature_id":{"type":"string"},"id":{"type":"string"},"metered_monthly_price":{"$ref":"#/components/schemas/BillingPriceView"},"metered_quarterly_price":{"$ref":"#/components/schemas/BillingPriceView"},"metered_yearly_price":{"$ref":"#/components/schemas/BillingPriceView"},"metric_period":{"oneOf":[{"$ref":"#/components/schemas/MetricPeriod"},{"type":"null"}]},"metric_period_month_reset":{"oneOf":[{"$ref":"#/components/schemas/MetricPeriodMonthReset"},{"type":"null"}]},"plan":{"$ref":"#/components/schemas/PlanResponseData"},"plan_id":{"type":"string"},"price_behavior":{"oneOf":[{"$ref":"#/components/schemas/EntitlementPriceBehavior"},{"type":"null"}]},"rule_id":{"type":"string"},"rule_id_usage_exceeded":{"type":["string","null"]},"soft_limit":{"type":["integer","null"],"format":"int64"},"updated_at":{"type":"string","format":"date-time"},"usage_based_product":{"$ref":"#/components/schemas/BillingProductResponseData"},"usage_quantity":{"type":["integer","null"],"format":"int64","description":"The committed unit quantity for this entitlement. For custom plans this is the quantity the company is contractually committed to; for standard plans it is the quantity pre-filled when subscribing. Only applies to pay-in-advance entitlements. Note: this is not yet enforced/auto-provisioned as a true default — it is currently stored for downstream billing use."},"value_bool":{"type":["boolean","null"]},"value_credit":{"$ref":"#/components/schemas/BillingCreditResponseData"},"value_numeric":{"type":["integer","null"],"format":"int64"},"value_trait":{"$ref":"#/components/schemas/EntityTraitDefinitionResponseData"},"value_trait_id":{"type":["string","null"]},"value_type":{"$ref":"#/components/schemas/EntitlementValueType"},"warning_tiers":{"type":"array","items":{"$ref":"#/components/schemas/WarningTierResponseData"}}},"required":["created_at","currency_prices","environment_id","feature_id","id","plan_id","rule_id","updated_at","value_type","warning_tiers"],"title":"PlanEntitlementResponseData"},"EventSummaryResponseData":{"type":"object","properties":{"company_count":{"type":"integer","format":"int64"},"environment_id":{"type":"string"},"event_count":{"type":"integer","format":"int64"},"event_subtype":{"type":"string"},"last_seen_at":{"type":["string","null"],"format":"date-time"},"user_count":{"type":"integer","format":"int64"}},"required":["company_count","environment_id","event_count","event_subtype","user_count"],"title":"EventSummaryResponseData"},"FlagType":{"type":"string","enum":["boolean"],"title":"FlagType"},"ConditionType":{"type":"string","enum":["base_plan","billing_product","company","credit","metric","plan","plan_version","trait","user"],"title":"ConditionType"},"ComparableOperator":{"type":"string","enum":["eq","gt","gte","is_empty","lt","lte","not_empty","ne"],"title":"ComparableOperator"},"PreviewObjectResponseData":{"type":"object","properties":{"description":{"type":["string","null"]},"id":{"type":"string"},"image_url":{"type":["string","null"]},"name":{"type":"string"}},"required":["id","name"],"title":"PreviewObjectResponseData"},"RuleConditionDetailResponseData":{"type":"object","properties":{"comparison_trait":{"$ref":"#/components/schemas/EntityTraitDefinitionResponseData"},"comparison_trait_id":{"type":["string","null"]},"condition_group_id":{"type":["string","null"]},"condition_type":{"$ref":"#/components/schemas/ConditionType"},"created_at":{"type":"string","format":"date-time"},"environment_id":{"type":"string"},"event_subtype":{"type":["string","null"]},"flag_id":{"type":["string","null"]},"id":{"type":"string"},"metric_period":{"oneOf":[{"$ref":"#/components/schemas/MetricPeriod"},{"type":"null"}]},"metric_period_month_reset":{"oneOf":[{"$ref":"#/components/schemas/MetricPeriodMonthReset"},{"type":"null"}]},"metric_value":{"type":["integer","null"],"format":"int64"},"operator":{"$ref":"#/components/schemas/ComparableOperator"},"resource_ids":{"type":"array","items":{"type":"string"}},"resources":{"type":"array","items":{"$ref":"#/components/schemas/PreviewObjectResponseData"}},"rule_id":{"type":"string"},"trait":{"$ref":"#/components/schemas/EntityTraitDefinitionResponseData"},"trait_entity_type":{"oneOf":[{"$ref":"#/components/schemas/EntityType"},{"type":"null"}]},"trait_id":{"type":["string","null"]},"trait_value":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}},"required":["condition_type","created_at","environment_id","id","operator","resource_ids","resources","rule_id","trait_value","updated_at"],"title":"RuleConditionDetailResponseData"},"RuleConditionGroupDetailResponseData":{"type":"object","properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/RuleConditionDetailResponseData"}},"created_at":{"type":"string","format":"date-time"},"environment_id":{"type":"string"},"flag_id":{"type":["string","null"]},"id":{"type":"string"},"rule_id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}},"required":["conditions","created_at","environment_id","id","rule_id","updated_at"],"title":"RuleConditionGroupDetailResponseData"},"RuleType":{"type":"string","enum":["company_override","company_override_usage_exceeded","default","global_override","plan_entitlement","plan_entitlement_usage_exceeded","standard"],"title":"RuleType"},"RuleDetailResponseData":{"type":"object","properties":{"condition_groups":{"type":"array","items":{"$ref":"#/components/schemas/RuleConditionGroupDetailResponseData"}},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/RuleConditionDetailResponseData"}},"created_at":{"type":"string","format":"date-time"},"environment_id":{"type":"string"},"flag_id":{"type":["string","null"]},"id":{"type":"string"},"name":{"type":"string"},"priority":{"type":"integer","format":"int64"},"rule_type":{"$ref":"#/components/schemas/RuleType"},"updated_at":{"type":"string","format":"date-time"},"value":{"type":"boolean"}},"required":["condition_groups","conditions","created_at","environment_id","id","name","priority","rule_type","updated_at","value"],"title":"RuleDetailResponseData"},"FlagInPlanResponseData":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"default_value":{"type":"boolean"},"description":{"type":"string"},"feature":{"$ref":"#/components/schemas/FeatureResponseData"},"feature_id":{"type":["string","null"]},"flag_type":{"$ref":"#/components/schemas/FlagType"},"id":{"type":"string"},"key":{"type":"string"},"last_checked_at":{"type":["string","null"],"format":"date-time"},"maintainer_account_member_id":{"type":["string","null"]},"name":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/RuleDetailResponseData"}},"updated_at":{"type":"string","format":"date-time"}},"required":["created_at","default_value","description","flag_type","id","key","name","rules","updated_at"],"title":"FlagInPlanResponseData"},"PreviewObject":{"type":"object","properties":{"description":{"type":["string","null"]},"id":{"type":"string"},"image_url":{"type":["string","null"]},"name":{"type":"string"}},"required":["id","name"],"title":"PreviewObject"},"FeatureInPlanResponseData":{"type":"object","properties":{"billing_linked_resource":{"$ref":"#/components/schemas/BillingLinkedResourceResponseData"},"created_at":{"type":"string","format":"date-time"},"description":{"type":"string"},"event_subtype":{"type":["string","null"]},"event_summary":{"$ref":"#/components/schemas/EventSummaryResponseData"},"feature_type":{"$ref":"#/components/schemas/FeatureType"},"flags":{"type":"array","items":{"$ref":"#/components/schemas/FlagInPlanResponseData"}},"icon":{"type":"string"},"id":{"type":"string"},"license_id":{"type":["string","null"],"description":"The license sold through this feature. Set only on features of type license, and created automatically with them."},"lifecycle_phase":{"oneOf":[{"$ref":"#/components/schemas/FeatureLifecyclePhase"},{"type":"null"}]},"maintainer_account_member_id":{"type":["string","null"]},"name":{"type":"string"},"plans":{"type":"array","items":{"$ref":"#/components/schemas/PreviewObject"}},"plural_name":{"type":["string","null"]},"singular_name":{"type":["string","null"]},"trait":{"$ref":"#/components/schemas/EntityTraitDefinitionResponseData"},"trait_id":{"type":["string","null"]},"updated_at":{"type":"string","format":"date-time"},"usage_limit_trait_id":{"type":["string","null"],"description":"Set when the feature carries a pay-in-advance quantity. Provisioned lazily for other feature types, and at creation for license features."}},"required":["created_at","description","feature_type","flags","icon","id","name","plans","updated_at"],"title":"FeatureInPlanResponseData"},"BillingCreditAutoTopupAvailability":{"type":"string","enum":["off","automatic","user_controlled"],"title":"BillingCreditAutoTopupAvailability"},"BillingCreditExpiryType":{"type":"string","enum":["duration","end_of_billing_period","end_of_next_billing_period","end_of_trial","no_expiry"],"title":"BillingCreditExpiryType"},"BillingPlanCreditGrantResetCadence":{"type":"string","enum":["daily","every_6_months","monthly","quarterly","weekly","yearly"],"title":"BillingPlanCreditGrantResetCadence"},"BillingPlanCreditGrantResetStart":{"type":"string","enum":["billing_period","first_of_month"],"title":"BillingPlanCreditGrantResetStart"},"BillingPlanCreditGrantResetType":{"type":"string","enum":["no_reset","plan_period"],"title":"BillingPlanCreditGrantResetType"},"PlanCreditGrantScaling":{"type":"string","enum":["fixed","per_license"],"title":"PlanCreditGrantScaling"},"BillingPlanCreditGrantResponseData":{"type":"object","properties":{"auto_topup_amount":{"type":["integer","null"],"format":"int64"},"auto_topup_amount_type":{"type":["string","null"]},"auto_topup_availability":{"$ref":"#/components/schemas/BillingCreditAutoTopupAvailability"},"auto_topup_enabled":{"type":"boolean","description":"Derived from auto_topup_availability; use that instead."},"auto_topup_expiry_type":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditExpiryType"},{"type":"null"}]},"auto_topup_expiry_unit":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditExpiryUnit"},{"type":"null"}]},"auto_topup_expiry_unit_count":{"type":["integer","null"],"format":"int64"},"auto_topup_self_service":{"type":"boolean","description":"Derived from auto_topup_availability; use that instead."},"auto_topup_threshold_credits":{"type":["integer","null"],"format":"int64"},"auto_topup_threshold_percent":{"type":["integer","null"],"format":"int64"},"can_buy_bundles":{"type":"boolean","description":"Deprecated: bundle availability is a per-bundle plan compatibility set now; use compatible_plan_ids on credit bundles instead."},"company_credit_amount":{"type":"integer","format":"int64","description":"Credits granted once per company on top of the per-license amount. Always 0 when scaling is fixed."},"created_at":{"type":"string","format":"date-time"},"credit":{"$ref":"#/components/schemas/BillingCreditResponseData"},"credit_amount":{"type":"integer","format":"int64"},"credit_id":{"type":"string"},"credit_name":{"type":"string","description":"Use credit.name from the nested credit object instead"},"credit_plural_name":{"type":["string","null"],"description":"Use plural_name from the nested credit object instead"},"credit_singular_name":{"type":["string","null"],"description":"Use singular_name from the nested credit object instead"},"expiry_type":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditExpiryType"},{"type":"null"}]},"expiry_unit":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditExpiryUnit"},{"type":"null"}]},"expiry_unit_count":{"type":["integer","null"],"format":"int64"},"id":{"type":"string"},"license_id":{"type":["string","null"],"description":"The license whose quantity scales this grant. Set only when scaling is per_license."},"plan":{"$ref":"#/components/schemas/PreviewObjectResponseData"},"plan_id":{"type":"string"},"plan_name":{"type":"string","description":"Use plan.name from the nested plan object instead"},"plan_version_id":{"type":["string","null"]},"reset_cadence":{"oneOf":[{"$ref":"#/components/schemas/BillingPlanCreditGrantResetCadence"},{"type":"null"}]},"reset_start":{"oneOf":[{"$ref":"#/components/schemas/BillingPlanCreditGrantResetStart"},{"type":"null"}]},"reset_type":{"oneOf":[{"$ref":"#/components/schemas/BillingPlanCreditGrantResetType"},{"type":"null"}]},"rollover_percentage":{"type":"integer","format":"int64","description":"Percentage of unused credits that carry over when this grant resets. Only meaningful when reset_type is plan_period."},"scaling":{"$ref":"#/components/schemas/PlanCreditGrantScaling","description":"Whether the grant is a fixed amount per company, or issued once per license the company holds."},"updated_at":{"type":"string","format":"date-time"}},"required":["auto_topup_availability","auto_topup_enabled","auto_topup_self_service","can_buy_bundles","company_credit_amount","created_at","credit_amount","credit_id","credit_name","id","plan_id","plan_name","rollover_percentage","scaling","updated_at"],"title":"BillingPlanCreditGrantResponseData"},"PlanDetailResponseData":{"type":"object","properties":{"active_version":{"$ref":"#/components/schemas/PlanVersionResponseData"},"audience_type":{"type":["string","null"]},"billing_linked_resource":{"$ref":"#/components/schemas/BillingLinkedResourceResponseData"},"billing_product":{"$ref":"#/components/schemas/BillingProductDetailResponseData"},"billing_strategy":{"$ref":"#/components/schemas/BillingStrategy"},"catalogs":{"type":"array","items":{"$ref":"#/components/schemas/PlanCatalogMembershipResponseData"}},"charge_type":{"$ref":"#/components/schemas/ChargeType"},"company_count":{"type":"integer","format":"int64"},"company_id":{"type":["string","null"]},"company_logo_url":{"type":["string","null"]},"company_name":{"type":["string","null"]},"controlled_by":{"$ref":"#/components/schemas/BillingProviderType"},"copied_from_plan_id":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"credits":{"type":"array","items":{"$ref":"#/components/schemas/BillingCreditResponseData"}},"currency_prices":{"type":"array","items":{"$ref":"#/components/schemas/PlanCurrencyPricesResponseData"}},"description":{"type":"string"},"draft_version":{"$ref":"#/components/schemas/PlanVersionResponseData"},"entitlements":{"type":["array","null"],"items":{"$ref":"#/components/schemas/PlanEntitlementResponseData"}},"features":{"type":"array","items":{"$ref":"#/components/schemas/FeatureInPlanResponseData"}},"icon":{"$ref":"#/components/schemas/PlanIcon"},"id":{"type":"string"},"included_credit_grants":{"type":"array","items":{"$ref":"#/components/schemas/BillingPlanCreditGrantResponseData"}},"is_default":{"type":"boolean"},"is_free":{"type":["boolean","null"],"description":"Deprecated: reports the plan's charge type, not its price. Read the plan's prices to tell whether it costs anything, or billing_strategy to tell how it is billed."},"is_trialable":{"type":"boolean"},"monthly_price":{"$ref":"#/components/schemas/BillingPriceResponseData"},"name":{"type":"string"},"one_time_price":{"$ref":"#/components/schemas/BillingPriceResponseData"},"plan_type":{"$ref":"#/components/schemas/PlanType"},"quarterly_price":{"$ref":"#/components/schemas/BillingPriceResponseData"},"trial_days":{"type":["integer","null"],"format":"int64"},"updated_at":{"type":"string","format":"date-time"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/PlanVersionResponseData"}},"yearly_price":{"$ref":"#/components/schemas/BillingPriceResponseData"}},"required":["billing_strategy","charge_type","company_count","controlled_by","created_at","credits","currency_prices","description","features","icon","id","is_default","is_trialable","name","plan_type","updated_at","versions"],"title":"PlanDetailResponseData"},"PlansGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{"company_id":{"type":"string"},"company_scoped_only":{"type":"boolean","description":"Only return plans that are scoped to a company (custom plans assigned to a company)"},"exclude_company_scoped":{"type":"boolean","description":"Exclude plans that are scoped to a company (custom plans assigned to a company)"},"for_fallback_plan":{"type":"boolean","description":"Filter for plans valid as fallback plans (not linked to billing)"},"for_initial_plan":{"type":"boolean","description":"Filter for plans valid as initial plans (not linked to billing, free, or auto-cancelling trial)"},"for_trial_expiry_plan":{"type":"boolean","description":"Filter for plans valid as trial expiry plans (not linked to billing or free)"},"has_product_id":{"type":"boolean","description":"Filter out plans that do not have a billing product ID"},"ids":{"type":"array","items":{"type":"string"}},"include_draft_versions":{"type":"boolean","description":"Include billing settings from draft versions for plans which have draft version"},"limit":{"type":"integer","format":"int64","description":"Page limit (default 100)"},"offset":{"type":"integer","format":"int64","description":"Page offset (default 0)"},"plan_type":{"$ref":"#/components/schemas/PlanType","description":"Filter by plan type"},"q":{"type":"string"},"scoped_to_company_id":{"type":"string","description":"Filter plans scoped to a specific company (custom plans)"},"with_entitlements":{"type":"boolean","description":"Include each plan's entitlements in the response"},"without_entitlement_for":{"type":"string","description":"Filter out plans that already have a plan entitlement for the specified feature ID"},"without_paid_product_id":{"type":"boolean","description":"Filter out plans that have a paid billing product ID"}},"description":"Input parameters","title":"PlansGetResponsesContentApplicationJsonSchemaParams"},"plans_listPlans_Response_200":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PlanDetailResponseData"}},"params":{"$ref":"#/components/schemas/PlansGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"plans_listPlans_Response_200"},"PlansPlanIdGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{"plan_version_id":{"type":"string","description":"Fetch billing settings for a specific plan version"}},"description":"Input parameters","title":"PlansPlanIdGetResponsesContentApplicationJsonSchemaParams"},"plans_getPlan_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PlanDetailResponseData"},"params":{"$ref":"#/components/schemas/PlansPlanIdGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"plans_getPlan_Response_200"},"CreatePlanRequestBody":{"type":"object","properties":{"description":{"type":"string"},"icon":{"oneOf":[{"$ref":"#/components/schemas/PlanIcon"},{"type":"null"}]},"name":{"type":"string"},"plan_type":{"$ref":"#/components/schemas/PlanType"}},"required":["description","name","plan_type"],"title":"CreatePlanRequestBody"},"PlansPostResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"PlansPostResponsesContentApplicationJsonSchemaParams"},"plans_createPlan_Response_201":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PlanDetailResponseData"},"params":{"$ref":"#/components/schemas/PlansPostResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"plans_createPlan_Response_201"},"UpdatePlanRequestBody":{"type":"object","properties":{"description":{"type":["string","null"]},"icon":{"oneOf":[{"$ref":"#/components/schemas/PlanIcon"},{"type":"null"}]},"name":{"type":"string"}},"required":["name"],"title":"UpdatePlanRequestBody"},"PlansPlanIdPutResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"PlansPlanIdPutResponsesContentApplicationJsonSchemaParams"},"plans_updatePlan_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PlanDetailResponseData"},"params":{"$ref":"#/components/schemas/PlansPlanIdPutResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"plans_updatePlan_Response_200"},"PlansPlanIdDeleteResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"PlansPlanIdDeleteResponsesContentApplicationJsonSchemaParams"},"plans_deletePlan_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeleteResponse"},"params":{"$ref":"#/components/schemas/PlansPlanIdDeleteResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"plans_deletePlan_Response_200"},"SortDirection":{"type":"string","enum":["asc","desc"],"title":"SortDirection"},"SubscriptionStatus":{"type":"string","enum":["active","canceled","expired","incomplete","incomplete_expired","past_due","paused","trialing","unpaid"],"title":"SubscriptionStatus"},"SubscriptionType":{"type":"string","enum":["free","one_time","paid","trial"],"title":"SubscriptionType"},"CreditCurrencyPrice":{"type":"object","properties":{"currency":{"type":"string"},"price":{"$ref":"#/components/schemas/BillingPriceView"}},"required":["currency"],"title":"CreditCurrencyPrice"},"BillingCreditLedgerAuthority":{"type":"string","enum":["schematic_authoritative","external_mirror","external_rated"],"title":"BillingCreditLedgerAuthority"},"BillingProductRecordResponseData":{"type":"object","properties":{"account_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"environment_id":{"type":"string"},"external_id":{"type":"string"},"id":{"type":"string"},"is_active":{"type":"boolean"},"name":{"type":"string"},"provider_type":{"$ref":"#/components/schemas/BillingProviderType"},"updated_at":{"type":"string","format":"date-time"}},"required":["account_id","created_at","environment_id","external_id","id","is_active","name","provider_type","updated_at"],"title":"BillingProductRecordResponseData"},"BillingCreditView":{"type":"object","properties":{"account_id":{"type":"string"},"burn_strategy":{"$ref":"#/components/schemas/BillingCreditBurnStrategy"},"cost_editable":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"},"currency_prices":{"type":"array","items":{"$ref":"#/components/schemas/CreditCurrencyPrice"}},"default_expiry_unit":{"$ref":"#/components/schemas/BillingCreditExpiryUnit"},"default_expiry_unit_count":{"type":["integer","null"],"format":"int64"},"default_rollover_policy":{"$ref":"#/components/schemas/BillingCreditRolloverPolicy"},"description":{"type":"string"},"environment_id":{"type":"string"},"icon":{"type":["string","null"]},"id":{"type":"string"},"ledger_authority":{"$ref":"#/components/schemas/BillingCreditLedgerAuthority"},"name":{"type":"string"},"plural_name":{"type":["string","null"]},"price":{"$ref":"#/components/schemas/BillingPriceView"},"price_per_unit":{"type":["integer","null"],"format":"int64"},"price_per_unit_decimal":{"type":["string","null"]},"product":{"$ref":"#/components/schemas/BillingProductRecordResponseData"},"singular_name":{"type":["string","null"]},"updated_at":{"type":"string","format":"date-time"}},"required":["account_id","burn_strategy","cost_editable","created_at","currency_prices","default_expiry_unit","default_rollover_policy","description","environment_id","id","ledger_authority","name","updated_at"],"title":"BillingCreditView"},"GenericPreviewObject":{"type":"object","properties":{"description":{"type":["string","null"]},"id":{"type":"string"},"image_url":{"type":["string","null"]},"name":{"type":"string"}},"required":["id","name"],"title":"GenericPreviewObject"},"CompanyPlanCreditGrantView":{"type":"object","properties":{"billing_credit_auto_topup_amount":{"type":["integer","null"],"format":"int64"},"billing_credit_auto_topup_amount_type":{"type":["string","null"]},"billing_credit_auto_topup_availability":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditAutoTopupAvailability"},{"type":"null"}]},"billing_credit_auto_topup_enabled":{"type":"boolean"},"billing_credit_auto_topup_expiry_type":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditExpiryType"},{"type":"null"}]},"billing_credit_auto_topup_expiry_unit":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditExpiryUnit"},{"type":"null"}]},"billing_credit_auto_topup_expiry_unit_count":{"type":["integer","null"],"format":"int64"},"billing_credit_auto_topup_self_service":{"type":"boolean"},"billing_credit_auto_topup_threshold_credits":{"type":["integer","null"],"format":"int64"},"billing_credit_auto_topup_threshold_percent":{"type":["integer","null"],"format":"int64"},"billing_credit_can_buy_bundles":{"type":"boolean"},"company_auto_topup_amount":{"type":["integer","null"],"format":"int64"},"company_auto_topup_enabled":{"type":["boolean","null"]},"company_auto_topup_threshold_credits":{"type":["integer","null"],"format":"int64"},"company_credit_amount":{"type":"integer","format":"int64"},"created_at":{"type":"string","format":"date-time"},"credit":{"$ref":"#/components/schemas/BillingCreditView"},"credit_amount":{"type":"integer","format":"int64"},"credit_description":{"type":"string","description":"Deprecated field, will be removed in the future. Use Credit.Description instead."},"credit_icon":{"type":["string","null"],"description":"Deprecated field, will be removed in the future. Use Credit.Icon instead."},"credit_id":{"type":"string"},"credit_name":{"type":"string","description":"Deprecated field, will be removed in the future. Use Credit.Name instead."},"expiry_type":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditExpiryType"},{"type":"null"}]},"expiry_unit":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditExpiryUnit"},{"type":"null"}]},"expiry_unit_count":{"type":["integer","null"],"format":"int64"},"id":{"type":"string"},"license_id":{"type":["string","null"]},"plan":{"$ref":"#/components/schemas/GenericPreviewObject"},"plan_id":{"type":"string"},"plan_version_id":{"type":["string","null"]},"plural_name":{"type":["string","null"],"description":"Deprecated field, will be removed in the future. Use Credit.PluralName instead."},"reset_cadence":{"oneOf":[{"$ref":"#/components/schemas/BillingPlanCreditGrantResetCadence"},{"type":"null"}]},"reset_start":{"oneOf":[{"$ref":"#/components/schemas/BillingPlanCreditGrantResetStart"},{"type":"null"}]},"reset_type":{"$ref":"#/components/schemas/BillingPlanCreditGrantResetType"},"rollover_percentage":{"type":"integer","format":"int64"},"scaling":{"$ref":"#/components/schemas/PlanCreditGrantScaling"},"singular_name":{"type":["string","null"],"description":"Deprecated field, will be removed in the future. Use Credit.SingularName instead."},"updated_at":{"type":"string","format":"date-time"}},"required":["billing_credit_auto_topup_enabled","billing_credit_auto_topup_self_service","billing_credit_can_buy_bundles","company_credit_amount","created_at","credit_amount","credit_description","credit_id","credit_name","id","plan_id","reset_type","rollover_percentage","scaling","updated_at"],"title":"CompanyPlanCreditGrantView"},"CompanyPlanWithBillingSubView":{"type":"object","properties":{"added_on":{"type":["string","null"],"format":"date-time"},"billing_product_external_id":{"type":["string","null"]},"billing_product_id":{"type":["string","null"]},"description":{"type":["string","null"]},"id":{"type":"string"},"image_url":{"type":["string","null"]},"included_credit_grants":{"type":"array","items":{"$ref":"#/components/schemas/CompanyPlanCreditGrantView"}},"name":{"type":"string"},"plan_period":{"type":["string","null"]},"plan_price":{"type":["integer","null"],"format":"int64"},"plan_version_id":{"type":["string","null"]}},"required":["id","included_credit_grants","name"],"title":"CompanyPlanWithBillingSubView"},"BillingSubscriptionDiscountView":{"type":"object","properties":{"amount_off":{"type":["integer","null"],"format":"int64"},"coupon_id":{"type":"string"},"coupon_name":{"type":"string"},"currency":{"type":["string","null"]},"customer_facing_code":{"type":["string","null"]},"discount_external_id":{"type":"string"},"duration":{"type":"string"},"duration_in_months":{"type":["integer","null"],"format":"int64"},"ended_at":{"type":["string","null"],"format":"date-time"},"is_active":{"type":"boolean"},"percent_off":{"type":["number","null"],"format":"double"},"promo_code_external_id":{"type":["string","null"]},"started_at":{"type":"string","format":"date-time"},"subscription_external_id":{"type":"string"}},"required":["coupon_id","coupon_name","discount_external_id","duration","is_active","started_at","subscription_external_id"],"title":"BillingSubscriptionDiscountView"},"InvoiceStatus":{"type":"string","enum":["draft","open","paid","uncollectible","void"],"title":"InvoiceStatus"},"InvoiceResponseData":{"type":"object","properties":{"amount_due":{"type":"integer","format":"int64"},"amount_paid":{"type":"integer","format":"int64"},"amount_remaining":{"type":"integer","format":"int64"},"collection_method":{"type":"string"},"company_id":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"currency":{"type":"string"},"customer_external_id":{"type":"string"},"due_date":{"type":["string","null"],"format":"date-time"},"ending_balance":{"type":"integer","format":"int64"},"environment_id":{"type":"string"},"external_id":{"type":["string","null"]},"id":{"type":"string"},"payment_method_external_id":{"type":["string","null"]},"provider_type":{"$ref":"#/components/schemas/BillingProviderType"},"starting_balance":{"type":"integer","format":"int64"},"status":{"oneOf":[{"$ref":"#/components/schemas/InvoiceStatus"},{"type":"null"}]},"subscription_external_id":{"type":["string","null"]},"subtotal":{"type":"integer","format":"int64"},"updated_at":{"type":"string","format":"date-time"},"url":{"type":["string","null"]}},"required":["amount_due","amount_paid","amount_remaining","collection_method","created_at","currency","customer_external_id","ending_balance","environment_id","id","provider_type","starting_balance","subtotal","updated_at"],"title":"InvoiceResponseData"},"BillingSubscriptionViewMetadata":{"type":"object","properties":{},"title":"BillingSubscriptionViewMetadata"},"PaymentMethodResponseData":{"type":"object","properties":{"account_last4":{"type":["string","null"]},"account_name":{"type":["string","null"]},"bank_name":{"type":["string","null"]},"billing_email":{"type":["string","null"]},"billing_name":{"type":["string","null"]},"card_brand":{"type":["string","null"]},"card_exp_month":{"type":["integer","null"],"format":"int64"},"card_exp_year":{"type":["integer","null"],"format":"int64"},"card_last4":{"type":["string","null"]},"company_id":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"customer_external_id":{"type":"string"},"environment_id":{"type":"string"},"external_id":{"type":"string"},"id":{"type":"string"},"payment_method_type":{"type":"string"},"provider_type":{"$ref":"#/components/schemas/BillingProviderType"},"updated_at":{"type":"string","format":"date-time"}},"required":["created_at","customer_external_id","environment_id","external_id","id","payment_method_type","provider_type","updated_at"],"title":"PaymentMethodResponseData"},"BillingProductForSubscriptionResponseData":{"type":"object","properties":{"billing_scheme":{"$ref":"#/components/schemas/BillingPriceScheme"},"billing_threshold":{"type":["integer","null"],"format":"int64"},"created_at":{"type":"string","format":"date-time"},"currency":{"type":"string"},"environment_id":{"type":"string"},"external_id":{"type":"string"},"id":{"type":"string"},"interval":{"type":"string"},"interval_count":{"type":["integer","null"],"format":"int64"},"meter_id":{"type":["string","null"]},"name":{"type":"string"},"package_size":{"type":"integer","format":"int64"},"price":{"type":"integer","format":"int64"},"price_decimal":{"type":["string","null"]},"price_external_id":{"type":"string"},"price_id":{"type":"string"},"price_tier":{"type":"array","items":{"$ref":"#/components/schemas/BillingProductPriceTierResponseData"}},"provider_type":{"$ref":"#/components/schemas/BillingProviderType"},"quantity":{"type":"number","format":"double"},"subscription_id":{"type":"string"},"subscription_item_external_id":{"type":["string","null"]},"updated_at":{"type":"string","format":"date-time"},"usage_type":{"$ref":"#/components/schemas/BillingPriceUsageType"}},"required":["billing_scheme","created_at","currency","environment_id","external_id","id","interval","name","package_size","price","price_external_id","price_id","price_tier","provider_type","quantity","subscription_id","updated_at","usage_type"],"title":"BillingProductForSubscriptionResponseData"},"BillingSubscriptionTrialEndSetting":{"type":"string","enum":["cancel","subscribe"],"title":"BillingSubscriptionTrialEndSetting"},"BillingSubscriptionView":{"type":"object","properties":{"application_id":{"type":["string","null"]},"cancel_at":{"type":["integer","null"],"format":"int64"},"cancel_at_period_end":{"type":"boolean"},"company_id":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"currency":{"type":"string"},"customer_external_id":{"type":"string"},"default_payment_method_id":{"type":["string","null"]},"discounts":{"type":"array","items":{"$ref":"#/components/schemas/BillingSubscriptionDiscountView"}},"expired_at":{"type":["string","null"],"format":"date-time"},"id":{"type":"string"},"interval":{"type":"string"},"latest_invoice":{"$ref":"#/components/schemas/InvoiceResponseData"},"metadata":{"$ref":"#/components/schemas/BillingSubscriptionViewMetadata"},"payment_method":{"$ref":"#/components/schemas/PaymentMethodResponseData"},"period_end":{"type":"integer","format":"int64"},"period_start":{"type":"integer","format":"int64"},"products":{"type":"array","items":{"$ref":"#/components/schemas/BillingProductForSubscriptionResponseData"}},"provider_type":{"$ref":"#/components/schemas/BillingProviderType"},"status":{"type":"string"},"subscription_external_id":{"type":"string"},"total_price":{"type":"integer","format":"int64"},"trial_end":{"type":["integer","null"],"format":"int64"},"trial_end_setting":{"oneOf":[{"$ref":"#/components/schemas/BillingSubscriptionTrialEndSetting"},{"type":"null"}]}},"required":["cancel_at_period_end","created_at","currency","customer_external_id","discounts","id","interval","period_end","period_start","products","provider_type","status","subscription_external_id","total_price"],"title":"BillingSubscriptionView"},"CustomPlanActivationStrategy":{"type":"string","enum":["on_payment","on_publish"],"title":"CustomPlanActivationStrategy"},"PlanBillingSource":{"type":"string","enum":["custom_plan","manage_plan"],"title":"PlanBillingSource"},"CustomPlanBillingStatus":{"type":"string","enum":["active","expired","paid","pending"],"title":"CustomPlanBillingStatus"},"CustomPlanBillingResponseData":{"type":"object","properties":{"activation_strategy":{"$ref":"#/components/schemas/CustomPlanActivationStrategy"},"billing_cycle_anchor":{"type":["string","null"],"format":"date-time","description":"The billing period renewal date pinned when the subscription started, when one was set. When no invoice exists yet, the first invoice is raised on this date."},"company_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"days_until_due":{"type":"integer","format":"int64"},"external_invoice_id":{"type":["string","null"]},"id":{"type":"string"},"paid_at":{"type":["string","null"],"format":"date-time"},"plan_billing_source":{"$ref":"#/components/schemas/PlanBillingSource","description":"The flow that created this billing record: a custom plan, or a standard plan assigned by invoice through Manage Plan."},"plan_id":{"type":"string"},"published_at":{"type":["string","null"],"format":"date-time"},"send_invoice":{"type":"boolean"},"status":{"$ref":"#/components/schemas/CustomPlanBillingStatus"},"stripe_invoice_url":{"type":["string","null"]},"updated_at":{"type":"string","format":"date-time"}},"required":["activation_strategy","company_id","created_at","days_until_due","id","plan_billing_source","plan_id","send_invoice","status","updated_at"],"title":"CustomPlanBillingResponseData"},"WarningTier":{"type":"object","properties":{"key":{"type":"string","description":"A customer-defined identifier for the warning tier"},"value":{"type":"integer","format":"int64","description":"The warning threshold, in the entitlement's usage units"}},"required":["key","value"],"title":"WarningTier"},"FeatureEntitlement":{"type":"object","properties":{"allocation":{"type":["integer","null"],"format":"int64","description":"If the company has a numeric entitlement for this feature, the allocated amount"},"consumption_rate":{"type":["number","null"],"format":"double","description":"If the company has a credit-based entitlement for this feature, the credit cost per unit of usage"},"credit_id":{"type":["string","null"],"description":"If the company has a credit-based entitlement for this feature, the ID of the credit"},"credit_remaining":{"type":["number","null"],"format":"double","description":"If the company has a credit-based entitlement for this feature, the credit available to fund new consumption or a new lease hold — open lease holds are excluded. Clients that hold a lease should gate on this plus their own unspent hold; clients with no lease awareness should use credit_settled instead"},"credit_reserved":{"type":["number","null"],"format":"double","description":"If the company has a credit-based entitlement for this feature, the unspent amount held by an open credit lease. Returns to credit_remaining when the lease is released"},"credit_settled":{"type":["number","null"],"format":"double","description":"If the company has a credit-based entitlement for this feature, the balance net of actual consumption, unaffected by open lease holds (credit_remaining plus credit_reserved). The number to display to end users"},"credit_total":{"type":["number","null"],"format":"double","description":"If the company has a credit-based entitlement for this feature, the total credit amount"},"credit_used":{"type":["number","null"],"format":"double","description":"If the company has a credit-based entitlement for this feature, the amount of credit used"},"event_name":{"type":["string","null"],"description":"If the feature is event-based, the name of the event tracked for usage"},"event_subtype":{"type":["string","null"],"description":"For event-based or credit-metered feature entitlements, the event subtype whose usage is tracked"},"feature_id":{"type":"string","description":"The ID of the feature"},"feature_key":{"type":"string","description":"The key of the flag associated with the feature"},"metric_period":{"oneOf":[{"$ref":"#/components/schemas/MetricPeriod"},{"type":"null"}],"description":"For event-based feature entitlements, the period over which usage is tracked"},"metric_reset_at":{"type":["string","null"],"format":"date-time","description":"For event-based feature entitlements, when the usage period will reset"},"month_reset":{"oneOf":[{"$ref":"#/components/schemas/MetricPeriodMonthReset"},{"type":"null"}],"description":"For event-based feature entitlements that have a monthly period, whether that monthly reset is based on the calendar month or a billing cycle"},"soft_limit":{"type":["integer","null"],"format":"int64","description":"For usage-based pricing, the soft limit for overage charges or the next tier boundary"},"usage":{"type":["integer","null"],"format":"int64","description":"If the company has a numeric entitlement for this feature, the current usage amount"},"value_type":{"$ref":"#/components/schemas/EntitlementValueType","description":"The type of the entitlement value"},"warning_tiers":{"type":"array","items":{"$ref":"#/components/schemas/WarningTier"},"description":"Customer-defined usage warning thresholds configured on this entitlement"}},"required":["feature_id","feature_key","value_type"],"title":"FeatureEntitlement"},"EntityTraitDetailResponseData":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"definition":{"$ref":"#/components/schemas/EntityTraitDefinitionResponseData"},"definition_id":{"type":"string"},"environment_id":{"type":"string"},"id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"value":{"type":"string"}},"required":["created_at","definition_id","environment_id","id","updated_at","value"],"title":"EntityTraitDetailResponseData"},"EntityKeyDefinitionResponseData":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"entity_type":{"$ref":"#/components/schemas/EntityType"},"id":{"type":"string"},"key":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}},"required":["created_at","entity_type","id","key","updated_at"],"title":"EntityKeyDefinitionResponseData"},"EntityKeyDetailResponseData":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"definition":{"$ref":"#/components/schemas/EntityKeyDefinitionResponseData"},"definition_id":{"type":"string"},"entity_id":{"type":"string"},"entity_type":{"$ref":"#/components/schemas/EntityType"},"environment_id":{"type":"string"},"id":{"type":"string"},"key":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"value":{"type":"string"}},"required":["created_at","definition_id","entity_id","entity_type","environment_id","id","key","updated_at","value"],"title":"EntityKeyDetailResponseData"},"CompanyEventPeriodMetricsResponseData":{"type":"object","properties":{"account_id":{"type":"string"},"captured_at_max":{"type":"string","format":"date-time"},"captured_at_min":{"type":"string","format":"date-time"},"company_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"environment_id":{"type":"string"},"event_subtype":{"type":"string"},"month_reset":{"$ref":"#/components/schemas/MetricPeriodMonthReset"},"period":{"$ref":"#/components/schemas/MetricPeriod"},"valid_until":{"type":["string","null"],"format":"date-time"},"value":{"type":"integer","format":"int64"}},"required":["account_id","captured_at_max","captured_at_min","company_id","created_at","environment_id","event_subtype","month_reset","period","value"],"title":"CompanyEventPeriodMetricsResponseData"},"TraitDefinitionComparableType":{"type":"string","enum":["bool","date","int","string"],"title":"TraitDefinitionComparableType"},"TraitDefinition":{"type":"object","properties":{"comparable_type":{"$ref":"#/components/schemas/TraitDefinitionComparableType"},"entity_type":{"$ref":"#/components/schemas/EntityType"},"id":{"type":"string"}},"required":["comparable_type","entity_type","id"],"title":"TraitDefinition"},"Condition":{"type":"object","properties":{"account_id":{"type":"string"},"comparison_trait_definition":{"$ref":"#/components/schemas/TraitDefinition"},"condition_type":{"$ref":"#/components/schemas/ConditionType"},"consumption_rate":{"type":["number","null"],"format":"double"},"credit_id":{"type":["string","null"]},"environment_id":{"type":"string"},"event_subtype":{"type":["string","null"]},"id":{"type":"string"},"metric_period":{"oneOf":[{"$ref":"#/components/schemas/MetricPeriod"},{"type":"null"}]},"metric_period_month_reset":{"oneOf":[{"$ref":"#/components/schemas/MetricPeriodMonthReset"},{"type":"null"}]},"metric_value":{"type":["integer","null"],"format":"int64"},"operator":{"$ref":"#/components/schemas/ComparableOperator"},"resource_ids":{"type":"array","items":{"type":"string"}},"trait_definition":{"$ref":"#/components/schemas/TraitDefinition"},"trait_value":{"type":"string"}},"required":["account_id","condition_type","environment_id","id","operator","resource_ids","trait_value"],"title":"Condition"},"ConditionGroup":{"type":"object","properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Condition"}}},"required":["conditions"],"title":"ConditionGroup"},"Rule":{"type":"object","properties":{"account_id":{"type":"string"},"condition_groups":{"type":"array","items":{"$ref":"#/components/schemas/ConditionGroup"}},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/Condition"}},"environment_id":{"type":"string"},"flag_id":{"type":["string","null"]},"id":{"type":"string"},"name":{"type":"string"},"priority":{"type":"integer","format":"int64"},"rule_type":{"$ref":"#/components/schemas/RuleType"},"value":{"type":"boolean"}},"required":["account_id","condition_groups","conditions","environment_id","id","name","priority","rule_type","value"],"title":"Rule"},"ScheduledDowngradeResponseData":{"type":"object","properties":{"currency":{"type":"string"},"effective_after":{"type":"string","format":"date-time"},"from_plan_id":{"type":"string"},"from_plan_name":{"type":"string"},"from_subscription_price":{"type":"integer","format":"int64"},"id":{"type":"string"},"interval":{"type":"string"},"scheduled_interval":{"type":["string","null"]},"scheduled_price":{"type":["integer","null"],"format":"int64"},"to_plan_id":{"type":"string"},"to_plan_name":{"type":"string"}},"required":["currency","effective_after","from_plan_id","from_plan_name","from_subscription_price","id","interval","to_plan_id","to_plan_name"],"title":"ScheduledDowngradeResponseData"},"CompanyDetailResponseDataTraits":{"type":"object","properties":{},"description":"A map of trait names to trait values","title":"CompanyDetailResponseDataTraits"},"CompanyDetailResponseData":{"type":"object","properties":{"add_ons":{"type":"array","items":{"$ref":"#/components/schemas/CompanyPlanWithBillingSubView"}},"billing_credit_balances":{"type":["object","null"],"additionalProperties":{"type":"number","format":"double"}},"billing_subscription":{"$ref":"#/components/schemas/BillingSubscriptionView"},"billing_subscriptions":{"type":"array","items":{"$ref":"#/components/schemas/BillingSubscriptionView"}},"created_at":{"type":"string","format":"date-time"},"custom_plan_billings":{"type":"array","items":{"$ref":"#/components/schemas/CustomPlanBillingResponseData"}},"default_payment_method":{"$ref":"#/components/schemas/PaymentMethodResponseData"},"entitlements":{"type":"array","items":{"$ref":"#/components/schemas/FeatureEntitlement"}},"entity_traits":{"type":"array","items":{"$ref":"#/components/schemas/EntityTraitDetailResponseData"}},"environment_id":{"type":"string"},"id":{"type":"string"},"keys":{"type":"array","items":{"$ref":"#/components/schemas/EntityKeyDetailResponseData"}},"last_seen_at":{"type":["string","null"],"format":"date-time"},"logo_url":{"type":["string","null"]},"metrics":{"type":"array","items":{"$ref":"#/components/schemas/CompanyEventPeriodMetricsResponseData"}},"name":{"type":"string"},"payment_methods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethodResponseData"}},"plan":{"$ref":"#/components/schemas/CompanyPlanWithBillingSubView"},"plans":{"type":"array","items":{"$ref":"#/components/schemas/GenericPreviewObject"}},"rules":{"type":"array","items":{"$ref":"#/components/schemas/Rule"}},"scheduled_downgrade":{"$ref":"#/components/schemas/ScheduledDowngradeResponseData"},"traits":{"$ref":"#/components/schemas/CompanyDetailResponseDataTraits","description":"A map of trait names to trait values"},"updated_at":{"type":"string","format":"date-time"},"user_count":{"type":"integer","format":"int64"}},"required":["add_ons","billing_subscriptions","created_at","custom_plan_billings","entitlements","entity_traits","environment_id","id","keys","metrics","name","payment_methods","plans","rules","updated_at","user_count"],"title":"CompanyDetailResponseData"},"CompaniesGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{"credit_type_ids":{"type":"array","items":{"type":"string"},"description":"Filter companies by one or more credit type IDs (each ID starts with bcrd_)"},"has_scheduled_downgrade":{"type":"boolean","description":"Filter companies that have a pending scheduled downgrade"},"ids":{"type":"array","items":{"type":"string"},"description":"Filter companies by multiple company IDs (starts with comp_)"},"limit":{"type":"integer","format":"int64","description":"Page limit (default 100)"},"monetized_subscriptions":{"type":"boolean","description":"Filter companies that have monetized subscriptions"},"offset":{"type":"integer","format":"int64","description":"Page offset (default 0)"},"plan_id":{"type":"string","description":"Filter companies by plan ID (starts with plan_)"},"plan_ids":{"type":"array","items":{"type":"string"},"description":"Filter companies by one or more plan IDs (each ID starts with plan_)"},"plan_version_id":{"type":"string","description":"Filter companies by plan version ID (starts with plvr_)"},"plan_version_ids":{"type":"array","items":{"type":"string"},"description":"Filter companies by one or more plan version IDs (each ID starts with plvr_). Takes precedence over plan_version_id when set."},"plan_version_unpublished":{"type":"boolean","description":"Filter companies assigned to a plan version that is no longer published, meaning the plan has since moved on to a newer version"},"q":{"type":"string","description":"Search for companies by name, keys or string traits"},"sort_order_column":{"type":"string","description":"Column to sort by (e.g. name, created_at, last_seen_at)"},"sort_order_direction":{"$ref":"#/components/schemas/SortDirection","description":"Direction to sort by (asc or desc)"},"subscription_statuses":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionStatus"},"description":"Filter companies by one or more subscription statuses"},"subscription_types":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionType"},"description":"Filter companies by one or more subscription types"},"with_entitlement_for":{"type":"string","description":"Filter companies that have an entitlement (plan entitlement or company override) for the specified feature ID"},"with_subscription":{"type":"boolean","description":"Filter companies that have a subscription"},"without_feature_override_for":{"type":"string","description":"Filter out companies that already have a company override for the specified feature ID"},"without_plan":{"type":"boolean","description":"Filter out companies that have a plan"},"without_subscription":{"type":"boolean","description":"Filter out companies that have a subscription"}},"description":"Input parameters","title":"CompaniesGetResponsesContentApplicationJsonSchemaParams"},"companies_listCompanies_Response_200":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CompanyDetailResponseData"}},"params":{"$ref":"#/components/schemas/CompaniesGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"companies_listCompanies_Response_200"},"UpsertCompanyRequestBodyTraits":{"type":"object","properties":{},"description":"A map of trait names to trait values","title":"UpsertCompanyRequestBodyTraits"},"UpsertCompanyRequestBody":{"type":"object","properties":{"base_plan_id":{"type":["string","null"],"description":"Assign this base plan when creating the company (starts with plan_). Takes precedence over the environment's initial plan and must be provisionable without a payment method."},"base_plan_price_id":{"type":["string","null"],"description":"The Schematic price to provision for base_plan_id (starts with bilpp_). Required and must be $0 for a billing-linked plan; omit for a plan that is not billing-linked."},"id":{"type":["string","null"],"description":"If you know the Schematic ID, you can use that here instead of keys"},"keys":{"type":"object","additionalProperties":{"type":"string"},"description":"See [Key Management](https://docs.schematichq.com/developer_resources/key_management) for more information"},"last_seen_at":{"type":["string","null"],"format":"date-time"},"name":{"type":["string","null"]},"prevent_key_remap":{"type":["boolean","null"]},"remove_keys":{"type":"array","items":{"type":"string"},"description":"Names of keys to remove from the company. Removing a key the company does not have does nothing, and a company must keep at least one key."},"traits":{"$ref":"#/components/schemas/UpsertCompanyRequestBodyTraits","description":"A map of trait names to trait values"},"update_only":{"type":["boolean","null"]}},"required":["keys"],"title":"UpsertCompanyRequestBody"},"CompaniesPostResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"CompaniesPostResponsesContentApplicationJsonSchemaParams"},"companies_upsertCompany_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CompanyDetailResponseData"},"params":{"$ref":"#/components/schemas/CompaniesPostResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"companies_upsertCompany_Response_200"},"CompaniesLookupGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{"keys":{"type":"object","additionalProperties":{"type":"string"}}},"description":"Input parameters","title":"CompaniesLookupGetResponsesContentApplicationJsonSchemaParams"},"companies_lookupCompany_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CompanyDetailResponseData"},"params":{"$ref":"#/components/schemas/CompaniesLookupGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"companies_lookupCompany_Response_200"},"CompaniesCompanyIdDeleteResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{"cancel_subscription":{"type":"boolean"},"prorate":{"type":"boolean"}},"description":"Input parameters","title":"CompaniesCompanyIdDeleteResponsesContentApplicationJsonSchemaParams"},"companies_deleteCompany_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeleteResponse"},"params":{"$ref":"#/components/schemas/CompaniesCompanyIdDeleteResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"companies_deleteCompany_Response_200"},"KeysRequestBody":{"type":"object","properties":{"keys":{"type":"object","additionalProperties":{"type":"string"}}},"required":["keys"],"title":"KeysRequestBody"},"CompanyResponseData":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"environment_id":{"type":"string"},"id":{"type":"string"},"last_seen_at":{"type":["string","null"],"format":"date-time"},"logo_url":{"type":["string","null"]},"name":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}},"required":["created_at","environment_id","id","name","updated_at"],"title":"CompanyResponseData"},"CompaniesDeletePostResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"CompaniesDeletePostResponsesContentApplicationJsonSchemaParams"},"companies_deleteCompanyByKeys_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CompanyResponseData"},"params":{"$ref":"#/components/schemas/CompaniesDeletePostResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"companies_deleteCompanyByKeys_Response_200"},"CompanyMembershipDetailResponseData":{"type":"object","properties":{"company":{"$ref":"#/components/schemas/CompanyResponseData"},"company_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"id":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"user_id":{"type":"string"}},"required":["company_id","created_at","id","updated_at","user_id"],"title":"CompanyMembershipDetailResponseData"},"CompanyMembershipsGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{"company_id":{"type":"string"},"limit":{"type":"integer","format":"int64","description":"Page limit (default 100)"},"offset":{"type":"integer","format":"int64","description":"Page offset (default 0)"},"user_id":{"type":"string"}},"description":"Input parameters","title":"CompanyMembershipsGetResponsesContentApplicationJsonSchemaParams"},"companies_listCompanyMemberships_Response_200":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CompanyMembershipDetailResponseData"}},"params":{"$ref":"#/components/schemas/CompanyMembershipsGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"companies_listCompanyMemberships_Response_200"},"GetOrCreateCompanyMembershipRequestBody":{"type":"object","properties":{"company_id":{"type":"string"},"user_id":{"type":"string"}},"required":["company_id","user_id"],"title":"GetOrCreateCompanyMembershipRequestBody"},"CompanyMembershipsPostResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"CompanyMembershipsPostResponsesContentApplicationJsonSchemaParams"},"companies_getOrCreateCompanyMembership_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CompanyMembershipDetailResponseData"},"params":{"$ref":"#/components/schemas/CompanyMembershipsPostResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"companies_getOrCreateCompanyMembership_Response_200"},"CompanyMembershipsCompanyMembershipIdDeleteResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"CompanyMembershipsCompanyMembershipIdDeleteResponsesContentApplicationJsonSchemaParams"},"companies_deleteCompanyMembership_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeleteResponse"},"params":{"$ref":"#/components/schemas/CompanyMembershipsCompanyMembershipIdDeleteResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"companies_deleteCompanyMembership_Response_200"},"UpsertTraitRequestBody":{"type":"object","properties":{"incr":{"type":["integer","null"],"format":"int64","description":"Amount to increment the trait by (positive or negative)"},"keys":{"type":"object","additionalProperties":{"type":"string"},"description":"Key/value pairs to identify a company or user"},"set":{"type":["string","null"],"description":"Value to set the trait to"},"trait":{"type":"string","description":"Name of the trait to update"},"update_only":{"type":["boolean","null"],"description":"Unless this is set, the company or user will be created if it does not already exist"}},"required":["keys","trait"],"title":"UpsertTraitRequestBody"},"CompanyTraitsPostResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"CompanyTraitsPostResponsesContentApplicationJsonSchemaParams"},"companies_upsertCompanyTrait_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CompanyDetailResponseData"},"params":{"$ref":"#/components/schemas/CompanyTraitsPostResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"companies_upsertCompanyTrait_Response_200"},"UserDetailResponseDataTraits":{"type":"object","properties":{},"description":"A map of trait names to trait values","title":"UserDetailResponseDataTraits"},"UserDetailResponseData":{"type":"object","properties":{"company_memberships":{"type":"array","items":{"$ref":"#/components/schemas/CompanyMembershipDetailResponseData"}},"created_at":{"type":"string","format":"date-time"},"entity_traits":{"type":"array","items":{"$ref":"#/components/schemas/EntityTraitDetailResponseData"}},"environment_id":{"type":"string"},"id":{"type":"string"},"keys":{"type":"array","items":{"$ref":"#/components/schemas/EntityKeyDetailResponseData"}},"last_seen_at":{"type":["string","null"],"format":"date-time"},"name":{"type":"string"},"traits":{"$ref":"#/components/schemas/UserDetailResponseDataTraits","description":"A map of trait names to trait values"},"updated_at":{"type":"string","format":"date-time"}},"required":["company_memberships","created_at","entity_traits","environment_id","id","keys","name","updated_at"],"title":"UserDetailResponseData"},"UsersGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{"company_id":{"type":"string","description":"Filter users by company ID (starts with comp_)"},"ids":{"type":"array","items":{"type":"string"},"description":"Filter users by multiple user IDs (starts with user_)"},"limit":{"type":"integer","format":"int64","description":"Page limit (default 100)"},"offset":{"type":"integer","format":"int64","description":"Page offset (default 0)"},"plan_id":{"type":"string","description":"Filter users by plan ID (starts with plan_)"},"q":{"type":"string","description":"Search for users by name, keys or string traits"}},"description":"Input parameters","title":"UsersGetResponsesContentApplicationJsonSchemaParams"},"companies_listUsers_Response_200":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UserDetailResponseData"}},"params":{"$ref":"#/components/schemas/UsersGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"companies_listUsers_Response_200"},"UsersLookupGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{"keys":{"type":"object","additionalProperties":{"type":"string"}}},"description":"Input parameters","title":"UsersLookupGetResponsesContentApplicationJsonSchemaParams"},"companies_lookupUser_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/UserDetailResponseData"},"params":{"$ref":"#/components/schemas/UsersLookupGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"companies_lookupUser_Response_200"},"UpsertUserRequestBodyTraits":{"type":"object","properties":{},"description":"A map of trait names to trait values","title":"UpsertUserRequestBodyTraits"},"UpsertUserRequestBody":{"type":"object","properties":{"companies":{"type":["array","null"],"items":{"type":"object","additionalProperties":{"type":"string"}},"description":"Optionally specify companies using array of key/value pairs"},"company":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Add user to this company. Takes priority over companies. For exhaustive list of companies, use companies"},"company_id":{"type":["string","null"],"description":"Add user to this company. Takes priority over company_ids. For exhaustive list of companies, use company_ids"},"company_ids":{"type":["array","null"],"items":{"type":"string"},"description":"Optionally specify companies using Schematic company ID"},"id":{"type":["string","null"],"description":"If you know the Schematic ID, you can use that here instead of keys"},"keys":{"type":"object","additionalProperties":{"type":"string"},"description":"See [Key Management](https://docs.schematichq.com/developer_resources/key_management) for more information"},"last_seen_at":{"type":["string","null"],"format":"date-time"},"name":{"type":["string","null"]},"remove_keys":{"type":"array","items":{"type":"string"},"description":"Names of keys to remove from the user. Removing a key the user does not have does nothing, and a user must keep at least one key."},"traits":{"$ref":"#/components/schemas/UpsertUserRequestBodyTraits","description":"A map of trait names to trait values"},"update_only":{"type":["boolean","null"]}},"required":["keys"],"title":"UpsertUserRequestBody"},"UsersPostResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"UsersPostResponsesContentApplicationJsonSchemaParams"},"companies_upsertUser_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/UserDetailResponseData"},"params":{"$ref":"#/components/schemas/UsersPostResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"companies_upsertUser_Response_200"},"UsersUserIdDeleteResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"UsersUserIdDeleteResponsesContentApplicationJsonSchemaParams"},"companies_deleteUser_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeleteResponse"},"params":{"$ref":"#/components/schemas/UsersUserIdDeleteResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"companies_deleteUser_Response_200"},"UserResponseData":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"environment_id":{"type":"string"},"id":{"type":"string"},"last_seen_at":{"type":["string","null"],"format":"date-time"},"name":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}},"required":["created_at","environment_id","id","name","updated_at"],"title":"UserResponseData"},"UsersDeletePostResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"UsersDeletePostResponsesContentApplicationJsonSchemaParams"},"companies_deleteUserByKeys_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/UserResponseData"},"params":{"$ref":"#/components/schemas/UsersDeletePostResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"companies_deleteUserByKeys_Response_200"},"UserTraitsPostResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"UserTraitsPostResponsesContentApplicationJsonSchemaParams"},"companies_upsertUserTrait_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/UserDetailResponseData"},"params":{"$ref":"#/components/schemas/UserTraitsPostResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"companies_upsertUserTrait_Response_200"},"EventType":{"type":"string","enum":["flag_check","identify","inference","track"],"title":"EventType"},"EventDetailResponseDataBody":{"type":"object","properties":{},"title":"EventDetailResponseDataBody"},"EventStatus":{"type":"string","enum":["enriched","failed","pending","processed","unknown"],"title":"EventStatus"},"EventDetailResponseData":{"type":"object","properties":{"api_key":{"type":["string","null"]},"api_key_view":{"$ref":"#/components/schemas/ApiKeyResponseData"},"body":{"$ref":"#/components/schemas/EventDetailResponseDataBody"},"body_preview":{"type":"string"},"captured_at":{"type":"string","format":"date-time"},"company":{"$ref":"#/components/schemas/PreviewObject"},"company_id":{"type":["string","null"]},"enriched_at":{"type":["string","null"],"format":"date-time"},"environment_id":{"type":["string","null"]},"error_message":{"type":["string","null"]},"feature_ids":{"type":"array","items":{"type":"string"}},"features":{"type":"array","items":{"$ref":"#/components/schemas/PreviewObject"}},"id":{"type":"string"},"idempotency_key":{"type":["string","null"]},"lease_id":{"type":["string","null"]},"loaded_at":{"type":["string","null"],"format":"date-time"},"processed_at":{"type":["string","null"],"format":"date-time"},"quantity":{"type":"integer","format":"int64"},"sent_at":{"type":["string","null"],"format":"date-time"},"status":{"$ref":"#/components/schemas/EventStatus"},"subtype":{"type":["string","null"]},"type":{"$ref":"#/components/schemas/EventType"},"updated_at":{"type":["string","null"],"format":"date-time"},"user":{"$ref":"#/components/schemas/PreviewObject"},"user_id":{"type":["string","null"]}},"required":["body","body_preview","captured_at","feature_ids","features","id","quantity","status","type"],"title":"EventDetailResponseData"},"EventsGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{"company_id":{"type":"string"},"event_subtype":{"type":"string"},"event_types":{"type":"array","items":{"$ref":"#/components/schemas/EventType"}},"flag_id":{"type":"string"},"idempotency_key":{"type":"string"},"limit":{"type":"integer","format":"int64","description":"Page limit (default 100)"},"offset":{"type":"integer","format":"int64","description":"Page offset (default 0)"},"user_id":{"type":"string"}},"description":"Input parameters","title":"EventsGetResponsesContentApplicationJsonSchemaParams"},"events_listEvents_Response_200":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EventDetailResponseData"}},"params":{"$ref":"#/components/schemas/EventsGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"events_listEvents_Response_200"},"EventBodyTrackTraits":{"type":"object","properties":{},"description":"A map of trait names to trait values","title":"EventBodyTrackTraits"},"EventBodyTrack":{"type":"object","properties":{"company":{"type":"object","additionalProperties":{"type":"string"},"description":"Key-value pairs to identify company associated with track event"},"event":{"type":"string","description":"The name of the type of track event"},"lease_id":{"type":"string","description":"Credit lease ID this track event is redeeming against"},"quantity":{"type":"integer","format":"int64","description":"Optionally specify the quantity of the event"},"traits":{"$ref":"#/components/schemas/EventBodyTrackTraits","description":"A map of trait names to trait values"},"user":{"type":"object","additionalProperties":{"type":"string"},"description":"Key-value pairs to identify user associated with track event"}},"required":["event"],"title":"EventBodyTrack"},"EventBodyFlagCheck":{"type":"object","properties":{"company_id":{"type":["string","null"],"description":"Schematic company ID (starting with 'comp_') of the company evaluated, if any"},"error":{"type":["string","null"],"description":"Report an error that occurred during the flag check"},"flag_id":{"type":["string","null"],"description":"Schematic flag ID (starting with 'flag_') for the flag matching the key, if any"},"flag_key":{"type":"string","description":"The key of the flag being checked"},"preflight":{"type":"boolean","description":"Whether the check was a preflight, asking whether an action would be allowed rather than reporting one that happened. Absent on ordinary checks"},"reason":{"type":"string","description":"The reason why the value was returned"},"req_company":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Key-value pairs used to to identify company for which the flag was checked"},"req_user":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Key-value pairs used to to identify user for which the flag was checked"},"rule_id":{"type":["string","null"],"description":"Schematic rule ID (starting with 'rule_') of the rule that matched for the flag, if any"},"user_id":{"type":["string","null"],"description":"Schematic user ID (starting with 'user_') of the user evaluated, if any"},"value":{"type":"boolean","description":"The value of the flag for the given company and/or user"}},"required":["flag_key","reason","value"],"title":"EventBodyFlagCheck"},"EventBodyIdentifyCompanyTraits":{"type":"object","properties":{},"description":"A map of trait names to trait values","title":"EventBodyIdentifyCompanyTraits"},"EventBodyIdentifyCompany":{"type":"object","properties":{"keys":{"type":"object","additionalProperties":{"type":"string"},"description":"Key-value pairs to identify the company"},"name":{"type":"string","description":"The display name of the company; required only if it is a new company"},"traits":{"$ref":"#/components/schemas/EventBodyIdentifyCompanyTraits","description":"A map of trait names to trait values"}},"required":["keys"],"description":"Information about the company associated with the user; required only if it is a new user","title":"EventBodyIdentifyCompany"},"EventBodyIdentifyTraits":{"type":"object","properties":{},"description":"A map of trait names to trait values","title":"EventBodyIdentifyTraits"},"EventBodyIdentify":{"type":"object","properties":{"company":{"$ref":"#/components/schemas/EventBodyIdentifyCompany","description":"Information about the company associated with the user; required only if it is a new user"},"keys":{"type":"object","additionalProperties":{"type":"string"},"description":"Key-value pairs to identify the user"},"name":{"type":"string","description":"The display name of the user being identified; required only if it is a new user"},"traits":{"$ref":"#/components/schemas/EventBodyIdentifyTraits","description":"A map of trait names to trait values"}},"required":["keys"],"title":"EventBodyIdentify"},"EventBodyInference":{"type":"object","properties":{"cached_input_tokens":{"type":"integer","format":"int64","description":"Number of input tokens served from cache"},"company":{"type":"object","additionalProperties":{"type":"string"},"description":"Key-value pairs to identify the company associated with the inference event"},"cost":{"type":"string","description":"Provided cost of the inference request as a decimal string; derived from model pricing when omitted"},"currency":{"type":"string","description":"ISO 4217 currency code for the provided cost; defaults to 'usd'"},"event":{"type":"string","description":"Optional track event name to fan out for usage-based billing"},"input_tokens":{"type":"integer","format":"int64","description":"Number of input tokens for the inference request"},"operation":{"type":"string","description":"The inference operation; defaults to 'chat'"},"output_tokens":{"type":"integer","format":"int64","description":"Number of output tokens for the inference request"},"provider":{"type":"string","description":"The inference provider (e.g. 'anthropic', 'openai')"},"reasoning_tokens":{"type":"integer","format":"int64","description":"Number of reasoning tokens for the inference request"},"request_model":{"type":"string","description":"The model requested for the inference request"},"requests":{"type":"integer","format":"int64","description":"Number of requests represented by this event; defaults to 1"},"response_model":{"type":"string","description":"The model that served the inference response"},"user":{"type":"object","additionalProperties":{"type":"string"},"description":"Key-value pairs to identify the user associated with the inference event"}},"required":["company","input_tokens","output_tokens","provider","response_model"],"title":"EventBodyInference"},"EventBody":{"oneOf":[{"$ref":"#/components/schemas/EventBodyTrack"},{"$ref":"#/components/schemas/EventBodyFlagCheck"},{"$ref":"#/components/schemas/EventBodyIdentify"},{"$ref":"#/components/schemas/EventBodyInference"}],"title":"EventBody"},"CreateEventRequestBody":{"type":"object","properties":{"backfill":{"type":["boolean","null"],"description":"Requires a secret API key, and trusted_client_clock. Import historical data without affecting billing."},"body":{"$ref":"#/components/schemas/EventBody"},"event_type":{"$ref":"#/components/schemas/EventType","description":"Either 'identify' or 'track'"},"idempotency_key":{"type":["string","null"],"description":"Optional client-supplied key. Duplicate events with the same key (scoped to the environment) are dropped for 24h."},"sent_at":{"type":["string","null"],"format":"date-time","description":"Optionally provide a timestamp at which the event was sent to Schematic"},"trusted_client_clock":{"type":["boolean","null"],"description":"Requires a secret API key and sent_at. Use sent_at as the effective timestamp."}},"required":["event_type"],"title":"CreateEventRequestBody"},"RawEventResponseData":{"type":"object","properties":{"captured_at":{"type":"string","format":"date-time"},"event_id":{"type":["string","null"]},"remote_addr":{"type":["string","null"]},"remote_ip":{"type":"string"},"user_agent":{"type":"string"}},"required":["captured_at","remote_ip","user_agent"],"title":"RawEventResponseData"},"EventsPostResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"EventsPostResponsesContentApplicationJsonSchemaParams"},"events_createEvent_Response_201":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RawEventResponseData"},"params":{"$ref":"#/components/schemas/EventsPostResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"events_createEvent_Response_201"},"CreateEventBatchRequestBody":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/CreateEventRequestBody"}}},"required":["events"],"title":"CreateEventBatchRequestBody"},"RawEventBatchResponseData":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/RawEventResponseData"}}},"required":["events"],"title":"RawEventBatchResponseData"},"EventBatchPostResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"EventBatchPostResponsesContentApplicationJsonSchemaParams"},"events_createEventBatch_Response_201":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RawEventBatchResponseData"},"params":{"$ref":"#/components/schemas/EventBatchPostResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"events_createEventBatch_Response_201"},"EventsEventIdGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"EventsEventIdGetResponsesContentApplicationJsonSchemaParams"},"events_getEvent_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EventDetailResponseData"},"params":{"$ref":"#/components/schemas/EventsEventIdGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"events_getEvent_Response_200"},"AccountMemberPermission":{"type":"string","enum":["companies_edit","company_users_edit","components_edit","custom_plans_edit","data_exports_edit","features_edit","flag_rules_edit","flags_edit","overrides_edit","plan_billing_edit","plan_entitlements_edit","plan_versions_edit","plans_edit","webhooks_edit","webhooks_reveal_secret"],"title":"AccountMemberPermission"},"AccountMemberRole":{"type":"string","enum":["admin","member"],"title":"AccountMemberRole"},"AccountMemberResponseData":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"email":{"type":["string","null"]},"first_name":{"type":["string","null"]},"id":{"type":"string"},"image_url":{"type":["string","null"]},"last_name":{"type":["string","null"]},"name":{"type":["string","null"]},"permissions":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/AccountMemberPermission"}}},"role":{"oneOf":[{"$ref":"#/components/schemas/AccountMemberRole"},{"type":"null"}]},"updated_at":{"type":"string","format":"date-time"}},"required":["created_at","id","permissions","updated_at"],"title":"AccountMemberResponseData"},"FlagDetailResponseData":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"default_value":{"type":"boolean"},"description":{"type":"string"},"feature":{"$ref":"#/components/schemas/FeatureResponseData"},"feature_id":{"type":["string","null"]},"flag_type":{"$ref":"#/components/schemas/FlagType"},"id":{"type":"string"},"key":{"type":"string"},"last_checked_at":{"type":["string","null"],"format":"date-time"},"maintainer":{"$ref":"#/components/schemas/AccountMemberResponseData"},"maintainer_account_member_id":{"type":["string","null"]},"name":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/RuleDetailResponseData"}},"updated_at":{"type":"string","format":"date-time"}},"required":["created_at","default_value","description","flag_type","id","key","name","rules","updated_at"],"title":"FlagDetailResponseData"},"FeatureDetailResponseData":{"type":"object","properties":{"billing_linked_resource":{"$ref":"#/components/schemas/BillingLinkedResourceResponseData"},"billing_product":{"$ref":"#/components/schemas/BillingProductResponseData","description":"The billing provider product that sells this feature in the current environment. Set for license features once they have been priced in a plan; a feature priced in several environments has a different product in each."},"created_at":{"type":"string","format":"date-time"},"description":{"type":"string"},"event_subtype":{"type":["string","null"]},"event_summary":{"$ref":"#/components/schemas/EventSummaryResponseData"},"feature_type":{"$ref":"#/components/schemas/FeatureType"},"flags":{"type":"array","items":{"$ref":"#/components/schemas/FlagDetailResponseData"}},"icon":{"type":"string"},"id":{"type":"string"},"license_id":{"type":["string","null"],"description":"The license sold through this feature. Set only on features of type license, and created automatically with them."},"lifecycle_phase":{"oneOf":[{"$ref":"#/components/schemas/FeatureLifecyclePhase"},{"type":"null"}]},"maintainer":{"$ref":"#/components/schemas/AccountMemberResponseData"},"maintainer_account_member_id":{"type":["string","null"]},"name":{"type":"string"},"plans":{"type":"array","items":{"$ref":"#/components/schemas/PreviewObject"}},"plural_name":{"type":["string","null"]},"singular_name":{"type":["string","null"]},"trait":{"$ref":"#/components/schemas/EntityTraitDefinitionResponseData"},"trait_id":{"type":["string","null"]},"updated_at":{"type":"string","format":"date-time"},"usage_limit_trait_id":{"type":["string","null"],"description":"Set when the feature carries a pay-in-advance quantity. Provisioned lazily for other feature types, and at creation for license features."}},"required":["created_at","description","feature_type","flags","icon","id","name","plans","updated_at"],"title":"FeatureDetailResponseData"},"FeaturesGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{"boolean_require_event":{"type":"boolean","description":"Only return boolean features if there is an associated event. Automatically includes boolean in the feature types filter."},"feature_type":{"type":"array","items":{"$ref":"#/components/schemas/FeatureType"},"description":"Filter by one or more feature types (boolean, event, trait)"},"ids":{"type":"array","items":{"type":"string"}},"limit":{"type":"integer","format":"int64","description":"Page limit (default 100)"},"managed_by":{"$ref":"#/components/schemas/BillingProviderType","description":"Filter for features managed by a billing provider, or by Schematic (no billing provider)"},"offset":{"type":"integer","format":"int64","description":"Page offset (default 0)"},"plan_version_id":{"type":"string","description":"Filter by plan version ID when used with without_plan_entitlement_for; if not provided, the latest published version is used"},"q":{"type":"string","description":"Search by feature name or ID"},"without_company_override_for":{"type":"string","description":"Filter out features that already have a company override for the specified company ID"},"without_plan_entitlement_for":{"type":"string","description":"Filter out features that already have a plan entitlement for the specified plan ID"}},"description":"Input parameters","title":"FeaturesGetResponsesContentApplicationJsonSchemaParams"},"features_listFeatures_Response_200":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FeatureDetailResponseData"}},"params":{"$ref":"#/components/schemas/FeaturesGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"features_listFeatures_Response_200"},"FeaturesFeatureIdGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"FeaturesFeatureIdGetResponsesContentApplicationJsonSchemaParams"},"features_getFeature_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/FeatureDetailResponseData"},"params":{"$ref":"#/components/schemas/FeaturesFeatureIdGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"features_getFeature_Response_200"},"CreateOrUpdateFlagRequestBody":{"type":"object","properties":{"default_value":{"type":"boolean"},"description":{"type":"string"},"feature_id":{"type":["string","null"]},"flag_type":{"$ref":"#/components/schemas/FlagType"},"id":{"type":["string","null"]},"key":{"type":"string"},"maintainer_account_member_id":{"type":["string","null"]},"name":{"type":"string"}},"required":["default_value","description","flag_type","key","name"],"title":"CreateOrUpdateFlagRequestBody"},"CreateFeatureRequestBody":{"type":"object","properties":{"description":{"type":"string"},"event_subtype":{"type":["string","null"]},"feature_type":{"$ref":"#/components/schemas/FeatureType"},"flag":{"$ref":"#/components/schemas/CreateOrUpdateFlagRequestBody"},"icon":{"type":["string","null"]},"lifecycle_phase":{"oneOf":[{"$ref":"#/components/schemas/FeatureLifecyclePhase"},{"type":"null"}]},"maintainer_account_member_id":{"type":["string","null"]},"name":{"type":"string"},"plural_name":{"type":["string","null"]},"singular_name":{"type":["string","null"]},"trait_id":{"type":["string","null"]}},"required":["description","feature_type","name"],"title":"CreateFeatureRequestBody"},"FeaturesPostResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"FeaturesPostResponsesContentApplicationJsonSchemaParams"},"features_createFeature_Response_201":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/FeatureDetailResponseData"},"params":{"$ref":"#/components/schemas/FeaturesPostResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"features_createFeature_Response_201"},"UpdateFeatureRequestBody":{"type":"object","properties":{"description":{"type":["string","null"]},"event_subtype":{"type":["string","null"]},"feature_type":{"oneOf":[{"$ref":"#/components/schemas/FeatureType"},{"type":"null"}]},"flag":{"$ref":"#/components/schemas/CreateOrUpdateFlagRequestBody"},"icon":{"type":["string","null"]},"lifecycle_phase":{"oneOf":[{"$ref":"#/components/schemas/FeatureLifecyclePhase"},{"type":"null"}]},"maintainer_account_member_id":{"type":["string","null"]},"name":{"type":["string","null"]},"plural_name":{"type":["string","null"]},"singular_name":{"type":["string","null"]},"trait_id":{"type":["string","null"]}},"title":"UpdateFeatureRequestBody"},"FeaturesFeatureIdPutResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"FeaturesFeatureIdPutResponsesContentApplicationJsonSchemaParams"},"features_updateFeature_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/FeatureDetailResponseData"},"params":{"$ref":"#/components/schemas/FeaturesFeatureIdPutResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"features_updateFeature_Response_200"},"FeaturesFeatureIdDeleteResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"FeaturesFeatureIdDeleteResponsesContentApplicationJsonSchemaParams"},"features_deleteFeature_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeleteResponse"},"params":{"$ref":"#/components/schemas/FeaturesFeatureIdDeleteResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"features_deleteFeature_Response_200"},"FlagsGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{"feature_id":{"type":"string"},"ids":{"type":"array","items":{"type":"string"}},"limit":{"type":"integer","format":"int64","description":"Page limit (default 100)"},"offset":{"type":"integer","format":"int64","description":"Page offset (default 0)"},"q":{"type":"string","description":"Search by flag name, key, or ID"}},"description":"Input parameters","title":"FlagsGetResponsesContentApplicationJsonSchemaParams"},"features_listFlags_Response_200":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FlagDetailResponseData"}},"params":{"$ref":"#/components/schemas/FlagsGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"features_listFlags_Response_200"},"FlagsFlagIdGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"FlagsFlagIdGetResponsesContentApplicationJsonSchemaParams"},"features_getFlag_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/FlagDetailResponseData"},"params":{"$ref":"#/components/schemas/FlagsFlagIdGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"features_getFlag_Response_200"},"CreateFlagRequestBody":{"type":"object","properties":{"default_value":{"type":"boolean"},"description":{"type":"string"},"feature_id":{"type":["string","null"]},"flag_type":{"$ref":"#/components/schemas/FlagType"},"key":{"type":"string"},"maintainer_account_member_id":{"type":["string","null"]},"name":{"type":"string"}},"required":["default_value","description","flag_type","key","name"],"title":"CreateFlagRequestBody"},"FlagsPostResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"FlagsPostResponsesContentApplicationJsonSchemaParams"},"features_createFlag_Response_201":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/FlagDetailResponseData"},"params":{"$ref":"#/components/schemas/FlagsPostResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"features_createFlag_Response_201"},"FlagsFlagIdPutResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"FlagsFlagIdPutResponsesContentApplicationJsonSchemaParams"},"features_updateFlag_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/FlagDetailResponseData"},"params":{"$ref":"#/components/schemas/FlagsFlagIdPutResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"features_updateFlag_Response_200"},"FlagsFlagIdDeleteResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"FlagsFlagIdDeleteResponsesContentApplicationJsonSchemaParams"},"features_deleteFlag_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeleteResponse"},"params":{"$ref":"#/components/schemas/FlagsFlagIdDeleteResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"features_deleteFlag_Response_200"},"CreateOrUpdateConditionRequestBody":{"type":"object","properties":{"comparison_trait_id":{"type":["string","null"],"description":"Optionally provide a trait ID to compare a metric or trait value against instead of a value"},"condition_type":{"$ref":"#/components/schemas/ConditionType"},"credit_cost":{"type":["number","null"],"format":"double","description":"Cost of credit to use to measure this condition"},"credit_id":{"type":["string","null"],"description":"ID of credit to use to measure this condition"},"event_subtype":{"type":["string","null"],"description":"Name of track event type used to measure this condition"},"id":{"type":["string","null"]},"metric_period":{"oneOf":[{"$ref":"#/components/schemas/MetricPeriod"},{"type":"null"}],"description":"Period of time over which to measure the track event metric"},"metric_period_month_reset":{"oneOf":[{"$ref":"#/components/schemas/MetricPeriodMonthReset"},{"type":"null"}],"description":"When metric_period=current_month, specify whether the month restarts based on the calendar month or the billing period"},"metric_value":{"type":["integer","null"],"format":"int64","description":"Value to compare the track event metric against"},"operator":{"$ref":"#/components/schemas/ComparableOperator"},"resource_ids":{"type":"array","items":{"type":"string"},"description":"List of resource IDs (companies, users, or plans) targeted by this condition"},"trait_id":{"type":["string","null"],"description":"ID of trait to use to measure this condition"},"trait_value":{"type":["string","null"],"description":"Value to compare the trait value against"}},"required":["condition_type","operator","resource_ids"],"title":"CreateOrUpdateConditionRequestBody"},"CreateOrUpdateConditionGroupRequestBody":{"type":"object","properties":{"conditions":{"type":"array","items":{"$ref":"#/components/schemas/CreateOrUpdateConditionRequestBody"}},"flag_id":{"type":["string","null"]},"id":{"type":["string","null"]}},"required":["conditions"],"title":"CreateOrUpdateConditionGroupRequestBody"},"CreateOrUpdateRuleRequestBody":{"type":"object","properties":{"condition_groups":{"type":"array","items":{"$ref":"#/components/schemas/CreateOrUpdateConditionGroupRequestBody"}},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/CreateOrUpdateConditionRequestBody"}},"id":{"type":["string","null"]},"name":{"type":"string"},"priority":{"type":"integer","format":"int64"},"rule_type":{"oneOf":[{"$ref":"#/components/schemas/RuleType"},{"type":"null"}]},"value":{"type":"boolean"}},"required":["condition_groups","conditions","name","priority","value"],"title":"CreateOrUpdateRuleRequestBody"},"UpdateFlagRulesRequestBody":{"type":"object","properties":{"rules":{"type":"array","items":{"$ref":"#/components/schemas/CreateOrUpdateRuleRequestBody"}}},"required":["rules"],"title":"UpdateFlagRulesRequestBody"},"FlagResponseData":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"default_value":{"type":"boolean"},"description":{"type":"string"},"feature_id":{"type":["string","null"]},"flag_type":{"$ref":"#/components/schemas/FlagType"},"id":{"type":"string"},"key":{"type":"string"},"maintainer_account_member_id":{"type":["string","null"]},"name":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}},"required":["created_at","default_value","description","flag_type","id","key","name","updated_at"],"title":"FlagResponseData"},"RulesDetailResponseData":{"type":"object","properties":{"flag":{"$ref":"#/components/schemas/FlagResponseData"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/RuleDetailResponseData"}}},"required":["rules"],"title":"RulesDetailResponseData"},"FlagsFlagIdRulesPutResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"FlagsFlagIdRulesPutResponsesContentApplicationJsonSchemaParams"},"features_updateFlagRules_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RulesDetailResponseData"},"params":{"$ref":"#/components/schemas/FlagsFlagIdRulesPutResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"features_updateFlagRules_Response_200"},"PreflightEventUsageRequestBody":{"type":"object","properties":{"event_subtype":{"type":"string","description":"The event subtype the usage would be recorded under"},"quantity":{"type":"integer","format":"int64","description":"How many units of the event subtype the action would record. Zero has no effect"}},"required":["event_subtype","quantity"],"title":"PreflightEventUsageRequestBody"},"PreflightRequestBody":{"type":"object","properties":{"credit_cost":{"type":"object","additionalProperties":{"type":"number","format":"double"},"description":"Cost in credits of the action, keyed by credit ID, for callers that have already computed it. Takes precedence over usage and event_usage on credit balance conditions for the same credit. A cost of zero means the action is free, not that the input is absent"},"event_usage":{"$ref":"#/components/schemas/PreflightEventUsageRequestBody","description":"Usage of a specific event subtype. Preferred over usage when the subtype is known, since it only affects conditions measuring that subtype"},"usage":{"type":["integer","null"],"format":"int64","description":"Quantity of usage to simulate against any numeric condition encountered while evaluating the flag. Zero has no effect"}},"title":"PreflightRequestBody"},"CheckFlagRequestBody":{"type":"object","properties":{"company":{"type":["object","null"],"additionalProperties":{"type":"string"}},"preflight":{"$ref":"#/components/schemas/PreflightRequestBody","description":"Hypothetical usage to evaluate the flag against, for answering \"would this action be allowed?\" before performing it. Only supported when checking a single flag. Values are caller-asserted and can widen a verdict as well as narrow it, so do not forward untrusted input here when the result gates access. Only the flag value reflects the preflight; the entitlement and usage figures in the response are the company's current, unsimulated ones"},"user":{"type":["object","null"],"additionalProperties":{"type":"string"}}},"title":"CheckFlagRequestBody"},"CheckFlagResponseData":{"type":"object","properties":{"company_id":{"type":["string","null"],"description":"If company keys were provided and matched a company, its ID"},"entitlement":{"$ref":"#/components/schemas/FeatureEntitlement","description":"If a feature entitlement rule was matched, its entitlement details"},"error":{"type":["string","null"],"description":"If an error occurred while checking the flag, the error message"},"feature_allocation":{"type":["integer","null"],"format":"int64","description":"Deprecated: Use Entitlement.Allocation instead."},"feature_usage":{"type":["integer","null"],"format":"int64","description":"Deprecated: Use Entitlement.Usage instead."},"feature_usage_event":{"type":["string","null"],"description":"Deprecated: Use Entitlement.EventName instead."},"feature_usage_period":{"oneOf":[{"$ref":"#/components/schemas/MetricPeriod"},{"type":"null"}],"description":"Deprecated: Use Entitlement.MetricPeriod instead."},"feature_usage_reset_at":{"type":["string","null"],"format":"date-time","description":"Deprecated: Use Entitlement.MetricResetAt instead."},"flag":{"type":"string","description":"The key used to check the flag"},"flag_id":{"type":["string","null"],"description":"If a flag was found, its ID"},"reason":{"type":"string","description":"A human-readable explanation of the result"},"rule_id":{"type":["string","null"],"description":"If a rule was found, its ID"},"rule_type":{"oneOf":[{"$ref":"#/components/schemas/RuleType"},{"type":"null"}],"description":"If a rule was found, its type"},"user_id":{"type":["string","null"],"description":"If user keys were provided and matched a user, its ID"},"value":{"type":"boolean","description":"A boolean flag check result; for feature entitlements, this represents whether further consumption of the feature is permitted"}},"required":["flag","reason","value"],"title":"CheckFlagResponseData"},"FlagsKeyCheckPostResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"FlagsKeyCheckPostResponsesContentApplicationJsonSchemaParams"},"features_checkFlag_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CheckFlagResponseData"},"params":{"$ref":"#/components/schemas/FlagsKeyCheckPostResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"features_checkFlag_Response_200"},"CompanyCreditBalance":{"type":"object","properties":{"remaining":{"type":"number","format":"double","description":"Remaining credit, excluding any open lease hold (the value SDKs gate on)"},"reserved":{"type":"number","format":"double","description":"Amount held by the company's open credit lease, 0 when none is open"},"settled":{"type":"number","format":"double","description":"Spendable balance including the open lease hold (remaining + reserved)"}},"required":["remaining","reserved","settled"],"title":"CompanyCreditBalance"},"TrialStatus":{"type":"string","enum":["active","converted","expired"],"title":"TrialStatus"},"DatastreamCompanyPlan":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"trial_end_date":{"type":["string","null"],"format":"date-time"},"trial_status":{"oneOf":[{"$ref":"#/components/schemas/TrialStatus"},{"type":"null"}]}},"required":["id","name"],"title":"DatastreamCompanyPlan"},"CheckFlagsResponseData":{"type":"object","properties":{"credit_balances":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CompanyCreditBalance"},"description":"Lease-aware credit balances keyed by credit ID, covering every credit type the company holds a balance in"},"flags":{"type":"array","items":{"$ref":"#/components/schemas/CheckFlagResponseData"}},"plan":{"$ref":"#/components/schemas/DatastreamCompanyPlan"}},"required":["flags"],"title":"CheckFlagsResponseData"},"FlagsCheckPostResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"FlagsCheckPostResponsesContentApplicationJsonSchemaParams"},"features_checkFlags_Response_201":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CheckFlagsResponseData"},"params":{"$ref":"#/components/schemas/FlagsCheckPostResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"features_checkFlags_Response_201"},"CompanyOverrideNoteResponseData":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time"},"external_user_id":{"type":"string"},"external_user_name":{"type":"string"},"id":{"type":"string"},"note":{"type":"string"},"updated_at":{"type":"string","format":"date-time"}},"required":["created_at","external_user_id","external_user_name","id","note","updated_at"],"title":"CompanyOverrideNoteResponseData"},"CompanyOverrideResponseData":{"type":"object","properties":{"company":{"$ref":"#/components/schemas/CompanyDetailResponseData"},"company_id":{"type":"string"},"consumption_rate":{"type":["number","null"],"format":"double"},"created_at":{"type":"string","format":"date-time"},"environment_id":{"type":"string"},"expiration_date":{"type":["string","null"],"format":"date-time"},"feature":{"$ref":"#/components/schemas/FeatureResponseData"},"feature_id":{"type":"string"},"id":{"type":"string"},"metric_period":{"oneOf":[{"$ref":"#/components/schemas/MetricPeriod"},{"type":"null"}]},"metric_period_month_reset":{"oneOf":[{"$ref":"#/components/schemas/MetricPeriodMonthReset"},{"type":"null"}]},"notes":{"type":"array","items":{"$ref":"#/components/schemas/CompanyOverrideNoteResponseData"}},"rule_id":{"type":["string","null"]},"rule_id_usage_exceeded":{"type":["string","null"]},"updated_at":{"type":"string","format":"date-time"},"value_bool":{"type":["boolean","null"]},"value_numeric":{"type":["integer","null"],"format":"int64"},"value_trait":{"$ref":"#/components/schemas/EntityTraitDefinitionResponseData"},"value_trait_id":{"type":["string","null"]},"value_type":{"$ref":"#/components/schemas/EntitlementValueType"}},"required":["company_id","created_at","environment_id","feature_id","id","notes","updated_at","value_type"],"title":"CompanyOverrideResponseData"},"CompanyOverridesGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{"company_id":{"type":"string","description":"Filter company overrides by a single company ID (starting with comp_)"},"company_ids":{"type":"array","items":{"type":"string"},"description":"Filter company overrides by multiple company IDs (starting with comp_)"},"feature_id":{"type":"string","description":"Filter company overrides by a single feature ID (starting with feat_)"},"feature_ids":{"type":"array","items":{"type":"string"},"description":"Filter company overrides by multiple feature IDs (starting with feat_)"},"ids":{"type":"array","items":{"type":"string"},"description":"Filter company overrides by multiple company override IDs (starting with cmov_)"},"limit":{"type":"integer","format":"int64","description":"Page limit (default 100)"},"offset":{"type":"integer","format":"int64","description":"Page offset (default 0)"},"q":{"type":"string","description":"Search for company overrides by feature or company name"},"without_expired":{"type":"boolean","description":"Filter company overrides by whether they have not expired"}},"description":"Input parameters","title":"CompanyOverridesGetResponsesContentApplicationJsonSchemaParams"},"entitlements_listCompanyOverrides_Response_200":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CompanyOverrideResponseData"}},"params":{"$ref":"#/components/schemas/CompanyOverridesGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"entitlements_listCompanyOverrides_Response_200"},"CompanyOverridesCompanyOverrideIdGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"CompanyOverridesCompanyOverrideIdGetResponsesContentApplicationJsonSchemaParams"},"entitlements_getCompanyOverride_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CompanyOverrideResponseData"},"params":{"$ref":"#/components/schemas/CompanyOverridesCompanyOverrideIdGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"entitlements_getCompanyOverride_Response_200"},"CreateCompanyOverrideRequestBody":{"type":"object","properties":{"company_id":{"type":"string"},"credit_consumption_rate":{"type":["number","null"],"format":"double"},"expiration_date":{"type":["string","null"],"format":"date-time"},"feature_id":{"type":"string"},"metric_period":{"oneOf":[{"$ref":"#/components/schemas/MetricPeriod"},{"type":"null"}]},"metric_period_month_reset":{"oneOf":[{"$ref":"#/components/schemas/MetricPeriodMonthReset"},{"type":"null"}]},"note":{"type":["string","null"]},"value_bool":{"type":["boolean","null"]},"value_credit_id":{"type":["string","null"]},"value_numeric":{"type":["integer","null"],"format":"int64"},"value_trait_id":{"type":["string","null"]},"value_type":{"$ref":"#/components/schemas/EntitlementValueType"}},"required":["company_id","feature_id","value_type"],"title":"CreateCompanyOverrideRequestBody"},"CompanyOverridesPostResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"CompanyOverridesPostResponsesContentApplicationJsonSchemaParams"},"entitlements_createCompanyOverride_Response_201":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CompanyOverrideResponseData"},"params":{"$ref":"#/components/schemas/CompanyOverridesPostResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"entitlements_createCompanyOverride_Response_201"},"UpdateCompanyOverrideRequestBody":{"type":"object","properties":{"credit_consumption_rate":{"type":["number","null"],"format":"double"},"expiration_date":{"type":["string","null"],"format":"date-time"},"metric_period":{"oneOf":[{"$ref":"#/components/schemas/MetricPeriod"},{"type":"null"}]},"metric_period_month_reset":{"oneOf":[{"$ref":"#/components/schemas/MetricPeriodMonthReset"},{"type":"null"}]},"note":{"type":["string","null"]},"value_bool":{"type":["boolean","null"]},"value_credit_id":{"type":["string","null"]},"value_numeric":{"type":["integer","null"],"format":"int64"},"value_trait_id":{"type":["string","null"]},"value_type":{"$ref":"#/components/schemas/EntitlementValueType"}},"required":["value_type"],"title":"UpdateCompanyOverrideRequestBody"},"CompanyOverridesCompanyOverrideIdPutResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"CompanyOverridesCompanyOverrideIdPutResponsesContentApplicationJsonSchemaParams"},"entitlements_updateCompanyOverride_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CompanyOverrideResponseData"},"params":{"$ref":"#/components/schemas/CompanyOverridesCompanyOverrideIdPutResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"entitlements_updateCompanyOverride_Response_200"},"CompanyOverridesCompanyOverrideIdDeleteResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"CompanyOverridesCompanyOverrideIdDeleteResponsesContentApplicationJsonSchemaParams"},"entitlements_deleteCompanyOverride_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeleteResponse"},"params":{"$ref":"#/components/schemas/CompanyOverridesCompanyOverrideIdDeleteResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"entitlements_deleteCompanyOverride_Response_200"},"PlanEntitlementsGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{"feature_id":{"type":"string","description":"Filter plan entitlements by a single feature ID (starting with feat_)"},"feature_ids":{"type":"array","items":{"type":"string"},"description":"Filter plan entitlements by multiple feature IDs (starting with feat_)"},"ids":{"type":"array","items":{"type":"string"},"description":"Filter plan entitlements by multiple plan entitlement IDs (starting with pltl_)"},"limit":{"type":"integer","format":"int64","description":"Page limit (default 100)"},"offset":{"type":"integer","format":"int64","description":"Page offset (default 0)"},"plan_id":{"type":"string","description":"Filter plan entitlements by a single plan ID (starting with plan_)"},"plan_ids":{"type":"array","items":{"type":"string"},"description":"Filter plan entitlements by multiple plan IDs (starting with plan_)"},"plan_version_id":{"type":"string","description":"Filter plan entitlements by a single plan version ID (starting with plvr_)"},"plan_version_ids":{"type":"array","items":{"type":"string"},"description":"Filter plan entitlements by multiple plan version IDs (starting with plvr_)"},"q":{"type":"string","description":"Search for plan entitlements by feature or company name"},"with_metered_products":{"type":"boolean","description":"Filter plan entitlements only with metered products"}},"description":"Input parameters","title":"PlanEntitlementsGetResponsesContentApplicationJsonSchemaParams"},"entitlements_listPlanEntitlements_Response_200":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PlanEntitlementResponseData"}},"params":{"$ref":"#/components/schemas/PlanEntitlementsGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"entitlements_listPlanEntitlements_Response_200"},"PlanEntitlementsPlanEntitlementIdGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"PlanEntitlementsPlanEntitlementIdGetResponsesContentApplicationJsonSchemaParams"},"entitlements_getPlanEntitlement_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PlanEntitlementResponseData"},"params":{"$ref":"#/components/schemas/PlanEntitlementsPlanEntitlementIdGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"entitlements_getPlanEntitlement_Response_200"},"CreatePriceTierRequestBody":{"type":"object","properties":{"flat_amount":{"type":["integer","null"],"format":"int64"},"per_unit_price":{"type":["integer","null"],"format":"int64"},"per_unit_price_decimal":{"type":["string","null"]},"up_to":{"type":["integer","null"],"format":"int64"}},"title":"CreatePriceTierRequestBody"},"CurrencyPriceRequestBody":{"type":"object","properties":{"currency":{"type":"string"},"monthly_price_tiers":{"type":["array","null"],"items":{"$ref":"#/components/schemas/CreatePriceTierRequestBody"}},"monthly_unit_price":{"type":["integer","null"],"format":"int64"},"monthly_unit_price_decimal":{"type":["string","null"]},"quarterly_price_tiers":{"type":["array","null"],"items":{"$ref":"#/components/schemas/CreatePriceTierRequestBody"}},"quarterly_unit_price":{"type":["integer","null"],"format":"int64"},"quarterly_unit_price_decimal":{"type":["string","null"]},"yearly_price_tiers":{"type":["array","null"],"items":{"$ref":"#/components/schemas/CreatePriceTierRequestBody"}},"yearly_unit_price":{"type":["integer","null"],"format":"int64"},"yearly_unit_price_decimal":{"type":["string","null"]}},"required":["currency"],"title":"CurrencyPriceRequestBody"},"WarningTierRequestBody":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"integer","format":"int64"}},"required":["key","value"],"title":"WarningTierRequestBody"},"CreatePlanEntitlementRequestBody":{"type":"object","properties":{"billing_product_id":{"type":["string","null"]},"billing_threshold":{"type":["integer","null"],"format":"int64"},"credit_consumption_rate":{"type":["number","null"],"format":"double"},"currency":{"type":["string","null"]},"currency_prices":{"type":["array","null"],"items":{"$ref":"#/components/schemas/CurrencyPriceRequestBody"}},"feature_id":{"type":"string"},"metric_period":{"oneOf":[{"$ref":"#/components/schemas/MetricPeriod"},{"type":"null"}]},"metric_period_month_reset":{"oneOf":[{"$ref":"#/components/schemas/MetricPeriodMonthReset"},{"type":"null"}]},"monthly_metered_price_id":{"type":["string","null"]},"monthly_price_tiers":{"type":["array","null"],"items":{"$ref":"#/components/schemas/CreatePriceTierRequestBody"}},"monthly_unit_price":{"type":["integer","null"],"format":"int64"},"monthly_unit_price_decimal":{"type":["string","null"]},"overage_billing_product_id":{"type":["string","null"]},"plan_id":{"type":"string"},"plan_version_id":{"type":["string","null"]},"price_behavior":{"oneOf":[{"$ref":"#/components/schemas/EntitlementPriceBehavior"},{"type":"null"}]},"price_tiers":{"type":["array","null"],"items":{"$ref":"#/components/schemas/CreatePriceTierRequestBody"},"description":"Use MonthlyPriceTiers or YearlyPriceTiers instead"},"quarterly_metered_price_id":{"type":["string","null"]},"quarterly_price_tiers":{"type":["array","null"],"items":{"$ref":"#/components/schemas/CreatePriceTierRequestBody"}},"quarterly_unit_price":{"type":["integer","null"],"format":"int64"},"quarterly_unit_price_decimal":{"type":["string","null"]},"soft_limit":{"type":["integer","null"],"format":"int64"},"tier_mode":{"oneOf":[{"$ref":"#/components/schemas/BillingTiersMode"},{"type":"null"}]},"usage_quantity":{"type":["integer","null"],"format":"int64","description":"The committed unit quantity for this entitlement. For custom plans this is the quantity the company is contractually committed to; for standard plans it is the quantity pre-filled when subscribing. Only applies to pay-in-advance entitlements. Note: this is not yet enforced/auto-provisioned as a true default — it is currently stored for downstream billing use."},"value_bool":{"type":["boolean","null"]},"value_credit_id":{"type":["string","null"]},"value_numeric":{"type":["integer","null"],"format":"int64"},"value_trait_id":{"type":["string","null"]},"value_type":{"$ref":"#/components/schemas/EntitlementValueType"},"warning_tiers":{"type":["array","null"],"items":{"$ref":"#/components/schemas/WarningTierRequestBody"}},"yearly_metered_price_id":{"type":["string","null"]},"yearly_price_tiers":{"type":["array","null"],"items":{"$ref":"#/components/schemas/CreatePriceTierRequestBody"}},"yearly_unit_price":{"type":["integer","null"],"format":"int64"},"yearly_unit_price_decimal":{"type":["string","null"]}},"required":["feature_id","plan_id","value_type"],"title":"CreatePlanEntitlementRequestBody"},"PlanEntitlementsPostResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"PlanEntitlementsPostResponsesContentApplicationJsonSchemaParams"},"entitlements_createPlanEntitlement_Response_201":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PlanEntitlementResponseData"},"params":{"$ref":"#/components/schemas/PlanEntitlementsPostResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"entitlements_createPlanEntitlement_Response_201"},"UpdatePlanEntitlementRequestBody":{"type":"object","properties":{"billing_product_id":{"type":["string","null"]},"billing_threshold":{"type":["integer","null"],"format":"int64"},"credit_consumption_rate":{"type":["number","null"],"format":"double"},"currency":{"type":["string","null"]},"currency_prices":{"type":["array","null"],"items":{"$ref":"#/components/schemas/CurrencyPriceRequestBody"}},"metric_period":{"oneOf":[{"$ref":"#/components/schemas/MetricPeriod"},{"type":"null"}]},"metric_period_month_reset":{"oneOf":[{"$ref":"#/components/schemas/MetricPeriodMonthReset"},{"type":"null"}]},"monthly_metered_price_id":{"type":["string","null"]},"monthly_price_tiers":{"type":["array","null"],"items":{"$ref":"#/components/schemas/CreatePriceTierRequestBody"}},"monthly_unit_price":{"type":["integer","null"],"format":"int64"},"monthly_unit_price_decimal":{"type":["string","null"]},"overage_billing_product_id":{"type":["string","null"]},"price_behavior":{"oneOf":[{"$ref":"#/components/schemas/EntitlementPriceBehavior"},{"type":"null"}]},"price_tiers":{"type":["array","null"],"items":{"$ref":"#/components/schemas/CreatePriceTierRequestBody"},"description":"Use MonthlyPriceTiers or YearlyPriceTiers instead"},"quarterly_metered_price_id":{"type":["string","null"]},"quarterly_price_tiers":{"type":["array","null"],"items":{"$ref":"#/components/schemas/CreatePriceTierRequestBody"}},"quarterly_unit_price":{"type":["integer","null"],"format":"int64"},"quarterly_unit_price_decimal":{"type":["string","null"]},"soft_limit":{"type":["integer","null"],"format":"int64"},"tier_mode":{"oneOf":[{"$ref":"#/components/schemas/BillingTiersMode"},{"type":"null"}]},"usage_quantity":{"type":["integer","null"],"format":"int64","description":"The committed unit quantity for this entitlement. For custom plans this is the quantity the company is contractually committed to; for standard plans it is the quantity pre-filled when subscribing. Only applies to pay-in-advance entitlements. Note: this is not yet enforced/auto-provisioned as a true default — it is currently stored for downstream billing use."},"value_bool":{"type":["boolean","null"]},"value_credit_id":{"type":["string","null"]},"value_numeric":{"type":["integer","null"],"format":"int64"},"value_trait_id":{"type":["string","null"]},"value_type":{"$ref":"#/components/schemas/EntitlementValueType"},"warning_tiers":{"type":["array","null"],"items":{"$ref":"#/components/schemas/WarningTierRequestBody"}},"yearly_metered_price_id":{"type":["string","null"]},"yearly_price_tiers":{"type":["array","null"],"items":{"$ref":"#/components/schemas/CreatePriceTierRequestBody"}},"yearly_unit_price":{"type":["integer","null"],"format":"int64"},"yearly_unit_price_decimal":{"type":["string","null"]}},"required":["value_type"],"title":"UpdatePlanEntitlementRequestBody"},"PlanEntitlementsPlanEntitlementIdPutResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"PlanEntitlementsPlanEntitlementIdPutResponsesContentApplicationJsonSchemaParams"},"entitlements_updatePlanEntitlement_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PlanEntitlementResponseData"},"params":{"$ref":"#/components/schemas/PlanEntitlementsPlanEntitlementIdPutResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"entitlements_updatePlanEntitlement_Response_200"},"PlanEntitlementsPlanEntitlementIdDeleteResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"PlanEntitlementsPlanEntitlementIdDeleteResponsesContentApplicationJsonSchemaParams"},"entitlements_deletePlanEntitlement_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeleteResponse"},"params":{"$ref":"#/components/schemas/PlanEntitlementsPlanEntitlementIdDeleteResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"entitlements_deletePlanEntitlement_Response_200"},"BillingCreditGrantReason":{"type":"string","enum":["adjustment","billing_credit_auto_topup","free","plan","purchased","rollover"],"title":"BillingCreditGrantReason"},"CreditGrantDetail":{"type":"object","properties":{"credit_type_icon":{"type":["string","null"]},"expires_at":{"type":["string","null"],"format":"date-time"},"grant_reason":{"$ref":"#/components/schemas/BillingCreditGrantReason"},"quantity":{"type":"number","format":"double"}},"required":["grant_reason","quantity"],"title":"CreditGrantDetail"},"CreditUsageAggregation":{"type":"object","properties":{"usage_this_billing_period":{"type":["number","null"],"format":"double","description":"Credit usage within the current billing period"},"usage_this_calendar_month":{"type":["number","null"],"format":"double","description":"Credit usage within the current calendar month"},"usage_this_week":{"type":["number","null"],"format":"double","description":"Credit usage within the current calendar week (Monday to Sunday)"},"usage_today":{"type":["number","null"],"format":"double","description":"Credit usage for the current day"}},"title":"CreditUsageAggregation"},"EntitlementType":{"type":"string","enum":["company_override","plan_entitlement","unknown"],"title":"EntitlementType"},"FeatureUsageResponseData":{"type":"object","properties":{"access":{"type":"boolean","description":"Whether further usage is permitted."},"allocation":{"type":["integer","null"],"format":"int64","description":"The maximum amount of usage that is permitted; a null value indicates that unlimited usage is permitted or that this is a credit-based entitlement (use credit_remaining instead)."},"allocation_type":{"$ref":"#/components/schemas/EntitlementValueType","description":"The type of allocation that is being used."},"company_override":{"$ref":"#/components/schemas/CompanyOverrideResponseData"},"credit_consumption_rate":{"type":["number","null"],"format":"double","description":"The rate at which credits are consumed per unit of usage"},"credit_grant_counts":{"type":"object","additionalProperties":{"type":"number","format":"double"}},"credit_grant_details":{"type":"array","items":{"$ref":"#/components/schemas/CreditGrantDetail"}},"credit_grant_reason":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditGrantReason"},{"type":"null"}],"description":"Reason for the credit grant"},"credit_remaining":{"type":["number","null"],"format":"double"},"credit_total":{"type":["number","null"],"format":"double","description":"Deprecated: Use credit_remaining instead."},"credit_type_icon":{"type":["string","null"],"description":"Icon identifier for the credit type"},"credit_usage_aggregation":{"$ref":"#/components/schemas/CreditUsageAggregation","description":"Aggregated credit usage by time period (day, week, month, billing period)"},"credit_used":{"type":["number","null"],"format":"double"},"effective_limit":{"type":["integer","null"],"format":"int64","description":"Effective limit for usage calculations. For overage pricing, this is the soft limit where overage charges begin. For tiered pricing, this is the first tier boundary. For other pricing models, this is the base allocation. Used to calculate usage percentages and determine access thresholds."},"effective_price":{"type":["number","null"],"format":"double","description":"Per-unit price for current usage scenario"},"entitlement_expiration_date":{"type":["string","null"],"format":"date-time"},"entitlement_id":{"type":"string"},"entitlement_source":{"type":["string","null"],"description":"Source of the entitlement (plan or company_override)"},"entitlement_type":{"$ref":"#/components/schemas/EntitlementType"},"feature":{"$ref":"#/components/schemas/FeatureInPlanResponseData"},"has_valid_allocation":{"type":["boolean","null"],"description":"Whether a valid allocation exists"},"is_unlimited":{"type":["boolean","null"],"description":"Whether this is an unlimited allocation"},"metric_reset_at":{"type":["string","null"],"format":"date-time","description":"The time at which the metric will reset."},"month_reset":{"oneOf":[{"$ref":"#/components/schemas/MetricPeriodMonthReset"},{"type":"null"}],"description":"If the period is current_month, when the month resets."},"monthly_usage_based_price":{"$ref":"#/components/schemas/BillingPriceView"},"overuse":{"type":["integer","null"],"format":"int64","description":"Amount of usage exceeding soft limit (overage pricing only)"},"percent_used":{"type":["number","null"],"format":"double","description":"Percentage of allocation consumed (0-100+)"},"period":{"oneOf":[{"$ref":"#/components/schemas/MetricPeriod"},{"type":"null"}],"description":"The period over which usage is measured."},"plan":{"$ref":"#/components/schemas/PlanResponseData"},"plan_entitlement":{"$ref":"#/components/schemas/PlanEntitlementResponseData"},"price_behavior":{"oneOf":[{"$ref":"#/components/schemas/EntitlementPriceBehavior"},{"type":"null"}]},"quarterly_usage_based_price":{"$ref":"#/components/schemas/BillingPriceView"},"soft_limit":{"type":["integer","null"],"format":"int64","description":"The soft limit for the feature usage. Available only for overage price behavior"},"usage":{"type":["integer","null"],"format":"int64","description":"The amount of usage that has been consumed; a null value indicates that usage is not being measured or that this is a credit-based entitlement (use credit_used instead)."},"yearly_usage_based_price":{"$ref":"#/components/schemas/BillingPriceView"}},"required":["access","allocation_type","entitlement_id","entitlement_type"],"title":"FeatureUsageResponseData"},"FeatureUsageGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{"company_id":{"type":"string"},"company_keys":{"type":"object","additionalProperties":{"type":"string"}},"feature_ids":{"type":"array","items":{"type":"string"}},"include_usage_aggregation":{"type":"boolean","description":"Include time-bucketed usage aggregation (today, this week, this month, billing period) for credit-based entitlements. Defaults to false for performance."},"limit":{"type":"integer","format":"int64","description":"Page limit (default 100)"},"managed_by":{"$ref":"#/components/schemas/BillingProviderType","description":"Filter for features managed by a billing provider, or by Schematic (no billing provider)"},"offset":{"type":"integer","format":"int64","description":"Page offset (default 0)"},"q":{"type":"string"},"without_negative_entitlements":{"type":"boolean"}},"description":"Input parameters","title":"FeatureUsageGetResponsesContentApplicationJsonSchemaParams"},"entitlements_listFeatureUsage_Response_200":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FeatureUsageResponseData"}},"params":{"$ref":"#/components/schemas/FeatureUsageGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"entitlements_listFeatureUsage_Response_200"},"BillingCreditsGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}},"limit":{"type":"integer","format":"int64","description":"Page limit (default 100)"},"name":{"type":"string"},"offset":{"type":"integer","format":"int64","description":"Page offset (default 0)"}},"description":"Input parameters","title":"BillingCreditsGetResponsesContentApplicationJsonSchemaParams"},"credits_listBillingCredits_Response_200":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BillingCreditResponseData"}},"params":{"$ref":"#/components/schemas/BillingCreditsGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"credits_listBillingCredits_Response_200"},"CreditCurrencyPriceRequestBody":{"type":"object","properties":{"currency":{"type":"string"},"price_per_unit":{"type":["integer","null"],"format":"int64"},"price_per_unit_decimal":{"type":["string","null"]}},"required":["currency"],"title":"CreditCurrencyPriceRequestBody"},"CreateBillingCreditRequestBody":{"type":"object","properties":{"burn_strategy":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditBurnStrategy"},{"type":"null"}]},"currency":{"type":"string"},"currency_prices":{"type":["array","null"],"items":{"$ref":"#/components/schemas/CreditCurrencyPriceRequestBody"}},"default_expiry_unit":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditExpiryUnit"},{"type":"null"}]},"default_expiry_unit_count":{"type":["integer","null"],"format":"int64"},"default_rollover_policy":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditRolloverPolicy"},{"type":"null"}]},"description":{"type":"string"},"icon":{"type":["string","null"]},"name":{"type":"string"},"per_unit_price":{"type":["integer","null"],"format":"int64"},"per_unit_price_decimal":{"type":["string","null"]},"plural_name":{"type":["string","null"]},"singular_name":{"type":["string","null"]}},"required":["currency","description","name"],"title":"CreateBillingCreditRequestBody"},"BillingCreditsPostResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"BillingCreditsPostResponsesContentApplicationJsonSchemaParams"},"credits_createBillingCredit_Response_201":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BillingCreditResponseData"},"params":{"$ref":"#/components/schemas/BillingCreditsPostResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"credits_createBillingCredit_Response_201"},"BillingCreditsCreditIdGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"BillingCreditsCreditIdGetResponsesContentApplicationJsonSchemaParams"},"credits_getSingleBillingCredit_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BillingCreditResponseData"},"params":{"$ref":"#/components/schemas/BillingCreditsCreditIdGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"credits_getSingleBillingCredit_Response_200"},"UpdateBillingCreditRequestBody":{"type":"object","properties":{"burn_strategy":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditBurnStrategy"},{"type":"null"}]},"currency_prices":{"type":["array","null"],"items":{"$ref":"#/components/schemas/CreditCurrencyPriceRequestBody"}},"default_expiry_unit":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditExpiryUnit"},{"type":"null"}]},"default_expiry_unit_count":{"type":["integer","null"],"format":"int64"},"default_rollover_policy":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditRolloverPolicy"},{"type":"null"}]},"description":{"type":"string"},"icon":{"type":["string","null"]},"name":{"type":"string"},"per_unit_price":{"type":["integer","null"],"format":"int64"},"per_unit_price_decimal":{"type":["string","null"]},"plural_name":{"type":["string","null"]},"singular_name":{"type":["string","null"]}},"required":["description","name"],"title":"UpdateBillingCreditRequestBody"},"BillingCreditsCreditIdPutResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"BillingCreditsCreditIdPutResponsesContentApplicationJsonSchemaParams"},"credits_updateBillingCredit_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BillingCreditResponseData"},"params":{"$ref":"#/components/schemas/BillingCreditsCreditIdPutResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"credits_updateBillingCredit_Response_200"},"BillingCreditsCreditIdDeleteResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"BillingCreditsCreditIdDeleteResponsesContentApplicationJsonSchemaParams"},"credits_softDeleteBillingCredit_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeleteResponse"},"params":{"$ref":"#/components/schemas/BillingCreditsCreditIdDeleteResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"credits_softDeleteBillingCredit_Response_200"},"BillingCreditBundleStatus":{"type":"string","enum":["active","inactive"],"title":"BillingCreditBundleStatus"},"BillingCreditBundleType":{"type":"string","enum":["fixed"],"title":"BillingCreditBundleType"},"CreditBundleCurrencyPriceResponseData":{"type":"object","properties":{"currency":{"type":"string"},"price":{"$ref":"#/components/schemas/BillingPriceResponseData"}},"required":["currency"],"title":"CreditBundleCurrencyPriceResponseData"},"BillingCreditBundleResponseData":{"type":"object","properties":{"billing_invoice_id":{"type":["string","null"]},"bundle_type":{"$ref":"#/components/schemas/BillingCreditBundleType"},"compatible_plan_ids":{"type":"array","items":{"type":"string"},"description":"Plans whose companies may purchase this bundle. Empty means the bundle is purchasable on every plan."},"created_at":{"type":"string","format":"date-time"},"credit_description":{"type":"string"},"credit_icon":{"type":["string","null"]},"credit_id":{"type":"string"},"credit_name":{"type":"string"},"currency_prices":{"type":"array","items":{"$ref":"#/components/schemas/CreditBundleCurrencyPriceResponseData"}},"expiry_type":{"$ref":"#/components/schemas/BillingCreditExpiryType"},"expiry_unit":{"$ref":"#/components/schemas/BillingCreditExpiryUnit"},"expiry_unit_count":{"type":["integer","null"],"format":"int64"},"has_grants":{"type":"boolean"},"id":{"type":"string"},"name":{"type":"string"},"plural_name":{"type":["string","null"]},"price":{"$ref":"#/components/schemas/BillingPriceResponseData"},"quantity":{"type":["integer","null"],"format":"int64"},"singular_name":{"type":["string","null"]},"status":{"$ref":"#/components/schemas/BillingCreditBundleStatus"},"unit_price":{"$ref":"#/components/schemas/BillingPriceResponseData"},"updated_at":{"type":"string","format":"date-time"}},"required":["bundle_type","compatible_plan_ids","created_at","credit_id","credit_name","currency_prices","expiry_type","expiry_unit","has_grants","id","name","status","updated_at"],"title":"BillingCreditBundleResponseData"},"BillingCreditsBundlesGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{"bundle_type":{"$ref":"#/components/schemas/BillingCreditBundleType"},"credit_id":{"type":"string"},"ids":{"type":"array","items":{"type":"string"}},"limit":{"type":"integer","format":"int64","description":"Page limit (default 100)"},"offset":{"type":"integer","format":"int64","description":"Page offset (default 0)"},"status":{"$ref":"#/components/schemas/BillingCreditBundleStatus"}},"description":"Input parameters","title":"BillingCreditsBundlesGetResponsesContentApplicationJsonSchemaParams"},"credits_listCreditBundles_Response_200":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BillingCreditBundleResponseData"}},"params":{"$ref":"#/components/schemas/BillingCreditsBundlesGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"credits_listCreditBundles_Response_200"},"CreditBundleCurrencyPriceRequestBody":{"type":"object","properties":{"currency":{"type":"string"},"price_per_unit":{"type":["integer","null"],"format":"int64"},"price_per_unit_decimal":{"type":["string","null"]}},"required":["currency"],"title":"CreditBundleCurrencyPriceRequestBody"},"CreateCreditBundleRequestBody":{"type":"object","properties":{"bundle_name":{"type":"string"},"bundle_type":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditBundleType"},{"type":"null"}]},"compatible_plan_ids":{"type":["array","null"],"items":{"type":"string"},"description":"Plans whose companies may purchase this bundle. Omitted or empty means the bundle is purchasable on every plan."},"credit_id":{"type":"string"},"currency":{"type":"string"},"currency_prices":{"type":["array","null"],"items":{"$ref":"#/components/schemas/CreditBundleCurrencyPriceRequestBody"}},"expiry_type":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditExpiryType"},{"type":"null"}]},"expiry_unit":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditExpiryUnit"},{"type":"null"}]},"expiry_unit_count":{"type":["integer","null"],"format":"int64"},"price_per_unit":{"type":"integer","format":"int64"},"price_per_unit_decimal":{"type":["string","null"]},"quantity":{"type":["integer","null"],"format":"int64"},"status":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditBundleStatus"},{"type":"null"}]}},"required":["bundle_name","credit_id","currency","price_per_unit"],"title":"CreateCreditBundleRequestBody"},"BillingCreditsBundlesPostResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"BillingCreditsBundlesPostResponsesContentApplicationJsonSchemaParams"},"credits_createCreditBundle_Response_201":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BillingCreditBundleResponseData"},"params":{"$ref":"#/components/schemas/BillingCreditsBundlesPostResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"credits_createCreditBundle_Response_201"},"BillingCreditsBundlesBundleIdGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"BillingCreditsBundlesBundleIdGetResponsesContentApplicationJsonSchemaParams"},"credits_getCreditBundle_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BillingCreditBundleResponseData"},"params":{"$ref":"#/components/schemas/BillingCreditsBundlesBundleIdGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"credits_getCreditBundle_Response_200"},"UpdateCreditBundleDetailsRequestBody":{"type":"object","properties":{"bundle_name":{"type":"string"},"compatible_plan_ids":{"type":["array","null"],"items":{"type":"string"},"description":"Plans whose companies may purchase this bundle. Omitted leaves compatibility unchanged; empty resets the bundle to purchasable on every plan."},"currency_prices":{"type":["array","null"],"items":{"$ref":"#/components/schemas/CreditBundleCurrencyPriceRequestBody"}},"expiry_type":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditExpiryType"},{"type":"null"}]},"expiry_unit":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditExpiryUnit"},{"type":"null"}]},"expiry_unit_count":{"type":["integer","null"],"format":"int64"},"price_per_unit":{"type":"integer","format":"int64"},"price_per_unit_decimal":{"type":["string","null"]},"quantity":{"type":["integer","null"],"format":"int64"},"status":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditBundleStatus"},{"type":"null"}]}},"required":["bundle_name","price_per_unit"],"title":"UpdateCreditBundleDetailsRequestBody"},"BillingCreditsBundlesBundleIdPutResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"BillingCreditsBundlesBundleIdPutResponsesContentApplicationJsonSchemaParams"},"credits_updateCreditBundleDetails_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BillingCreditBundleResponseData"},"params":{"$ref":"#/components/schemas/BillingCreditsBundlesBundleIdPutResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"credits_updateCreditBundleDetails_Response_200"},"BillingCreditsBundlesBundleIdDeleteResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"BillingCreditsBundlesBundleIdDeleteResponsesContentApplicationJsonSchemaParams"},"credits_deleteCreditBundle_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeleteResponse"},"params":{"$ref":"#/components/schemas/BillingCreditsBundlesBundleIdDeleteResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"credits_deleteCreditBundle_Response_200"},"CreateCompanyCreditGrant":{"type":"object","properties":{"billing_periods_count":{"type":["integer","null"],"format":"int64"},"company_id":{"type":"string"},"credit_id":{"type":"string"},"currency":{"type":["string","null"]},"expires_at":{"type":["string","null"],"format":"date-time"},"expiry_type":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditExpiryType"},{"type":"null"}]},"expiry_unit":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditExpiryUnit"},{"type":"null"}]},"expiry_unit_count":{"type":["integer","null"],"format":"int64"},"quantity":{"type":"integer","format":"int64"},"reason":{"$ref":"#/components/schemas/BillingCreditGrantReason"},"renewal_enabled":{"type":["boolean","null"]},"renewal_period":{"oneOf":[{"$ref":"#/components/schemas/BillingPlanCreditGrantResetStart"},{"type":"null"}]}},"required":["company_id","credit_id","quantity","reason"],"title":"CreateCompanyCreditGrant"},"CreditTransferResponseData":{"type":"object","properties":{"amount":{"type":"number","format":"double"},"created_at":{"type":"string","format":"date-time"},"direction":{"type":"string"},"id":{"type":"string"},"reason":{"type":"string"},"related_grant_id":{"type":"string"}},"required":["amount","created_at","direction","id","reason","related_grant_id"],"title":"CreditTransferResponseData"},"BillingCreditGrantZeroedOutReason":{"type":"string","enum":["customer_archived","expired","integration_uninstalled","license_retired","manual","plan_change","plan_period_reset","reconciled"],"title":"BillingCreditGrantZeroedOutReason"},"BillingCreditGrantResponseData":{"type":"object","properties":{"company_id":{"type":"string"},"company_license_id":{"type":["string","null"],"description":"The license instance this grant was issued for. Set only when a per-license plan grant issued it; null on a plan's own grant."},"company_name":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"credit_icon":{"type":["string","null"]},"credit_id":{"type":"string"},"credit_name":{"type":"string"},"currency":{"type":["string","null"]},"expires_at":{"type":["string","null"],"format":"date-time"},"grant_reason":{"$ref":"#/components/schemas/BillingCreditGrantReason"},"id":{"type":"string"},"license_name":{"type":["string","null"],"description":"Name of the license this grant was issued for, when it came from a per-license plan grant."},"plan_id":{"type":["string","null"]},"plan_name":{"type":["string","null"]},"price":{"$ref":"#/components/schemas/BillingPriceResponseData"},"quantity":{"type":"number","format":"double"},"quantity_remaining":{"type":"number","format":"double"},"quantity_used":{"type":"number","format":"double"},"renewal_enabled":{"type":"boolean"},"renewal_period":{"oneOf":[{"$ref":"#/components/schemas/BillingPlanCreditGrantResetCadence"},{"type":"null"}]},"reserved":{"type":["number","null"],"format":"double"},"settled":{"type":["number","null"],"format":"double"},"source_grant_id":{"type":["string","null"],"description":"For rollover grants, the ID of the source grant that this grant rolled from."},"source_label":{"type":"string"},"transfers":{"type":"array","items":{"$ref":"#/components/schemas/CreditTransferResponseData"}},"updated_at":{"type":"string","format":"date-time"},"valid_from":{"type":["string","null"],"format":"date-time"},"zeroed_out_date":{"type":["string","null"],"format":"date-time"},"zeroed_out_reason":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditGrantZeroedOutReason"},{"type":"null"}]}},"required":["company_id","company_name","created_at","credit_id","credit_name","grant_reason","id","quantity","quantity_remaining","quantity_used","renewal_enabled","source_label","updated_at"],"title":"BillingCreditGrantResponseData"},"BillingCreditsGrantsCompanyPostResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"BillingCreditsGrantsCompanyPostResponsesContentApplicationJsonSchemaParams"},"credits_grantBillingCreditsToCompany_Response_201":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BillingCreditGrantResponseData"},"params":{"$ref":"#/components/schemas/BillingCreditsGrantsCompanyPostResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"credits_grantBillingCreditsToCompany_Response_201"},"CreditGrantSortOrder":{"type":"string","enum":["created_at","expires_at","quantity","quantity_remaining"],"title":"CreditGrantSortOrder"},"BillingCreditsGrantsCompanyListGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{"company_id":{"type":"string"},"dir":{"$ref":"#/components/schemas/SortDirection"},"limit":{"type":"integer","format":"int64","description":"Page limit (default 100)"},"offset":{"type":"integer","format":"int64","description":"Page offset (default 0)"},"order":{"$ref":"#/components/schemas/CreditGrantSortOrder"}},"description":"Input parameters","title":"BillingCreditsGrantsCompanyListGetResponsesContentApplicationJsonSchemaParams"},"credits_listCompanyGrants_Response_200":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BillingCreditGrantResponseData"}},"params":{"$ref":"#/components/schemas/BillingCreditsGrantsCompanyListGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"credits_listCompanyGrants_Response_200"},"BillingCreditsGrantsListGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{"credit_id":{"type":"string"},"ids":{"type":"array","items":{"type":"string"}},"limit":{"type":"integer","format":"int64","description":"Page limit (default 100)"},"offset":{"type":"integer","format":"int64","description":"Page offset (default 0)"}},"description":"Input parameters","title":"BillingCreditsGrantsListGetResponsesContentApplicationJsonSchemaParams"},"credits_listGrantsForCredit_Response_200":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BillingCreditGrantResponseData"}},"params":{"$ref":"#/components/schemas/BillingCreditsGrantsListGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"credits_listGrantsForCredit_Response_200"},"ZeroOutGrantRequestBody":{"type":"object","properties":{"reason":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditGrantZeroedOutReason"},{"type":"null"}]}},"title":"ZeroOutGrantRequestBody"},"BillingCreditsGrantsGrantIdZeroOutPutResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"BillingCreditsGrantsGrantIdZeroOutPutResponsesContentApplicationJsonSchemaParams"},"credits_zeroOutGrant_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BillingCreditGrantResponseData"},"params":{"$ref":"#/components/schemas/BillingCreditsGrantsGrantIdZeroOutPutResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"credits_zeroOutGrant_Response_200"},"BillingCreditsPlanGrantsGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{"credit_id":{"type":"string"},"ids":{"type":"array","items":{"type":"string"}},"limit":{"type":"integer","format":"int64","description":"Page limit (default 100)"},"offset":{"type":"integer","format":"int64","description":"Page offset (default 0)"},"plan_id":{"type":"string"},"plan_ids":{"type":"array","items":{"type":"string"}},"plan_version_id":{"type":"string"},"plan_version_ids":{"type":"array","items":{"type":"string"}}},"description":"Input parameters","title":"BillingCreditsPlanGrantsGetResponsesContentApplicationJsonSchemaParams"},"credits_listBillingPlanCreditGrants_Response_200":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/BillingPlanCreditGrantResponseData"}},"params":{"$ref":"#/components/schemas/BillingCreditsPlanGrantsGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"credits_listBillingPlanCreditGrants_Response_200"},"CreditAutoTopupAmountType":{"type":"string","enum":["credit"],"title":"CreditAutoTopupAmountType"},"CreateBillingPlanCreditGrantRequestBody":{"type":"object","properties":{"apply_to_existing":{"type":["boolean","null"]},"auto_topup_amount":{"type":["integer","null"],"format":"int64"},"auto_topup_amount_type":{"oneOf":[{"$ref":"#/components/schemas/CreditAutoTopupAmountType"},{"type":"null"}]},"auto_topup_availability":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditAutoTopupAvailability"},{"type":"null"}]},"auto_topup_enabled":{"type":["boolean","null"]},"auto_topup_expiry_type":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditExpiryType"},{"type":"null"}]},"auto_topup_expiry_unit":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditExpiryUnit"},{"type":"null"}]},"auto_topup_expiry_unit_count":{"type":["integer","null"],"format":"int64"},"auto_topup_self_service":{"type":["boolean","null"]},"auto_topup_threshold_credits":{"type":["integer","null"],"format":"int64"},"auto_topup_threshold_percent":{"type":["integer","null"],"format":"int64"},"can_buy_bundles":{"type":["boolean","null"],"description":"Deprecated: use compatible_plan_ids on credit bundles instead. Still accepted; writes through to the credit's bundle compatibility."},"company_credit_amount":{"type":["integer","null"],"format":"int64","description":"Credits granted once per company on top of the per-license amount. Only valid when scaling is per_license. Defaults to 0."},"credit_amount":{"type":"integer","format":"int64"},"credit_id":{"type":"string"},"expiry_type":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditExpiryType"},{"type":"null"}]},"expiry_unit":{"oneOf":[{"$ref":"#/components/schemas/BillingCreditExpiryUnit"},{"type":"null"}]},"expiry_unit_count":{"type":["integer","null"],"format":"int64"},"license_id":{"type":["string","null"],"description":"The license whose quantity scales this grant. Required when scaling is per_license."},"plan_id":{"type":"string"},"plan_version_id":{"type":["string","null"]},"reset_cadence":{"$ref":"#/components/schemas/BillingPlanCreditGrantResetCadence"},"reset_start":{"$ref":"#/components/schemas/BillingPlanCreditGrantResetStart"},"reset_type":{"oneOf":[{"$ref":"#/components/schemas/BillingPlanCreditGrantResetType"},{"type":"null"}]},"rollover_percentage":{"type":["integer","null"],"format":"int64","description":"Percentage of unused credits that carry over when this grant resets. Only applies when reset_type is plan_period. Rolled-over credits expire at the next reset and are not rolled again. Defaults to 0."},"scaling":{"oneOf":[{"$ref":"#/components/schemas/PlanCreditGrantScaling"},{"type":"null"}],"description":"Whether the grant is a fixed amount per company, or issued once per license the company holds. Defaults to fixed."}},"required":["credit_amount","credit_id","plan_id","reset_cadence","reset_start"],"title":"CreateBillingPlanCreditGrantRequestBody"},"BillingCreditsPlanGrantsPostResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"BillingCreditsPlanGrantsPostResponsesContentApplicationJsonSchemaParams"},"credits_createBillingPlanCreditGrant_Response_201":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/BillingPlanCreditGrantResponseData"},"params":{"$ref":"#/components/schemas/BillingCreditsPlanGrantsPostResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"credits_createBillingPlanCreditGrant_Response_201"},"BillingCreditsPlanGrantsPlanGrantIdDeleteResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{"apply_to_existing":{"type":"boolean"}},"description":"Input parameters","title":"BillingCreditsPlanGrantsPlanGrantIdDeleteResponsesContentApplicationJsonSchemaParams"},"credits_deleteBillingPlanCreditGrant_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeleteResponse"},"params":{"$ref":"#/components/schemas/BillingCreditsPlanGrantsPlanGrantIdDeleteResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"credits_deleteBillingPlanCreditGrant_Response_200"},"AccountMembersGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"}},"limit":{"type":"integer","format":"int64","description":"Page limit (default 100)"},"offset":{"type":"integer","format":"int64","description":"Page offset (default 0)"},"q":{"type":"string","description":"Search filter"},"role":{"$ref":"#/components/schemas/AccountMemberRole","description":"Filter by member role"}},"description":"Input parameters","title":"AccountMembersGetResponsesContentApplicationJsonSchemaParams"},"accounts_listAccountMembers_Response_200":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AccountMemberResponseData"}},"params":{"$ref":"#/components/schemas/AccountMembersGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"accounts_listAccountMembers_Response_200"},"AccountMembersAccountMemberIdGetResponsesContentApplicationJsonSchemaParams":{"type":"object","properties":{},"description":"Input parameters","title":"AccountMembersAccountMemberIdGetResponsesContentApplicationJsonSchemaParams"},"accounts_getAccountMember_Response_200":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/AccountMemberResponseData"},"params":{"$ref":"#/components/schemas/AccountMembersAccountMemberIdGetResponsesContentApplicationJsonSchemaParams","description":"Input parameters"}},"required":["data","params"],"title":"accounts_getAccountMember_Response_200"}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-Schematic-Api-Key"}}}}