info: title: Schematic API version: "0.1" description: Schematic API x-rules-engine-schema-version: v97288f60 openapi: 3.0.0 security: - ApiKeyAuth: [] servers: - url: https://api.schematichq.com components: securitySchemes: ApiKeyAuth: type: apiKey in: header name: X-Schematic-Api-Key responses: BadRequest: description: Bad request content: application/json: schema: $ref: '#/components/schemas/ApiError' Conflict: description: Conflict content: application/json: schema: $ref: '#/components/schemas/ApiError' Forbidden: description: Forbidden content: application/json: schema: $ref: '#/components/schemas/ApiError' NotFound: description: Not found content: application/json: schema: $ref: '#/components/schemas/ApiError' ServerError: description: Server error content: application/json: schema: $ref: '#/components/schemas/ApiError' Unauthorized: description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/ApiError' UnprocessableEntity: description: Unprocessable entity content: application/json: schema: $ref: '#/components/schemas/ApiError' schemas: AccountMemberPermission: type: string enum: - billing_credits_edit - companies_edit - company_users_edit - components_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 AccountMemberResponseData: type: object properties: created_at: type: string format: date-time email: type: string nullable: true id: type: string image_url: type: string nullable: true name: type: string nullable: true permissions: additionalProperties: type: array items: $ref: '#/components/schemas/AccountMemberPermission' maxItems: 64 type: object role: allOf: - $ref: '#/components/schemas/AccountMemberRole' nullable: true updated_at: type: string format: date-time required: - created_at - id - permissions - updated_at title: AccountMemberResponseData AccountMemberRole: type: string enum: - admin - member ActivityEntryResponseData: type: object properties: actor_name: type: string method: type: string resource_name: type: string resource_type: type: string timestamp: type: string format: date-time title: type: string required: - actor_name - method - resource_name - resource_type - timestamp - title title: ActivityEntryResponseData ActivityResponseResponseData: type: object properties: entries: type: array items: $ref: '#/components/schemas/ActivityEntryResponseData' maxItems: 1000 required: - entries title: ActivityResponseResponseData ActorType: type: string enum: - api_key - app_user - stripe_app - system - temporary_access_token ApiError: type: object properties: error: type: string description: Error message required: - error ApiKeyCreateResponseData: type: object properties: created_at: type: string format: date-time description: type: string nullable: true environment: $ref: '#/components/schemas/EnvironmentResponseData' environment_id: type: string nullable: true id: type: string last_used_at: type: string format: date-time nullable: true name: type: string readonly: type: boolean scopes: type: array items: $ref: '#/components/schemas/ApiKeyScope' maxItems: 50 secret: type: string updated_at: type: string format: date-time required: - id - created_at - name - readonly - scopes - updated_at - secret title: ApiKeyCreateResponseData ApiKeyResponseData: type: object properties: created_at: type: string format: date-time description: type: string nullable: true environment: $ref: '#/components/schemas/EnvironmentResponseData' environment_id: type: string nullable: true id: type: string last_used_at: type: string format: date-time nullable: true name: type: string readonly: type: boolean scopes: type: array items: $ref: '#/components/schemas/ApiKeyScope' maxItems: 50 updated_at: type: string format: date-time required: - id - created_at - name - readonly - scopes - updated_at title: ApiKeyResponseData ApiKeyScope: type: string enum: - admin - capture - read - write AuditLogListResponseData: type: object properties: actor_type: $ref: '#/components/schemas/ActorType' api_key_id: type: string nullable: true ended_at: type: string format: date-time nullable: true environment: $ref: '#/components/schemas/EnvironmentResponseData' environment_id: type: string nullable: true id: type: string maxLength: 36 minLength: 36 method: type: string maxLength: 10 minLength: 1 resource_id: type: integer format: int64 nullable: true resource_id_string: type: string nullable: true maxLength: 256 resource_name: type: string nullable: true maxLength: 256 resource_type: type: string nullable: true maxLength: 64 resp_code: type: integer format: int64 nullable: true maximum: 599 minimum: 100 secondary_resource: type: string nullable: true maxLength: 256 started_at: type: string format: date-time url: type: string maxLength: 2048 minLength: 1 user_name: type: string nullable: true maxLength: 256 required: - actor_type - method - id - started_at - url title: AuditLogListResponseData AuditLogResponseData: type: object properties: actor_type: $ref: '#/components/schemas/ActorType' api_key_id: type: string nullable: true ended_at: type: string format: date-time nullable: true environment: $ref: '#/components/schemas/EnvironmentResponseData' environment_id: type: string nullable: true id: type: string maxLength: 36 minLength: 36 method: type: string maxLength: 10 minLength: 1 req_body: type: string nullable: true resource_id: type: integer format: int64 nullable: true resource_id_string: type: string nullable: true maxLength: 256 resource_name: type: string nullable: true maxLength: 256 resource_type: type: string nullable: true maxLength: 64 resp_body: type: string nullable: true resp_code: type: integer format: int64 nullable: true maximum: 599 minimum: 100 secondary_resource: type: string nullable: true maxLength: 256 started_at: type: string format: date-time url: type: string maxLength: 2048 minLength: 1 user_id: type: string nullable: true maxLength: 256 user_name: type: string nullable: true maxLength: 256 required: - actor_type - method - id - started_at - url title: AuditLogResponseData BillingCouponResponseData: type: object properties: account_id: type: string amount_off: type: integer format: int64 nullable: true currency: type: string nullable: true duration: type: string nullable: true duration_in_months: type: integer format: int64 nullable: true environment_id: type: string external_id: type: string id: type: string is_active: type: boolean max_redemptions: type: integer format: int64 nullable: true metadata: type: object name: type: string percent_off: type: number nullable: true provider_type: $ref: '#/components/schemas/BillingProviderType' times_redeemed: type: integer format: int64 valid_from: type: string format: date-time nullable: true valid_until: type: string format: date-time nullable: true required: - id - account_id - environment_id - external_id - is_active - metadata - name - provider_type - times_redeemed title: BillingCouponResponseData BillingCreditBundleResponseData: type: object properties: billing_invoice_id: type: string nullable: true bundle_type: $ref: '#/components/schemas/BillingCreditBundleType' created_at: type: string format: date-time credit_description: type: string credit_icon: type: string nullable: true credit_id: type: string credit_name: type: string currency_prices: type: array items: $ref: '#/components/schemas/CreditBundleCurrencyPriceResponseData' maxItems: 256 expiry_type: $ref: '#/components/schemas/BillingCreditExpiryType' expiry_unit: $ref: '#/components/schemas/BillingCreditExpiryUnit' expiry_unit_count: type: integer format: int64 nullable: true has_grants: type: boolean id: type: string name: type: string plural_name: type: string nullable: true price: $ref: '#/components/schemas/BillingPriceResponseData' quantity: type: integer format: int64 nullable: true singular_name: type: string nullable: true status: $ref: '#/components/schemas/BillingCreditBundleStatus' unit_price: $ref: '#/components/schemas/BillingPriceResponseData' updated_at: type: string format: date-time required: - id - credit_id - name - status - bundle_type - expiry_unit - expiry_type - credit_name - currency_prices - has_grants - created_at - updated_at title: BillingCreditBundleResponseData BillingCreditBundleStatus: type: string enum: - active - inactive BillingCreditBundleType: type: string enum: - fixed BillingCreditBundleView: type: object properties: bundle_type: $ref: '#/components/schemas/BillingCreditBundleType' created_at: type: string format: date-time credit_description: type: string credit_icon: type: string nullable: true credit_id: type: string credit_name: type: string currency_prices: type: array items: $ref: '#/components/schemas/CreditBundleCurrencyPrice' maxItems: 256 expiry_type: $ref: '#/components/schemas/BillingCreditExpiryType' expiry_unit: $ref: '#/components/schemas/BillingCreditExpiryUnit' expiry_unit_count: type: integer format: int64 nullable: true has_grants: type: boolean id: type: string name: type: string plural_name: type: string nullable: true price: $ref: '#/components/schemas/BillingProductPriceResponseData' quantity: type: integer format: int64 nullable: true singular_name: type: string nullable: true status: $ref: '#/components/schemas/BillingCreditBundleStatus' unit_price: $ref: '#/components/schemas/BillingProductPriceResponseData' updated_at: type: string format: date-time required: - id - credit_id - name - status - bundle_type - expiry_unit - expiry_type - credit_name - currency_prices - has_grants - created_at - updated_at title: BillingCreditBundleView BillingCreditBurnStrategy: type: string enum: - expiration_priority - first_in_first_out - last_in_first_out - plan_first_then_credit_bundles_first_in_first_out BillingCreditExpiryType: type: string enum: - duration - end_of_billing_period - end_of_next_billing_period - end_of_trial - no_expiry BillingCreditExpiryUnit: type: string enum: - billing_periods - days BillingCreditGrantReason: type: string enum: - adjustment - billing_credit_auto_topup - free - plan - purchased BillingCreditGrantResponseData: type: object properties: company_id: type: string company_name: type: string created_at: type: string format: date-time credit_icon: type: string nullable: true credit_id: type: string credit_name: type: string currency: type: string nullable: true expires_at: type: string format: date-time nullable: true grant_reason: $ref: '#/components/schemas/BillingCreditGrantReason' id: type: string plan_id: type: string nullable: true plan_name: type: string nullable: true price: $ref: '#/components/schemas/BillingPriceResponseData' quantity: type: integer format: int64 quantity_remaining: type: number quantity_used: type: number renewal_enabled: type: boolean renewal_period: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetCadence' nullable: true source_label: type: string transfers: type: array items: $ref: '#/components/schemas/CreditTransferResponseData' maxItems: 1000 updated_at: type: string format: date-time valid_from: type: string format: date-time nullable: true zeroed_out_date: type: string format: date-time nullable: true zeroed_out_reason: allOf: - $ref: '#/components/schemas/BillingCreditGrantZeroedOutReason' nullable: true required: - id - quantity - quantity_remaining - quantity_used - company_id - company_name - credit_id - credit_name - source_label - created_at - updated_at - grant_reason - renewal_enabled title: BillingCreditGrantResponseData BillingCreditGrantZeroedOutReason: type: string enum: - expired - manual - plan_change - plan_period_reset BillingCreditLedgerResponseData: type: object properties: description: type: string nullable: true icon: type: string nullable: true id: type: string name: type: string plural_name: type: string nullable: true singular_name: type: string nullable: true required: - id - name title: BillingCreditLedgerResponseData 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' maxItems: 256 default_expiry_unit: $ref: '#/components/schemas/BillingCreditExpiryUnit' default_expiry_unit_count: type: integer format: int64 nullable: true default_rollover_policy: $ref: '#/components/schemas/BillingCreditRolloverPolicy' description: type: string icon: type: string nullable: true id: type: string name: type: string plural_name: type: string nullable: true price: $ref: '#/components/schemas/BillingPriceResponseData' product: $ref: '#/components/schemas/BillingProductResponseData' singular_name: type: string nullable: true updated_at: type: string format: date-time required: - id - name - description - default_expiry_unit - default_rollover_policy - burn_strategy - cost_editable - currency_prices - created_at - updated_at title: BillingCreditResponseData BillingCreditRolloverPolicy: type: string enum: - expire - none - rollover 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' maxItems: 1000 default_expiry_unit: $ref: '#/components/schemas/BillingCreditExpiryUnit' default_expiry_unit_count: type: integer format: int64 nullable: true default_rollover_policy: $ref: '#/components/schemas/BillingCreditRolloverPolicy' description: type: string environment_id: type: string icon: type: string nullable: true id: type: string name: type: string plural_name: type: string nullable: true price: $ref: '#/components/schemas/BillingPriceView' price_per_unit: type: integer format: int64 nullable: true price_per_unit_decimal: type: string nullable: true product: $ref: '#/components/schemas/BillingProductResponseData' singular_name: type: string nullable: true updated_at: type: string format: date-time required: - id - account_id - environment_id - name - description - default_expiry_unit - default_rollover_policy - burn_strategy - cost_editable - currency_prices - created_at - updated_at title: BillingCreditView BillingCustomerResponseData: type: object properties: company_id: type: string nullable: true deleted_at: type: string format: date-time nullable: true email: type: string external_id: type: string id: type: string name: type: string provider_type: $ref: '#/components/schemas/BillingProviderType' updated_at: type: string format: date-time required: - email - external_id - id - name - provider_type - updated_at title: BillingCustomerResponseData BillingCustomerSubscription: type: object properties: currency: type: string expired_at: type: string format: date-time nullable: true interval: type: string metered_usage: type: boolean per_unit_price: type: integer format: int64 total_price: type: integer format: int64 required: - total_price - interval - metered_usage - per_unit_price - currency title: BillingCustomerSubscription BillingCustomerWithSubscriptionsResponseData: type: object properties: company_id: type: string nullable: true deleted_at: type: string format: date-time nullable: true email: type: string external_id: type: string id: type: string name: type: string provider_type: $ref: '#/components/schemas/BillingProviderType' subscriptions: type: array items: $ref: '#/components/schemas/BillingCustomerSubscription' maxItems: 1000 updated_at: type: string format: date-time required: - email - external_id - id - name - provider_type - subscriptions - updated_at title: BillingCustomerWithSubscriptionsResponseData 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 BillingMeterResponseData: type: object properties: dispaly_name: type: string event_name: type: string event_payload_key: type: string external_price_id: type: string id: type: string provider_type: $ref: '#/components/schemas/BillingProviderType' required: - dispaly_name - event_name - event_payload_key - external_price_id - id - provider_type title: BillingMeterResponseData BillingPlanCreditGrantResetCadence: type: string enum: - daily - monthly - weekly - yearly BillingPlanCreditGrantResetStart: type: string enum: - billing_period - first_of_month BillingPlanCreditGrantResetType: type: string enum: - no_reset - plan_period BillingPlanCreditGrantResponseData: type: object properties: auto_topup_amount: type: integer format: int64 nullable: true auto_topup_amount_type: type: string nullable: true auto_topup_enabled: type: boolean auto_topup_expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true auto_topup_expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true auto_topup_expiry_unit_count: type: integer format: int64 nullable: true auto_topup_threshold_credits: type: integer format: int64 nullable: true auto_topup_threshold_percent: type: integer format: int64 nullable: true 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 deprecated: true credit_plural_name: type: string description: Use plural_name from the nested credit object instead nullable: true deprecated: true credit_singular_name: type: string description: Use singular_name from the nested credit object instead nullable: true deprecated: true expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true expiry_unit_count: type: integer format: int64 nullable: true id: type: string plan: $ref: '#/components/schemas/PreviewObjectResponseData' plan_id: type: string plan_name: type: string description: Use plan.name from the nested plan object instead deprecated: true plan_version_id: type: string nullable: true reset_cadence: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetCadence' nullable: true reset_start: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetStart' nullable: true reset_type: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetType' nullable: true updated_at: type: string format: date-time required: - id - credit_id - plan_id - plan_name - credit_amount - credit_name - auto_topup_enabled - created_at - updated_at title: BillingPlanCreditGrantResponseData BillingPriceResponseData: type: object properties: currency: type: string external_price_id: type: string id: type: string interval: $ref: '#/components/schemas/BillingProductPriceInterval' nickname: type: string nullable: true price: type: integer format: int64 price_decimal: type: string nullable: true provider_type: $ref: '#/components/schemas/BillingProviderType' scheme: $ref: '#/components/schemas/BillingPriceScheme' required: - currency - external_price_id - id - interval - price - provider_type - scheme title: BillingPriceResponseData BillingPriceScheme: type: string enum: - per_unit - tiered BillingPriceUsageType: type: string enum: - licensed - metered 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' is_active: type: boolean meter_event_name: type: string nullable: true meter_event_payload_key: type: string nullable: true meter_id: type: string nullable: true nickname: type: string nullable: true package_size: type: integer format: int64 price: type: integer format: int64 price_decimal: type: string nullable: true price_external_id: type: string price_id: type: string price_tier: type: array items: $ref: '#/components/schemas/BillingProductPriceTierResponseData' maxItems: 100 product_external_id: type: string product_id: type: string product_name: type: string provider_type: $ref: '#/components/schemas/BillingProviderType' tiers_mode: allOf: - $ref: '#/components/schemas/BillingTiersMode' nullable: true updated_at: type: string format: date-time usage_type: $ref: '#/components/schemas/BillingPriceUsageType' required: - id - billing_scheme - created_at - currency - interval - is_active - package_size - price - price_external_id - product_external_id - provider_type - updated_at - usage_type - price_id - product_id - product_name - price_tier title: BillingPriceView BillingProductDetailResponseData: type: object properties: account_id: type: string created_at: type: string format: date-time currency: type: string description: Deprecated; currencies are associated with prices, not products nullable: true deprecated: true environment_id: type: string external_id: type: string is_active: type: boolean name: type: string price: type: number price_decimal: type: string nullable: true prices: type: array items: $ref: '#/components/schemas/BillingPriceResponseData' maxItems: 1000 product_id: type: string provider_type: $ref: '#/components/schemas/BillingProviderType' quantity: type: number 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 - product_id - provider_type - quantity - updated_at - prices - subscription_count title: BillingProductDetailResponseData BillingProductForSubscriptionResponseData: type: object properties: billing_scheme: $ref: '#/components/schemas/BillingPriceScheme' billing_threshold: type: integer format: int64 nullable: true created_at: type: string format: date-time currency: type: string environment_id: type: string external_id: type: string id: type: string interval: type: string meter_id: type: string nullable: true name: type: string package_size: type: integer format: int64 price: type: integer format: int64 price_decimal: type: string nullable: true price_external_id: type: string price_id: type: string price_tier: type: array items: $ref: '#/components/schemas/BillingProductPriceTierResponseData' maxItems: 100 provider_type: $ref: '#/components/schemas/BillingProviderType' quantity: type: number subscription_id: type: string subscription_item_external_id: type: string nullable: true updated_at: type: string format: date-time usage_type: $ref: '#/components/schemas/BillingPriceUsageType' required: - id - created_at - currency - environment_id - external_id - interval - name - package_size - price - price_external_id - price_id - price_tier - provider_type - quantity - billing_scheme - subscription_id - updated_at - usage_type title: BillingProductForSubscriptionResponseData BillingProductPlanResponseData: type: object properties: account_id: type: string billing_product_id: type: string charge_type: $ref: '#/components/schemas/ChargeType' controlled_by: $ref: '#/components/schemas/BillingProviderType' environment_id: type: string is_trialable: type: boolean monthly_price_id: type: string nullable: true one_time_price_id: type: string nullable: true plan_id: type: string trial_days: type: integer format: int64 nullable: true yearly_price_id: type: string nullable: true required: - account_id - charge_type - environment_id - plan_id - billing_product_id - controlled_by - is_trialable title: BillingProductPlanResponseData BillingProductPriceInterval: type: string enum: - day - month - one-time - year BillingProductPriceResponseData: 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' is_active: type: boolean meter_id: type: string nullable: true nickname: type: string nullable: true package_size: type: integer format: int64 price: type: integer format: int64 price_decimal: type: string nullable: true price_external_id: type: string product_external_id: type: string provider_type: $ref: '#/components/schemas/BillingProviderType' tiers_mode: allOf: - $ref: '#/components/schemas/BillingTiersMode' nullable: true updated_at: type: string format: date-time usage_type: $ref: '#/components/schemas/BillingPriceUsageType' required: - id - billing_scheme - created_at - currency - interval - is_active - package_size - price - price_external_id - product_external_id - provider_type - updated_at - usage_type title: BillingProductPriceResponseData BillingProductPriceTierResponseData: type: object properties: flat_amount: type: integer format: int64 nullable: true per_unit_price: type: integer format: int64 nullable: true per_unit_price_decimal: type: string nullable: true up_to: type: integer format: int64 nullable: true title: BillingProductPriceTierResponseData BillingProductPricing: type: object properties: billing_threshold: type: integer format: int64 nullable: true maximum: 9999999999999 minimum: 50 currency: type: string maxLength: 3 interval: type: string maxLength: 255 meter_id: type: string nullable: true maxLength: 255 package_size: type: integer format: int64 nullable: true price: type: integer format: int64 price_decimal: type: string nullable: true price_external_id: type: string maxLength: 255 product_external_id: type: string maxLength: 255 quantity: type: integer format: int64 subscription_item_external_id: type: string nullable: true maxLength: 255 usage_type: $ref: '#/components/schemas/BillingPriceUsageType' required: - product_external_id - price - quantity - interval - currency - usage_type - price_external_id title: BillingProductPricing BillingProductResponseData: type: object properties: account_id: type: string created_at: type: string format: date-time currency: type: string description: Deprecated; currencies are associated with prices, not products nullable: true deprecated: true environment_id: type: string external_id: type: string is_active: type: boolean name: type: string price: type: number price_decimal: type: string nullable: true product_id: type: string provider_type: $ref: '#/components/schemas/BillingProviderType' quantity: type: number 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 BillingProviderType: type: string enum: - orb - schematic - stripe BillingSubscriptionDiscount: type: object properties: coupon_external_id: type: string maxLength: 255 customer_facing_code: type: string nullable: true maxLength: 255 ended_at: type: string format: date-time nullable: true external_id: type: string maxLength: 255 is_active: type: boolean promo_code_external_id: type: string nullable: true maxLength: 255 started_at: type: string format: date-time required: - external_id - started_at - is_active - coupon_external_id title: BillingSubscriptionDiscount BillingSubscriptionDiscountView: type: object properties: amount_off: type: integer format: int64 nullable: true coupon_id: type: string coupon_name: type: string currency: type: string nullable: true customer_facing_code: type: string nullable: true discount_external_id: type: string duration: type: string duration_in_months: type: integer format: int64 nullable: true ended_at: type: string format: date-time nullable: true is_active: type: boolean percent_off: type: number nullable: true promo_code_external_id: type: string nullable: true started_at: type: string format: date-time subscription_external_id: type: string required: - discount_external_id - subscription_external_id - coupon_id - started_at - coupon_name - duration - is_active title: BillingSubscriptionDiscountView BillingSubscriptionResponseData: type: object properties: application_id: type: string nullable: true cancel_at: type: integer format: int64 nullable: true cancel_at_period_end: type: boolean company_id: type: string nullable: true created_at: type: string format: date-time currency: type: string customer_external_id: type: string default_payment_method_id: type: string nullable: true expired_at: type: string format: date-time nullable: true id: type: string interval: type: string metadata: type: object period_end: type: integer format: int64 period_start: type: integer format: int64 provider_type: $ref: '#/components/schemas/BillingProviderType' status: type: string subscription_external_id: type: string total_price: type: integer format: int64 trial_end: type: integer format: int64 nullable: true trial_end_setting: allOf: - $ref: '#/components/schemas/BillingSubscriptionTrialEndSetting' nullable: true required: - cancel_at_period_end - created_at - currency - customer_external_id - subscription_external_id - id - interval - period_end - period_start - total_price - provider_type - status title: BillingSubscriptionResponseData BillingSubscriptionTrialEndSetting: type: string enum: - cancel - subscribe BillingSubscriptionView: type: object properties: application_id: type: string nullable: true cancel_at: type: integer format: int64 nullable: true cancel_at_period_end: type: boolean company_id: type: string nullable: true created_at: type: string format: date-time currency: type: string customer_external_id: type: string default_payment_method_id: type: string nullable: true discounts: type: array items: $ref: '#/components/schemas/BillingSubscriptionDiscountView' maxItems: 1000 expired_at: type: string format: date-time nullable: true id: type: string interval: type: string latest_invoice: $ref: '#/components/schemas/InvoiceResponseData' metadata: type: object 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' maxItems: 1000 provider_type: $ref: '#/components/schemas/BillingProviderType' status: type: string subscription_external_id: type: string total_price: type: integer format: int64 trial_end: type: integer format: int64 nullable: true trial_end_setting: allOf: - $ref: '#/components/schemas/BillingSubscriptionTrialEndSetting' nullable: true required: - cancel_at_period_end - created_at - currency - customer_external_id - subscription_external_id - id - interval - period_end - period_start - total_price - provider_type - status - products - discounts title: BillingSubscriptionView BillingTiersMode: type: string enum: - graduated - volume CancelSubscriptionRequest: type: object properties: cancel_immediately: type: boolean description: If false, subscription cancels at period end. Defaults to true. nullable: true company_id: type: string prorate: type: boolean description: If true and cancel_immediately is true, issue prorated credit. Defaults to true. nullable: true required: - company_id title: CancelSubscriptionRequest CaptureRawEvent: type: object properties: captured_at: type: string format: date-time event_id: type: string nullable: true raw_bytes: type: string format: byte remote_ip: type: string user_agent: type: string required: - captured_at - raw_bytes - remote_ip - user_agent title: CaptureRawEvent CaptureRawEventBatch: type: object properties: events: type: array items: $ref: '#/components/schemas/CaptureRawEvent' maxItems: 1000 required: - events title: CaptureRawEventBatch ChangeSubscriptionInternalRequestBody: type: object properties: add_on_ids: type: array items: $ref: '#/components/schemas/UpdateAddOnRequestBody' maxItems: 100 company_id: type: string coupon_external_id: type: string nullable: true maxLength: 255 credit_bundles: type: array items: $ref: '#/components/schemas/UpdateCreditBundleRequestBody' maxItems: 100 new_plan_id: type: string new_price_id: type: string pay_in_advance: type: array items: $ref: '#/components/schemas/UpdatePayInAdvanceRequestBody' maxItems: 100 payment_method_id: type: string nullable: true maxLength: 255 promo_code: type: string nullable: true maxLength: 255 skip_trial: type: boolean required: - add_on_ids - pay_in_advance - credit_bundles - new_plan_id - new_price_id - skip_trial - company_id title: ChangeSubscriptionInternalRequestBody ChangeSubscriptionRequestBody: type: object properties: add_on_ids: type: array items: $ref: '#/components/schemas/UpdateAddOnRequestBody' maxItems: 100 coupon_external_id: type: string nullable: true maxLength: 255 credit_bundles: type: array items: $ref: '#/components/schemas/UpdateCreditBundleRequestBody' maxItems: 100 new_plan_id: type: string new_price_id: type: string pay_in_advance: type: array items: $ref: '#/components/schemas/UpdatePayInAdvanceRequestBody' maxItems: 100 payment_method_id: type: string nullable: true maxLength: 255 promo_code: type: string nullable: true maxLength: 255 skip_trial: type: boolean required: - add_on_ids - pay_in_advance - credit_bundles - new_plan_id - new_price_id - skip_trial title: ChangeSubscriptionRequestBody ChargeType: type: string enum: - free - one_time - recurring CheckFlagRequestBody: type: object properties: company: additionalProperties: type: string maxLength: 255 type: object nullable: true user: additionalProperties: type: string maxLength: 255 type: object nullable: true title: CheckFlagRequestBody CheckFlagResponseData: type: object properties: company_id: type: string description: If company keys were provided and matched a company, its ID nullable: true entitlement: allOf: - $ref: '#/components/schemas/FeatureEntitlement' description: If a feature entitlement rule was matched, its entitlement details error: type: string description: If an error occurred while checking the flag, the error message nullable: true feature_allocation: type: integer description: 'Deprecated: Use Entitlement.Allocation instead.' format: int64 nullable: true deprecated: true feature_usage: type: integer description: 'Deprecated: Use Entitlement.Usage instead.' format: int64 nullable: true deprecated: true feature_usage_event: type: string description: 'Deprecated: Use Entitlement.EventName instead.' nullable: true deprecated: true feature_usage_period: allOf: - $ref: '#/components/schemas/MetricPeriod' description: 'Deprecated: Use Entitlement.MetricPeriod instead.' nullable: true deprecated: true feature_usage_reset_at: type: string description: 'Deprecated: Use Entitlement.MetricResetAt instead.' format: date-time nullable: true deprecated: true flag: type: string description: The key used to check the flag flag_id: type: string description: If a flag was found, its ID nullable: true reason: type: string description: A human-readable explanation of the result rule_id: type: string description: If a rule was found, its ID nullable: true rule_type: allOf: - $ref: '#/components/schemas/RuleType' description: If a rule was found, its type nullable: true user_id: type: string description: If user keys were provided and matched a user, its ID nullable: true 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 CheckFlagsBulkRequestBody: type: object properties: contexts: type: array items: $ref: '#/components/schemas/CheckFlagRequestBody' maxItems: 100 minItems: 1 required: - contexts title: CheckFlagsBulkRequestBody CheckFlagsBulkResponseData: type: object properties: data: type: array items: $ref: '#/components/schemas/CheckFlagsResponseData' maxItems: 1000 required: - data title: CheckFlagsBulkResponseData CheckFlagsResponseData: type: object properties: flags: type: array items: $ref: '#/components/schemas/CheckFlagResponseData' maxItems: 1000 plan: $ref: '#/components/schemas/DatastreamCompanyPlan' required: - flags title: CheckFlagsResponseData CheckoutDataRequestBody: type: object properties: company_id: type: string selected_plan_id: type: string nullable: true required: - company_id title: CheckoutDataRequestBody CheckoutDataResponseData: type: object properties: active_add_ons: type: array items: $ref: '#/components/schemas/PlanDetailResponseData' maxItems: 1000 active_plan: $ref: '#/components/schemas/PlanDetailResponseData' active_usage_based_entitlements: type: array items: $ref: '#/components/schemas/UsageBasedEntitlementResponseData' maxItems: 1000 available_credit_bundles: type: array items: $ref: '#/components/schemas/BillingCreditBundleResponseData' maxItems: 1000 company: $ref: '#/components/schemas/CompanyDetailResponseData' feature_usage: $ref: '#/components/schemas/FeatureUsageDetailResponseData' selected_credit_bundles: type: array items: $ref: '#/components/schemas/CreditBundlePurchaseResponseData' maxItems: 1000 selected_plan: $ref: '#/components/schemas/PlanDetailResponseData' selected_usage_based_entitlements: type: array items: $ref: '#/components/schemas/UsageBasedEntitlementResponseData' maxItems: 1000 subscription: $ref: '#/components/schemas/CompanySubscriptionResponseData' required: - active_add_ons - active_usage_based_entitlements - selected_usage_based_entitlements - available_credit_bundles - selected_credit_bundles title: CheckoutDataResponseData CheckoutSettingsResponseData: type: object properties: collect_address: type: boolean collect_email: type: boolean collect_phone: type: boolean required: - collect_address - collect_email - collect_phone title: CheckoutSettingsResponseData CheckoutSubscription: type: object properties: application_id: type: string nullable: true cancel_at: type: integer format: int64 nullable: true cancel_at_period_end: type: boolean company_id: type: string nullable: true confirm_payment_intent_client_secret: type: string nullable: true confirm_payment_intent_id: type: string nullable: true created_at: type: string format: date-time currency: type: string customer_external_id: type: string default_payment_method_id: type: string nullable: true expired_at: type: string format: date-time nullable: true id: type: string interval: type: string invoice_url: type: string nullable: true metadata: type: object period_end: type: integer format: int64 period_start: type: integer format: int64 provider_type: $ref: '#/components/schemas/BillingProviderType' status: type: string subscription_external_id: type: string total_price: type: integer format: int64 trial_end: type: integer format: int64 nullable: true trial_end_setting: allOf: - $ref: '#/components/schemas/BillingSubscriptionTrialEndSetting' nullable: true required: - cancel_at_period_end - created_at - currency - customer_external_id - subscription_external_id - id - interval - period_end - period_start - total_price - provider_type - status title: CheckoutSubscription ClerkIntegrationConfig: type: object properties: first_events_received: type: boolean description: Whether Schematic has received the first webhook event from Clerk after install nullable: true type: type: string description: 'Discriminator: always "clerk" for this variant' enum: - clerk webhook_url: type: string description: URL configured on the Clerk webhook endpoint that delivers events to Schematic nullable: true required: - type title: ClerkIntegrationConfig CompanyCreditBalanceResponseData: type: object properties: credit_id: type: string remaining: type: number source: $ref: '#/components/schemas/BillingProviderType' total: type: number nullable: true required: - credit_id - remaining - source title: CompanyCreditBalanceResponseData CompanyDetailResponseData: type: object properties: add_ons: type: array items: $ref: '#/components/schemas/CompanyPlanWithBillingSubView' maxItems: 1000 billing_credit_balances: additionalProperties: type: number type: object nullable: true billing_subscription: $ref: '#/components/schemas/BillingSubscriptionView' billing_subscriptions: type: array items: $ref: '#/components/schemas/BillingSubscriptionView' maxItems: 1000 created_at: type: string format: date-time custom_plan_billings: type: array items: $ref: '#/components/schemas/CustomPlanBillingResponseData' maxItems: 1000 default_payment_method: $ref: '#/components/schemas/PaymentMethodResponseData' entitlements: type: array items: $ref: '#/components/schemas/FeatureEntitlement' maxItems: 1000 entity_traits: type: array items: $ref: '#/components/schemas/EntityTraitDetailResponseData' maxItems: 1000 environment_id: type: string id: type: string keys: type: array items: $ref: '#/components/schemas/EntityKeyDetailResponseData' maxItems: 1000 last_seen_at: type: string format: date-time nullable: true logo_url: type: string nullable: true metrics: type: array items: $ref: '#/components/schemas/CompanyEventPeriodMetricsResponseData' maxItems: 1000 name: type: string payment_methods: type: array items: $ref: '#/components/schemas/PaymentMethodResponseData' maxItems: 1000 plan: $ref: '#/components/schemas/CompanyPlanWithBillingSubView' plans: type: array items: $ref: '#/components/schemas/GenericPreviewObject' maxItems: 1000 rules: type: array items: $ref: '#/components/schemas/Rule' maxItems: 1000 scheduled_downgrade: $ref: '#/components/schemas/ScheduledDowngradeResponseData' traits: type: object description: A map of trait names to trait values updated_at: type: string format: date-time user_count: type: integer format: int64 required: - created_at - environment_id - id - name - updated_at - add_ons - billing_subscriptions - custom_plan_billings - entitlements - entity_traits - keys - metrics - payment_methods - plans - rules - user_count title: CompanyDetailResponseData 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 format: date-time nullable: true 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 CompanyLedgerResponseData: type: object properties: id: type: string logo_url: type: string nullable: true name: type: string required: - id - name title: CompanyLedgerResponseData CompanyMatchingCriteria: type: string enum: - billing_meta_object - manual_upsert 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: - id - company_id - user_id - created_at - updated_at title: CompanyMembershipDetailResponseData CompanyMembershipResponseData: type: object properties: 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: - id - company_id - user_id - created_at - updated_at title: CompanyMembershipResponseData 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: - id - external_user_id - external_user_name - note - created_at - updated_at title: CompanyOverrideNoteResponseData CompanyOverrideResponseData: type: object properties: company: $ref: '#/components/schemas/CompanyDetailResponseData' company_id: type: string consumption_rate: type: number nullable: true created_at: type: string format: date-time environment_id: type: string expiration_date: type: string format: date-time nullable: true feature: $ref: '#/components/schemas/FeatureResponseData' feature_id: type: string id: type: string metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true notes: type: array items: $ref: '#/components/schemas/CompanyOverrideNoteResponseData' maxItems: 1000 rule_id: type: string nullable: true rule_id_usage_exceeded: type: string nullable: true updated_at: type: string format: date-time value_bool: type: boolean nullable: true value_numeric: type: integer format: int64 nullable: true value_trait: $ref: '#/components/schemas/EntityTraitDefinitionResponseData' value_trait_id: type: string nullable: true value_type: $ref: '#/components/schemas/EntitlementValueType' required: - company_id - created_at - environment_id - feature_id - id - updated_at - value_type - notes title: CompanyOverrideResponseData CompanyPlanDetailResponseData: type: object properties: active_version: $ref: '#/components/schemas/PlanVersionResponseData' audience_type: type: string nullable: true deprecated: true billing_linked_resource: $ref: '#/components/schemas/BillingLinkedResourceResponseData' billing_product: $ref: '#/components/schemas/BillingProductDetailResponseData' charge_type: $ref: '#/components/schemas/ChargeType' company_can_trial: type: boolean company_count: type: integer format: int64 company_id: type: string nullable: true company_name: type: string nullable: true compatible_plan_ids: type: array items: type: string maxItems: 1000 controlled_by: $ref: '#/components/schemas/BillingProviderType' copied_from_plan_id: type: string nullable: true created_at: type: string format: date-time currency_prices: type: array items: $ref: '#/components/schemas/PlanCurrencyPricesResponseData' maxItems: 1000 current: type: boolean custom: type: boolean custom_plan_config: $ref: '#/components/schemas/CustomPlanConfig' description: type: string draft_version: $ref: '#/components/schemas/PlanVersionResponseData' entitlements: type: array items: $ref: '#/components/schemas/PlanEntitlementResponseData' maxItems: 1000 features: type: array items: $ref: '#/components/schemas/FeatureInPlanResponseData' maxItems: 1000 icon: $ref: '#/components/schemas/PlanIcon' id: type: string included_credit_grants: type: array items: $ref: '#/components/schemas/PlanCreditGrantView' maxItems: 1000 invalid_reason: allOf: - $ref: '#/components/schemas/CompanyPlanInvalidReason' nullable: true is_custom: type: boolean is_default: type: boolean deprecated: true is_free: type: boolean 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' trial_days: type: integer format: int64 nullable: true updated_at: type: string format: date-time usage_violations: type: array items: $ref: '#/components/schemas/FeatureUsageResponseData' maxItems: 1000 valid: type: boolean versions: type: array items: $ref: '#/components/schemas/PlanVersionResponseData' maxItems: 1000 yearly_price: $ref: '#/components/schemas/BillingPriceResponseData' required: - created_at - description - icon - id - name - plan_type - updated_at - charge_type - company_count - controlled_by - currency_prices - features - is_default - is_free - is_trialable - versions - is_custom - entitlements - compatible_plan_ids - company_can_trial - current - custom - included_credit_grants - usage_violations - valid title: CompanyPlanDetailResponseData CompanyPlanInvalidReason: type: string enum: - downgrade_not_permitted - feature_usage_exceeded CompanyPlanWithBillingSubView: type: object properties: added_on: type: string format: date-time nullable: true billing_product_external_id: type: string nullable: true billing_product_id: type: string nullable: true description: type: string nullable: true id: type: string image_url: type: string nullable: true included_credit_grants: type: array items: $ref: '#/components/schemas/PlanCreditGrantView' maxItems: 1000 name: type: string plan_period: type: string nullable: true plan_price: type: integer format: int64 nullable: true plan_version_id: type: string nullable: true required: - id - name - included_credit_grants title: CompanyPlanWithBillingSubView CompanyResponseData: type: object properties: created_at: type: string format: date-time environment_id: type: string id: type: string last_seen_at: type: string format: date-time nullable: true logo_url: type: string nullable: true name: type: string updated_at: type: string format: date-time required: - created_at - environment_id - id - name - updated_at title: CompanyResponseData CompanySubscriptionResponseData: type: object properties: cancel_at: type: string format: date-time nullable: true cancel_at_period_end: type: boolean currency: type: string customer_external_id: type: string discounts: type: array items: $ref: '#/components/schemas/BillingSubscriptionDiscountView' maxItems: 1000 expired_at: type: string format: date-time nullable: true interval: type: string latest_invoice: $ref: '#/components/schemas/InvoiceResponseData' payment_method: $ref: '#/components/schemas/PaymentMethodResponseData' products: type: array items: $ref: '#/components/schemas/BillingProductForSubscriptionResponseData' maxItems: 1000 provider_type: $ref: '#/components/schemas/BillingProviderType' status: type: string subscription_external_id: type: string total_price: type: integer format: int64 trial_end: type: string format: date-time nullable: true required: - customer_external_id - interval - products - discounts - provider_type - subscription_external_id - total_price - status - currency - cancel_at_period_end title: CompanySubscriptionResponseData ComparableOperator: type: string enum: - eq - gt - gte - is_empty - lt - lte - not_empty - ne CompatiblePlans: type: object properties: compatible_plan_ids: type: array items: type: string maxItems: 1000 source_plan_id: type: string required: - source_plan_id - compatible_plan_ids title: CompatiblePlans CompatiblePlansResponseData: type: object properties: compatible_plan_ids: type: array items: type: string maxItems: 1000 source_plan_id: type: string required: - source_plan_id - compatible_plan_ids title: CompatiblePlansResponseData ComponentCapabilities: type: object properties: badge_visibility: type: boolean checkout: type: boolean required: - checkout - badge_visibility title: ComponentCapabilities ComponentCheckoutSettings: type: object properties: collect_address: type: boolean collect_email: type: boolean collect_phone: type: boolean tax_collection_enabled: type: boolean required: - collect_email - collect_address - collect_phone - tax_collection_enabled title: ComponentCheckoutSettings ComponentDisplaySettings: type: object properties: show_as_monthly_prices: type: boolean show_credits: type: boolean show_feature_description: type: boolean show_hard_limit: type: boolean show_period_toggle: type: boolean show_zero_price_as_free: type: boolean required: - show_as_monthly_prices - show_credits - show_feature_description - show_hard_limit - show_period_toggle - show_zero_price_as_free title: ComponentDisplaySettings ComponentEntityType: type: string enum: - billing - entitlement ComponentHydrateResponseData: type: object properties: active_add_ons: type: array items: $ref: '#/components/schemas/CompanyPlanDetailResponseData' maxItems: 1000 active_plans: type: array items: $ref: '#/components/schemas/CompanyPlanDetailResponseData' maxItems: 1000 active_usage_based_entitlements: type: array items: $ref: '#/components/schemas/UsageBasedEntitlementResponseData' maxItems: 1000 add_on_compatibilities: type: array items: $ref: '#/components/schemas/CompatiblePlans' maxItems: 1000 capabilities: $ref: '#/components/schemas/ComponentCapabilities' checkout_settings: $ref: '#/components/schemas/ComponentCheckoutSettings' company: $ref: '#/components/schemas/CompanyDetailResponseData' component: $ref: '#/components/schemas/ComponentResponseData' credit_bundles: type: array items: $ref: '#/components/schemas/BillingCreditBundleView' maxItems: 1000 credit_grants: type: array items: $ref: '#/components/schemas/CreditCompanyGrantView' maxItems: 1000 default_plan: $ref: '#/components/schemas/PlanDetailResponseData' display_settings: $ref: '#/components/schemas/ComponentDisplaySettings' feature_usage: $ref: '#/components/schemas/FeatureUsageDetailResponseData' post_trial_plan: $ref: '#/components/schemas/PlanDetailResponseData' prevent_self_service_downgrade: type: boolean prevent_self_service_downgrade_button_text: type: string nullable: true prevent_self_service_downgrade_url: type: string nullable: true scheduled_downgrade: $ref: '#/components/schemas/ScheduledDowngradeResponseData' show_as_monthly_prices: type: boolean deprecated: true show_credits: type: boolean deprecated: true show_period_toggle: type: boolean deprecated: true show_zero_price_as_free: type: boolean deprecated: true stripe_embed: $ref: '#/components/schemas/StripeEmbedInfo' subscription: $ref: '#/components/schemas/CompanySubscriptionResponseData' trial_payment_method_required: type: boolean nullable: true upcoming_invoice: $ref: '#/components/schemas/InvoiceResponseData' required: - active_add_ons - active_plans - active_usage_based_entitlements - add_on_compatibilities - credit_bundles - credit_grants - prevent_self_service_downgrade - show_as_monthly_prices - show_credits - show_period_toggle - show_zero_price_as_free - checkout_settings - display_settings title: ComponentHydrateResponseData ComponentPreviewResponseData: type: object properties: active_add_ons: type: array items: $ref: '#/components/schemas/CompanyPlanDetailResponseData' maxItems: 1000 active_plans: type: array items: $ref: '#/components/schemas/CompanyPlanDetailResponseData' maxItems: 1000 active_usage_based_entitlements: type: array items: $ref: '#/components/schemas/UsageBasedEntitlementResponseData' maxItems: 1000 add_on_compatibilities: type: array items: $ref: '#/components/schemas/CompatiblePlans' maxItems: 1000 capabilities: $ref: '#/components/schemas/ComponentCapabilities' checkout_settings: $ref: '#/components/schemas/ComponentCheckoutSettings' company: $ref: '#/components/schemas/CompanyDetailResponseData' component: $ref: '#/components/schemas/ComponentResponseData' credit_bundles: type: array items: $ref: '#/components/schemas/BillingCreditBundleView' maxItems: 1000 credit_grants: type: array items: $ref: '#/components/schemas/CreditCompanyGrantView' maxItems: 1000 default_plan: $ref: '#/components/schemas/PlanDetailResponseData' display_settings: $ref: '#/components/schemas/ComponentDisplaySettings' feature_usage: $ref: '#/components/schemas/FeatureUsageDetailResponseData' invoices: type: array items: $ref: '#/components/schemas/InvoiceResponseData' maxItems: 1000 post_trial_plan: $ref: '#/components/schemas/PlanDetailResponseData' prevent_self_service_downgrade: type: boolean prevent_self_service_downgrade_button_text: type: string nullable: true prevent_self_service_downgrade_url: type: string nullable: true scheduled_downgrade: $ref: '#/components/schemas/ScheduledDowngradeResponseData' show_as_monthly_prices: type: boolean deprecated: true show_credits: type: boolean deprecated: true show_period_toggle: type: boolean deprecated: true show_zero_price_as_free: type: boolean deprecated: true stripe_embed: $ref: '#/components/schemas/StripeEmbedInfo' subscription: $ref: '#/components/schemas/CompanySubscriptionResponseData' trial_payment_method_required: type: boolean nullable: true upcoming_invoice: $ref: '#/components/schemas/InvoiceResponseData' required: - active_add_ons - active_plans - active_usage_based_entitlements - add_on_compatibilities - credit_bundles - credit_grants - prevent_self_service_downgrade - show_as_monthly_prices - show_credits - show_period_toggle - show_zero_price_as_free - checkout_settings - display_settings - invoices title: ComponentPreviewResponseData ComponentResponseData: type: object properties: ast: additionalProperties: type: number type: object created_at: type: string format: date-time id: type: string name: type: string state: $ref: '#/components/schemas/ComponentState' type: $ref: '#/components/schemas/ComponentEntityType' updated_at: type: string format: date-time required: - id - name - type - state - created_at - updated_at title: ComponentResponseData ComponentSettingsResponseData: type: object properties: show_as_monthly_prices: type: boolean show_credits: type: boolean show_feature_description: type: boolean show_hard_limit: type: boolean show_period_toggle: type: boolean show_zero_price_as_free: type: boolean required: - show_as_monthly_prices - show_credits - show_feature_description - show_hard_limit - show_period_toggle - show_zero_price_as_free title: ComponentSettingsResponseData ComponentState: type: string enum: - draft - live 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 nullable: true credit_id: type: string nullable: true environment_id: type: string event_subtype: type: string nullable: true id: type: string metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true metric_value: type: integer format: int64 nullable: true operator: $ref: '#/components/schemas/ComparableOperator' resource_ids: type: array items: type: string maxItems: 1000 trait_definition: $ref: '#/components/schemas/TraitDefinition' trait_value: type: string required: - id - account_id - environment_id - condition_type - operator - resource_ids - trait_value title: Condition ConditionGroup: type: object properties: conditions: type: array items: $ref: '#/components/schemas/Condition' maxItems: 1000 required: - conditions title: ConditionGroup ConditionGroupResponseData: type: object properties: account_id: type: string created_at: type: string format: date-time environment_id: type: string flag_id: type: string nullable: true id: type: string rule_id: type: string updated_at: type: string format: date-time required: - account_id - created_at - environment_id - id - rule_id - updated_at title: ConditionGroupResponseData ConditionGroupView: type: object properties: account_id: type: string conditions: type: array items: $ref: '#/components/schemas/ConditionView' maxItems: 1000 created_at: type: string format: date-time environment_id: type: string flag_id: type: string nullable: true id: type: string rule_id: type: string updated_at: type: string format: date-time required: - account_id - created_at - environment_id - id - rule_id - updated_at - conditions title: ConditionGroupView ConditionResponseData: type: object properties: account_id: type: string comparison_trait_id: type: string nullable: true condition_group_id: type: string nullable: true condition_type: $ref: '#/components/schemas/ConditionType' consumption_rate: type: number nullable: true created_at: type: string format: date-time credit_id: type: string nullable: true environment_id: type: string event_subtype: type: string nullable: true flag_id: type: string nullable: true id: type: string metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true metric_value: type: integer format: int64 nullable: true operator: $ref: '#/components/schemas/ComparableOperator' resource_unspecified_ids: type: array items: type: string maxItems: 1000 rule_id: type: string trait_entity_type: allOf: - $ref: '#/components/schemas/EntityType' nullable: true trait_id: type: string nullable: true trait_value: type: string trait_value_bool: type: boolean trait_value_date: type: string format: date-time nullable: true trait_value_int: type: integer format: int64 updated_at: type: string format: date-time required: - account_id - condition_type - created_at - environment_id - id - operator - rule_id - updated_at - resource_unspecified_ids - trait_value - trait_value_bool - trait_value_int title: ConditionResponseData ConditionType: type: string enum: - base_plan - billing_product - company - credit - metric - plan - plan_version - trait - user ConditionView: type: object properties: account_id: type: string billing_products: type: array items: $ref: '#/components/schemas/GenericPreviewObject' maxItems: 1000 companies: type: array items: $ref: '#/components/schemas/GenericPreviewObject' maxItems: 1000 comparison_trait: $ref: '#/components/schemas/EntityTraitDefinitionResponseData' comparison_trait_id: type: string nullable: true condition_group_id: type: string nullable: true condition_type: $ref: '#/components/schemas/ConditionType' consumption_rate: type: number nullable: true created_at: type: string format: date-time credit_id: type: string nullable: true environment_id: type: string event_subtype: type: string nullable: true flag_id: type: string nullable: true id: type: string metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true metric_value: type: integer format: int64 nullable: true operator: $ref: '#/components/schemas/ComparableOperator' plan_versions: type: array items: $ref: '#/components/schemas/GenericPreviewObject' maxItems: 1000 plans: type: array items: $ref: '#/components/schemas/GenericPreviewObject' maxItems: 1000 resource_unspecified_ids: type: array items: type: string maxItems: 1000 rule_id: type: string trait: $ref: '#/components/schemas/EntityTraitDefinitionResponseData' trait_entity_type: allOf: - $ref: '#/components/schemas/EntityType' nullable: true trait_id: type: string nullable: true trait_value: type: string trait_value_bool: type: boolean trait_value_date: type: string format: date-time nullable: true trait_value_int: type: integer format: int64 updated_at: type: string format: date-time users: type: array items: $ref: '#/components/schemas/GenericPreviewObject' maxItems: 1000 required: - account_id - condition_type - created_at - environment_id - id - operator - rule_id - updated_at - resource_unspecified_ids - trait_value - trait_value_bool - trait_value_int - billing_products - companies - plans - plan_versions - users title: ConditionView CountResponse: type: object properties: count: type: integer description: The number of resources CouponRequestBody: type: object properties: amount_off: type: integer format: int64 currency: type: string nullable: true maxLength: 3 duration: type: string maxLength: 50 duration_in_months: type: integer format: int64 max_redemptions: type: integer format: int64 name: type: string maxLength: 255 percent_off: type: number times_redeemed: type: integer format: int64 required: - name - percent_off - amount_off - times_redeemed - max_redemptions - duration - duration_in_months title: CouponRequestBody CreateApiKeyRequestBody: type: object properties: description: type: string nullable: true maxLength: 256 environment_id: type: string nullable: true name: type: string maxLength: 256 minLength: 1 readonly: type: boolean nullable: true required: - name title: CreateApiKeyRequestBody CreateBillingCreditRequestBody: type: object properties: burn_strategy: allOf: - $ref: '#/components/schemas/BillingCreditBurnStrategy' nullable: true currency: type: string currency_prices: type: array items: $ref: '#/components/schemas/CreditCurrencyPriceRequestBody' nullable: true maxItems: 50 default_expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true default_expiry_unit_count: type: integer format: int64 nullable: true minimum: 1 default_rollover_policy: allOf: - $ref: '#/components/schemas/BillingCreditRolloverPolicy' nullable: true description: type: string maxLength: 1024 icon: type: string nullable: true maxLength: 64 name: type: string maxLength: 255 per_unit_price: type: integer format: int64 nullable: true per_unit_price_decimal: type: string nullable: true plural_name: type: string nullable: true maxLength: 512 singular_name: type: string nullable: true maxLength: 512 required: - name - description - currency title: CreateBillingCreditRequestBody CreateBillingCustomerRequestBody: type: object properties: company_id: type: string nullable: true default_payment_method_id: type: string nullable: true email: type: string maxLength: 255 external_id: type: string maxLength: 255 meta: additionalProperties: type: string type: object name: type: string maxLength: 255 provider_type: allOf: - $ref: '#/components/schemas/BillingProviderType' nullable: true required: - email - external_id - meta - name title: CreateBillingCustomerRequestBody CreateBillingLinkedFeatureRequestBody: type: object properties: billing_provider: $ref: '#/components/schemas/BillingProviderType' description: type: string maxLength: 1024 event_subtype: type: string nullable: true external_resource_id: type: string maxLength: 255 feature_type: $ref: '#/components/schemas/FeatureType' flag: $ref: '#/components/schemas/CreateOrUpdateFlagRequestBody' icon: type: string nullable: true lifecycle_phase: allOf: - $ref: '#/components/schemas/FeatureLifecyclePhase' nullable: true maintainer_account_member_id: type: string nullable: true name: type: string maxLength: 512 plural_name: type: string nullable: true singular_name: type: string nullable: true trait_id: type: string nullable: true required: - description - feature_type - name - billing_provider - external_resource_id title: CreateBillingLinkedFeatureRequestBody CreateBillingLinkedPlanEntitlementRequestBody: type: object properties: billing_product_id: type: string nullable: true billing_provider: $ref: '#/components/schemas/BillingProviderType' billing_threshold: type: integer format: int64 nullable: true maximum: 9999999999999 minimum: 50 credit_consumption_rate: type: number nullable: true currency: type: string nullable: true currency_prices: type: array items: $ref: '#/components/schemas/CurrencyPriceRequestBody' nullable: true maxItems: 50 external_resource_id: type: string maxLength: 255 feature_id: type: string metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true monthly_metered_price_id: type: string nullable: true deprecated: true monthly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 monthly_unit_price: type: integer format: int64 nullable: true monthly_unit_price_decimal: type: string nullable: true overage_billing_product_id: type: string nullable: true deprecated: true plan_id: type: string plan_version_id: type: string nullable: true price_behavior: allOf: - $ref: '#/components/schemas/EntitlementPriceBehavior' nullable: true price_tiers: type: array description: Use MonthlyPriceTiers or YearlyPriceTiers instead items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true deprecated: true maxItems: 100 soft_limit: type: integer format: int64 nullable: true tier_mode: allOf: - $ref: '#/components/schemas/BillingTiersMode' nullable: true value_bool: type: boolean nullable: true value_credit_id: type: string nullable: true value_numeric: type: integer format: int64 nullable: true value_trait_id: type: string nullable: true value_type: $ref: '#/components/schemas/EntitlementValueType' yearly_metered_price_id: type: string nullable: true deprecated: true yearly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 yearly_unit_price: type: integer format: int64 nullable: true yearly_unit_price_decimal: type: string nullable: true required: - plan_id - feature_id - value_type - billing_provider - external_resource_id title: CreateBillingLinkedPlanEntitlementRequestBody CreateBillingLinkedPlanRequestBody: type: object properties: billing_provider: $ref: '#/components/schemas/BillingProviderType' description: type: string maxLength: 1024 minLength: 0 external_resource_id: type: string maxLength: 255 external_resource_version: type: string nullable: true maxLength: 64 icon: allOf: - $ref: '#/components/schemas/PlanIcon' nullable: true name: type: string maxLength: 256 minLength: 1 plan_type: $ref: '#/components/schemas/PlanType' required: - description - name - plan_type - billing_provider - external_resource_id title: CreateBillingLinkedPlanRequestBody CreateBillingPlanCreditGrantRequestBody: type: object properties: apply_to_existing: type: boolean nullable: true auto_topup_amount: type: integer format: int64 nullable: true minimum: 1 auto_topup_amount_type: allOf: - $ref: '#/components/schemas/CreditAutoTopupAmountType' nullable: true auto_topup_enabled: type: boolean nullable: true auto_topup_expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true auto_topup_expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true auto_topup_expiry_unit_count: type: integer format: int64 nullable: true minimum: 1 auto_topup_threshold_credits: type: integer format: int64 nullable: true minimum: 0 auto_topup_threshold_percent: type: integer format: int64 nullable: true maximum: 100 minimum: 1 credit_amount: type: integer format: int64 maximum: 9999999999 minimum: 0 credit_id: type: string expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true expiry_unit_count: type: integer format: int64 nullable: true minimum: 1 plan_id: type: string plan_version_id: type: string nullable: true reset_cadence: $ref: '#/components/schemas/BillingPlanCreditGrantResetCadence' reset_start: $ref: '#/components/schemas/BillingPlanCreditGrantResetStart' reset_type: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetType' nullable: true required: - reset_cadence - reset_start - credit_id - plan_id - credit_amount title: CreateBillingPlanCreditGrantRequestBody CreateBillingPriceRequestBody: type: object properties: billing_scheme: $ref: '#/components/schemas/BillingPriceScheme' currency: type: string maxLength: 3 external_account_id: type: string maxLength: 255 interval: type: string maxLength: 255 is_active: type: boolean meter_id: type: string nullable: true maxLength: 255 nickname: type: string nullable: true maxLength: 512 package_size: type: integer format: int64 nullable: true price: type: integer format: int64 price_decimal: type: string nullable: true price_external_id: type: string maxLength: 255 price_tiers: type: array items: $ref: '#/components/schemas/CreateBillingPriceTierRequestBody' maxItems: 100 product_external_id: type: string maxLength: 255 provider_type: allOf: - $ref: '#/components/schemas/BillingProviderType' nullable: true tiers_mode: allOf: - $ref: '#/components/schemas/BillingTiersMode' nullable: true usage_type: $ref: '#/components/schemas/BillingPriceUsageType' required: - billing_scheme - currency - external_account_id - interval - is_active - price - price_external_id - price_tiers - product_external_id - usage_type title: CreateBillingPriceRequestBody CreateBillingPriceTierRequestBody: type: object properties: flat_amount: type: integer format: int64 nullable: true per_unit_decimal: type: string nullable: true per_unit_price: type: integer format: int64 nullable: true price_external_id: type: string maxLength: 255 provider_type: allOf: - $ref: '#/components/schemas/BillingProviderType' nullable: true up_to: type: integer format: int64 nullable: true required: - price_external_id title: CreateBillingPriceTierRequestBody CreateBillingProductRequestBody: type: object properties: external_id: type: string maxLength: 255 is_active: type: boolean nullable: true name: type: string nullable: true maxLength: 255 price: type: number provider_type: allOf: - $ref: '#/components/schemas/BillingProviderType' nullable: true required: - price - external_id title: CreateBillingProductRequestBody CreateBillingSubscriptionRequestBody: type: object properties: application_id: type: string nullable: true maxLength: 255 cancel_at: type: integer format: int64 nullable: true cancel_at_period_end: type: boolean currency: type: string maxLength: 3 customer_external_id: type: string maxLength: 255 default_payment_method_external_id: type: string nullable: true maxLength: 255 default_payment_method_id: type: string nullable: true discounts: type: array items: $ref: '#/components/schemas/BillingSubscriptionDiscount' maxItems: 100 expired_at: type: string format: date-time interval: type: string nullable: true maxLength: 255 metadata: type: object nullable: true period_end: type: integer format: int64 nullable: true period_start: type: integer format: int64 nullable: true product_external_ids: type: array items: $ref: '#/components/schemas/BillingProductPricing' maxItems: 100 provider_type: allOf: - $ref: '#/components/schemas/BillingProviderType' nullable: true status: type: string nullable: true maxLength: 255 subscription_external_id: type: string maxLength: 255 total_price: type: integer format: int64 trial_end: type: integer format: int64 nullable: true trial_end_setting: allOf: - $ref: '#/components/schemas/BillingSubscriptionTrialEndSetting' nullable: true required: - customer_external_id - subscription_external_id - total_price - currency - expired_at - product_external_ids - discounts - cancel_at_period_end title: CreateBillingSubscriptionRequestBody CreateCompanyCreditGrant: type: object properties: billing_periods_count: type: integer format: int64 nullable: true minimum: 1 company_id: type: string credit_id: type: string currency: type: string nullable: true maxLength: 3 expires_at: type: string format: date-time nullable: true expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true expiry_unit_count: type: integer format: int64 nullable: true minimum: 1 quantity: type: integer format: int64 minimum: 1 reason: $ref: '#/components/schemas/BillingCreditGrantReason' renewal_enabled: type: boolean nullable: true renewal_period: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetStart' nullable: true required: - company_id - credit_id - quantity - reason title: CreateCompanyCreditGrant CreateCompanyOverrideRequestBody: type: object properties: company_id: type: string credit_consumption_rate: type: number nullable: true expiration_date: type: string format: date-time nullable: true feature_id: type: string metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true note: type: string nullable: true value_bool: type: boolean nullable: true value_credit_id: type: string nullable: true value_numeric: type: integer format: int64 nullable: true value_trait_id: type: string nullable: true value_type: $ref: '#/components/schemas/EntitlementValueType' required: - company_id - feature_id - value_type title: CreateCompanyOverrideRequestBody CreateComponentRequestBody: type: object properties: ast: additionalProperties: type: number type: object entity_type: $ref: '#/components/schemas/ComponentEntityType' name: type: string maxLength: 256 minLength: 1 required: - name - entity_type title: CreateComponentRequestBody CreateCouponRequestBody: type: object properties: amount_off: type: integer format: int64 currency: type: string nullable: true maxLength: 3 duration: type: string maxLength: 50 duration_in_months: type: integer format: int64 external_id: type: string maxLength: 255 max_redemptions: type: integer format: int64 name: type: string maxLength: 255 percent_off: type: number times_redeemed: type: integer format: int64 required: - external_id - name - percent_off - amount_off - times_redeemed - max_redemptions - duration - duration_in_months title: CreateCouponRequestBody CreateCreditBundleRequestBody: type: object properties: bundle_name: type: string maxLength: 256 bundle_type: allOf: - $ref: '#/components/schemas/BillingCreditBundleType' nullable: true credit_id: type: string currency: type: string currency_prices: type: array items: $ref: '#/components/schemas/CreditBundleCurrencyPriceRequestBody' nullable: true maxItems: 50 expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true expiry_unit_count: type: integer format: int64 nullable: true minimum: 1 price_per_unit: type: integer format: int64 minimum: 0 price_per_unit_decimal: type: string nullable: true quantity: type: integer format: int64 nullable: true minimum: 1 status: allOf: - $ref: '#/components/schemas/BillingCreditBundleStatus' nullable: true required: - credit_id - currency - bundle_name - price_per_unit title: CreateCreditBundleRequestBody CreateCustomPlanRequestBody: type: object properties: company_id: type: string copied_from_plan_id: type: string nullable: true description: type: string maxLength: 1024 minLength: 0 icon: allOf: - $ref: '#/components/schemas/PlanIcon' nullable: true name: type: string maxLength: 256 minLength: 1 required: - company_id - description - name title: CreateCustomPlanRequestBody CreateDataExportRequestBody: type: object properties: export_type: $ref: '#/components/schemas/DataExportType' metadata: type: string maxLength: 10240 output_file_type: $ref: '#/components/schemas/DataExportOutputFileType' required: - export_type - output_file_type - metadata title: CreateDataExportRequestBody CreateEntitlementInBundleRequestBody: type: object properties: billing_product_id: type: string nullable: true billing_threshold: type: integer format: int64 nullable: true maximum: 9999999999999 minimum: 50 credit_consumption_rate: type: number nullable: true currency: type: string nullable: true currency_prices: type: array items: $ref: '#/components/schemas/CurrencyPriceRequestBody' nullable: true maxItems: 50 feature_id: type: string metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true monthly_metered_price_id: type: string nullable: true deprecated: true monthly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 monthly_unit_price: type: integer format: int64 nullable: true monthly_unit_price_decimal: type: string nullable: true overage_billing_product_id: type: string nullable: true deprecated: true plan_id: type: string plan_version_id: type: string nullable: true price_behavior: allOf: - $ref: '#/components/schemas/EntitlementPriceBehavior' nullable: true price_tiers: type: array description: Use MonthlyPriceTiers or YearlyPriceTiers instead items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true deprecated: true maxItems: 100 soft_limit: type: integer format: int64 nullable: true tier_mode: allOf: - $ref: '#/components/schemas/BillingTiersMode' nullable: true value_bool: type: boolean nullable: true value_credit_id: type: string nullable: true value_numeric: type: integer format: int64 nullable: true value_trait_id: type: string nullable: true value_type: $ref: '#/components/schemas/EntitlementValueType' yearly_metered_price_id: type: string nullable: true deprecated: true yearly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 yearly_unit_price: type: integer format: int64 nullable: true yearly_unit_price_decimal: type: string nullable: true required: - plan_id - feature_id - value_type title: CreateEntitlementInBundleRequestBody CreateEntitlementReqCommon: type: object properties: credit_consumption_rate: type: number nullable: true feature_id: type: string metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true value_bool: type: boolean nullable: true value_credit_id: type: string nullable: true value_numeric: type: integer format: int64 nullable: true value_trait_id: type: string nullable: true value_type: $ref: '#/components/schemas/EntitlementValueType' required: - feature_id - value_type title: CreateEntitlementReqCommon CreateEntityTraitDefinitionRequestBody: type: object properties: display_name: type: string nullable: true maxLength: 255 entity_type: $ref: '#/components/schemas/EntityType' hierarchy: type: array items: type: string maxItems: 100 trait_type: $ref: '#/components/schemas/TraitType' required: - entity_type - hierarchy - trait_type title: CreateEntityTraitDefinitionRequestBody CreateEnvironmentRequestBody: type: object properties: environment_type: $ref: '#/components/schemas/EnvironmentType' name: type: string maxLength: 256 minLength: 1 required: - name - environment_type title: CreateEnvironmentRequestBody CreateEventBatchRequestBody: type: object properties: events: type: array items: $ref: '#/components/schemas/CreateEventRequestBody' maxItems: 1000 required: - events title: CreateEventBatchRequestBody CreateEventRequestBody: type: object properties: body: $ref: '#/components/schemas/EventBody' event_type: allOf: - $ref: '#/components/schemas/EventType' description: Either 'identify' or 'track' idempotency_key: type: string description: Optional client-supplied key. Duplicate events with the same key (scoped to the environment) are dropped for 24h. nullable: true maxLength: 255 sent_at: type: string description: Optionally provide a timestamp at which the event was sent to Schematic format: date-time nullable: true required: - event_type title: CreateEventRequestBody CreateFeatureRequestBody: type: object properties: description: type: string maxLength: 1024 event_subtype: type: string nullable: true feature_type: $ref: '#/components/schemas/FeatureType' flag: $ref: '#/components/schemas/CreateOrUpdateFlagRequestBody' icon: type: string nullable: true lifecycle_phase: allOf: - $ref: '#/components/schemas/FeatureLifecyclePhase' nullable: true maintainer_account_member_id: type: string nullable: true name: type: string maxLength: 512 plural_name: type: string nullable: true singular_name: type: string nullable: true trait_id: type: string nullable: true required: - description - feature_type - name title: CreateFeatureRequestBody CreateFlagRequestBody: type: object properties: default_value: type: boolean description: type: string maxLength: 1024 feature_id: type: string nullable: true flag_type: $ref: '#/components/schemas/FlagType' key: type: string maxLength: 512 maintainer_account_member_id: type: string nullable: true name: type: string maxLength: 512 required: - default_value - description - flag_type - key - name title: CreateFlagRequestBody CreateInvoiceRequestBody: 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 maxLength: 32 currency: type: string maxLength: 16 customer_external_id: type: string maxLength: 255 due_date: type: string format: date-time nullable: true external_id: type: string nullable: true maxLength: 255 payment_method_external_id: type: string nullable: true maxLength: 255 status: allOf: - $ref: '#/components/schemas/InvoiceStatus' nullable: true subscription_external_id: type: string nullable: true maxLength: 255 subtotal: type: integer format: int64 url: type: string nullable: true maxLength: 512 required: - amount_due - amount_paid - amount_remaining - collection_method - currency - customer_external_id - subtotal title: CreateInvoiceRequestBody CreateMeterRequestBody: type: object properties: display_name: type: string maxLength: 255 event_name: type: string maxLength: 255 event_payload_key: type: string maxLength: 255 external_id: type: string maxLength: 255 provider_type: allOf: - $ref: '#/components/schemas/BillingProviderType' nullable: true required: - external_id - display_name - event_name - event_payload_key title: CreateMeterRequestBody CreateOrUpdateConditionGroupRequestBody: type: object properties: conditions: type: array items: $ref: '#/components/schemas/CreateOrUpdateConditionRequestBody' maxItems: 100 flag_id: type: string nullable: true id: type: string nullable: true required: - conditions title: CreateOrUpdateConditionGroupRequestBody CreateOrUpdateConditionRequestBody: type: object properties: comparison_trait_id: type: string description: Optionally provide a trait ID to compare a metric or trait value against instead of a value nullable: true condition_type: $ref: '#/components/schemas/ConditionType' credit_cost: type: number description: Cost of credit to use to measure this condition nullable: true credit_id: type: string description: ID of credit to use to measure this condition nullable: true event_subtype: type: string description: Name of track event type used to measure this condition nullable: true id: type: string nullable: true metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' description: Period of time over which to measure the track event metric nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' description: When metric_period=current_month, specify whether the month restarts based on the calendar month or the billing period nullable: true metric_value: type: integer description: Value to compare the track event metric against format: int64 nullable: true operator: $ref: '#/components/schemas/ComparableOperator' resource_ids: type: array description: List of resource IDs (companies, users, or plans) targeted by this condition items: type: string maxItems: 1000 trait_id: type: string description: ID of trait to use to measure this condition nullable: true trait_value: type: string description: Value to compare the trait value against nullable: true required: - condition_type - operator - resource_ids title: CreateOrUpdateConditionRequestBody CreateOrUpdateFlagRequestBody: type: object properties: default_value: type: boolean description: type: string maxLength: 1024 feature_id: type: string nullable: true flag_type: $ref: '#/components/schemas/FlagType' id: type: string nullable: true key: type: string maxLength: 512 maintainer_account_member_id: type: string nullable: true name: type: string maxLength: 512 required: - default_value - description - flag_type - key - name title: CreateOrUpdateFlagRequestBody CreateOrUpdateRuleRequestBody: type: object properties: condition_groups: type: array items: $ref: '#/components/schemas/CreateOrUpdateConditionGroupRequestBody' maxItems: 100 conditions: type: array items: $ref: '#/components/schemas/CreateOrUpdateConditionRequestBody' maxItems: 100 id: type: string nullable: true name: type: string maxLength: 512 priority: type: integer format: int64 rule_type: allOf: - $ref: '#/components/schemas/RuleType' nullable: true value: type: boolean required: - condition_groups - conditions - name - priority - value title: CreateOrUpdateRuleRequestBody CreatePaymentMethodRequestBody: type: object properties: account_last4: type: string nullable: true maxLength: 4 account_name: type: string nullable: true maxLength: 255 bank_name: type: string nullable: true maxLength: 255 billing_email: type: string nullable: true maxLength: 255 billing_name: type: string nullable: true maxLength: 255 card_brand: type: string nullable: true maxLength: 32 card_exp_month: type: integer format: int64 nullable: true card_exp_year: type: integer format: int64 nullable: true card_last4: type: string nullable: true maxLength: 4 customer_external_id: type: string maxLength: 255 external_id: type: string maxLength: 255 payment_method_type: type: string maxLength: 32 required: - external_id - customer_external_id - payment_method_type title: CreatePaymentMethodRequestBody CreatePlanBundleRequestBody: type: object properties: billing_product: $ref: '#/components/schemas/UpsertBillingProductRequestBody' credit_grants: type: array items: $ref: '#/components/schemas/PlanBundleCreditGrantRequestBody' maxItems: 100 entitlements: type: array items: $ref: '#/components/schemas/PlanBundleEntitlementRequestBody' maxItems: 100 plan: $ref: '#/components/schemas/CreatePlanRequestBody' traits: type: array items: $ref: '#/components/schemas/UpdatePlanTraitTraitRequestBody' maxItems: 100 required: - entitlements title: CreatePlanBundleRequestBody CreatePlanEntitlementRequestBody: type: object properties: billing_product_id: type: string nullable: true billing_threshold: type: integer format: int64 nullable: true maximum: 9999999999999 minimum: 50 credit_consumption_rate: type: number nullable: true currency: type: string nullable: true currency_prices: type: array items: $ref: '#/components/schemas/CurrencyPriceRequestBody' nullable: true maxItems: 50 feature_id: type: string metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true monthly_metered_price_id: type: string nullable: true deprecated: true monthly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 monthly_unit_price: type: integer format: int64 nullable: true monthly_unit_price_decimal: type: string nullable: true overage_billing_product_id: type: string nullable: true deprecated: true plan_id: type: string plan_version_id: type: string nullable: true price_behavior: allOf: - $ref: '#/components/schemas/EntitlementPriceBehavior' nullable: true price_tiers: type: array description: Use MonthlyPriceTiers or YearlyPriceTiers instead items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true deprecated: true maxItems: 100 soft_limit: type: integer format: int64 nullable: true tier_mode: allOf: - $ref: '#/components/schemas/BillingTiersMode' nullable: true value_bool: type: boolean nullable: true value_credit_id: type: string nullable: true value_numeric: type: integer format: int64 nullable: true value_trait_id: type: string nullable: true value_type: $ref: '#/components/schemas/EntitlementValueType' yearly_metered_price_id: type: string nullable: true deprecated: true yearly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 yearly_unit_price: type: integer format: int64 nullable: true yearly_unit_price_decimal: type: string nullable: true required: - plan_id - feature_id - value_type title: CreatePlanEntitlementRequestBody CreatePlanGroupRequestBody: type: object properties: add_on_compatibilities: type: array items: $ref: '#/components/schemas/CompatiblePlans' nullable: true maxItems: 100 add_on_ids: type: array description: Use OrderedAddOns instead items: type: string deprecated: true maxItems: 100 checkout_collect_address: type: boolean checkout_collect_email: type: boolean checkout_collect_phone: type: boolean custom_plan_config: $ref: '#/components/schemas/CustomPlanConfig' custom_plan_id: type: string nullable: true enable_tax_collection: type: boolean fallback_plan_id: type: string nullable: true initial_plan_id: type: string nullable: true initial_plan_price_id: type: string nullable: true ordered_add_ons: type: array items: $ref: '#/components/schemas/OrderedPlansInGroup' maxItems: 100 ordered_bundle_list: type: array items: $ref: '#/components/schemas/PlanGroupBundleOrder' maxItems: 100 ordered_plans: type: array items: $ref: '#/components/schemas/OrderedPlansInGroup' maxItems: 100 prevent_downgrades_when_over_limit: type: boolean prevent_self_service_downgrade: type: boolean prevent_self_service_downgrade_button_text: type: string nullable: true maxLength: 255 prevent_self_service_downgrade_url: type: string nullable: true maxLength: 512 proration_behavior: $ref: '#/components/schemas/ProrationBehavior' scheduled_downgrade_behavior: allOf: - $ref: '#/components/schemas/ScheduledDowngradeConfigBehavior' nullable: true scheduled_downgrade_prevent_when_over_limit: type: boolean nullable: true show_as_monthly_prices: type: boolean show_credits: type: boolean show_feature_description: type: boolean show_hard_limit: type: boolean show_period_toggle: type: boolean show_zero_price_as_free: type: boolean sync_customer_billing_details: type: boolean trial_days: type: integer format: int64 nullable: true trial_expiry_plan_id: type: string nullable: true trial_expiry_plan_price_id: type: string nullable: true trial_payment_method_required: type: boolean nullable: true required: - add_on_ids - checkout_collect_address - checkout_collect_email - checkout_collect_phone - prevent_self_service_downgrade - enable_tax_collection - ordered_add_ons - ordered_bundle_list - ordered_plans - prevent_downgrades_when_over_limit - show_as_monthly_prices - show_credits - show_feature_description - show_hard_limit - show_period_toggle - show_zero_price_as_free - sync_customer_billing_details - proration_behavior title: CreatePlanGroupRequestBody CreatePlanRequestBody: type: object properties: description: type: string maxLength: 1024 minLength: 0 icon: allOf: - $ref: '#/components/schemas/PlanIcon' nullable: true name: type: string maxLength: 256 minLength: 1 plan_type: $ref: '#/components/schemas/PlanType' required: - description - name - plan_type title: CreatePlanRequestBody CreatePriceTierRequestBody: type: object properties: flat_amount: type: integer format: int64 nullable: true per_unit_price: type: integer format: int64 nullable: true per_unit_price_decimal: type: string nullable: true up_to: type: integer format: int64 nullable: true title: CreatePriceTierRequestBody CreateScheduledCheckoutRequest: type: object properties: company_id: type: string execute_after: type: string format: date-time from_plan_id: type: string to_plan_id: type: string required: - company_id - execute_after - from_plan_id - to_plan_id title: CreateScheduledCheckoutRequest CreateWebhookRequestBody: type: object properties: credit_trigger_configs: type: array items: $ref: '#/components/schemas/CreditTriggerConfig' nullable: true maxItems: 100 entitlement_trigger_configs: type: array items: $ref: '#/components/schemas/EntitlementTriggerConfig' nullable: true maxItems: 100 name: type: string maxLength: 256 minLength: 1 request_types: type: array items: $ref: '#/components/schemas/WebhookRequestType' maxItems: 50 url: type: string maxLength: 2048 minLength: 1 required: - name - url - request_types title: CreateWebhookRequestBody CreditAutoTopupAmountType: type: string enum: - credit CreditBundleCurrencyPrice: type: object properties: currency: type: string price: $ref: '#/components/schemas/BillingPriceView' required: - currency title: CreditBundleCurrencyPrice CreditBundleCurrencyPriceRequestBody: type: object properties: currency: type: string maxLength: 3 price_per_unit: type: integer format: int64 nullable: true minimum: 0 price_per_unit_decimal: type: string nullable: true required: - currency title: CreditBundleCurrencyPriceRequestBody CreditBundleCurrencyPriceResponseData: type: object properties: currency: type: string price: $ref: '#/components/schemas/BillingPriceResponseData' required: - currency title: CreditBundleCurrencyPriceResponseData CreditBundlePurchaseResponseData: type: object properties: bundle: $ref: '#/components/schemas/BillingCreditBundleResponseData' quantity: type: integer format: int64 total: type: integer format: int64 required: - quantity - total title: CreditBundlePurchaseResponseData CreditCompanyGrantView: type: object properties: billing_credit_bundle_id: type: string nullable: true billing_credit_id: type: string company_id: type: string company_name: type: string created_at: type: string format: date-time credit_description: type: string credit_icon: type: string nullable: true credit_name: type: string currency: type: string nullable: true exhausted_at: type: string format: date-time nullable: true expires_at: type: string format: date-time nullable: true expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true expiry_unit_count: type: integer format: int64 nullable: true grant_reason: $ref: '#/components/schemas/BillingCreditGrantReason' id: type: string plan_id: type: string nullable: true plan_name: type: string nullable: true plural_name: type: string nullable: true price: $ref: '#/components/schemas/BillingProductPriceResponseData' quantity: type: integer format: int64 quantity_remaining: type: number quantity_used: type: number renewal_enabled: type: boolean renewal_period: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetCadence' nullable: true singular_name: type: string nullable: true source_label: type: string transfers: type: array items: $ref: '#/components/schemas/CreditTransferView' maxItems: 1000 updated_at: type: string format: date-time valid_from: type: string format: date-time nullable: true zeroed_out_date: type: string format: date-time nullable: true zeroed_out_reason: allOf: - $ref: '#/components/schemas/BillingCreditGrantZeroedOutReason' nullable: true required: - id - quantity - quantity_remaining - quantity_used - company_id - company_name - billing_credit_id - credit_name - credit_description - source_label - created_at - updated_at - grant_reason - renewal_enabled title: CreditCompanyGrantView CreditCurrencyPrice: type: object properties: currency: type: string price: $ref: '#/components/schemas/BillingPriceView' required: - currency title: CreditCurrencyPrice CreditCurrencyPriceRequestBody: type: object properties: currency: type: string maxLength: 3 price_per_unit: type: integer format: int64 nullable: true minimum: 0 price_per_unit_decimal: type: string nullable: true required: - currency title: CreditCurrencyPriceRequestBody CreditCurrencyPriceResponseData: type: object properties: currency: type: string price: $ref: '#/components/schemas/BillingPriceResponseData' required: - currency title: CreditCurrencyPriceResponseData CreditEventLedgerResponseData: type: object properties: amount: type: number auto_topup_log_id: type: string nullable: true billing_credit_bundle_id: type: string nullable: true billing_credit_id: type: string company: $ref: '#/components/schemas/CompanyLedgerResponseData' company_id: type: string credit: $ref: '#/components/schemas/BillingCreditLedgerResponseData' credit_name: type: string environment_id: type: string event_at: type: string format: date-time event_id: type: string event_type: $ref: '#/components/schemas/CreditEventType' expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true expiry_unit_count: type: integer format: int64 nullable: true feature: $ref: '#/components/schemas/FeatureLedgerResponseData' feature_id: type: string nullable: true from_grant_id: type: string nullable: true grant_expires_at: type: string format: date-time nullable: true grant_id: type: string nullable: true grant_quantity: type: integer format: int64 nullable: true grant_quantity_remaining: type: number nullable: true grant_reason: allOf: - $ref: '#/components/schemas/BillingCreditGrantReason' nullable: true grant_valid_from: type: string format: date-time nullable: true plan_id: type: string nullable: true quantity_consumed: type: number nullable: true quantity_remaining_at_zero_out: type: number nullable: true source_id: type: integer format: int64 to_grant_id: type: string nullable: true usage_event_id: type: string nullable: true zeroed_out_reason: allOf: - $ref: '#/components/schemas/BillingCreditGrantZeroedOutReason' nullable: true required: - amount - credit_name - event_at - event_id - event_type - source_id - billing_credit_id - company_id - environment_id title: CreditEventLedgerResponseData CreditEventType: type: string enum: - grant - transfer - usage - zero_out CreditGrantDetail: type: object properties: credit_type_icon: type: string nullable: true expires_at: type: string format: date-time nullable: true grant_reason: $ref: '#/components/schemas/BillingCreditGrantReason' quantity: type: number required: - grant_reason - quantity title: CreditGrantDetail CreditGrantExpiryRequestBody: type: object properties: expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true expiry_unit_count: type: integer format: int64 nullable: true minimum: 1 reset_cadence: $ref: '#/components/schemas/BillingPlanCreditGrantResetCadence' reset_start: $ref: '#/components/schemas/BillingPlanCreditGrantResetStart' reset_type: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetType' nullable: true required: - reset_cadence - reset_start title: CreditGrantExpiryRequestBody CreditGrantSortOrder: type: string enum: - created_at - expires_at - quantity - quantity_remaining CreditLedgerEnrichedEntryResponseData: type: object properties: billing_credit_auto_topup_grant_count: type: integer format: int64 billing_credit_id: type: string company: $ref: '#/components/schemas/CompanyLedgerResponseData' company_id: type: string credit: $ref: '#/components/schemas/BillingCreditLedgerResponseData' expired_grant_count: type: integer format: int64 feature: $ref: '#/components/schemas/FeatureLedgerResponseData' feature_id: type: string nullable: true first_transaction_at: type: string format: date-time free_grant_count: type: integer format: int64 grant_count: type: integer format: int64 last_transaction_at: type: string format: date-time manually_zeroed_count: type: integer format: int64 net_change: type: number plan_grant_count: type: integer format: int64 purchased_grant_count: type: integer format: int64 time_bucket: type: string format: date-time total_consumed: type: number total_granted: type: number transaction_count: type: integer format: int64 usage_count: type: integer format: int64 zeroed_out_count: type: integer format: int64 required: - company_id - billing_credit_id - time_bucket - total_granted - total_consumed - net_change - transaction_count - grant_count - usage_count - zeroed_out_count - first_transaction_at - last_transaction_at - billing_credit_auto_topup_grant_count - expired_grant_count - free_grant_count - manually_zeroed_count - plan_grant_count - purchased_grant_count title: CreditLedgerEnrichedEntryResponseData CreditLedgerPeriod: type: string enum: - daily - monthly - raw - weekly CreditTransferResponseData: type: object properties: amount: type: number 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 CreditTransferView: type: object properties: amount: type: number created_at: type: string format: date-time direction: type: string id: type: string reason: type: string related_grant_id: type: string required: - id - amount - created_at - direction - related_grant_id - reason title: CreditTransferView CreditTriggerConfig: type: object properties: credit_id: type: string required: - credit_id title: CreditTriggerConfig CreditUsage: type: object properties: credit_consumption_rate: type: number nullable: true credit_grant_counts: additionalProperties: type: number type: object credit_grant_details: type: array items: $ref: '#/components/schemas/CreditGrantDetail' maxItems: 1000 credit_remaining: type: number nullable: true credit_total: type: number nullable: true credit_type_icon: type: string nullable: true credit_type_name: type: string nullable: true credit_used: type: number nullable: true usage_aggregation: $ref: '#/components/schemas/CreditUsageAggregation' title: CreditUsage CreditUsageAggregation: type: object properties: usage_this_billing_period: type: number description: Credit usage within the current billing period nullable: true usage_this_calendar_month: type: number description: Credit usage within the current calendar month nullable: true usage_this_week: type: number description: Credit usage within the current calendar week (Monday to Sunday) nullable: true usage_today: type: number description: Credit usage for the current day nullable: true title: CreditUsageAggregation CreditsAutoTopupCompanySummary: type: object properties: id: type: string name: type: string required: - id - name title: CreditsAutoTopupCompanySummary CreditsAutoTopupCreditSummary: type: object properties: id: type: string name: type: string required: - id - name title: CreditsAutoTopupCreditSummary CreditsAutoTopupHardFailure: type: object properties: company: $ref: '#/components/schemas/CreditsAutoTopupCompanySummary' credit: $ref: '#/components/schemas/CreditsAutoTopupCreditSummary' error_message: type: string nullable: true stripe_error_code: type: string nullable: true title: CreditsAutoTopupHardFailure CreditsAutoTopupRetryFailure: type: object properties: company: $ref: '#/components/schemas/CreditsAutoTopupCompanySummary' consecutive_failures: type: integer format: int64 credit: $ref: '#/components/schemas/CreditsAutoTopupCreditSummary' last_error_message: type: string nullable: true stripe_error_code: type: string nullable: true required: - consecutive_failures title: CreditsAutoTopupRetryFailure CurrencyPriceRequestBody: type: object properties: currency: type: string maxLength: 3 monthly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 monthly_unit_price: type: integer format: int64 nullable: true monthly_unit_price_decimal: type: string nullable: true yearly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 yearly_unit_price: type: integer format: int64 nullable: true yearly_unit_price_decimal: type: string nullable: true required: - currency title: CurrencyPriceRequestBody CustomPlanActivationStrategy: type: string enum: - on_payment - on_publish CustomPlanBillingResponseData: type: object properties: activation_strategy: $ref: '#/components/schemas/CustomPlanActivationStrategy' company_id: type: string created_at: type: string format: date-time days_until_due: type: integer format: int64 id: type: string paid_at: type: string format: date-time nullable: true plan_id: type: string published_at: type: string format: date-time nullable: true status: $ref: '#/components/schemas/CustomPlanBillingStatus' stripe_invoice_url: type: string nullable: true updated_at: type: string format: date-time required: - activation_strategy - company_id - created_at - days_until_due - id - plan_id - status - updated_at title: CustomPlanBillingResponseData CustomPlanBillingStatus: type: string enum: - active - expired - paid - pending CustomPlanConfig: type: object properties: cta_text: type: string cta_web_site: type: string price_text: type: string required: - cta_web_site - cta_text - price_text title: CustomPlanConfig CustomPlanViewConfigResponseData: type: object properties: cta_text: type: string cta_web_site: type: string price_text: type: string required: - cta_web_site - cta_text - price_text title: CustomPlanViewConfigResponseData DataEventPayload: type: object properties: api_key: type: string body: type: object idempotency_key: type: string nullable: true maxLength: 255 sent_at: type: string format: date-time nullable: true type: $ref: '#/components/schemas/EventType' required: - api_key - type title: DataEventPayload DataExportOutputFileType: type: string enum: - csv DataExportResponseData: type: object properties: account_id: type: string created_at: type: string format: date-time environment_id: type: string export_type: $ref: '#/components/schemas/DataExportType' id: type: string metadata: type: string output_file_type: $ref: '#/components/schemas/DataExportOutputFileType' status: $ref: '#/components/schemas/DataExportStatus' updated_at: type: string format: date-time required: - id - account_id - environment_id - export_type - status - metadata - output_file_type - created_at - updated_at title: DataExportResponseData DataExportStatus: type: string enum: - failure - pending - success DataExportType: type: string enum: - company-feature-usage DatastreamCompanyPlan: type: object properties: id: type: string name: type: string trial_end_date: type: string format: date-time nullable: true trial_status: allOf: - $ref: '#/components/schemas/TrialStatus' nullable: true required: - id - name title: DatastreamCompanyPlan DeleteBillingPlanCreditGrantRequestBody: type: object properties: apply_to_existing: type: boolean nullable: true title: DeleteBillingPlanCreditGrantRequestBody DeleteResponse: type: object properties: deleted: type: boolean description: Whether the delete was successful DuplicatePlanEntitlementsRequestBody: type: object properties: source_plan_id: type: string target_plan_id: type: string required: - source_plan_id - target_plan_id title: DuplicatePlanEntitlementsRequestBody DuplicatePlanEntitlementsResponseResponseData: type: object properties: data: type: array items: $ref: '#/components/schemas/PlanEntitlementResponseData' maxItems: 1000 skipped: type: array items: $ref: '#/components/schemas/SkippedEntitlementResponseData' maxItems: 1000 required: - data - skipped title: DuplicatePlanEntitlementsResponseResponseData EntitlementCurrencyPricesResponseData: type: object properties: currency: type: string monthly_price: $ref: '#/components/schemas/BillingPriceView' yearly_price: $ref: '#/components/schemas/BillingPriceView' required: - currency title: EntitlementCurrencyPricesResponseData EntitlementPriceBehavior: type: string enum: - credit_burndown - overage - pay_as_you_go - pay_in_advance - tier EntitlementTriggerConfig: type: object properties: feature_id: type: string required: - feature_id title: EntitlementTriggerConfig EntitlementType: type: string enum: - company_override - plan_entitlement - unknown EntitlementValueType: type: string enum: - boolean - credit - numeric - trait - unknown - unlimited EntitlementsInPlan: type: object properties: entitlement_id: type: string visible: type: boolean nullable: true required: - entitlement_id title: EntitlementsInPlan 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: - id - entity_type - key - created_at - 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: - id - environment_id - definition_id - entity_type - entity_id - key - value - created_at - updated_at title: EntityKeyDetailResponseData EntityKeyResponseData: type: object properties: created_at: type: string format: date-time 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: - id - environment_id - definition_id - entity_type - entity_id - key - value - created_at - updated_at title: EntityKeyResponseData 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 maxItems: 1000 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 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: - id - environment_id - definition_id - value - created_at - updated_at title: EntityTraitDetailResponseData EntityTraitResponseData: type: object properties: created_at: type: string format: date-time definition_id: type: string environment_id: type: string id: type: string updated_at: type: string format: date-time value: type: string required: - id - environment_id - definition_id - value - created_at - updated_at title: EntityTraitResponseData EntityTraitValue: type: object properties: definition_id: type: string value: type: string required: - definition_id - value title: EntityTraitValue EntityType: type: string enum: - company - user EnvironmentDetailResponseData: type: object properties: api_keys: type: array items: $ref: '#/components/schemas/ApiKeyResponseData' maxItems: 1000 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: - id - name - environment_type - created_at - updated_at - api_keys title: EnvironmentDetailResponseData EnvironmentFeatureUsageTimeSeriesResponseData: type: object properties: event_subtype: type: string feature_id: type: string points: type: array items: $ref: '#/components/schemas/EnvironmentUsagePointResponseData' maxItems: 1000 required: - event_subtype - feature_id - points title: EnvironmentFeatureUsageTimeSeriesResponseData 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: - id - name - environment_type - created_at - updated_at title: EnvironmentResponseData EnvironmentTraitUsageTimeSeriesResponseData: type: object properties: feature_id: type: string points: type: array items: $ref: '#/components/schemas/EnvironmentUsagePointResponseData' maxItems: 1000 trait_definition_id: type: string required: - feature_id - points - trait_definition_id title: EnvironmentTraitUsageTimeSeriesResponseData EnvironmentType: type: string enum: - development - production - staging EnvironmentUsagePointResponseData: type: object properties: timestamp: type: string format: date-time usage: type: integer format: int64 required: - timestamp - usage title: EnvironmentUsagePointResponseData EventBody: type: object oneOf: - $ref: '#/components/schemas/EventBodyTrack' - $ref: '#/components/schemas/EventBodyFlagCheck' - $ref: '#/components/schemas/EventBodyIdentify' title: EventBody EventBodyFlagCheck: type: object properties: company_id: type: string description: Schematic company ID (starting with 'comp_') of the company evaluated, if any nullable: true error: type: string description: Report an error that occurred during the flag check nullable: true flag_id: type: string description: Schematic flag ID (starting with 'flag_') for the flag matching the key, if any nullable: true flag_key: type: string description: The key of the flag being checked reason: type: string description: The reason why the value was returned req_company: additionalProperties: type: string type: object description: Key-value pairs used to to identify company for which the flag was checked nullable: true req_user: additionalProperties: type: string type: object description: Key-value pairs used to to identify user for which the flag was checked nullable: true rule_id: type: string description: Schematic rule ID (starting with 'rule_') of the rule that matched for the flag, if any nullable: true user_id: type: string description: Schematic user ID (starting with 'user_') of the user evaluated, if any nullable: true value: type: boolean description: The value of the flag for the given company and/or user required: - flag_key - reason - value title: EventBodyFlagCheck EventBodyIdentify: type: object properties: company: type: object description: Information about the company associated with the user; required only if it is a new user properties: keys: additionalProperties: type: string type: object 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: type: object description: A map of trait names to trait values required: - keys title: EventBodyIdentifyCompany keys: additionalProperties: type: string type: object 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: type: object description: A map of trait names to trait values required: - keys title: EventBodyIdentify EventBodyTrack: type: object properties: company: additionalProperties: type: string type: object description: Key-value pairs to identify company associated with track event event: type: string description: The name of the type of track event quantity: type: integer description: Optionally specify the quantity of the event traits: type: object description: A map of trait names to trait values user: additionalProperties: type: string type: object description: Key-value pairs to identify user associated with track event required: - event title: EventBodyTrack EventDetailResponseData: type: object properties: api_key: type: string nullable: true body: type: object body_preview: type: string captured_at: type: string format: date-time company: $ref: '#/components/schemas/PreviewObject' company_id: type: string nullable: true enriched_at: type: string format: date-time nullable: true deprecated: true environment_id: type: string nullable: true error_message: type: string nullable: true feature_ids: type: array items: type: string maxItems: 1000 features: type: array items: $ref: '#/components/schemas/PreviewObject' maxItems: 1000 id: type: string idempotency_key: type: string nullable: true loaded_at: type: string format: date-time nullable: true processed_at: type: string format: date-time nullable: true deprecated: true quantity: type: integer format: int64 sent_at: type: string format: date-time nullable: true status: $ref: '#/components/schemas/EventStatus' subtype: type: string nullable: true type: $ref: '#/components/schemas/EventType' updated_at: type: string format: date-time nullable: true deprecated: true user: $ref: '#/components/schemas/PreviewObject' user_id: type: string nullable: true required: - body - body_preview - captured_at - type - feature_ids - id - quantity - status - features title: EventDetailResponseData EventResponseData: type: object properties: api_key: type: string nullable: true body: type: object body_preview: type: string captured_at: type: string format: date-time company_id: type: string nullable: true enriched_at: type: string format: date-time nullable: true deprecated: true environment_id: type: string nullable: true error_message: type: string nullable: true feature_ids: type: array items: type: string maxItems: 1000 id: type: string idempotency_key: type: string nullable: true loaded_at: type: string format: date-time nullable: true processed_at: type: string format: date-time nullable: true deprecated: true quantity: type: integer format: int64 sent_at: type: string format: date-time nullable: true status: $ref: '#/components/schemas/EventStatus' subtype: type: string nullable: true type: $ref: '#/components/schemas/EventType' updated_at: type: string format: date-time nullable: true deprecated: true user_id: type: string nullable: true required: - body - body_preview - captured_at - type - feature_ids - id - quantity - status title: EventResponseData EventStatus: type: string enum: - enriched - failed - pending - processed - unknown 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 format: date-time nullable: true user_count: type: integer format: int64 required: - company_count - environment_id - event_count - event_subtype - user_count title: EventSummaryResponseData EventType: type: string enum: - flag_check - identify - track FeatureCompanyResponseData: type: object properties: access: type: boolean description: Whether further usage is permitted. allocation: type: integer 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). format: int64 nullable: true allocation_type: allOf: - $ref: '#/components/schemas/EntitlementValueType' description: The type of allocation that is being used. company: $ref: '#/components/schemas/CompanyDetailResponseData' company_override: $ref: '#/components/schemas/CompanyOverrideResponseData' credit_consumption_rate: type: number description: The rate at which credits are consumed per unit of usage nullable: true credit_grant_counts: additionalProperties: type: number type: object credit_grant_details: type: array items: $ref: '#/components/schemas/CreditGrantDetail' maxItems: 1000 credit_grant_reason: allOf: - $ref: '#/components/schemas/BillingCreditGrantReason' description: Reason for the credit grant nullable: true credit_remaining: type: number nullable: true credit_total: type: number description: 'Deprecated: Use credit_remaining instead.' nullable: true deprecated: true credit_type_icon: type: string description: Icon identifier for the credit type nullable: true credit_usage: $ref: '#/components/schemas/CreditUsage' credit_usage_aggregation: allOf: - $ref: '#/components/schemas/CreditUsageAggregation' description: Aggregated credit usage by time period (day, week, month, billing period) credit_used: type: number nullable: true effective_limit: type: integer 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. format: int64 nullable: true effective_price: type: number description: Per-unit price for current usage scenario nullable: true entitlement_expiration_date: type: string format: date-time nullable: true entitlement_id: type: string entitlement_source: type: string description: Source of the entitlement (plan or company_override) nullable: true entitlement_type: $ref: '#/components/schemas/EntitlementType' feature: $ref: '#/components/schemas/FeatureInPlanResponseData' has_valid_allocation: type: boolean description: Whether a valid allocation exists nullable: true is_unlimited: type: boolean description: Whether this is an unlimited allocation nullable: true metric_reset_at: type: string description: The time at which the metric will reset. format: date-time nullable: true month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' description: If the period is current_month, when the month resets. nullable: true monthly_usage_based_price: $ref: '#/components/schemas/BillingPriceView' overuse: type: integer description: Amount of usage exceeding soft limit (overage pricing only) format: int64 nullable: true percent_used: type: number description: Percentage of allocation consumed (0-100+) nullable: true period: allOf: - $ref: '#/components/schemas/MetricPeriod' description: The period over which usage is measured. nullable: true plan: $ref: '#/components/schemas/PlanResponseData' plan_entitlement: $ref: '#/components/schemas/PlanEntitlementResponseData' price_behavior: allOf: - $ref: '#/components/schemas/EntitlementPriceBehavior' nullable: true soft_limit: type: integer description: The soft limit for the feature usage. Available only for overage price behavior format: int64 nullable: true usage: type: integer 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). format: int64 nullable: true yearly_usage_based_price: $ref: '#/components/schemas/BillingPriceView' required: - access - allocation_type - entitlement_id - entitlement_type title: FeatureCompanyResponseData FeatureCompanyUserResponseData: type: object properties: access: type: boolean description: Whether further usage is permitted. allocation: type: integer description: The maximum amount of usage that is permitted; a null value indicates that unlimited usage is permitted. format: int64 nullable: true allocation_type: allOf: - $ref: '#/components/schemas/EntitlementValueType' description: The type of allocation that is being used. company: $ref: '#/components/schemas/CompanyDetailResponseData' entitlement_id: type: string entitlement_type: $ref: '#/components/schemas/EntitlementType' feature: $ref: '#/components/schemas/FeatureDetailResponseData' metric_reset_at: type: string description: The time at which the metric will resets. format: date-time nullable: true month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' description: If the period is current_month, when the month resets. nullable: true period: allOf: - $ref: '#/components/schemas/MetricPeriod' description: The period over which usage is measured. nullable: true plan: $ref: '#/components/schemas/PlanResponseData' usage: type: integer description: The amount of usage that has been consumed; a null value indicates that usage is not being measured. format: int64 nullable: true user: $ref: '#/components/schemas/UserResponseData' required: - access - allocation_type - entitlement_id - entitlement_type title: FeatureCompanyUserResponseData FeatureDetailResponseData: type: object properties: billing_linked_resource: $ref: '#/components/schemas/BillingLinkedResourceResponseData' created_at: type: string format: date-time description: type: string event_subtype: type: string nullable: true event_summary: $ref: '#/components/schemas/EventSummaryResponseData' feature_type: $ref: '#/components/schemas/FeatureType' flags: type: array items: $ref: '#/components/schemas/FlagDetailResponseData' maxItems: 1000 icon: type: string id: type: string lifecycle_phase: allOf: - $ref: '#/components/schemas/FeatureLifecyclePhase' nullable: true maintainer: $ref: '#/components/schemas/AccountMemberResponseData' maintainer_account_member_id: type: string nullable: true name: type: string plans: type: array items: $ref: '#/components/schemas/PreviewObject' maxItems: 1000 plural_name: type: string nullable: true singular_name: type: string nullable: true trait: $ref: '#/components/schemas/EntityTraitDefinitionResponseData' trait_id: type: string nullable: true updated_at: type: string format: date-time required: - id - name - description - feature_type - icon - created_at - updated_at - flags - plans title: FeatureDetailResponseData FeatureEntitlement: type: object properties: allocation: type: integer description: If the company has a numeric entitlement for this feature, the allocated amount format: int64 nullable: true credit_id: type: string description: If the company has a credit-based entitlement for this feature, the ID of the credit nullable: true credit_remaining: type: number description: If the company has a credit-based entitlement for this feature, the remaining credit amount nullable: true credit_total: type: number description: If the company has a credit-based entitlement for this feature, the total credit amount nullable: true credit_used: type: number description: If the company has a credit-based entitlement for this feature, the amount of credit used nullable: true event_name: type: string description: If the feature is event-based, the name of the event tracked for usage nullable: true 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: allOf: - $ref: '#/components/schemas/MetricPeriod' description: For event-based feature entitlements, the period over which usage is tracked nullable: true metric_reset_at: type: string description: For event-based feature entitlements, when the usage period will reset format: date-time nullable: true month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' 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 nullable: true soft_limit: type: integer description: For usage-based pricing, the soft limit for overage charges or the next tier boundary format: int64 nullable: true usage: type: integer description: If the company has a numeric entitlement for this feature, the current usage amount format: int64 nullable: true value_type: allOf: - $ref: '#/components/schemas/EntitlementValueType' description: The type of the entitlement value required: - feature_id - feature_key - value_type title: FeatureEntitlement 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 nullable: true event_summary: $ref: '#/components/schemas/EventSummaryResponseData' feature_type: $ref: '#/components/schemas/FeatureType' flags: type: array items: $ref: '#/components/schemas/FlagInPlanResponseData' maxItems: 1000 icon: type: string id: type: string lifecycle_phase: allOf: - $ref: '#/components/schemas/FeatureLifecyclePhase' nullable: true maintainer_account_member_id: type: string nullable: true name: type: string plans: type: array items: $ref: '#/components/schemas/PreviewObject' maxItems: 1000 plural_name: type: string nullable: true singular_name: type: string nullable: true trait: $ref: '#/components/schemas/EntityTraitDefinitionResponseData' trait_id: type: string nullable: true updated_at: type: string format: date-time required: - id - name - description - feature_type - icon - created_at - updated_at - flags - plans title: FeatureInPlanResponseData FeatureLedgerResponseData: type: object properties: description: type: string nullable: true icon: type: string nullable: true id: type: string name: type: string required: - id - name title: FeatureLedgerResponseData FeatureLifecyclePhase: type: string enum: - add_on - alpha - beta - deprecated - ga - inactive - in_plan - internal_testing - legacy FeatureResponseData: type: object properties: created_at: type: string format: date-time description: type: string event_subtype: type: string nullable: true feature_type: $ref: '#/components/schemas/FeatureType' icon: type: string id: type: string lifecycle_phase: allOf: - $ref: '#/components/schemas/FeatureLifecyclePhase' nullable: true maintainer_account_member_id: type: string nullable: true name: type: string plural_name: type: string nullable: true singular_name: type: string nullable: true trait_id: type: string nullable: true updated_at: type: string format: date-time required: - id - name - description - feature_type - icon - created_at - updated_at title: FeatureResponseData FeatureType: type: string enum: - boolean - event - trait FeatureUsageDetailResponseData: type: object properties: features: type: array items: $ref: '#/components/schemas/FeatureUsageResponseData' maxItems: 1000 required: - features title: FeatureUsageDetailResponseData FeatureUsageLegacyResponseData: type: object properties: Allocation: type: integer format: int64 nullable: true CreditUsage: $ref: '#/components/schemas/CreditUsage' Entitlement: type: string Feature: $ref: '#/components/schemas/FeatureView' MetricResetAt: type: string format: date-time nullable: true Usage: type: integer format: int64 nullable: true required: - Entitlement title: FeatureUsageLegacyResponseData FeatureUsageResponseData: type: object properties: access: type: boolean description: Whether further usage is permitted. allocation: type: integer 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). format: int64 nullable: true allocation_type: allOf: - $ref: '#/components/schemas/EntitlementValueType' description: The type of allocation that is being used. company_override: $ref: '#/components/schemas/CompanyOverrideResponseData' credit_consumption_rate: type: number description: The rate at which credits are consumed per unit of usage nullable: true credit_grant_counts: additionalProperties: type: number type: object credit_grant_details: type: array items: $ref: '#/components/schemas/CreditGrantDetail' maxItems: 1000 credit_grant_reason: allOf: - $ref: '#/components/schemas/BillingCreditGrantReason' description: Reason for the credit grant nullable: true credit_remaining: type: number nullable: true credit_total: type: number description: 'Deprecated: Use credit_remaining instead.' nullable: true deprecated: true credit_type_icon: type: string description: Icon identifier for the credit type nullable: true credit_usage_aggregation: allOf: - $ref: '#/components/schemas/CreditUsageAggregation' description: Aggregated credit usage by time period (day, week, month, billing period) credit_used: type: number nullable: true effective_limit: type: integer 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. format: int64 nullable: true effective_price: type: number description: Per-unit price for current usage scenario nullable: true entitlement_expiration_date: type: string format: date-time nullable: true entitlement_id: type: string entitlement_source: type: string description: Source of the entitlement (plan or company_override) nullable: true entitlement_type: $ref: '#/components/schemas/EntitlementType' feature: $ref: '#/components/schemas/FeatureInPlanResponseData' has_valid_allocation: type: boolean description: Whether a valid allocation exists nullable: true is_unlimited: type: boolean description: Whether this is an unlimited allocation nullable: true metric_reset_at: type: string description: The time at which the metric will reset. format: date-time nullable: true month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' description: If the period is current_month, when the month resets. nullable: true monthly_usage_based_price: $ref: '#/components/schemas/BillingPriceView' overuse: type: integer description: Amount of usage exceeding soft limit (overage pricing only) format: int64 nullable: true percent_used: type: number description: Percentage of allocation consumed (0-100+) nullable: true period: allOf: - $ref: '#/components/schemas/MetricPeriod' description: The period over which usage is measured. nullable: true plan: $ref: '#/components/schemas/PlanResponseData' plan_entitlement: $ref: '#/components/schemas/PlanEntitlementResponseData' price_behavior: allOf: - $ref: '#/components/schemas/EntitlementPriceBehavior' nullable: true soft_limit: type: integer description: The soft limit for the feature usage. Available only for overage price behavior format: int64 nullable: true usage: type: integer 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). format: int64 nullable: true yearly_usage_based_price: $ref: '#/components/schemas/BillingPriceView' required: - access - allocation_type - entitlement_id - entitlement_type title: FeatureUsageResponseData FeatureUsageTimeSeriesResponseData: type: object properties: feature_id: type: string feature_type: $ref: '#/components/schemas/FeatureType' limits: type: array items: $ref: '#/components/schemas/LimitTimeSeriesPointResponseData' maxItems: 1000 period_type: type: string nullable: true usage_points: type: array items: $ref: '#/components/schemas/UsageTimeSeriesPointResponseData' maxItems: 1000 required: - feature_id - feature_type - limits - usage_points title: FeatureUsageTimeSeriesResponseData FeatureView: type: object properties: account_id: type: string billing_linked_resource: $ref: '#/components/schemas/BillingLinkedResourceResponseData' created_at: type: string format: date-time description: type: string event_subtype: type: string nullable: true event_summary: $ref: '#/components/schemas/EventSummaryResponseData' feature_type: $ref: '#/components/schemas/FeatureType' flags: type: array items: $ref: '#/components/schemas/FlagView' maxItems: 1000 icon: type: string id: type: string lifecycle_phase: allOf: - $ref: '#/components/schemas/FeatureLifecyclePhase' nullable: true name: type: string plans: type: array items: $ref: '#/components/schemas/PreviewObject' maxItems: 1000 plural_name: type: string nullable: true singular_name: type: string nullable: true trait: $ref: '#/components/schemas/EntityTraitDefinitionResponseData' trait_id: type: string nullable: true updated_at: type: string format: date-time required: - id - account_id - name - description - feature_type - icon - created_at - updated_at - flags - plans title: FeatureView 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 nullable: true flag_type: $ref: '#/components/schemas/FlagType' id: type: string key: type: string last_checked_at: type: string format: date-time nullable: true maintainer: $ref: '#/components/schemas/AccountMemberResponseData' maintainer_account_member_id: type: string nullable: true name: type: string rules: type: array items: $ref: '#/components/schemas/RuleDetailResponseData' maxItems: 1000 updated_at: type: string format: date-time required: - created_at - default_value - description - flag_type - id - key - name - updated_at - rules title: FlagDetailResponseData 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 nullable: true flag_type: $ref: '#/components/schemas/FlagType' id: type: string key: type: string last_checked_at: type: string format: date-time nullable: true maintainer_account_member_id: type: string nullable: true name: type: string rules: type: array items: $ref: '#/components/schemas/RuleDetailResponseData' maxItems: 1000 updated_at: type: string format: date-time required: - created_at - default_value - description - flag_type - id - key - name - updated_at - rules title: FlagInPlanResponseData FlagResponseData: type: object properties: created_at: type: string format: date-time default_value: type: boolean description: type: string feature_id: type: string nullable: true flag_type: $ref: '#/components/schemas/FlagType' id: type: string key: type: string maintainer_account_member_id: type: string nullable: true 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 FlagType: type: string enum: - boolean FlagView: type: object properties: account_id: type: string created_at: type: string format: date-time default_value: type: boolean description: type: string feature: $ref: '#/components/schemas/FeatureResponseData' feature_id: type: string nullable: true flag_type: $ref: '#/components/schemas/FlagType' id: type: string key: type: string last_checked_at: type: string format: date-time nullable: true name: type: string rules: type: array items: $ref: '#/components/schemas/RuleView' maxItems: 1000 updated_at: type: string format: date-time required: - id - account_id - key - name - description - flag_type - default_value - created_at - updated_at - rules title: FlagView GenericPreviewObject: type: object properties: description: type: string nullable: true id: type: string image_url: type: string nullable: true name: type: string required: - id - name title: GenericPreviewObject GetOrCreateCompanyMembershipRequestBody: type: object properties: company_id: type: string user_id: type: string required: - company_id - user_id title: GetOrCreateCompanyMembershipRequestBody InsightsSummaryResponseData: type: object properties: active_credits: type: number mrr: type: array items: $ref: '#/components/schemas/MrrResponseData' maxItems: 1000 paid_companies: type: integer format: int64 total_companies: type: integer format: int64 total_features: type: integer format: int64 total_plans: type: integer format: int64 required: - active_credits - mrr - paid_companies - total_companies - total_features - total_plans title: InsightsSummaryResponseData IntegrationCapabilities: type: object properties: author_plans: type: boolean checkout: type: boolean edit_billing: type: boolean required: - author_plans - checkout - edit_billing title: IntegrationCapabilities IntegrationConfig: type: object discriminator: propertyName: type mapping: clerk: '#/components/schemas/ClerkIntegrationConfig' orb: '#/components/schemas/OrbIntegrationConfig' stripe: '#/components/schemas/StripeIntegrationConfig' oneOf: - $ref: '#/components/schemas/StripeIntegrationConfig' - $ref: '#/components/schemas/OrbIntegrationConfig' - $ref: '#/components/schemas/ClerkIntegrationConfig' title: IntegrationConfig IntegrationResponseData: type: object properties: created_at: type: string format: date-time id: type: string state: $ref: '#/components/schemas/IntegrationState' type: $ref: '#/components/schemas/IntegrationType' updated_at: type: string format: date-time required: - created_at - id - state - type - updated_at title: IntegrationResponseData IntegrationState: type: string enum: - active - created - pending IntegrationType: type: string enum: - clerk - orb - stripe - unknown IntegrationWebhookUrlResponseData: type: object properties: type: $ref: '#/components/schemas/IntegrationType' url: type: string required: - url - type title: IntegrationWebhookUrlResponseData IntegrationsDataSetResponseData: type: object properties: keys: type: array items: type: string maxItems: 1000 required: - keys title: IntegrationsDataSetResponseData IntegrationsListResponseData: type: object properties: capabilities: $ref: '#/components/schemas/IntegrationCapabilities' config: $ref: '#/components/schemas/IntegrationConfig' id: type: string is_app_install: type: boolean is_connect_install: type: boolean state: $ref: '#/components/schemas/IntegrationState' type: $ref: '#/components/schemas/IntegrationType' required: - capabilities - id - is_app_install - is_connect_install - state - type title: IntegrationsListResponseData IntegrationsResponseData: type: object properties: created_at: type: string format: date-time id: type: string state: $ref: '#/components/schemas/IntegrationState' type: $ref: '#/components/schemas/IntegrationType' updated_at: type: string format: date-time required: - created_at - id - state - type - updated_at title: IntegrationsResponseData InvoiceRequestBody: 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 maxLength: 32 currency: type: string maxLength: 16 customer_external_id: type: string maxLength: 255 due_date: type: string format: date-time nullable: true payment_method_external_id: type: string nullable: true maxLength: 255 status: allOf: - $ref: '#/components/schemas/InvoiceStatus' nullable: true subscription_external_id: type: string nullable: true maxLength: 255 subtotal: type: integer format: int64 url: type: string nullable: true maxLength: 512 required: - amount_due - amount_paid - amount_remaining - collection_method - currency - customer_external_id - subtotal title: InvoiceRequestBody 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 nullable: true created_at: type: string format: date-time currency: type: string customer_external_id: type: string due_date: type: string format: date-time nullable: true environment_id: type: string external_id: type: string nullable: true id: type: string payment_method_external_id: type: string nullable: true provider_type: $ref: '#/components/schemas/BillingProviderType' status: allOf: - $ref: '#/components/schemas/InvoiceStatus' nullable: true subscription_external_id: type: string nullable: true subtotal: type: integer format: int64 updated_at: type: string format: date-time url: type: string nullable: true required: - id - amount_due - amount_paid - amount_remaining - collection_method - created_at - currency - customer_external_id - environment_id - provider_type - subtotal - updated_at title: InvoiceResponseData InvoiceStatus: type: string enum: - draft - open - paid - uncollectible - void IssueTemporaryAccessTokenRequestBody: type: object properties: lookup: additionalProperties: type: string type: object resource_type: $ref: '#/components/schemas/TemporaryAccessTokenResourceType' required: - resource_type - lookup title: IssueTemporaryAccessTokenRequestBody IssueTemporaryAccessTokenResponseData: type: object properties: api_key_id: type: string created_at: type: string format: date-time environment_id: type: string expired_at: type: string format: date-time id: type: string resource_type: $ref: '#/components/schemas/TemporaryAccessTokenResourceType' token: type: string updated_at: type: string format: date-time required: - id - environment_id - resource_type - api_key_id - expired_at - created_at - updated_at - token title: IssueTemporaryAccessTokenResponseData KeysRequestBody: type: object properties: keys: additionalProperties: type: string type: object required: - keys title: KeysRequestBody LimitTimeSeriesPointResponseData: type: object properties: effective_at: type: string format: date-time is_soft_limit: type: boolean limit_source: $ref: '#/components/schemas/EntitlementType' limit_value: type: integer format: int64 nullable: true plan_id: type: string nullable: true price_behavior: allOf: - $ref: '#/components/schemas/EntitlementPriceBehavior' nullable: true required: - effective_at - is_soft_limit - limit_source title: LimitTimeSeriesPointResponseData ManagePlanPreviewResponseResponseData: type: object properties: subscription_change_preview: $ref: '#/components/schemas/PreviewSubscriptionChangeResponseData' title: ManagePlanPreviewResponseResponseData ManagePlanRequest: type: object properties: add_on_selections: type: array items: $ref: '#/components/schemas/PlanSelection' maxItems: 100 base_plan_id: type: string nullable: true base_plan_price_id: type: string nullable: true base_plan_version_id: type: string nullable: true cancel_immediately: type: boolean description: If false, subscription cancels at period end. Only applies when removing all plans. Defaults to true. nullable: true company_id: type: string coupon_external_id: type: string nullable: true credit_bundles: type: array items: $ref: '#/components/schemas/UpdateCreditBundleRequestBody' maxItems: 100 pay_in_advance_entitlements: type: array items: $ref: '#/components/schemas/UpdatePayInAdvanceRequestBody' maxItems: 100 payment_method_external_id: type: string nullable: true maxLength: 255 promo_code: type: string nullable: true prorate: type: boolean description: If true and cancel_immediately is true, issue prorated credit. Only applies when removing all plans. Defaults to true. nullable: true trial_end: type: string format: date-time nullable: true required: - add_on_selections - company_id - credit_bundles - pay_in_advance_entitlements title: ManagePlanRequest ManagePlanResponseResponseData: type: object properties: company: $ref: '#/components/schemas/CompanyDetailResponseData' success: type: boolean required: - success title: ManagePlanResponseResponseData MeterRequestBody: type: object properties: display_name: type: string maxLength: 255 event_name: type: string maxLength: 255 event_payload_key: type: string maxLength: 255 required: - display_name - event_name - event_payload_key title: MeterRequestBody MetricPeriod: type: string enum: - all_time - current_day - current_month - current_week MetricPeriodMonthReset: type: string enum: - billing_cycle - first_of_month MrrResponseData: type: object properties: amount: type: integer format: int64 currency: type: string required: - amount - currency title: MrrResponseData OrbIntegrationConfig: type: object properties: external_customer_id_key: type: string description: Schematic company key used to store Orb's external_customer_id; when unset, defaults to orb_external_customer_id nullable: true type: type: string description: 'Discriminator: always "orb" for this variant' enum: - orb required: - type title: OrbIntegrationConfig OrderedPlansInGroup: type: object properties: entitlements: type: array items: $ref: '#/components/schemas/EntitlementsInPlan' nullable: true maxItems: 100 plan_id: type: string required: - plan_id title: OrderedPlansInGroup PaymentMethodRequestBody: type: object properties: account_last4: type: string nullable: true maxLength: 4 account_name: type: string nullable: true maxLength: 255 bank_name: type: string nullable: true maxLength: 255 billing_email: type: string nullable: true maxLength: 255 billing_name: type: string nullable: true maxLength: 255 card_brand: type: string nullable: true maxLength: 32 card_exp_month: type: integer format: int64 nullable: true card_exp_year: type: integer format: int64 nullable: true card_last4: type: string nullable: true maxLength: 4 customer_external_id: type: string maxLength: 255 payment_method_type: type: string maxLength: 32 required: - customer_external_id - payment_method_type title: PaymentMethodRequestBody PaymentMethodResponseData: type: object properties: account_last4: type: string nullable: true account_name: type: string nullable: true bank_name: type: string nullable: true billing_email: type: string nullable: true billing_name: type: string nullable: true card_brand: type: string nullable: true card_exp_month: type: integer format: int64 nullable: true card_exp_year: type: integer format: int64 nullable: true card_last4: type: string nullable: true company_id: type: string nullable: true 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: - id - created_at - customer_external_id - environment_id - external_id - payment_method_type - provider_type - updated_at title: PaymentMethodResponseData PlanBundleAction: type: string enum: - create - update - delete PlanBundleCreditGrantRequestBody: type: object properties: action: $ref: '#/components/schemas/PlanBundleAction' create_req: $ref: '#/components/schemas/CreateBillingPlanCreditGrantRequestBody' credit_grant_id: type: string nullable: true delete_req: $ref: '#/components/schemas/DeleteBillingPlanCreditGrantRequestBody' update_req: $ref: '#/components/schemas/UpdateBillingPlanCreditGrantRequestBody' required: - action title: PlanBundleCreditGrantRequestBody PlanBundleEntitlementRequestBody: type: object properties: action: $ref: '#/components/schemas/PlanBundleAction' entitlement_id: type: string nullable: true req: $ref: '#/components/schemas/CreateEntitlementInBundleRequestBody' required: - action title: PlanBundleEntitlementRequestBody PlanBundleResponseData: type: object properties: billing_product: $ref: '#/components/schemas/BillingProductPlanResponseData' credit_grants: type: array items: $ref: '#/components/schemas/BillingPlanCreditGrantResponseData' maxItems: 1000 entitlements: type: array items: $ref: '#/components/schemas/PlanEntitlementResponseData' maxItems: 1000 plan: $ref: '#/components/schemas/PlanResponseData' traits: type: array items: $ref: '#/components/schemas/PlanTraitResponseData' maxItems: 1000 title: PlanBundleResponseData PlanChangeAction: type: string enum: - checkout - company_upsert - fallback_plan - manage_plan - migration - plan_billing_product_changed - plan_deleted - plan_trait_change - plan_version_migration - quickstart - subscription_change PlanChangeBasePlanAction: type: string enum: - fallback - initial - trait - trial_expiry PlanChangeResponseData: type: object properties: action: $ref: '#/components/schemas/PlanChangeAction' actor_type: $ref: '#/components/schemas/ActorType' add_ons_added: type: array items: $ref: '#/components/schemas/PlanSnapshotView' maxItems: 1000 add_ons_removed: type: array items: $ref: '#/components/schemas/PlanSnapshotView' maxItems: 1000 api_key: $ref: '#/components/schemas/ApiKeyResponseData' audit_log: $ref: '#/components/schemas/AuditLogListResponseData' base_plan: $ref: '#/components/schemas/PlanSnapshotView' base_plan_action: allOf: - $ref: '#/components/schemas/PlanChangeBasePlanAction' description: Any special behavior that affected the assignment of the base plan during this change. nullable: true base_plan_version: allOf: - $ref: '#/components/schemas/PlanVersionSnapshotView' description: The plan version that was assigned during this change. company: $ref: '#/components/schemas/CompanyResponseData' company_id: type: string created_at: type: string format: date-time environment_id: type: string id: type: string previous_base_plan: $ref: '#/components/schemas/PlanSnapshotView' previous_base_plan_version: allOf: - $ref: '#/components/schemas/PlanVersionSnapshotView' description: The plan version of the previous base plan before this change. request_id: type: string nullable: true subscription_change_action: allOf: - $ref: '#/components/schemas/PlanChangeSubscriptionAction' description: If a subscription was changed as a part of this plan change, indicates the type of change that was made. nullable: true traits_updated: type: array description: Any traits were updated as part of this plan change (via pay-in-advance entitlements). items: $ref: '#/components/schemas/SubscriptionTraitUpdate' maxItems: 1000 updated_at: type: string format: date-time user_id: type: string nullable: true user_name: type: string nullable: true required: - action - actor_type - add_ons_added - add_ons_removed - company_id - created_at - environment_id - id - traits_updated - updated_at title: PlanChangeResponseData PlanChangeSubscriptionAction: type: string enum: - adjustment - downgrade - invalid - subscribe - unsubscribe - upgrade - upgrade_trial PlanCreditGrantView: type: object properties: billing_credit_auto_topup_amount: type: integer format: int64 nullable: true billing_credit_auto_topup_amount_type: type: string nullable: true billing_credit_auto_topup_enabled: type: boolean billing_credit_auto_topup_expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true billing_credit_auto_topup_expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true billing_credit_auto_topup_expiry_unit_count: type: integer format: int64 nullable: true billing_credit_auto_topup_threshold_credits: type: integer format: int64 nullable: true billing_credit_auto_topup_threshold_percent: type: integer format: int64 nullable: true 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. deprecated: true credit_icon: type: string description: Deprecated field, will be removed in the future. Use Credit.Icon instead. nullable: true deprecated: true credit_id: type: string credit_name: type: string description: Deprecated field, will be removed in the future. Use Credit.Name instead. deprecated: true expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true expiry_unit_count: type: integer format: int64 nullable: true id: type: string plan: $ref: '#/components/schemas/GenericPreviewObject' plan_id: type: string plan_version_id: type: string nullable: true plural_name: type: string description: Deprecated field, will be removed in the future. Use Credit.PluralName instead. nullable: true deprecated: true reset_cadence: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetCadence' nullable: true reset_start: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetStart' nullable: true reset_type: $ref: '#/components/schemas/BillingPlanCreditGrantResetType' singular_name: type: string description: Deprecated field, will be removed in the future. Use Credit.SingularName instead. nullable: true deprecated: true updated_at: type: string format: date-time required: - id - credit_id - plan_id - credit_amount - credit_name - credit_description - reset_type - billing_credit_auto_topup_enabled - created_at - updated_at title: PlanCreditGrantView PlanCurrencyPriceRequestBody: type: object properties: currency: type: string maxLength: 3 monthly_price: type: integer format: int64 nullable: true one_time_price: type: integer format: int64 nullable: true yearly_price: type: integer format: int64 nullable: true required: - currency title: PlanCurrencyPriceRequestBody PlanCurrencyPricesResponseData: type: object properties: currency: type: string monthly_price: $ref: '#/components/schemas/BillingPriceResponseData' one_time_price: $ref: '#/components/schemas/BillingPriceResponseData' yearly_price: $ref: '#/components/schemas/BillingPriceResponseData' required: - currency title: PlanCurrencyPricesResponseData PlanDetailResponseData: type: object properties: active_version: $ref: '#/components/schemas/PlanVersionResponseData' audience_type: type: string nullable: true deprecated: true billing_linked_resource: $ref: '#/components/schemas/BillingLinkedResourceResponseData' billing_product: $ref: '#/components/schemas/BillingProductDetailResponseData' charge_type: $ref: '#/components/schemas/ChargeType' company_count: type: integer format: int64 company_id: type: string nullable: true company_name: type: string nullable: true controlled_by: $ref: '#/components/schemas/BillingProviderType' copied_from_plan_id: type: string nullable: true created_at: type: string format: date-time currency_prices: type: array items: $ref: '#/components/schemas/PlanCurrencyPricesResponseData' maxItems: 1000 description: type: string draft_version: $ref: '#/components/schemas/PlanVersionResponseData' features: type: array items: $ref: '#/components/schemas/FeatureInPlanResponseData' maxItems: 1000 icon: $ref: '#/components/schemas/PlanIcon' id: type: string included_credit_grants: type: array items: $ref: '#/components/schemas/BillingPlanCreditGrantResponseData' maxItems: 1000 is_default: type: boolean deprecated: true is_free: type: boolean 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' trial_days: type: integer format: int64 nullable: true updated_at: type: string format: date-time versions: type: array items: $ref: '#/components/schemas/PlanVersionResponseData' maxItems: 1000 yearly_price: $ref: '#/components/schemas/BillingPriceResponseData' required: - created_at - description - icon - id - name - plan_type - updated_at - charge_type - company_count - controlled_by - currency_prices - features - is_default - is_free - is_trialable - versions title: PlanDetailResponseData PlanEntitlementResponseData: type: object properties: billing_linked_resource: $ref: '#/components/schemas/BillingLinkedResourceResponseData' billing_threshold: type: integer format: int64 nullable: true consumption_rate: type: number nullable: true created_at: type: string format: date-time currency_prices: type: array items: $ref: '#/components/schemas/EntitlementCurrencyPricesResponseData' maxItems: 1000 environment_id: type: string feature: $ref: '#/components/schemas/FeatureResponseData' feature_id: type: string id: type: string metered_monthly_price: $ref: '#/components/schemas/BillingPriceView' metered_yearly_price: $ref: '#/components/schemas/BillingPriceView' metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true plan: $ref: '#/components/schemas/PlanResponseData' plan_id: type: string price_behavior: allOf: - $ref: '#/components/schemas/EntitlementPriceBehavior' nullable: true rule_id: type: string rule_id_usage_exceeded: type: string nullable: true soft_limit: type: integer format: int64 nullable: true updated_at: type: string format: date-time usage_based_product: $ref: '#/components/schemas/BillingProductResponseData' value_bool: type: boolean nullable: true value_credit: $ref: '#/components/schemas/BillingCreditResponseData' value_numeric: type: integer format: int64 nullable: true value_trait: $ref: '#/components/schemas/EntityTraitDefinitionResponseData' value_trait_id: type: string nullable: true value_type: $ref: '#/components/schemas/EntitlementValueType' required: - created_at - currency_prices - environment_id - feature_id - id - plan_id - rule_id - updated_at - value_type title: PlanEntitlementResponseData PlanEntitlementsOrder: type: object properties: plan_entitlement_id: type: string visible: type: boolean nullable: true required: - plan_entitlement_id title: PlanEntitlementsOrder PlanGroupBundleOrder: type: object properties: bundleId: type: string required: - bundleId title: PlanGroupBundleOrder PlanGroupDetailResponseData: type: object properties: add_ons: type: array items: $ref: '#/components/schemas/PlanGroupPlanDetailResponseData' maxItems: 1000 checkout_settings: $ref: '#/components/schemas/CheckoutSettingsResponseData' component_settings: $ref: '#/components/schemas/ComponentSettingsResponseData' custom_plan_config: $ref: '#/components/schemas/CustomPlanViewConfigResponseData' custom_plan_id: type: string nullable: true default_plan: $ref: '#/components/schemas/PlanGroupPlanDetailResponseData' default_plan_id: type: string nullable: true deprecated: true fallback_plan: $ref: '#/components/schemas/PlanGroupPlanDetailResponseData' fallback_plan_id: type: string nullable: true id: type: string initial_plan: $ref: '#/components/schemas/PlanGroupPlanDetailResponseData' initial_plan_id: type: string nullable: true initial_plan_price: $ref: '#/components/schemas/BillingPriceView' initial_plan_price_id: type: string nullable: true ordered_add_on_list: type: array items: $ref: '#/components/schemas/PlanGroupPlanEntitlementsOrder' maxItems: 1000 ordered_bundle_list: type: array items: $ref: '#/components/schemas/PlanGroupBundleOrder' maxItems: 1000 ordered_plan_list: type: array items: $ref: '#/components/schemas/PlanGroupPlanEntitlementsOrder' maxItems: 1000 plans: type: array items: $ref: '#/components/schemas/PlanGroupPlanDetailResponseData' maxItems: 1000 prevent_downgrades_when_over_limit: type: boolean prevent_self_service_downgrade: type: boolean prevent_self_service_downgrade_button_text: type: string nullable: true prevent_self_service_downgrade_url: type: string nullable: true proration_behavior: type: string scheduled_downgrade_behavior: type: string nullable: true scheduled_downgrade_prevent_when_over_limit: type: boolean nullable: true show_as_monthly_prices: type: boolean deprecated: true show_credits: type: boolean deprecated: true show_period_toggle: type: boolean deprecated: true show_zero_price_as_free: type: boolean deprecated: true sync_customer_billing_details: type: boolean tax_collection_enabled: type: boolean trial_days: type: integer format: int64 nullable: true trial_expiry_plan: $ref: '#/components/schemas/PlanGroupPlanDetailResponseData' trial_expiry_plan_id: type: string nullable: true trial_expiry_plan_price: $ref: '#/components/schemas/BillingPriceView' trial_expiry_plan_price_id: type: string nullable: true trial_payment_method_required: type: boolean nullable: true required: - add_ons - id - plans - ordered_plan_list - ordered_bundle_list - ordered_add_on_list - show_as_monthly_prices - show_credits - show_period_toggle - show_zero_price_as_free - checkout_settings - component_settings - prevent_downgrades_when_over_limit - prevent_self_service_downgrade - proration_behavior - sync_customer_billing_details - tax_collection_enabled title: PlanGroupDetailResponseData PlanGroupPlanDetailResponseData: type: object properties: active_version: $ref: '#/components/schemas/PlanVersionResponseData' audience_type: type: string nullable: true deprecated: true billing_linked_resource: $ref: '#/components/schemas/BillingLinkedResourceResponseData' billing_product: $ref: '#/components/schemas/BillingProductDetailResponseData' charge_type: $ref: '#/components/schemas/ChargeType' company_count: type: integer format: int64 company_id: type: string nullable: true company_name: type: string nullable: true compatible_plan_ids: type: array items: type: string maxItems: 1000 controlled_by: $ref: '#/components/schemas/BillingProviderType' copied_from_plan_id: type: string nullable: true created_at: type: string format: date-time currency_prices: type: array items: $ref: '#/components/schemas/PlanCurrencyPricesResponseData' maxItems: 1000 custom_plan_config: $ref: '#/components/schemas/CustomPlanViewConfigResponseData' description: type: string draft_version: $ref: '#/components/schemas/PlanVersionResponseData' entitlements: type: array items: $ref: '#/components/schemas/PlanEntitlementResponseData' maxItems: 1000 features: type: array items: $ref: '#/components/schemas/FeatureInPlanResponseData' maxItems: 1000 icon: $ref: '#/components/schemas/PlanIcon' id: type: string included_credit_grants: type: array items: $ref: '#/components/schemas/BillingPlanCreditGrantResponseData' maxItems: 1000 is_custom: type: boolean is_default: type: boolean deprecated: true is_free: type: boolean 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' trial_days: type: integer format: int64 nullable: true updated_at: type: string format: date-time versions: type: array items: $ref: '#/components/schemas/PlanVersionResponseData' maxItems: 1000 yearly_price: $ref: '#/components/schemas/BillingPriceResponseData' required: - created_at - description - icon - id - name - plan_type - updated_at - charge_type - company_count - controlled_by - currency_prices - features - is_default - is_free - is_trialable - versions - is_custom - entitlements - compatible_plan_ids title: PlanGroupPlanDetailResponseData PlanGroupPlanEntitlementsOrder: type: object properties: entitlements: type: array items: $ref: '#/components/schemas/PlanEntitlementsOrder' nullable: true maxItems: 1000 plan_id: type: string required: - plan_id title: PlanGroupPlanEntitlementsOrder PlanGroupResponseData: type: object properties: add_on_compatibilities: type: array items: $ref: '#/components/schemas/CompatiblePlansResponseData' maxItems: 1000 add_on_ids: type: array items: type: string maxItems: 1000 checkout_settings: $ref: '#/components/schemas/CheckoutSettingsResponseData' component_settings: $ref: '#/components/schemas/ComponentSettingsResponseData' default_plan_id: type: string nullable: true deprecated: true fallback_plan_id: type: string nullable: true id: type: string initial_plan_id: type: string nullable: true initial_plan_price_id: type: string nullable: true ordered_add_on_ids: type: array items: $ref: '#/components/schemas/OrderedPlansInGroup' maxItems: 1000 plan_ids: type: array items: $ref: '#/components/schemas/OrderedPlansInGroup' maxItems: 1000 prevent_downgrades_when_over_limit: type: boolean prevent_self_service_downgrade: type: boolean prevent_self_service_downgrade_button_text: type: string nullable: true prevent_self_service_downgrade_url: type: string nullable: true proration_behavior: type: string scheduled_downgrade_behavior: type: string nullable: true scheduled_downgrade_prevent_when_over_limit: type: boolean nullable: true show_as_monthly_prices: type: boolean deprecated: true show_credits: type: boolean deprecated: true show_period_toggle: type: boolean deprecated: true show_zero_price_as_free: type: boolean deprecated: true sync_customer_billing_details: type: boolean tax_collection_enabled: type: boolean trial_days: type: integer format: int64 nullable: true trial_expiry_plan_id: type: string nullable: true trial_expiry_plan_price_id: type: string nullable: true trial_payment_method_required: type: boolean nullable: true required: - id - add_on_ids - plan_ids - ordered_add_on_ids - add_on_compatibilities - show_as_monthly_prices - show_credits - show_period_toggle - show_zero_price_as_free - checkout_settings - component_settings - prevent_downgrades_when_over_limit - prevent_self_service_downgrade - proration_behavior - sync_customer_billing_details - tax_collection_enabled title: PlanGroupResponseData PlanGrowthPointResponseData: type: object properties: month: type: string format: date-time plan_id: type: string plan_name: type: string subscribers: type: integer format: int64 required: - month - plan_id - plan_name - subscribers title: PlanGrowthPointResponseData PlanGrowthResponseData: type: object properties: points: type: array items: $ref: '#/components/schemas/PlanGrowthPointResponseData' maxItems: 1000 required: - points title: PlanGrowthResponseData 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 PlanIssueResponseData: type: object properties: code: type: string description: type: string detail: type: string id: type: string required: - code - description title: PlanIssueResponseData PlanResponseData: type: object properties: audience_type: type: string nullable: true deprecated: true company_id: type: string nullable: true copied_from_plan_id: type: string nullable: true 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 PlanSelection: type: object properties: plan_id: type: string price_id: type: string nullable: true version_id: type: string nullable: true required: - plan_id title: PlanSelection PlanSnapshotView: type: object properties: deleted: type: boolean description: type: string icon: type: string id: type: string name: type: string required: - deleted - description - id - icon - name title: PlanSnapshotView PlanTraitResponseData: type: object properties: account_id: type: string created_at: type: string format: date-time environment_id: type: string id: type: string plan_id: type: string plan_type: type: string trait_id: type: string trait_value: type: string updated_at: type: string format: date-time required: - id - account_id - environment_id - plan_id - plan_type - trait_id - trait_value - created_at - updated_at title: PlanTraitResponseData PlanType: type: string enum: - plan - add_on PlanVersionCompanyMigrationResponseData: type: object properties: company_id: type: string company_name: type: string completed_at: type: string format: date-time nullable: true created_at: type: string format: date-time error: type: string nullable: true id: type: string migration_id: type: string plan_version_id_from: type: string nullable: true started_at: type: string format: date-time nullable: true status: $ref: '#/components/schemas/PlanVersionCompanyMigrationStatus' updated_at: type: string format: date-time required: - company_id - company_name - created_at - id - migration_id - status - updated_at title: PlanVersionCompanyMigrationResponseData PlanVersionCompanyMigrationStatus: type: string enum: - completed - failed - in_progress - pending - skipped PlanVersionMigrationResponseData: type: object properties: completed_at: type: string format: date-time nullable: true completed_companies: type: integer format: int64 created_at: type: string format: date-time error: type: string nullable: true failed_companies: type: integer format: int64 id: type: string plan_id: type: string plan_version_id_from: type: string nullable: true plan_version_id_to: type: string skipped_companies: type: integer format: int64 started_at: type: string format: date-time nullable: true status: $ref: '#/components/schemas/PlanVersionMigrationStatus' strategy: $ref: '#/components/schemas/PlanVersionMigrationStrategy' total_companies: type: integer format: int64 updated_at: type: string format: date-time required: - completed_companies - created_at - failed_companies - id - plan_id - plan_version_id_to - skipped_companies - status - strategy - total_companies - updated_at title: PlanVersionMigrationResponseData PlanVersionMigrationStatus: type: string enum: - completed - failed - in_progress - pending PlanVersionMigrationStrategy: type: string enum: - immediate - leave 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 nullable: true 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 PlanVersionSnapshotView: type: object properties: id: type: string name: type: string version: type: integer format: int64 required: - id - name - version title: PlanVersionSnapshotView PlanVersionStatus: type: string enum: - published - draft - archived PlanViewPublicResponseData: type: object properties: active_version: $ref: '#/components/schemas/PlanVersionResponseData' audience_type: type: string nullable: true deprecated: true billing_linked_resource: $ref: '#/components/schemas/BillingLinkedResourceResponseData' billing_product: $ref: '#/components/schemas/BillingProductDetailResponseData' charge_type: $ref: '#/components/schemas/ChargeType' company_count: type: integer format: int64 company_id: type: string nullable: true company_name: type: string nullable: true compatible_plan_ids: type: array items: type: string maxItems: 1000 controlled_by: $ref: '#/components/schemas/BillingProviderType' copied_from_plan_id: type: string nullable: true created_at: type: string format: date-time currency_prices: type: array items: $ref: '#/components/schemas/PlanCurrencyPricesResponseData' maxItems: 1000 custom: type: boolean custom_plan_config: $ref: '#/components/schemas/CustomPlanConfig' description: type: string draft_version: $ref: '#/components/schemas/PlanVersionResponseData' entitlements: type: array items: $ref: '#/components/schemas/PlanEntitlementResponseData' maxItems: 1000 features: type: array items: $ref: '#/components/schemas/FeatureInPlanResponseData' maxItems: 1000 icon: $ref: '#/components/schemas/PlanIcon' id: type: string included_credit_grants: type: array items: $ref: '#/components/schemas/PlanCreditGrantView' maxItems: 1000 is_custom: type: boolean is_default: type: boolean deprecated: true is_free: type: boolean 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' trial_days: type: integer format: int64 nullable: true updated_at: type: string format: date-time versions: type: array items: $ref: '#/components/schemas/PlanVersionResponseData' maxItems: 1000 yearly_price: $ref: '#/components/schemas/BillingPriceResponseData' required: - created_at - description - icon - id - name - plan_type - updated_at - charge_type - company_count - controlled_by - currency_prices - features - is_default - is_free - is_trialable - versions - is_custom - entitlements - compatible_plan_ids - custom - included_credit_grants title: PlanViewPublicResponseData PreviewObject: type: object properties: description: type: string nullable: true id: type: string image_url: type: string nullable: true name: type: string required: - id - name title: PreviewObject PreviewObjectResponseData: type: object properties: description: type: string nullable: true id: type: string image_url: type: string nullable: true name: type: string required: - id - name title: PreviewObjectResponseData PreviewSubscriptionChangeResponseData: type: object properties: amount_off: type: integer format: int64 deprecated: true due_now: type: integer format: int64 deprecated: true finance: $ref: '#/components/schemas/PreviewSubscriptionFinanceResponseData' is_scheduled_downgrade: type: boolean new_charges: type: integer format: int64 deprecated: true payment_method_required: type: boolean percent_off: type: number deprecated: true period_start: type: string format: date-time deprecated: true promo_code_applied: type: boolean deprecated: true proration: type: integer format: int64 deprecated: true scheduled_change_time: type: string format: date-time nullable: true trial_end: type: string format: date-time nullable: true deprecated: true usage_violations: type: array items: $ref: '#/components/schemas/FeatureUsageResponseData' maxItems: 1000 required: - due_now - new_charges - proration - period_start - promo_code_applied - percent_off - amount_off - is_scheduled_downgrade - payment_method_required - usage_violations title: PreviewSubscriptionChangeResponseData PreviewSubscriptionFinanceResponseData: type: object properties: amount_off: type: integer format: int64 due_now: type: integer format: int64 new_charges: type: integer format: int64 percent_off: type: number period_start: type: string format: date-time promo_code_applied: type: boolean proration: type: integer format: int64 tax_amount: type: integer format: int64 nullable: true tax_display_name: type: string nullable: true tax_require_billing_details: type: boolean total_per_billing_period: type: integer format: int64 trial_end: type: string format: date-time nullable: true upcoming_invoice_line_items: type: array items: $ref: '#/components/schemas/PreviewSubscriptionUpcomingInvoiceLineItems' maxItems: 1000 required: - amount_off - due_now - upcoming_invoice_line_items - new_charges - percent_off - period_start - promo_code_applied - proration - tax_require_billing_details - total_per_billing_period title: PreviewSubscriptionFinanceResponseData PreviewSubscriptionUpcomingInvoiceLineItems: type: object properties: amount: type: integer format: int64 description: type: string price_id: type: string proration: type: boolean quantity: type: integer format: int64 required: - price_id - quantity - proration - amount - description title: PreviewSubscriptionUpcomingInvoiceLineItems ProrationBehavior: type: string enum: - create_prorations - invoice_immediately PublicPlansResponseData: type: object properties: active_add_ons: type: array items: $ref: '#/components/schemas/PlanViewPublicResponseData' maxItems: 1000 active_plans: type: array items: $ref: '#/components/schemas/PlanViewPublicResponseData' maxItems: 1000 add_on_compatibilities: type: array items: $ref: '#/components/schemas/CompatiblePlans' maxItems: 1000 capabilities: $ref: '#/components/schemas/ComponentCapabilities' display_settings: $ref: '#/components/schemas/ComponentDisplaySettings' show_as_monthly_prices: type: boolean deprecated: true show_credits: type: boolean deprecated: true show_period_toggle: type: boolean deprecated: true show_zero_price_as_free: type: boolean deprecated: true required: - active_add_ons - active_plans - add_on_compatibilities - show_as_monthly_prices - show_credits - show_period_toggle - show_zero_price_as_free - display_settings title: PublicPlansResponseData PublishPlanVersionRequestBody: type: object properties: activation_strategy: allOf: - $ref: '#/components/schemas/CustomPlanActivationStrategy' nullable: true customer_email: type: string nullable: true maxLength: 255 days_until_due: type: integer format: int64 nullable: true maximum: 365 excluded_company_ids: type: array items: type: string maxItems: 1000 migration_strategy: $ref: '#/components/schemas/PlanVersionMigrationStrategy' pay_in_advance: type: array items: $ref: '#/components/schemas/UpdatePayInAdvanceRequestBody' maxItems: 100 required: - excluded_company_ids - migration_strategy - pay_in_advance title: PublishPlanVersionRequestBody QuickstartResp: type: object properties: ok: type: boolean required: - ok title: QuickstartResp RawEventBatchResponseData: type: object properties: events: type: array items: $ref: '#/components/schemas/RawEventResponseData' maxItems: 1000 required: - events title: RawEventBatchResponseData RawEventResponseData: type: object properties: captured_at: type: string format: date-time event_id: type: string nullable: true remote_addr: type: string nullable: true remote_ip: type: string user_agent: type: string required: - captured_at - remote_ip - user_agent title: RawEventResponseData RetryCustomPlanBillingRequestBody: type: object properties: activation_strategy: allOf: - $ref: '#/components/schemas/CustomPlanActivationStrategy' nullable: true customer_email: type: string maxLength: 255 days_until_due: type: integer format: int64 nullable: true maximum: 365 pay_in_advance: type: array items: $ref: '#/components/schemas/UpdatePayInAdvanceRequestBody' maxItems: 100 required: - customer_email - pay_in_advance title: RetryCustomPlanBillingRequestBody Rule: type: object properties: account_id: type: string condition_groups: type: array items: $ref: '#/components/schemas/ConditionGroup' maxItems: 1000 conditions: type: array items: $ref: '#/components/schemas/Condition' maxItems: 1000 environment_id: type: string flag_id: type: string nullable: true id: type: string name: type: string priority: type: integer format: int64 rule_type: $ref: '#/components/schemas/RuleType' value: type: boolean required: - id - account_id - environment_id - rule_type - name - priority - conditions - condition_groups - value title: Rule RuleConditionDetailResponseData: type: object properties: comparison_trait: $ref: '#/components/schemas/EntityTraitDefinitionResponseData' comparison_trait_id: type: string nullable: true condition_group_id: type: string nullable: true condition_type: $ref: '#/components/schemas/ConditionType' created_at: type: string format: date-time environment_id: type: string event_subtype: type: string nullable: true flag_id: type: string nullable: true id: type: string metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true metric_value: type: integer format: int64 nullable: true operator: $ref: '#/components/schemas/ComparableOperator' resource_ids: type: array items: type: string maxItems: 1000 resources: type: array items: $ref: '#/components/schemas/PreviewObjectResponseData' maxItems: 1000 rule_id: type: string trait: $ref: '#/components/schemas/EntityTraitDefinitionResponseData' trait_entity_type: allOf: - $ref: '#/components/schemas/EntityType' nullable: true trait_id: type: string nullable: true trait_value: type: string updated_at: type: string format: date-time required: - id - environment_id - rule_id - condition_type - operator - created_at - updated_at - resource_ids - trait_value - resources title: RuleConditionDetailResponseData RuleConditionGroupDetailResponseData: type: object properties: conditions: type: array items: $ref: '#/components/schemas/RuleConditionDetailResponseData' maxItems: 1000 created_at: type: string format: date-time environment_id: type: string flag_id: type: string nullable: true id: type: string rule_id: type: string updated_at: type: string format: date-time required: - id - environment_id - rule_id - created_at - updated_at - conditions title: RuleConditionGroupDetailResponseData RuleConditionGroupResponseData: type: object properties: created_at: type: string format: date-time environment_id: type: string flag_id: type: string nullable: true id: type: string rule_id: type: string updated_at: type: string format: date-time required: - id - environment_id - rule_id - created_at - updated_at title: RuleConditionGroupResponseData RuleConditionResponseData: type: object properties: comparison_trait_id: type: string nullable: true condition_group_id: type: string nullable: true condition_type: $ref: '#/components/schemas/ConditionType' created_at: type: string format: date-time environment_id: type: string event_subtype: type: string nullable: true flag_id: type: string nullable: true id: type: string metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true metric_value: type: integer format: int64 nullable: true operator: $ref: '#/components/schemas/ComparableOperator' resource_ids: type: array items: type: string maxItems: 1000 rule_id: type: string trait_entity_type: allOf: - $ref: '#/components/schemas/EntityType' nullable: true trait_id: type: string nullable: true trait_value: type: string updated_at: type: string format: date-time required: - id - environment_id - rule_id - condition_type - operator - created_at - updated_at - resource_ids - trait_value title: RuleConditionResponseData RuleDetailResponseData: type: object properties: condition_groups: type: array items: $ref: '#/components/schemas/RuleConditionGroupDetailResponseData' maxItems: 1000 conditions: type: array items: $ref: '#/components/schemas/RuleConditionDetailResponseData' maxItems: 1000 created_at: type: string format: date-time environment_id: type: string flag_id: type: string nullable: true 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: - id - environment_id - priority - name - rule_type - value - created_at - updated_at - conditions - condition_groups title: RuleDetailResponseData RuleResponseData: type: object properties: created_at: type: string format: date-time environment_id: type: string flag_id: type: string nullable: true 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: - id - environment_id - priority - name - rule_type - value - created_at - updated_at title: RuleResponseData RuleType: type: string enum: - company_override - company_override_usage_exceeded - default - global_override - plan_entitlement - plan_entitlement_usage_exceeded - standard RuleView: type: object properties: account_id: type: string condition_groups: type: array items: $ref: '#/components/schemas/ConditionGroupView' maxItems: 1000 conditions: type: array items: $ref: '#/components/schemas/ConditionView' maxItems: 1000 created_at: type: string format: date-time environment_id: type: string flag_id: type: string nullable: true 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: - account_id - created_at - environment_id - id - name - priority - rule_type - updated_at - value - conditions - condition_groups title: RuleView RulesDetailResponseData: type: object properties: flag: $ref: '#/components/schemas/FlagResponseData' rules: type: array items: $ref: '#/components/schemas/RuleDetailResponseData' maxItems: 1000 required: - rules title: RulesDetailResponseData RulesEngineSchemaVersion: type: string description: The current schema version hash for rules engine types. The first enum value is always the current version. title: RulesEngineSchemaVersion enum: - v97288f60 - placeholder-for-fern-compatibility RulesengineCheckFlagResult: type: object properties: company_id: type: string nullable: true entitlement: $ref: '#/components/schemas/RulesengineFeatureEntitlement' err: type: string feature_allocation: type: integer format: int64 nullable: true feature_usage: type: integer format: int64 nullable: true feature_usage_event: type: string nullable: true feature_usage_period: allOf: - $ref: '#/components/schemas/RulesengineMetricPeriod' nullable: true feature_usage_reset_at: type: string format: date-time nullable: true flag_id: type: string nullable: true flag_key: type: string reason: type: string rule_id: type: string nullable: true rule_type: allOf: - $ref: '#/components/schemas/RulesengineRuleType' nullable: true user_id: type: string nullable: true value: type: boolean required: - flag_key - reason - value title: RulesengineCheckFlagResult RulesengineCompany: type: object properties: account_id: type: string base_plan_id: type: string nullable: true billing_product_ids: type: array items: type: string maxItems: 1000 credit_balances: additionalProperties: type: number type: object entitlements: type: array items: $ref: '#/components/schemas/RulesengineFeatureEntitlement' maxItems: 1000 environment_id: type: string id: type: string keys: additionalProperties: type: string type: object metrics: type: array items: $ref: '#/components/schemas/RulesengineCompanyMetric' maxItems: 1000 plan_ids: type: array items: type: string maxItems: 1000 plan_version_ids: type: array items: type: string maxItems: 1000 rules: type: array items: $ref: '#/components/schemas/RulesengineRule' maxItems: 1000 subscription: $ref: '#/components/schemas/RulesengineSubscription' traits: type: array items: $ref: '#/components/schemas/RulesengineTrait' maxItems: 1000 required: - id - account_id - environment_id - billing_product_ids - credit_balances - keys - metrics - plan_ids - plan_version_ids - rules - traits title: RulesengineCompany RulesengineCompanyMetric: type: object properties: account_id: type: string company_id: type: string created_at: type: string format: date-time environment_id: type: string event_subtype: type: string month_reset: $ref: '#/components/schemas/RulesengineMetricPeriodMonthReset' period: $ref: '#/components/schemas/RulesengineMetricPeriod' valid_until: type: string format: date-time nullable: true value: type: integer format: int64 required: - account_id - environment_id - company_id - event_subtype - period - month_reset - value - created_at title: RulesengineCompanyMetric RulesengineCondition: type: object properties: account_id: type: string comparison_trait_definition: $ref: '#/components/schemas/RulesengineTraitDefinition' condition_type: $ref: '#/components/schemas/RulesengineConditionType' consumption_rate: type: number nullable: true credit_id: type: string nullable: true environment_id: type: string event_subtype: type: string nullable: true id: type: string metric_period: allOf: - $ref: '#/components/schemas/RulesengineMetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/RulesengineMetricPeriodMonthReset' nullable: true metric_value: type: integer format: int64 nullable: true operator: $ref: '#/components/schemas/ComparableOperator' resource_ids: type: array items: type: string maxItems: 1000 trait_definition: $ref: '#/components/schemas/RulesengineTraitDefinition' trait_value: type: string required: - id - account_id - environment_id - condition_type - operator - resource_ids - trait_value title: RulesengineCondition RulesengineConditionGroup: type: object properties: conditions: type: array items: $ref: '#/components/schemas/RulesengineCondition' maxItems: 1000 required: - conditions title: RulesengineConditionGroup RulesengineConditionType: type: string title: RulesengineConditionType enum: - base_plan - billing_product - company - credit - metric - plan - plan_version - trait - user RulesengineEntitlementValueType: type: string title: RulesengineEntitlementValueType enum: - boolean - credit - numeric - trait - unknown - unlimited RulesengineEntityType: type: string title: RulesengineEntityType enum: - company - user RulesengineFeatureEntitlement: type: object properties: allocation: type: integer description: If the company has a numeric entitlement for this feature, the allocated amount format: int64 nullable: true credit_id: type: string description: If the company has a credit-based entitlement for this feature, the ID of the credit nullable: true credit_remaining: type: number description: If the company has a credit-based entitlement for this feature, the remaining credit amount nullable: true credit_total: type: number description: If the company has a credit-based entitlement for this feature, the total credit amount nullable: true credit_used: type: number description: If the company has a credit-based entitlement for this feature, the amount of credit used nullable: true event_name: type: string description: If the feature is event-based, the name of the event tracked for usage nullable: true 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: allOf: - $ref: '#/components/schemas/RulesengineMetricPeriod' description: For event-based feature entitlements, the period over which usage is tracked nullable: true metric_reset_at: type: string description: For event-based feature entitlements, when the usage period will reset format: date-time nullable: true month_reset: allOf: - $ref: '#/components/schemas/RulesengineMetricPeriodMonthReset' 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 nullable: true soft_limit: type: integer description: For usage-based pricing, the soft limit for overage charges or the next tier boundary format: int64 nullable: true usage: type: integer description: If the company has a numeric entitlement for this feature, the current usage amount format: int64 nullable: true value_type: allOf: - $ref: '#/components/schemas/RulesengineEntitlementValueType' description: The type of the entitlement value required: - feature_id - feature_key - value_type title: RulesengineFeatureEntitlement RulesengineFlag: type: object properties: account_id: type: string default_value: type: boolean environment_id: type: string id: type: string key: type: string rules: type: array items: $ref: '#/components/schemas/RulesengineRule' maxItems: 1000 required: - id - account_id - environment_id - key - rules - default_value title: RulesengineFlag RulesengineMetricPeriod: type: string title: RulesengineMetricPeriod enum: - all_time - current_day - current_month - current_week RulesengineMetricPeriodMonthReset: type: string title: RulesengineMetricPeriodMonthReset enum: - billing_cycle - first_of_month RulesengineRule: type: object properties: account_id: type: string condition_groups: type: array items: $ref: '#/components/schemas/RulesengineConditionGroup' maxItems: 1000 conditions: type: array items: $ref: '#/components/schemas/RulesengineCondition' maxItems: 1000 environment_id: type: string flag_id: type: string nullable: true id: type: string name: type: string priority: type: integer format: int64 rule_type: $ref: '#/components/schemas/RulesengineRuleType' value: type: boolean required: - id - account_id - environment_id - rule_type - name - priority - conditions - condition_groups - value title: RulesengineRule RulesengineRuleType: type: string title: RulesengineRuleType enum: - company_override - company_override_usage_exceeded - default - global_override - plan_entitlement - plan_entitlement_usage_exceeded - standard RulesengineSubscription: type: object properties: id: type: string period_end: type: string format: date-time period_start: type: string format: date-time required: - id - period_start - period_end title: RulesengineSubscription RulesengineTrait: type: object properties: trait_definition: $ref: '#/components/schemas/RulesengineTraitDefinition' value: type: string required: - value title: RulesengineTrait RulesengineTraitDefinition: type: object properties: comparable_type: type: string enum: - bool - date - int - string entity_type: $ref: '#/components/schemas/RulesengineEntityType' id: type: string required: - id - comparable_type - entity_type title: RulesengineTraitDefinition RulesengineUser: type: object properties: account_id: type: string environment_id: type: string id: type: string keys: additionalProperties: type: string type: object rules: type: array items: $ref: '#/components/schemas/RulesengineRule' maxItems: 1000 traits: type: array items: $ref: '#/components/schemas/RulesengineTrait' maxItems: 1000 required: - id - account_id - environment_id - keys - traits - rules title: RulesengineUser ScheduledCheckoutResponseData: type: object properties: actor_type: type: string company_id: type: string completed_at: type: string format: date-time nullable: true created_at: type: string format: date-time error_message: type: string nullable: true execute_after: type: string format: date-time from_plan_id: type: string id: type: string scheduled_interval: type: string nullable: true scheduled_price: type: integer format: int64 nullable: true started_at: type: string format: date-time nullable: true status: $ref: '#/components/schemas/ScheduledCheckoutStatus' to_plan_id: type: string updated_at: type: string format: date-time required: - actor_type - company_id - created_at - execute_after - from_plan_id - id - status - to_plan_id - updated_at title: ScheduledCheckoutResponseData ScheduledCheckoutStatus: type: string enum: - cancelled - error - executing - pending - success ScheduledDowngradeConfigBehavior: type: string enum: - end_of_billing_period - none 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 nullable: true scheduled_price: type: integer format: int64 nullable: true 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 SegmentStatusResp: type: object properties: connected: type: boolean environment_id: type: string last_event_at: type: string format: date-time nullable: true required: - connected - environment_id title: SegmentStatusResp SkippedEntitlementErrorResponseData: type: object properties: message: type: string required: - message title: SkippedEntitlementErrorResponseData SkippedEntitlementResponseData: type: object properties: entitlement_id: type: string errors: type: array items: $ref: '#/components/schemas/SkippedEntitlementErrorResponseData' maxItems: 1000 feature_id: type: string feature_name: type: string required: - entitlement_id - feature_id - feature_name - errors title: SkippedEntitlementResponseData SortDirection: type: string enum: - asc - desc StartDataImportRequestBody: type: object properties: company_matching_criteria: allOf: - $ref: '#/components/schemas/CompanyMatchingCriteria' nullable: true company_matching_field: type: string nullable: true integration_id: type: string required: - integration_id title: StartDataImportRequestBody StripeEmbedInfo: type: object properties: account_id: type: string nullable: true publishable_key: type: string nullable: true schematic_publishable_key: type: string setup_intent_client_secret: type: string nullable: true required: - schematic_publishable_key title: StripeEmbedInfo StripeIntegrationConfig: type: object properties: account_id: type: string description: Connected Stripe account ID (acct_*) nullable: true account_name: type: string description: Display name of the connected Stripe account nullable: true company_update_only: type: boolean description: When importing Stripe customers, only update existing companies, do not create new companies is_sandbox: type: boolean description: Whether the integration is connected to a Stripe sandbox account live_mode: type: boolean description: Whether the integration is connected to a live Stripe account onboard_url: type: string description: Onboarding URL returned during the v2 (Connect) install flow before activation nullable: true type: type: string description: 'Discriminator: always "stripe" for this variant' enum: - stripe version: type: integer description: Stripe integration config version (1 = legacy API key install, 2 = Connect/App install) required: - type - is_sandbox - live_mode - version title: StripeIntegrationConfig SubscriptionStatus: type: string enum: - active - canceled - expired - incomplete - incomplete_expired - past_due - paused - trialing - unpaid SubscriptionTraitUpdate: type: object properties: feature_id: type: string hierarchy: type: array items: type: string maxItems: 1000 reason: type: string trait_id: type: string trait_name: type: string trait_type: $ref: '#/components/schemas/TraitType' value: type: string required: - trait_id - trait_name - hierarchy - trait_type - value - feature_id - reason title: SubscriptionTraitUpdate SubscriptionType: type: string enum: - free - one_time - paid - trial TemporaryAccessTokenResourceType: type: string enum: - company TemporaryAccessTokenResponseData: type: object properties: api_key_id: type: string created_at: type: string format: date-time environment_id: type: string expired_at: type: string format: date-time id: type: string resource_type: $ref: '#/components/schemas/TemporaryAccessTokenResourceType' updated_at: type: string format: date-time required: - id - environment_id - resource_type - api_key_id - expired_at - created_at - updated_at title: TemporaryAccessTokenResponseData TimeSeriesGranularity: type: string enum: - daily - hourly - monthly - weekly TopFeatureByUsageResponseData: type: object properties: change_pct: type: number nullable: true feature_id: type: string feature_name: type: string plural_name: type: string nullable: true prior_usage: type: integer format: int64 usage: type: integer format: int64 required: - feature_id - feature_name - prior_usage - usage title: TopFeatureByUsageResponseData TopFeaturesByUsageResponseData: type: object properties: features: type: array items: $ref: '#/components/schemas/TopFeatureByUsageResponseData' maxItems: 1000 required: - features title: TopFeaturesByUsageResponseData TraitDefinition: type: object properties: comparable_type: type: string enum: - bool - date - int - string entity_type: $ref: '#/components/schemas/EntityType' id: type: string required: - id - comparable_type - entity_type title: TraitDefinition TraitType: type: string enum: - boolean - currency - date - number - string - url TrialStatus: type: string enum: - active - converted - expired UpdateAddOnRequestBody: type: object properties: add_on_id: type: string price_id: type: string required: - add_on_id - price_id title: UpdateAddOnRequestBody UpdateApiKeyRequestBody: type: object properties: description: type: string nullable: true maxLength: 256 name: type: string nullable: true maxLength: 256 minLength: 1 title: UpdateApiKeyRequestBody UpdateBillingCreditRequestBody: type: object properties: burn_strategy: allOf: - $ref: '#/components/schemas/BillingCreditBurnStrategy' nullable: true currency_prices: type: array items: $ref: '#/components/schemas/CreditCurrencyPriceRequestBody' nullable: true maxItems: 50 default_expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true default_expiry_unit_count: type: integer format: int64 nullable: true minimum: 1 default_rollover_policy: allOf: - $ref: '#/components/schemas/BillingCreditRolloverPolicy' nullable: true description: type: string maxLength: 1024 icon: type: string nullable: true maxLength: 64 name: type: string maxLength: 255 per_unit_price: type: integer format: int64 nullable: true minimum: 1 per_unit_price_decimal: type: string nullable: true plural_name: type: string nullable: true maxLength: 512 singular_name: type: string nullable: true maxLength: 512 required: - name - description title: UpdateBillingCreditRequestBody UpdateBillingPlanCreditGrantRequestBody: type: object properties: apply_to_existing: type: boolean nullable: true auto_topup_amount: type: integer format: int64 nullable: true minimum: 1 auto_topup_amount_type: allOf: - $ref: '#/components/schemas/CreditAutoTopupAmountType' nullable: true auto_topup_enabled: type: boolean nullable: true auto_topup_expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true auto_topup_expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true auto_topup_expiry_unit_count: type: integer format: int64 nullable: true minimum: 1 auto_topup_threshold_credits: type: integer format: int64 nullable: true minimum: 0 auto_topup_threshold_percent: type: integer format: int64 nullable: true maximum: 100 minimum: 1 credit_amount: type: integer format: int64 nullable: true maximum: 9999999999 minimum: 0 expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true expiry_unit_count: type: integer format: int64 nullable: true minimum: 1 reset_cadence: $ref: '#/components/schemas/BillingPlanCreditGrantResetCadence' reset_start: $ref: '#/components/schemas/BillingPlanCreditGrantResetStart' reset_type: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetType' nullable: true required: - reset_cadence - reset_start title: UpdateBillingPlanCreditGrantRequestBody UpdateCompanyOverrideRequestBody: type: object properties: credit_consumption_rate: type: number nullable: true expiration_date: type: string format: date-time nullable: true metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true note: type: string nullable: true value_bool: type: boolean nullable: true value_credit_id: type: string nullable: true value_numeric: type: integer format: int64 nullable: true value_trait_id: type: string nullable: true value_type: $ref: '#/components/schemas/EntitlementValueType' required: - value_type title: UpdateCompanyOverrideRequestBody UpdateCompanyPlansRequestBody: type: object properties: add_on_ids: type: array items: type: string maxItems: 100 base_plan_id: type: string nullable: true required: - add_on_ids title: UpdateCompanyPlansRequestBody UpdateComponentRequestBody: type: object properties: ast: additionalProperties: type: number type: object entity_type: allOf: - $ref: '#/components/schemas/ComponentEntityType' nullable: true name: type: string nullable: true maxLength: 256 minLength: 1 state: allOf: - $ref: '#/components/schemas/ComponentState' nullable: true title: UpdateComponentRequestBody UpdateCreditBundleDetailsRequestBody: type: object properties: bundle_name: type: string maxLength: 256 currency_prices: type: array items: $ref: '#/components/schemas/CreditBundleCurrencyPriceRequestBody' nullable: true maxItems: 50 expiry_type: allOf: - $ref: '#/components/schemas/BillingCreditExpiryType' nullable: true expiry_unit: allOf: - $ref: '#/components/schemas/BillingCreditExpiryUnit' nullable: true expiry_unit_count: type: integer format: int64 nullable: true minimum: 1 price_per_unit: type: integer format: int64 minimum: 0 price_per_unit_decimal: type: string nullable: true quantity: type: integer format: int64 nullable: true minimum: 1 status: allOf: - $ref: '#/components/schemas/BillingCreditBundleStatus' nullable: true required: - bundle_name - price_per_unit title: UpdateCreditBundleDetailsRequestBody UpdateCreditBundleRequestBody: type: object properties: bundle_id: type: string quantity: type: integer format: int64 minimum: 1 required: - bundle_id - quantity title: UpdateCreditBundleRequestBody UpdateEntitlementReqCommon: type: object properties: credit_consumption_rate: type: number nullable: true metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true value_bool: type: boolean nullable: true value_credit_id: type: string nullable: true value_numeric: type: integer format: int64 nullable: true value_trait_id: type: string nullable: true value_type: $ref: '#/components/schemas/EntitlementValueType' required: - value_type title: UpdateEntitlementReqCommon UpdateEntityTraitDefinitionRequestBody: type: object properties: display_name: type: string nullable: true maxLength: 255 trait_type: $ref: '#/components/schemas/TraitType' required: - trait_type title: UpdateEntityTraitDefinitionRequestBody UpdateEnvironmentRequestBody: type: object properties: environment_type: allOf: - $ref: '#/components/schemas/EnvironmentType' nullable: true name: type: string nullable: true maxLength: 256 minLength: 1 title: UpdateEnvironmentRequestBody UpdateFeatureRequestBody: type: object properties: description: type: string nullable: true maxLength: 1024 event_subtype: type: string nullable: true feature_type: allOf: - $ref: '#/components/schemas/FeatureType' nullable: true flag: $ref: '#/components/schemas/CreateOrUpdateFlagRequestBody' icon: type: string nullable: true lifecycle_phase: allOf: - $ref: '#/components/schemas/FeatureLifecyclePhase' nullable: true maintainer_account_member_id: type: string nullable: true name: type: string nullable: true maxLength: 512 plural_name: type: string nullable: true singular_name: type: string nullable: true trait_id: type: string nullable: true title: UpdateFeatureRequestBody UpdateFlagRulesRequestBody: type: object properties: rules: type: array items: $ref: '#/components/schemas/CreateOrUpdateRuleRequestBody' maxItems: 100 required: - rules title: UpdateFlagRulesRequestBody UpdatePayInAdvanceRequestBody: type: object properties: price_id: type: string quantity: type: integer format: int64 required: - price_id - quantity title: UpdatePayInAdvanceRequestBody UpdatePlanBundleRequestBody: type: object properties: billing_product: $ref: '#/components/schemas/UpsertBillingProductRequestBody' credit_grants: type: array items: $ref: '#/components/schemas/PlanBundleCreditGrantRequestBody' maxItems: 100 entitlements: type: array items: $ref: '#/components/schemas/PlanBundleEntitlementRequestBody' maxItems: 100 plan: $ref: '#/components/schemas/UpdatePlanRequestBody' plan_version_id: type: string nullable: true traits: type: array items: $ref: '#/components/schemas/UpdatePlanTraitTraitRequestBody' maxItems: 100 required: - entitlements title: UpdatePlanBundleRequestBody UpdatePlanEntitlementRequestBody: type: object properties: billing_product_id: type: string nullable: true billing_threshold: type: integer format: int64 nullable: true maximum: 9999999999999 minimum: 50 credit_consumption_rate: type: number nullable: true currency: type: string nullable: true currency_prices: type: array items: $ref: '#/components/schemas/CurrencyPriceRequestBody' nullable: true maxItems: 50 metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true monthly_metered_price_id: type: string nullable: true deprecated: true monthly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 monthly_unit_price: type: integer format: int64 nullable: true monthly_unit_price_decimal: type: string nullable: true overage_billing_product_id: type: string nullable: true deprecated: true price_behavior: allOf: - $ref: '#/components/schemas/EntitlementPriceBehavior' nullable: true price_tiers: type: array description: Use MonthlyPriceTiers or YearlyPriceTiers instead items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true deprecated: true maxItems: 100 soft_limit: type: integer format: int64 nullable: true tier_mode: allOf: - $ref: '#/components/schemas/BillingTiersMode' nullable: true value_bool: type: boolean nullable: true value_credit_id: type: string nullable: true value_numeric: type: integer format: int64 nullable: true value_trait_id: type: string nullable: true value_type: $ref: '#/components/schemas/EntitlementValueType' yearly_metered_price_id: type: string nullable: true deprecated: true yearly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 yearly_unit_price: type: integer format: int64 nullable: true yearly_unit_price_decimal: type: string nullable: true required: - value_type title: UpdatePlanEntitlementRequestBody UpdatePlanGroupRequestBody: type: object properties: add_on_compatibilities: type: array items: $ref: '#/components/schemas/CompatiblePlans' nullable: true maxItems: 100 add_on_ids: type: array description: Use OrderedAddOns instead items: type: string deprecated: true maxItems: 100 checkout_collect_address: type: boolean checkout_collect_email: type: boolean checkout_collect_phone: type: boolean custom_plan_config: $ref: '#/components/schemas/CustomPlanConfig' custom_plan_id: type: string nullable: true enable_tax_collection: type: boolean fallback_plan_id: type: string nullable: true initial_plan_id: type: string nullable: true initial_plan_price_id: type: string nullable: true ordered_add_ons: type: array items: $ref: '#/components/schemas/OrderedPlansInGroup' maxItems: 100 ordered_bundle_list: type: array items: $ref: '#/components/schemas/PlanGroupBundleOrder' maxItems: 100 ordered_plans: type: array items: $ref: '#/components/schemas/OrderedPlansInGroup' maxItems: 100 prevent_downgrades_when_over_limit: type: boolean prevent_self_service_downgrade: type: boolean prevent_self_service_downgrade_button_text: type: string nullable: true maxLength: 255 prevent_self_service_downgrade_url: type: string nullable: true maxLength: 512 proration_behavior: $ref: '#/components/schemas/ProrationBehavior' scheduled_downgrade_behavior: allOf: - $ref: '#/components/schemas/ScheduledDowngradeConfigBehavior' nullable: true scheduled_downgrade_prevent_when_over_limit: type: boolean nullable: true show_as_monthly_prices: type: boolean show_credits: type: boolean show_feature_description: type: boolean show_hard_limit: type: boolean show_period_toggle: type: boolean show_zero_price_as_free: type: boolean sync_customer_billing_details: type: boolean trial_days: type: integer format: int64 nullable: true trial_expiry_plan_id: type: string nullable: true trial_expiry_plan_price_id: type: string nullable: true trial_payment_method_required: type: boolean nullable: true required: - add_on_ids - checkout_collect_address - checkout_collect_email - checkout_collect_phone - prevent_self_service_downgrade - enable_tax_collection - ordered_add_ons - ordered_bundle_list - ordered_plans - prevent_downgrades_when_over_limit - show_as_monthly_prices - show_credits - show_feature_description - show_hard_limit - show_period_toggle - show_zero_price_as_free - sync_customer_billing_details - proration_behavior title: UpdatePlanGroupRequestBody UpdatePlanRequestBody: type: object properties: description: type: string nullable: true maxLength: 1024 minLength: 0 icon: allOf: - $ref: '#/components/schemas/PlanIcon' nullable: true name: type: string maxLength: 256 minLength: 1 required: - name title: UpdatePlanRequestBody UpdatePlanTraitBulkRequestBody: type: object properties: apply_to_existing_companies: type: boolean plan_id: type: string traits: type: array items: $ref: '#/components/schemas/UpdatePlanTraitTraitRequestBody' maxItems: 100 required: - apply_to_existing_companies - plan_id - traits title: UpdatePlanTraitBulkRequestBody UpdatePlanTraitTraitRequestBody: type: object properties: trait_id: type: string trait_value: type: string required: - trait_id - trait_value title: UpdatePlanTraitTraitRequestBody UpdateRuleRequestBody: type: object properties: condition_groups: type: array items: $ref: '#/components/schemas/CreateOrUpdateConditionGroupRequestBody' maxItems: 100 conditions: type: array items: $ref: '#/components/schemas/CreateOrUpdateConditionRequestBody' maxItems: 100 name: type: string maxLength: 512 priority: type: integer format: int64 value: type: boolean required: - condition_groups - conditions - name - priority - value title: UpdateRuleRequestBody UpdateScheduledCheckoutRequest: type: object properties: execute_after: type: string format: date-time nullable: true status: allOf: - $ref: '#/components/schemas/ScheduledCheckoutStatus' nullable: true title: UpdateScheduledCheckoutRequest UpdateTrialEndRequestBody: type: object properties: trial_end: type: string format: date-time nullable: true title: UpdateTrialEndRequestBody UpdateWebhookRequestBody: type: object properties: credit_trigger_configs: type: array items: $ref: '#/components/schemas/CreditTriggerConfig' nullable: true maxItems: 100 entitlement_trigger_configs: type: array items: $ref: '#/components/schemas/EntitlementTriggerConfig' nullable: true maxItems: 100 name: type: string nullable: true maxLength: 256 minLength: 1 request_types: type: array items: $ref: '#/components/schemas/WebhookRequestType' nullable: true maxItems: 50 status: allOf: - $ref: '#/components/schemas/WebhookStatus' nullable: true url: type: string nullable: true maxLength: 2048 minLength: 1 title: UpdateWebhookRequestBody UpsertBillingProductRequestBody: type: object properties: billing_product_id: type: string nullable: true charge_type: $ref: '#/components/schemas/ChargeType' currency: type: string nullable: true currency_prices: type: array items: $ref: '#/components/schemas/PlanCurrencyPriceRequestBody' nullable: true maxItems: 50 is_trialable: type: boolean monthly_price: type: integer format: int64 nullable: true monthly_price_id: type: string nullable: true one_time_price: type: integer format: int64 nullable: true one_time_price_id: type: string nullable: true trial_days: type: integer format: int64 nullable: true yearly_price: type: integer format: int64 nullable: true yearly_price_id: type: string nullable: true required: - charge_type - is_trialable title: UpsertBillingProductRequestBody UpsertCompanyRequestBody: type: object properties: id: type: string description: If you know the Schematic ID, you can use that here instead of keys nullable: true keys: additionalProperties: type: string type: object description: See [Key Management](https://docs.schematichq.com/developer_resources/key_management) for more information last_seen_at: type: string format: date-time nullable: true name: type: string nullable: true maxLength: 256 prevent_key_remap: type: boolean nullable: true traits: type: object description: A map of trait names to trait values update_only: type: boolean nullable: true required: - keys title: UpsertCompanyRequestBody UpsertTraitRequestBody: type: object properties: incr: type: integer description: Amount to increment the trait by (positive or negative) format: int64 nullable: true keys: additionalProperties: type: string type: object description: Key/value pairs to identify a company or user set: type: string description: Value to set the trait to nullable: true maxLength: 1024 trait: type: string description: Name of the trait to update maxLength: 255 update_only: type: boolean description: Unless this is set, the company or user will be created if it does not already exist nullable: true required: - keys - trait title: UpsertTraitRequestBody UpsertUserRequestBody: type: object properties: companies: type: array description: Optionally specify companies using array of key/value pairs items: additionalProperties: type: string type: object nullable: true maxItems: 100 company: additionalProperties: type: string type: object description: Add user to this company. Takes priority over companies. For exhaustive list of companies, use companies nullable: true company_id: type: string description: Add user to this company. Takes priority over company_ids. For exhaustive list of companies, use company_ids nullable: true company_ids: type: array description: Optionally specify companies using Schematic company ID items: type: string nullable: true maxItems: 100 id: type: string description: If you know the Schematic ID, you can use that here instead of keys nullable: true keys: additionalProperties: type: string type: object description: See [Key Management](https://docs.schematichq.com/developer_resources/key_management) for more information last_seen_at: type: string format: date-time nullable: true name: type: string nullable: true maxLength: 256 traits: type: object description: A map of trait names to trait values update_only: type: boolean nullable: true required: - keys title: UpsertUserRequestBody UpsertUserSubRequestBody: type: object properties: company_id: type: string description: Add user to this company. Takes priority over company_ids. For exhaustive list of companies, use company_ids nullable: true company_ids: type: array description: Optionally specify companies using Schematic company ID items: type: string nullable: true maxItems: 100 id: type: string description: If you know the Schematic ID, you can use that here instead of keys nullable: true keys: additionalProperties: type: string type: object description: See [Key Management](https://docs.schematichq.com/developer_resources/key_management) for more information last_seen_at: type: string format: date-time nullable: true name: type: string nullable: true maxLength: 256 traits: type: object description: A map of trait names to trait values update_only: type: boolean nullable: true required: - keys title: UpsertUserSubRequestBody UsageBasedEntitlementRequestBody: type: object properties: billing_product_id: type: string nullable: true billing_threshold: type: integer format: int64 nullable: true maximum: 9999999999999 minimum: 50 currency: type: string nullable: true currency_prices: type: array items: $ref: '#/components/schemas/CurrencyPriceRequestBody' nullable: true maxItems: 50 monthly_metered_price_id: type: string nullable: true deprecated: true monthly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 monthly_unit_price: type: integer format: int64 nullable: true monthly_unit_price_decimal: type: string nullable: true overage_billing_product_id: type: string nullable: true deprecated: true price_behavior: allOf: - $ref: '#/components/schemas/EntitlementPriceBehavior' nullable: true price_tiers: type: array description: Use MonthlyPriceTiers or YearlyPriceTiers instead items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true deprecated: true maxItems: 100 soft_limit: type: integer format: int64 nullable: true tier_mode: allOf: - $ref: '#/components/schemas/BillingTiersMode' nullable: true yearly_metered_price_id: type: string nullable: true deprecated: true yearly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 yearly_unit_price: type: integer format: int64 nullable: true yearly_unit_price_decimal: type: string nullable: true title: UsageBasedEntitlementRequestBody UsageBasedEntitlementResponseData: type: object properties: billing_threshold: type: integer format: int64 nullable: true consumption_rate: type: number nullable: true feature_id: type: string metered_price: $ref: '#/components/schemas/BillingPriceView' metric_period: allOf: - $ref: '#/components/schemas/MetricPeriod' nullable: true metric_period_month_reset: allOf: - $ref: '#/components/schemas/MetricPeriodMonthReset' nullable: true monthly_usage_based_price: $ref: '#/components/schemas/BillingPriceView' price_behavior: allOf: - $ref: '#/components/schemas/EntitlementPriceBehavior' nullable: true value_bool: type: boolean nullable: true value_numeric: type: integer format: int64 nullable: true value_type: $ref: '#/components/schemas/EntitlementValueType' yearly_usage_based_price: $ref: '#/components/schemas/BillingPriceView' required: - feature_id - value_type title: UsageBasedEntitlementResponseData UsageTimeSeriesPointResponseData: type: object properties: period_end: type: string format: date-time nullable: true period_start: type: string format: date-time nullable: true timestamp: type: string format: date-time usage: type: integer format: int64 required: - timestamp - usage title: UsageTimeSeriesPointResponseData UserDetailResponseData: type: object properties: company_memberships: type: array items: $ref: '#/components/schemas/CompanyMembershipDetailResponseData' maxItems: 1000 created_at: type: string format: date-time entity_traits: type: array items: $ref: '#/components/schemas/EntityTraitDetailResponseData' maxItems: 1000 environment_id: type: string id: type: string keys: type: array items: $ref: '#/components/schemas/EntityKeyDetailResponseData' maxItems: 1000 last_seen_at: type: string format: date-time nullable: true name: type: string traits: type: object description: A map of trait names to trait values updated_at: type: string format: date-time required: - id - environment_id - name - created_at - updated_at - keys - entity_traits - company_memberships title: UserDetailResponseData UserResponseData: type: object properties: created_at: type: string format: date-time environment_id: type: string id: type: string last_seen_at: type: string format: date-time nullable: true name: type: string updated_at: type: string format: date-time required: - id - environment_id - name - created_at - updated_at title: UserResponseData WebFeatureUsageWebhookOutput: type: object properties: Allocation: type: integer format: int64 nullable: true CreditUsage: $ref: '#/components/schemas/CreditUsage' Entitlement: type: string Feature: $ref: '#/components/schemas/FeatureView' MetricResetAt: type: string format: date-time nullable: true Usage: type: integer format: int64 nullable: true company: $ref: '#/components/schemas/CompanyDetailResponseData' required: - Entitlement title: WebFeatureUsageWebhookOutput WebScheduledDowngradeWebhookOutput: type: object properties: company: $ref: '#/components/schemas/CompanyResponseData' execute_after: type: string format: date-time from_plan: $ref: '#/components/schemas/PlanSnapshotView' id: type: string scheduled_interval: type: string nullable: true scheduled_price: type: integer format: int64 nullable: true to_plan: $ref: '#/components/schemas/PlanSnapshotView' required: - execute_after - id title: WebScheduledDowngradeWebhookOutput WebhookEventDetailResponseData: type: object properties: created_at: type: string format: date-time id: type: string payload: type: string nullable: true request_type: $ref: '#/components/schemas/WebhookRequestType' response_code: type: integer format: int64 nullable: true sent_at: type: string format: date-time nullable: true status: $ref: '#/components/schemas/WebhookEventStatus' updated_at: type: string format: date-time webhook: $ref: '#/components/schemas/WebhookResponseData' webhook_id: type: string required: - id - webhook_id - request_type - status - created_at - updated_at title: WebhookEventDetailResponseData WebhookEventResponseData: type: object properties: created_at: type: string format: date-time id: type: string payload: type: string nullable: true request_type: $ref: '#/components/schemas/WebhookRequestType' response_code: type: integer format: int64 nullable: true sent_at: type: string format: date-time nullable: true status: $ref: '#/components/schemas/WebhookEventStatus' updated_at: type: string format: date-time webhook_id: type: string required: - id - webhook_id - request_type - status - created_at - updated_at title: WebhookEventResponseData WebhookEventStatus: type: string enum: - failure - pending - success WebhookRequestType: type: string enum: - subscription.trial.ended - company.created - company.deleted - company.override.created - company.override.deleted - company.override.expired - company.override.updated - company.plan_changed - company.scheduled_downgrade - company.updated - credit.limit.reached - credit.limit.warning - entitlement.limit.reached - entitlement.limit.warning - entitlement.soft_limit.reached - entitlement.soft_limit.warning - entitlement.tier_limit.reached - entitlement.tier_limit.warning - feature.created - feature.deleted - feature.updated - flag.created - flag.deleted - flag_rules.updated - flag.updated - plan.created - plan.deleted - plan.entitlement.created - plan.entitlement.deleted - plan.entitlement.updated - plan.updated - plan_version.deleted - rule.deleted - test.send - user.created - user.deleted - user.updated - auto.topup.hard.failure - auto.topup.retry.exceeded WebhookResponseData: type: object properties: created_at: type: string format: date-time credit_trigger_configs: type: array items: $ref: '#/components/schemas/CreditTriggerConfig' nullable: true maxItems: 1000 entitlement_trigger_configs: type: array items: $ref: '#/components/schemas/EntitlementTriggerConfig' nullable: true maxItems: 1000 id: type: string name: type: string request_types: type: array items: $ref: '#/components/schemas/WebhookRequestType' maxItems: 1000 secret: type: string status: $ref: '#/components/schemas/WebhookStatus' updated_at: type: string format: date-time url: type: string required: - created_at - id - name - request_types - secret - status - url - updated_at title: WebhookResponseData WebhookStatus: type: string enum: - active - inactive WebhookUrl: type: object properties: type: $ref: '#/components/schemas/IntegrationType' url: type: string required: - url - type title: WebhookUrl WhoAmIResponseData: type: object properties: account_id: type: string account_name: type: string actor_type: $ref: '#/components/schemas/ActorType' api_key_id: type: string environment_id: type: string environments: type: array items: $ref: '#/components/schemas/EnvironmentResponseData' maxItems: 1000 stripe_user_id: type: string user_id: type: string user_name: type: string required: - account_id - account_name - actor_type - environments title: WhoAmIResponseData ZeroOutGrantRequestBody: type: object properties: reason: allOf: - $ref: '#/components/schemas/BillingCreditGrantZeroedOutReason' nullable: true title: ZeroOutGrantRequestBody paths: /account-members: get: operationId: listAccountMembers summary: List account members tags: - accounts parameters: - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: q in: query description: Search filter schema: type: string description: Search filter maxLength: 512 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/AccountMemberResponseData' title: ListAccountMembersResponseData maxItems: 250 params: type: object description: Input parameters properties: ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string description: Search filter maxLength: 512 title: ListAccountMembersParams required: - data - params title: ListAccountMembersResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /account-members/{account_member_id}: get: operationId: getAccountMember summary: Get account member tags: - accounts parameters: - name: account_member_id in: path description: account_member_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/AccountMemberResponseData' params: type: object description: Input parameters title: GetAccountMemberParams required: - data - params title: GetAccountMemberResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /api-keys: get: operationId: listApiKeys summary: List api keys tags: - accounts parameters: - name: environment_id in: query schema: type: string - name: require_environment in: query required: true schema: type: boolean - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/ApiKeyResponseData' title: ListApiKeysResponseData maxItems: 250 params: type: object description: Input parameters properties: environment_id: type: string limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" require_environment: type: boolean title: ListApiKeysParams required: - data - params title: ListApiKeysResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' post: operationId: createApiKey summary: Create api key tags: - accounts requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateApiKeyRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/ApiKeyCreateResponseData' params: type: object description: Input parameters title: CreateApiKeyParams required: - data - params title: CreateApiKeyResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /api-keys/{api_key_id}: get: operationId: getApiKey summary: Get api key tags: - accounts parameters: - name: api_key_id in: path description: api_key_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/ApiKeyResponseData' params: type: object description: Input parameters title: GetApiKeyParams required: - data - params title: GetApiKeyResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' put: operationId: updateApiKey summary: Update api key tags: - accounts parameters: - name: api_key_id in: path description: api_key_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateApiKeyRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/ApiKeyResponseData' params: type: object description: Input parameters title: UpdateApiKeyParams required: - data - params title: UpdateApiKeyResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' delete: operationId: deleteApiKey summary: Delete api key tags: - accounts parameters: - name: api_key_id in: path description: api_key_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DeleteResponse' params: type: object description: Input parameters title: DeleteApiKeyParams required: - data - params title: DeleteApiKeyResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /api-keys/count: get: operationId: countApiKeys summary: Count api keys tags: - accounts parameters: - name: environment_id in: query schema: type: string - name: require_environment in: query required: true schema: type: boolean - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: environment_id: type: string limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" require_environment: type: boolean title: CountApiKeysParams required: - data - params title: CountApiKeysResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /audit-log: get: operationId: listAuditLogs summary: List audit logs tags: - accounts parameters: - name: actor_type in: query schema: $ref: '#/components/schemas/ActorType' - name: end_time in: query schema: type: string format: date-time - name: environment_id in: query schema: type: string - name: q in: query schema: type: string maxLength: 512 - name: start_time in: query schema: type: string format: date-time - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/AuditLogListResponseData' title: ListAuditLogsResponseData maxItems: 250 params: type: object description: Input parameters properties: actor_type: $ref: '#/components/schemas/ActorType' end_time: type: string format: date-time environment_id: type: string limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string maxLength: 512 start_time: type: string format: date-time title: ListAuditLogsParams required: - data - params title: ListAuditLogsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /audit-log/{audit_log_id}: get: operationId: getAuditLog summary: Get audit log tags: - accounts parameters: - name: audit_log_id in: path description: audit_log_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/AuditLogResponseData' params: type: object description: Input parameters title: GetAuditLogParams required: - data - params title: GetAuditLogResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /audit-log/count: get: operationId: countAuditLogs summary: Count audit logs tags: - accounts parameters: - name: actor_type in: query schema: $ref: '#/components/schemas/ActorType' - name: end_time in: query schema: type: string format: date-time - name: environment_id in: query schema: type: string - name: q in: query schema: type: string maxLength: 512 - name: start_time in: query schema: type: string format: date-time - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: actor_type: $ref: '#/components/schemas/ActorType' end_time: type: string format: date-time environment_id: type: string limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string maxLength: 512 start_time: type: string format: date-time title: CountAuditLogsParams required: - data - params title: CountAuditLogsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/coupons: get: operationId: listCoupons summary: List coupons tags: - billing parameters: - name: is_active in: query schema: type: boolean - name: q in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/BillingCouponResponseData' title: ListCouponsResponseData maxItems: 250 params: type: object description: Input parameters properties: is_active: type: boolean limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string title: ListCouponsParams required: - data - params title: ListCouponsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' post: operationId: upsertBillingCoupon summary: Upsert billing coupon tags: - billing requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateCouponRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingCouponResponseData' params: type: object description: Input parameters title: UpsertBillingCouponParams required: - data - params title: UpsertBillingCouponResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/credits: get: operationId: listBillingCredits summary: List billing credits tags: - credits parameters: - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: name in: query schema: type: string maxLength: 255 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/BillingCreditResponseData' title: ListBillingCreditsResponseData maxItems: 250 params: type: object description: Input parameters properties: ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" name: type: string maxLength: 255 offset: type: integer description: Page offset (default 0) format: int64 example: "0" title: ListBillingCreditsParams required: - data - params title: ListBillingCreditsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' post: operationId: createBillingCredit summary: Create billing credit tags: - credits requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateBillingCreditRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingCreditResponseData' params: type: object description: Input parameters title: CreateBillingCreditParams required: - data - params title: CreateBillingCreditResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/credits/{credit_id}: get: operationId: getSingleBillingCredit summary: Get single billing credit tags: - credits parameters: - name: credit_id in: path description: credit_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingCreditResponseData' params: type: object description: Input parameters title: GetSingleBillingCreditParams required: - data - params title: GetSingleBillingCreditResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' put: operationId: updateBillingCredit summary: Update billing credit tags: - credits parameters: - name: credit_id in: path description: credit_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateBillingCreditRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingCreditResponseData' params: type: object description: Input parameters title: UpdateBillingCreditParams required: - data - params title: UpdateBillingCreditResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' delete: operationId: softDeleteBillingCredit summary: Soft delete billing credit tags: - credits parameters: - name: credit_id in: path description: credit_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DeleteResponse' params: type: object description: Input parameters title: SoftDeleteBillingCreditParams required: - data - params title: SoftDeleteBillingCreditResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/credits/balance: get: operationId: listCompanyCreditBalances summary: List company credit balances tags: - credits parameters: - name: company_id in: query required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/CompanyCreditBalanceResponseData' title: ListCompanyCreditBalancesResponseData maxItems: 250 params: type: object description: Input parameters properties: company_id: type: string title: ListCompanyCreditBalancesParams required: - data - params title: ListCompanyCreditBalancesResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/credits/bundles: get: operationId: listCreditBundles summary: List credit bundles tags: - credits parameters: - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: credit_id in: query schema: type: string - name: status in: query schema: $ref: '#/components/schemas/BillingCreditBundleStatus' - name: bundle_type in: query schema: $ref: '#/components/schemas/BillingCreditBundleType' - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/BillingCreditBundleResponseData' title: ListCreditBundlesResponseData maxItems: 250 params: type: object description: Input parameters properties: bundle_type: $ref: '#/components/schemas/BillingCreditBundleType' credit_id: type: string ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" status: $ref: '#/components/schemas/BillingCreditBundleStatus' title: ListCreditBundlesParams required: - data - params title: ListCreditBundlesResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' post: operationId: createCreditBundle summary: Create credit bundle tags: - credits requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateCreditBundleRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingCreditBundleResponseData' params: type: object description: Input parameters title: CreateCreditBundleParams required: - data - params title: CreateCreditBundleResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/credits/bundles/{bundle_id}: get: operationId: getCreditBundle summary: Get credit bundle tags: - credits parameters: - name: bundle_id in: path description: bundle_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingCreditBundleResponseData' params: type: object description: Input parameters title: GetCreditBundleParams required: - data - params title: GetCreditBundleResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' put: operationId: updateCreditBundleDetails summary: Update credit bundle details tags: - credits parameters: - name: bundle_id in: path description: bundle_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateCreditBundleDetailsRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingCreditBundleResponseData' params: type: object description: Input parameters title: UpdateCreditBundleDetailsParams required: - data - params title: UpdateCreditBundleDetailsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' delete: operationId: deleteCreditBundle summary: Delete credit bundle tags: - credits parameters: - name: bundle_id in: path description: bundle_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DeleteResponse' params: type: object description: Input parameters title: DeleteCreditBundleParams required: - data - params title: DeleteCreditBundleResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/credits/bundles/count: get: operationId: countCreditBundles summary: Count credit bundles tags: - credits parameters: - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: credit_id in: query schema: type: string - name: status in: query schema: $ref: '#/components/schemas/BillingCreditBundleStatus' - name: bundle_type in: query schema: $ref: '#/components/schemas/BillingCreditBundleType' - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: bundle_type: $ref: '#/components/schemas/BillingCreditBundleType' credit_id: type: string ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" status: $ref: '#/components/schemas/BillingCreditBundleStatus' title: CountCreditBundlesParams required: - data - params title: CountCreditBundlesResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/credits/count: get: operationId: countBillingCredits summary: Count billing credits tags: - credits parameters: - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: name in: query schema: type: string maxLength: 255 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" name: type: string maxLength: 255 offset: type: integer description: Page offset (default 0) format: int64 example: "0" title: CountBillingCreditsParams required: - data - params title: CountBillingCreditsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/credits/grants/{grant_id}/zero-out: put: operationId: zeroOutGrant summary: Zero out grant tags: - credits parameters: - name: grant_id in: path description: grant_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/ZeroOutGrantRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingCreditGrantResponseData' params: type: object description: Input parameters title: ZeroOutGrantParams required: - data - params title: ZeroOutGrantResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/credits/grants/company: post: operationId: grantBillingCreditsToCompany summary: Grant billing credits to company tags: - credits requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateCompanyCreditGrant' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingCreditGrantResponseData' params: type: object description: Input parameters title: GrantBillingCreditsToCompanyParams required: - data - params title: GrantBillingCreditsToCompanyResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/credits/grants/company/count: get: operationId: countCompanyGrants summary: Count company grants tags: - credits parameters: - name: company_id in: query schema: type: string - name: order in: query schema: $ref: '#/components/schemas/CreditGrantSortOrder' - name: dir in: query schema: $ref: '#/components/schemas/SortDirection' - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: company_id: type: string dir: $ref: '#/components/schemas/SortDirection' limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" order: $ref: '#/components/schemas/CreditGrantSortOrder' title: CountCompanyGrantsParams required: - data - params title: CountCompanyGrantsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/credits/grants/company/list: get: operationId: listCompanyGrants summary: List company grants tags: - credits parameters: - name: company_id in: query schema: type: string - name: order in: query schema: $ref: '#/components/schemas/CreditGrantSortOrder' - name: dir in: query schema: $ref: '#/components/schemas/SortDirection' - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/BillingCreditGrantResponseData' title: ListCompanyGrantsResponseData maxItems: 250 params: type: object description: Input parameters properties: company_id: type: string dir: $ref: '#/components/schemas/SortDirection' limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" order: $ref: '#/components/schemas/CreditGrantSortOrder' title: ListCompanyGrantsParams required: - data - params title: ListCompanyGrantsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/credits/grants/count: get: operationId: countBillingCreditsGrants summary: Count billing credits grants tags: - credits parameters: - name: credit_id in: query schema: type: string - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: credit_id: type: string ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" title: CountBillingCreditsGrantsParams required: - data - params title: CountBillingCreditsGrantsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/credits/grants/list: get: operationId: listGrantsForCredit summary: List grants for credit tags: - credits parameters: - name: credit_id in: query schema: type: string - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/BillingCreditGrantResponseData' title: ListGrantsForCreditResponseData maxItems: 250 params: type: object description: Input parameters properties: credit_id: type: string ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" title: ListGrantsForCreditParams required: - data - params title: ListGrantsForCreditResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/credits/ledger: get: operationId: getEnrichedCreditLedger summary: Get enriched credit ledger tags: - credits parameters: - name: company_id in: query required: true schema: type: string - name: billing_credit_id in: query schema: type: string - name: feature_id in: query schema: type: string - name: period in: query required: true schema: $ref: '#/components/schemas/CreditLedgerPeriod' - name: start_time in: query schema: type: string - name: end_time in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/CreditLedgerEnrichedEntryResponseData' title: GetEnrichedCreditLedgerResponseData maxItems: 250 params: type: object description: Input parameters properties: billing_credit_id: type: string company_id: type: string end_time: type: string feature_id: type: string limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" period: $ref: '#/components/schemas/CreditLedgerPeriod' start_time: type: string title: GetEnrichedCreditLedgerParams required: - data - params title: GetEnrichedCreditLedgerResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/credits/ledger/count: get: operationId: countCreditLedger summary: Count credit ledger tags: - credits parameters: - name: company_id in: query required: true schema: type: string - name: billing_credit_id in: query schema: type: string - name: feature_id in: query schema: type: string - name: period in: query required: true schema: $ref: '#/components/schemas/CreditLedgerPeriod' - name: start_time in: query schema: type: string - name: end_time in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: billing_credit_id: type: string company_id: type: string end_time: type: string feature_id: type: string limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" period: $ref: '#/components/schemas/CreditLedgerPeriod' start_time: type: string title: CountCreditLedgerParams required: - data - params title: CountCreditLedgerResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/credits/plan-grants: get: operationId: listBillingPlanCreditGrants summary: List billing plan credit grants tags: - credits parameters: - name: credit_id in: query schema: type: string - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: plan_id in: query schema: type: string - name: plan_ids in: query schema: type: array items: type: string maxItems: 100 - name: plan_version_id in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/BillingPlanCreditGrantResponseData' title: ListBillingPlanCreditGrantsResponseData maxItems: 250 params: type: object description: Input parameters properties: credit_id: type: string ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" plan_id: type: string plan_ids: type: array items: type: string maxItems: 100 plan_version_id: type: string title: ListBillingPlanCreditGrantsParams required: - data - params title: ListBillingPlanCreditGrantsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' post: operationId: createBillingPlanCreditGrant summary: Create billing plan credit grant tags: - credits requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateBillingPlanCreditGrantRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingPlanCreditGrantResponseData' params: type: object description: Input parameters title: CreateBillingPlanCreditGrantParams required: - data - params title: CreateBillingPlanCreditGrantResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/credits/plan-grants/{plan_grant_id}: get: operationId: getSingleBillingPlanCreditGrant summary: Get single billing plan credit grant tags: - credits parameters: - name: plan_grant_id in: path description: plan_grant_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingPlanCreditGrantResponseData' params: type: object description: Input parameters title: GetSingleBillingPlanCreditGrantParams required: - data - params title: GetSingleBillingPlanCreditGrantResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' put: operationId: updateBillingPlanCreditGrant summary: Update billing plan credit grant tags: - credits parameters: - name: plan_grant_id in: path description: plan_grant_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateBillingPlanCreditGrantRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingPlanCreditGrantResponseData' params: type: object description: Input parameters title: UpdateBillingPlanCreditGrantParams required: - data - params title: UpdateBillingPlanCreditGrantResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' delete: operationId: deleteBillingPlanCreditGrant summary: Delete billing 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 schema: type: boolean responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DeleteResponse' params: type: object description: Input parameters properties: apply_to_existing: type: boolean title: DeleteBillingPlanCreditGrantParams required: - data - params title: DeleteBillingPlanCreditGrantResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/credits/plan-grants/count: get: operationId: countBillingPlanCreditGrants summary: Count billing plan credit grants tags: - credits parameters: - name: credit_id in: query schema: type: string - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: plan_id in: query schema: type: string - name: plan_ids in: query schema: type: array items: type: string maxItems: 100 - name: plan_version_id in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: credit_id: type: string ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" plan_id: type: string plan_ids: type: array items: type: string maxItems: 100 plan_version_id: type: string title: CountBillingPlanCreditGrantsParams required: - data - params title: CountBillingPlanCreditGrantsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/customer/upsert: post: operationId: upsertBillingCustomer summary: Upsert billing customer tags: - billing requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateBillingCustomerRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingCustomerResponseData' params: type: object description: Input parameters title: UpsertBillingCustomerParams required: - data - params title: UpsertBillingCustomerResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/customers: get: operationId: listCustomersWithSubscriptions summary: List customers with subscriptions tags: - billing parameters: - name: company_ids in: query schema: type: array items: type: string maxItems: 100 - name: name in: query schema: type: string maxLength: 255 - name: provider_type in: query schema: $ref: '#/components/schemas/BillingProviderType' - name: q in: query schema: type: string maxLength: 512 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/BillingCustomerWithSubscriptionsResponseData' title: ListCustomersWithSubscriptionsResponseData maxItems: 250 params: type: object description: Input parameters properties: company_ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" name: type: string maxLength: 255 offset: type: integer description: Page offset (default 0) format: int64 example: "0" provider_type: $ref: '#/components/schemas/BillingProviderType' q: type: string maxLength: 512 title: ListCustomersWithSubscriptionsParams required: - data - params title: ListCustomersWithSubscriptionsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/customers/count: get: operationId: countCustomers summary: Count customers tags: - billing parameters: - name: company_ids in: query schema: type: array items: type: string maxItems: 100 - name: name in: query schema: type: string maxLength: 255 - name: provider_type in: query schema: $ref: '#/components/schemas/BillingProviderType' - name: q in: query schema: type: string maxLength: 512 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: company_ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" name: type: string maxLength: 255 offset: type: integer description: Page offset (default 0) format: int64 example: "0" provider_type: $ref: '#/components/schemas/BillingProviderType' q: type: string maxLength: 512 title: CountCustomersParams required: - data - params title: CountCustomersResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/invoices: get: operationId: listInvoices summary: List invoices tags: - billing parameters: - name: company_id in: query schema: type: string - name: customer_external_id in: query required: true schema: type: string maxLength: 255 - name: subscription_external_id in: query required: true schema: type: string maxLength: 255 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/InvoiceResponseData' title: ListInvoicesResponseData maxItems: 250 params: type: object description: Input parameters properties: company_id: type: string customer_external_id: type: string maxLength: 255 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" subscription_external_id: type: string maxLength: 255 title: ListInvoicesParams required: - data - params title: ListInvoicesResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' post: operationId: upsertInvoice summary: Upsert invoice tags: - billing requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateInvoiceRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/InvoiceResponseData' params: type: object description: Input parameters title: UpsertInvoiceParams required: - data - params title: UpsertInvoiceResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/meter: get: operationId: listMeters summary: List meters tags: - billing parameters: - name: display_name in: query schema: type: string maxLength: 255 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/BillingMeterResponseData' title: ListMetersResponseData maxItems: 250 params: type: object description: Input parameters properties: display_name: type: string maxLength: 255 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" title: ListMetersParams required: - data - params title: ListMetersResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/meter/upsert: post: operationId: upsertBillingMeter summary: Upsert billing meter tags: - billing requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateMeterRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingMeterResponseData' params: type: object description: Input parameters title: UpsertBillingMeterParams required: - data - params title: UpsertBillingMeterResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/payment-methods: get: operationId: listPaymentMethods summary: List payment methods tags: - billing parameters: - name: company_id in: query schema: type: string - name: customer_external_id in: query required: true schema: type: string maxLength: 255 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/PaymentMethodResponseData' title: ListPaymentMethodsResponseData maxItems: 250 params: type: object description: Input parameters properties: company_id: type: string customer_external_id: type: string maxLength: 255 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" title: ListPaymentMethodsParams required: - data - params title: ListPaymentMethodsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' post: operationId: upsertPaymentMethod summary: Upsert payment method tags: - billing requestBody: content: application/json: schema: $ref: '#/components/schemas/CreatePaymentMethodRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PaymentMethodResponseData' params: type: object description: Input parameters title: UpsertPaymentMethodParams required: - data - params title: UpsertPaymentMethodResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/price: get: operationId: listBillingPrices summary: List billing prices tags: - billing parameters: - name: currency in: query description: Filter for prices in a specific currency (e.g. usd, eur) schema: type: string description: Filter for prices in a specific currency (e.g. usd, eur) maxLength: 3 - name: for_initial_plan in: query description: Filter for prices valid for initial plans (free prices only) schema: type: boolean description: Filter for prices valid for initial plans (free prices only) - name: for_trial_expiry_plan in: query description: Filter for prices valid for trial expiry plans (free prices only) schema: type: boolean description: Filter for prices valid for trial expiry plans (free prices only) - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: interval in: query schema: type: string maxLength: 255 - name: is_active in: query description: Filter for active prices on active products (defaults to true if not specified) schema: type: boolean description: Filter for active prices on active products (defaults to true if not specified) - name: price in: query schema: type: integer format: int64 - name: product_id in: query schema: type: string - name: product_ids in: query schema: type: array items: type: string maxItems: 100 - name: provider_type in: query schema: $ref: '#/components/schemas/BillingProviderType' - name: q in: query schema: type: string - name: tiers_mode in: query schema: $ref: '#/components/schemas/BillingTiersMode' - name: usage_type in: query schema: $ref: '#/components/schemas/BillingPriceUsageType' - name: with_meter in: query description: Filter for prices with a meter schema: type: boolean description: Filter for prices with a meter - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/BillingPriceView' title: ListBillingPricesResponseData maxItems: 250 params: type: object description: Input parameters properties: currency: type: string description: Filter for prices in a specific currency (e.g. usd, eur) maxLength: 3 for_initial_plan: type: boolean description: Filter for prices valid for initial plans (free prices only) for_trial_expiry_plan: type: boolean description: Filter for prices valid for trial expiry plans (free prices only) ids: type: array items: type: string maxItems: 100 interval: type: string maxLength: 255 is_active: type: boolean description: Filter for active prices on active products (defaults to true if not specified) limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" price: type: integer format: int64 product_id: type: string product_ids: type: array items: type: string maxItems: 100 provider_type: $ref: '#/components/schemas/BillingProviderType' q: type: string tiers_mode: $ref: '#/components/schemas/BillingTiersMode' usage_type: $ref: '#/components/schemas/BillingPriceUsageType' with_meter: type: boolean description: Filter for prices with a meter title: ListBillingPricesParams required: - data - params title: ListBillingPricesResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/price/upsert: post: operationId: upsertBillingPrice summary: Upsert billing price tags: - billing requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateBillingPriceRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingPriceResponseData' params: type: object description: Input parameters title: UpsertBillingPriceParams required: - data - params title: UpsertBillingPriceResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/product/{billing_id}: delete: operationId: deleteBillingProduct summary: Delete billing product tags: - billing parameters: - name: billing_id in: path description: billing_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DeleteResponse' params: type: object description: Input parameters title: DeleteBillingProductParams required: - data - params title: DeleteBillingProductResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/product/prices: get: operationId: listBillingProductPrices summary: List billing product prices tags: - billing parameters: - name: currency in: query description: Filter for prices in a specific currency (e.g. usd, eur) schema: type: string description: Filter for prices in a specific currency (e.g. usd, eur) maxLength: 3 - name: for_initial_plan in: query description: Filter for prices valid for initial plans (free prices only) schema: type: boolean description: Filter for prices valid for initial plans (free prices only) - name: for_trial_expiry_plan in: query description: Filter for prices valid for trial expiry plans (free prices only) schema: type: boolean description: Filter for prices valid for trial expiry plans (free prices only) - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: interval in: query schema: type: string maxLength: 255 - name: is_active in: query description: Filter for active prices on active products (defaults to true if not specified) schema: type: boolean description: Filter for active prices on active products (defaults to true if not specified) - name: price in: query schema: type: integer format: int64 - name: product_id in: query schema: type: string - name: product_ids in: query schema: type: array items: type: string maxItems: 100 - name: provider_type in: query schema: $ref: '#/components/schemas/BillingProviderType' - name: q in: query schema: type: string - name: tiers_mode in: query schema: $ref: '#/components/schemas/BillingTiersMode' - name: usage_type in: query schema: $ref: '#/components/schemas/BillingPriceUsageType' - name: with_meter in: query description: Filter for prices with a meter schema: type: boolean description: Filter for prices with a meter - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/BillingPriceView' title: ListBillingProductPricesResponseData maxItems: 250 params: type: object description: Input parameters properties: currency: type: string description: Filter for prices in a specific currency (e.g. usd, eur) maxLength: 3 for_initial_plan: type: boolean description: Filter for prices valid for initial plans (free prices only) for_trial_expiry_plan: type: boolean description: Filter for prices valid for trial expiry plans (free prices only) ids: type: array items: type: string maxItems: 100 interval: type: string maxLength: 255 is_active: type: boolean description: Filter for active prices on active products (defaults to true if not specified) limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" price: type: integer format: int64 product_id: type: string product_ids: type: array items: type: string maxItems: 100 provider_type: $ref: '#/components/schemas/BillingProviderType' q: type: string tiers_mode: $ref: '#/components/schemas/BillingTiersMode' usage_type: $ref: '#/components/schemas/BillingPriceUsageType' with_meter: type: boolean description: Filter for prices with a meter title: ListBillingProductPricesParams required: - data - params title: ListBillingProductPricesResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/product/prices/{billing_id}: delete: operationId: deleteProductPrice summary: Delete product price tags: - billing parameters: - name: billing_id in: path description: billing_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DeleteResponse' params: type: object description: Input parameters title: DeleteProductPriceParams required: - data - params title: DeleteProductPriceResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/product/upsert: post: operationId: upsertBillingProduct summary: Upsert billing product tags: - billing requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateBillingProductRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingProductResponseData' params: type: object description: Input parameters title: UpsertBillingProductParams required: - data - params title: UpsertBillingProductResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/products: get: operationId: listBillingProducts summary: List billing products tags: - billing parameters: - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: is_active in: query description: Filter products that are active. Defaults to true if not specified schema: type: boolean description: Filter products that are active. Defaults to true if not specified - name: name in: query schema: type: string maxLength: 255 - name: price_usage_type in: query schema: $ref: '#/components/schemas/BillingPriceUsageType' - name: provider_type in: query schema: $ref: '#/components/schemas/BillingProviderType' - name: q in: query schema: type: string maxLength: 512 - name: recurring_charges_only in: query description: Filter to products that have at least one recurring price schema: type: boolean description: Filter to products that have at least one recurring price - name: with_one_time_charges in: query description: Filter products that are one time charges schema: type: boolean description: Filter products that are one time charges - name: with_prices_only in: query description: Filter products that have prices schema: type: boolean description: Filter products that have prices - name: with_zero_price in: query description: Filter products that have zero price for free subscription type schema: type: boolean description: Filter products that have zero price for free subscription type - name: without_linked_to_plan in: query description: Filter products that are not linked to any plan schema: type: boolean description: Filter products that are not linked to any plan - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/BillingProductDetailResponseData' title: ListBillingProductsResponseData maxItems: 250 params: type: object description: Input parameters properties: ids: type: array items: type: string maxItems: 100 is_active: type: boolean description: Filter products that are active. Defaults to true if not specified limit: type: integer description: Page limit (default 100) format: int64 example: "100" name: type: string maxLength: 255 offset: type: integer description: Page offset (default 0) format: int64 example: "0" price_usage_type: $ref: '#/components/schemas/BillingPriceUsageType' provider_type: $ref: '#/components/schemas/BillingProviderType' q: type: string maxLength: 512 recurring_charges_only: type: boolean description: Filter to products that have at least one recurring price with_one_time_charges: type: boolean description: Filter products that are one time charges with_prices_only: type: boolean description: Filter products that have prices with_zero_price: type: boolean description: Filter products that have zero price for free subscription type without_linked_to_plan: type: boolean description: Filter products that are not linked to any plan title: ListBillingProductsParams required: - data - params title: ListBillingProductsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/products/count: get: operationId: countBillingProducts summary: Count billing products tags: - billing parameters: - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: is_active in: query description: Filter products that are active. Defaults to true if not specified schema: type: boolean description: Filter products that are active. Defaults to true if not specified - name: name in: query schema: type: string maxLength: 255 - name: price_usage_type in: query schema: $ref: '#/components/schemas/BillingPriceUsageType' - name: provider_type in: query schema: $ref: '#/components/schemas/BillingProviderType' - name: q in: query schema: type: string maxLength: 512 - name: recurring_charges_only in: query description: Filter to products that have at least one recurring price schema: type: boolean description: Filter to products that have at least one recurring price - name: with_one_time_charges in: query description: Filter products that are one time charges schema: type: boolean description: Filter products that are one time charges - name: with_prices_only in: query description: Filter products that have prices schema: type: boolean description: Filter products that have prices - name: with_zero_price in: query description: Filter products that have zero price for free subscription type schema: type: boolean description: Filter products that have zero price for free subscription type - name: without_linked_to_plan in: query description: Filter products that are not linked to any plan schema: type: boolean description: Filter products that are not linked to any plan - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: ids: type: array items: type: string maxItems: 100 is_active: type: boolean description: Filter products that are active. Defaults to true if not specified limit: type: integer description: Page limit (default 100) format: int64 example: "100" name: type: string maxLength: 255 offset: type: integer description: Page offset (default 0) format: int64 example: "0" price_usage_type: $ref: '#/components/schemas/BillingPriceUsageType' provider_type: $ref: '#/components/schemas/BillingProviderType' q: type: string maxLength: 512 recurring_charges_only: type: boolean description: Filter to products that have at least one recurring price with_one_time_charges: type: boolean description: Filter products that are one time charges with_prices_only: type: boolean description: Filter products that have prices with_zero_price: type: boolean description: Filter products that have zero price for free subscription type without_linked_to_plan: type: boolean description: Filter products that are not linked to any plan title: CountBillingProductsParams required: - data - params title: CountBillingProductsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /billing/subscription/upsert: post: operationId: upsertBillingSubscription summary: Upsert billing subscription tags: - billing requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateBillingSubscriptionRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingSubscriptionResponseData' params: type: object description: Input parameters title: UpsertBillingSubscriptionParams required: - data - params title: UpsertBillingSubscriptionResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /checkout-internal: post: operationId: checkoutInternal summary: Checkout internal tags: - checkout requestBody: content: application/json: schema: $ref: '#/components/schemas/ChangeSubscriptionInternalRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CheckoutSubscription' params: type: object description: Input parameters title: CheckoutInternalParams required: - data - params title: CheckoutInternalResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /checkout-internal/data: post: operationId: getCheckoutData summary: Get checkout data tags: - checkout requestBody: content: application/json: schema: $ref: '#/components/schemas/CheckoutDataRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CheckoutDataResponseData' params: type: object description: Input parameters title: GetCheckoutDataParams required: - data - params title: GetCheckoutDataResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /checkout-internal/preview: post: operationId: previewCheckoutInternal summary: Preview checkout internal tags: - checkout requestBody: content: application/json: schema: $ref: '#/components/schemas/ChangeSubscriptionInternalRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PreviewSubscriptionChangeResponseData' params: type: object description: Input parameters title: PreviewCheckoutInternalParams required: - data - params title: PreviewCheckoutInternalResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /companies: get: operationId: listCompanies 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_) schema: type: array description: Filter companies by one or more credit type IDs (each ID starts with bcrd_) items: type: string maxItems: 100 - name: has_scheduled_downgrade in: query description: Filter companies that have a pending scheduled downgrade schema: type: boolean description: Filter companies that have a pending scheduled downgrade - name: ids in: query description: Filter companies by multiple company IDs (starts with comp_) schema: type: array description: Filter companies by multiple company IDs (starts with comp_) items: type: string maxItems: 100 - name: monetized_subscriptions in: query description: Filter companies that have monetized subscriptions schema: type: boolean description: Filter companies that have monetized subscriptions - name: plan_id in: query description: Filter companies by plan ID (starts with plan_) schema: type: string description: Filter companies by plan ID (starts with plan_) - name: plan_ids in: query description: Filter companies by one or more plan IDs (each ID starts with plan_) schema: type: array description: Filter companies by one or more plan IDs (each ID starts with plan_) items: type: string maxItems: 100 - name: plan_version_id in: query description: Filter companies by plan version ID (starts with plvr_) schema: type: string description: Filter companies by plan version ID (starts with plvr_) - name: q in: query description: Search for companies by name, keys or string traits schema: type: string description: Search for companies by name, keys or string traits maxLength: 512 - name: sort_order_column in: query description: Column to sort by (e.g. name, created_at, last_seen_at) schema: type: string description: Column to sort by (e.g. name, created_at, last_seen_at) maxLength: 255 - name: sort_order_direction in: query description: Direction to sort by (asc or desc) schema: allOf: - $ref: '#/components/schemas/SortDirection' description: Direction to sort by (asc or desc) - name: subscription_statuses in: query description: Filter companies by one or more subscription statuses schema: type: array description: Filter companies by one or more subscription statuses items: $ref: '#/components/schemas/SubscriptionStatus' maxItems: 100 - name: subscription_types in: query description: Filter companies by one or more subscription types schema: type: array description: Filter companies by one or more subscription types items: $ref: '#/components/schemas/SubscriptionType' maxItems: 100 - name: with_entitlement_for in: query description: Filter companies that have an entitlement (plan entitlement or company override) for the specified feature ID schema: type: string description: Filter companies that have an entitlement (plan entitlement or company override) for the specified feature ID - name: without_feature_override_for in: query description: Filter out companies that already have a company override for the specified feature ID schema: type: string description: Filter out companies that already have a company override for the specified feature ID - name: without_plan in: query description: Filter out companies that have a plan schema: type: boolean description: Filter out companies that have a plan - name: without_subscription in: query description: Filter out companies that have a subscription schema: type: boolean description: Filter out companies that have a subscription - name: with_subscription in: query description: Filter companies that have a subscription schema: type: boolean description: Filter companies that have a subscription - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/CompanyDetailResponseData' title: ListCompaniesResponseData maxItems: 250 params: type: object description: Input parameters properties: credit_type_ids: type: array description: Filter companies by one or more credit type IDs (each ID starts with bcrd_) items: type: string maxItems: 100 has_scheduled_downgrade: type: boolean description: Filter companies that have a pending scheduled downgrade ids: type: array description: Filter companies by multiple company IDs (starts with comp_) items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" monetized_subscriptions: type: boolean description: Filter companies that have monetized subscriptions offset: type: integer description: Page offset (default 0) format: int64 example: "0" plan_id: type: string description: Filter companies by plan ID (starts with plan_) plan_ids: type: array description: Filter companies by one or more plan IDs (each ID starts with plan_) items: type: string maxItems: 100 plan_version_id: type: string description: Filter companies by plan version ID (starts with plvr_) q: type: string description: Search for companies by name, keys or string traits maxLength: 512 sort_order_column: type: string description: Column to sort by (e.g. name, created_at, last_seen_at) maxLength: 255 sort_order_direction: allOf: - $ref: '#/components/schemas/SortDirection' description: Direction to sort by (asc or desc) subscription_statuses: type: array description: Filter companies by one or more subscription statuses items: $ref: '#/components/schemas/SubscriptionStatus' maxItems: 100 subscription_types: type: array description: Filter companies by one or more subscription types items: $ref: '#/components/schemas/SubscriptionType' maxItems: 100 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 title: ListCompaniesParams required: - data - params title: ListCompaniesResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' post: operationId: upsertCompany summary: Upsert company tags: - companies requestBody: content: application/json: schema: $ref: '#/components/schemas/UpsertCompanyRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CompanyDetailResponseData' params: type: object description: Input parameters title: UpsertCompanyParams required: - data - params title: UpsertCompanyResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /companies/{company_id}: get: operationId: getCompany summary: Get company tags: - companies parameters: - name: company_id in: path description: company_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CompanyDetailResponseData' params: type: object description: Input parameters title: GetCompanyParams required: - data - params title: GetCompanyResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' delete: operationId: deleteCompany summary: Delete company tags: - companies parameters: - name: company_id in: path description: company_id required: true schema: type: string - name: cancel_subscription in: query schema: type: boolean - name: prorate in: query schema: type: boolean responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DeleteResponse' params: type: object description: Input parameters properties: cancel_subscription: type: boolean prorate: type: boolean title: DeleteCompanyParams required: - data - params title: DeleteCompanyResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /companies/count: get: operationId: countCompanies summary: Count 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_) schema: type: array description: Filter companies by one or more credit type IDs (each ID starts with bcrd_) items: type: string maxItems: 100 - name: has_scheduled_downgrade in: query description: Filter companies that have a pending scheduled downgrade schema: type: boolean description: Filter companies that have a pending scheduled downgrade - name: ids in: query description: Filter companies by multiple company IDs (starts with comp_) schema: type: array description: Filter companies by multiple company IDs (starts with comp_) items: type: string maxItems: 100 - name: monetized_subscriptions in: query description: Filter companies that have monetized subscriptions schema: type: boolean description: Filter companies that have monetized subscriptions - name: plan_id in: query description: Filter companies by plan ID (starts with plan_) schema: type: string description: Filter companies by plan ID (starts with plan_) - name: plan_ids in: query description: Filter companies by one or more plan IDs (each ID starts with plan_) schema: type: array description: Filter companies by one or more plan IDs (each ID starts with plan_) items: type: string maxItems: 100 - name: plan_version_id in: query description: Filter companies by plan version ID (starts with plvr_) schema: type: string description: Filter companies by plan version ID (starts with plvr_) - name: q in: query description: Search for companies by name, keys or string traits schema: type: string description: Search for companies by name, keys or string traits maxLength: 512 - name: sort_order_column in: query description: Column to sort by (e.g. name, created_at, last_seen_at) schema: type: string description: Column to sort by (e.g. name, created_at, last_seen_at) maxLength: 255 - name: sort_order_direction in: query description: Direction to sort by (asc or desc) schema: allOf: - $ref: '#/components/schemas/SortDirection' description: Direction to sort by (asc or desc) - name: subscription_statuses in: query description: Filter companies by one or more subscription statuses schema: type: array description: Filter companies by one or more subscription statuses items: $ref: '#/components/schemas/SubscriptionStatus' maxItems: 100 - name: subscription_types in: query description: Filter companies by one or more subscription types schema: type: array description: Filter companies by one or more subscription types items: $ref: '#/components/schemas/SubscriptionType' maxItems: 100 - name: with_entitlement_for in: query description: Filter companies that have an entitlement (plan entitlement or company override) for the specified feature ID schema: type: string description: Filter companies that have an entitlement (plan entitlement or company override) for the specified feature ID - name: without_feature_override_for in: query description: Filter out companies that already have a company override for the specified feature ID schema: type: string description: Filter out companies that already have a company override for the specified feature ID - name: without_plan in: query description: Filter out companies that have a plan schema: type: boolean description: Filter out companies that have a plan - name: without_subscription in: query description: Filter out companies that have a subscription schema: type: boolean description: Filter out companies that have a subscription - name: with_subscription in: query description: Filter companies that have a subscription schema: type: boolean description: Filter companies that have a subscription - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: credit_type_ids: type: array description: Filter companies by one or more credit type IDs (each ID starts with bcrd_) items: type: string maxItems: 100 has_scheduled_downgrade: type: boolean description: Filter companies that have a pending scheduled downgrade ids: type: array description: Filter companies by multiple company IDs (starts with comp_) items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" monetized_subscriptions: type: boolean description: Filter companies that have monetized subscriptions offset: type: integer description: Page offset (default 0) format: int64 example: "0" plan_id: type: string description: Filter companies by plan ID (starts with plan_) plan_ids: type: array description: Filter companies by one or more plan IDs (each ID starts with plan_) items: type: string maxItems: 100 plan_version_id: type: string description: Filter companies by plan version ID (starts with plvr_) q: type: string description: Search for companies by name, keys or string traits maxLength: 512 sort_order_column: type: string description: Column to sort by (e.g. name, created_at, last_seen_at) maxLength: 255 sort_order_direction: allOf: - $ref: '#/components/schemas/SortDirection' description: Direction to sort by (asc or desc) subscription_statuses: type: array description: Filter companies by one or more subscription statuses items: $ref: '#/components/schemas/SubscriptionStatus' maxItems: 100 subscription_types: type: array description: Filter companies by one or more subscription types items: $ref: '#/components/schemas/SubscriptionType' maxItems: 100 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 title: CountCompaniesParams required: - data - params title: CountCompaniesResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /companies/create: post: operationId: createCompany summary: Create company tags: - companies requestBody: content: application/json: schema: $ref: '#/components/schemas/UpsertCompanyRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CompanyDetailResponseData' params: type: object description: Input parameters title: CreateCompanyParams required: - data - params title: CreateCompanyResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /companies/delete: post: operationId: deleteCompanyByKeys summary: Delete company by keys tags: - companies requestBody: content: application/json: schema: $ref: '#/components/schemas/KeysRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CompanyResponseData' params: type: object description: Input parameters title: DeleteCompanyByKeysParams required: - data - params title: DeleteCompanyByKeysResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /companies/lookup: get: operationId: lookupCompany summary: Lookup company tags: - companies parameters: - name: keys in: query description: Key/value pairs required: true schema: additionalProperties: type: string type: object responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CompanyDetailResponseData' params: type: object description: Input parameters properties: keys: additionalProperties: type: string type: object title: LookupCompanyParams required: - data - params title: LookupCompanyResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /company-memberships: get: operationId: listCompanyMemberships summary: List company memberships tags: - companies parameters: - name: company_id in: query schema: type: string - name: user_id in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/CompanyMembershipDetailResponseData' title: ListCompanyMembershipsResponseData maxItems: 250 params: type: object description: Input parameters properties: company_id: type: string limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" user_id: type: string title: ListCompanyMembershipsParams required: - data - params title: ListCompanyMembershipsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' post: operationId: getOrCreateCompanyMembership summary: Get or create company membership tags: - companies requestBody: content: application/json: schema: $ref: '#/components/schemas/GetOrCreateCompanyMembershipRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CompanyMembershipDetailResponseData' params: type: object description: Input parameters title: GetOrCreateCompanyMembershipParams required: - data - params title: GetOrCreateCompanyMembershipResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /company-memberships/{company_membership_id}: delete: operationId: deleteCompanyMembership summary: Delete company membership tags: - companies parameters: - name: company_membership_id in: path description: company_membership_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DeleteResponse' params: type: object description: Input parameters title: DeleteCompanyMembershipParams required: - data - params title: DeleteCompanyMembershipResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /company-overrides: get: operationId: listCompanyOverrides summary: List company overrides tags: - entitlements parameters: - name: company_id in: query description: Filter company overrides by a single company ID (starting with comp_) schema: type: string description: Filter company overrides by a single company ID (starting with comp_) - name: company_ids in: query description: Filter company overrides by multiple company IDs (starting with comp_) schema: type: array description: Filter company overrides by multiple company IDs (starting with comp_) items: type: string maxItems: 100 - name: feature_id in: query description: Filter company overrides by a single feature ID (starting with feat_) schema: type: string description: Filter company overrides by a single feature ID (starting with feat_) - name: feature_ids in: query description: Filter company overrides by multiple feature IDs (starting with feat_) schema: type: array description: Filter company overrides by multiple feature IDs (starting with feat_) items: type: string maxItems: 100 - name: ids in: query description: Filter company overrides by multiple company override IDs (starting with cmov_) schema: type: array description: Filter company overrides by multiple company override IDs (starting with cmov_) items: type: string maxItems: 100 - name: without_expired in: query description: Filter company overrides by whether they have not expired schema: type: boolean description: Filter company overrides by whether they have not expired - name: q in: query description: Search for company overrides by feature or company name schema: type: string description: Search for company overrides by feature or company name - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/CompanyOverrideResponseData' title: ListCompanyOverridesResponseData maxItems: 250 params: type: object description: Input parameters properties: company_id: type: string description: Filter company overrides by a single company ID (starting with comp_) company_ids: type: array description: Filter company overrides by multiple company IDs (starting with comp_) items: type: string maxItems: 100 feature_id: type: string description: Filter company overrides by a single feature ID (starting with feat_) feature_ids: type: array description: Filter company overrides by multiple feature IDs (starting with feat_) items: type: string maxItems: 100 ids: type: array description: Filter company overrides by multiple company override IDs (starting with cmov_) items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "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 title: ListCompanyOverridesParams required: - data - params title: ListCompanyOverridesResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' post: operationId: createCompanyOverride summary: Create company override tags: - entitlements requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateCompanyOverrideRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CompanyOverrideResponseData' params: type: object description: Input parameters title: CreateCompanyOverrideParams required: - data - params title: CreateCompanyOverrideResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /company-overrides/{company_override_id}: get: operationId: getCompanyOverride summary: Get company override tags: - entitlements parameters: - name: company_override_id in: path description: company_override_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CompanyOverrideResponseData' params: type: object description: Input parameters title: GetCompanyOverrideParams required: - data - params title: GetCompanyOverrideResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' put: operationId: updateCompanyOverride summary: Update company override tags: - entitlements parameters: - name: company_override_id in: path description: company_override_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateCompanyOverrideRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CompanyOverrideResponseData' params: type: object description: Input parameters title: UpdateCompanyOverrideParams required: - data - params title: UpdateCompanyOverrideResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' delete: operationId: deleteCompanyOverride summary: Delete company override tags: - entitlements parameters: - name: company_override_id in: path description: company_override_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DeleteResponse' params: type: object description: Input parameters title: DeleteCompanyOverrideParams required: - data - params title: DeleteCompanyOverrideResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /company-overrides/count: get: operationId: countCompanyOverrides summary: Count company overrides tags: - entitlements parameters: - name: company_id in: query description: Filter company overrides by a single company ID (starting with comp_) schema: type: string description: Filter company overrides by a single company ID (starting with comp_) - name: company_ids in: query description: Filter company overrides by multiple company IDs (starting with comp_) schema: type: array description: Filter company overrides by multiple company IDs (starting with comp_) items: type: string maxItems: 100 - name: feature_id in: query description: Filter company overrides by a single feature ID (starting with feat_) schema: type: string description: Filter company overrides by a single feature ID (starting with feat_) - name: feature_ids in: query description: Filter company overrides by multiple feature IDs (starting with feat_) schema: type: array description: Filter company overrides by multiple feature IDs (starting with feat_) items: type: string maxItems: 100 - name: ids in: query description: Filter company overrides by multiple company override IDs (starting with cmov_) schema: type: array description: Filter company overrides by multiple company override IDs (starting with cmov_) items: type: string maxItems: 100 - name: without_expired in: query description: Filter company overrides by whether they have not expired schema: type: boolean description: Filter company overrides by whether they have not expired - name: q in: query description: Search for company overrides by feature or company name schema: type: string description: Search for company overrides by feature or company name - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: company_id: type: string description: Filter company overrides by a single company ID (starting with comp_) company_ids: type: array description: Filter company overrides by multiple company IDs (starting with comp_) items: type: string maxItems: 100 feature_id: type: string description: Filter company overrides by a single feature ID (starting with feat_) feature_ids: type: array description: Filter company overrides by multiple feature IDs (starting with feat_) items: type: string maxItems: 100 ids: type: array description: Filter company overrides by multiple company override IDs (starting with cmov_) items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "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 title: CountCompanyOverridesParams required: - data - params title: CountCompanyOverridesResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /company-plans/{company_plan_id}: put: operationId: updateCompanyPlans summary: Update company plans tags: - plans parameters: - name: company_plan_id in: path description: company_plan_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateCompanyPlansRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CompanyDetailResponseData' params: type: object description: Input parameters title: UpdateCompanyPlansParams required: - data - params title: UpdateCompanyPlansResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /company-subscriptions: get: operationId: getActiveCompanySubscription summary: Get active company subscription tags: - companies parameters: - name: company_id in: query schema: type: string - name: company_ids in: query schema: type: array items: type: string maxItems: 100 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/CompanySubscriptionResponseData' title: GetActiveCompanySubscriptionResponseData maxItems: 250 params: type: object description: Input parameters properties: company_id: type: string company_ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" title: GetActiveCompanySubscriptionParams required: - data - params title: GetActiveCompanySubscriptionResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /company-traits: post: operationId: upsertCompanyTrait summary: Upsert company trait tags: - companies requestBody: content: application/json: schema: $ref: '#/components/schemas/UpsertTraitRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CompanyDetailResponseData' params: type: object description: Input parameters title: UpsertCompanyTraitParams required: - data - params title: UpsertCompanyTraitResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /components: get: operationId: listComponents summary: List components tags: - components parameters: - name: q in: query schema: type: string maxLength: 512 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/ComponentResponseData' title: ListComponentsResponseData maxItems: 250 params: type: object description: Input parameters properties: limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string maxLength: 512 title: ListComponentsParams required: - data - params title: ListComponentsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' post: operationId: createComponent summary: Create component tags: - components requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateComponentRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/ComponentResponseData' params: type: object description: Input parameters title: CreateComponentParams required: - data - params title: CreateComponentResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /components/{component_id}: get: operationId: getComponent summary: Get component tags: - components parameters: - name: component_id in: path description: component_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/ComponentResponseData' params: type: object description: Input parameters title: GetComponentParams required: - data - params title: GetComponentResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' put: operationId: updateComponent summary: Update component tags: - components parameters: - name: component_id in: path description: component_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateComponentRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/ComponentResponseData' params: type: object description: Input parameters title: UpdateComponentParams required: - data - params title: UpdateComponentResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' delete: operationId: deleteComponent summary: Delete component tags: - components parameters: - name: component_id in: path description: component_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DeleteResponse' params: type: object description: Input parameters title: DeleteComponentParams required: - data - params title: DeleteComponentResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /components/count: get: operationId: countComponents summary: Count components tags: - components parameters: - name: q in: query schema: type: string maxLength: 512 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string maxLength: 512 title: CountComponentsParams required: - data - params title: CountComponentsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /components/preview-data: get: operationId: previewComponentData summary: Preview component data tags: - components parameters: - name: company_id in: query schema: type: string - name: component_id in: query schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/ComponentPreviewResponseData' params: type: object description: Input parameters properties: company_id: type: string component_id: type: string title: PreviewComponentDataParams required: - data - params title: PreviewComponentDataResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /custom-plan-billings: get: operationId: listCustomPlanBillings summary: List custom plan billings tags: - plans parameters: - name: company_id in: query description: Filter by company ID schema: type: string description: Filter by company ID - name: plan_id in: query description: Filter by plan ID schema: type: string description: Filter by plan ID - name: status in: query description: Filter by billing status schema: allOf: - $ref: '#/components/schemas/CustomPlanBillingStatus' description: Filter by billing status - name: statuses in: query description: Filter by multiple billing statuses schema: type: array description: Filter by multiple billing statuses items: $ref: '#/components/schemas/CustomPlanBillingStatus' maxItems: 10 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/CustomPlanBillingResponseData' title: ListCustomPlanBillingsResponseData maxItems: 250 params: type: object description: Input parameters properties: company_id: type: string description: Filter by company ID limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" plan_id: type: string description: Filter by plan ID status: allOf: - $ref: '#/components/schemas/CustomPlanBillingStatus' description: Filter by billing status statuses: type: array description: Filter by multiple billing statuses items: $ref: '#/components/schemas/CustomPlanBillingStatus' maxItems: 10 title: ListCustomPlanBillingsParams required: - data - params title: ListCustomPlanBillingsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /custom-plan-billings/{custom_plan_billing_id}/retry: put: operationId: retryCustomPlanBilling summary: Retry custom plan billing tags: - plans parameters: - name: custom_plan_billing_id in: path description: custom_plan_billing_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/RetryCustomPlanBillingRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CustomPlanBillingResponseData' params: type: object description: Input parameters title: RetryCustomPlanBillingParams required: - data - params title: RetryCustomPlanBillingResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /custom-plans: post: operationId: createCustomPlan summary: Create custom plan tags: - plans requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateCustomPlanRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanDetailResponseData' params: type: object description: Input parameters title: CreateCustomPlanParams required: - data - params title: CreateCustomPlanResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /data-exports: post: operationId: createDataExport summary: Create data export tags: - dataexports requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateDataExportRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DataExportResponseData' params: type: object description: Input parameters title: CreateDataExportParams required: - data - params title: CreateDataExportResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /data-exports/{data_export_id}/artifact: get: operationId: getDataExportArtifact summary: Get data export artifact tags: - dataexports parameters: - name: data_export_id in: path description: data_export_id required: true schema: type: string responses: "200": description: OK content: text/csv: schema: type: string format: binary application/octet-stream: schema: type: string format: binary headers: Content-Disposition: description: Indicates whether the content is expected to be displayed inline by the client or treated as an attachment to be downloaded. schema: type: string example: attachment; filename="file.csv" "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /entity-key-definitions: get: operationId: listEntityKeyDefinitions summary: List entity key definitions tags: - companies parameters: - name: entity_type in: query schema: $ref: '#/components/schemas/EntityType' - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: q in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/EntityKeyDefinitionResponseData' title: ListEntityKeyDefinitionsResponseData maxItems: 250 params: type: object description: Input parameters properties: entity_type: $ref: '#/components/schemas/EntityType' ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string title: ListEntityKeyDefinitionsParams required: - data - params title: ListEntityKeyDefinitionsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /entity-key-definitions/count: get: operationId: countEntityKeyDefinitions summary: Count entity key definitions tags: - companies parameters: - name: entity_type in: query schema: $ref: '#/components/schemas/EntityType' - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: q in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: entity_type: $ref: '#/components/schemas/EntityType' ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string title: CountEntityKeyDefinitionsParams required: - data - params title: CountEntityKeyDefinitionsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /entity-trait-definitions: get: operationId: listEntityTraitDefinitions summary: List entity trait definitions tags: - companies parameters: - name: entity_type in: query schema: $ref: '#/components/schemas/EntityType' - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: q in: query schema: type: string - name: trait_type in: query schema: $ref: '#/components/schemas/TraitType' - name: trait_types in: query schema: type: array items: $ref: '#/components/schemas/TraitType' maxItems: 100 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/EntityTraitDefinitionResponseData' title: ListEntityTraitDefinitionsResponseData maxItems: 250 params: type: object description: Input parameters properties: entity_type: $ref: '#/components/schemas/EntityType' ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string trait_type: $ref: '#/components/schemas/TraitType' trait_types: type: array items: $ref: '#/components/schemas/TraitType' maxItems: 100 title: ListEntityTraitDefinitionsParams required: - data - params title: ListEntityTraitDefinitionsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' post: operationId: getOrCreateEntityTraitDefinition summary: Get or create entity trait definition tags: - companies requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateEntityTraitDefinitionRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/EntityTraitDefinitionResponseData' params: type: object description: Input parameters title: GetOrCreateEntityTraitDefinitionParams required: - data - params title: GetOrCreateEntityTraitDefinitionResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /entity-trait-definitions/{entity_trait_definition_id}: get: operationId: getEntityTraitDefinition summary: Get entity trait definition tags: - companies parameters: - name: entity_trait_definition_id in: path description: entity_trait_definition_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/EntityTraitDefinitionResponseData' params: type: object description: Input parameters title: GetEntityTraitDefinitionParams required: - data - params title: GetEntityTraitDefinitionResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' put: operationId: updateEntityTraitDefinition summary: Update entity trait definition tags: - companies parameters: - name: entity_trait_definition_id in: path description: entity_trait_definition_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateEntityTraitDefinitionRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/EntityTraitDefinitionResponseData' params: type: object description: Input parameters title: UpdateEntityTraitDefinitionParams required: - data - params title: UpdateEntityTraitDefinitionResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /entity-trait-definitions/count: get: operationId: countEntityTraitDefinitions summary: Count entity trait definitions tags: - companies parameters: - name: entity_type in: query schema: $ref: '#/components/schemas/EntityType' - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: q in: query schema: type: string - name: trait_type in: query schema: $ref: '#/components/schemas/TraitType' - name: trait_types in: query schema: type: array items: $ref: '#/components/schemas/TraitType' maxItems: 100 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: entity_type: $ref: '#/components/schemas/EntityType' ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string trait_type: $ref: '#/components/schemas/TraitType' trait_types: type: array items: $ref: '#/components/schemas/TraitType' maxItems: 100 title: CountEntityTraitDefinitionsParams required: - data - params title: CountEntityTraitDefinitionsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /entity-trait-values: get: operationId: getEntityTraitValues summary: Get entity trait values tags: - companies parameters: - name: definition_id in: query required: true schema: type: string - name: q in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/EntityTraitValue' title: GetEntityTraitValuesResponseData maxItems: 250 params: type: object description: Input parameters properties: definition_id: type: string limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string title: GetEntityTraitValuesParams required: - data - params title: GetEntityTraitValuesResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /environments: get: operationId: listEnvironments summary: List environments tags: - accounts parameters: - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/EnvironmentResponseData' title: ListEnvironmentsResponseData maxItems: 250 params: type: object description: Input parameters properties: ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" title: ListEnvironmentsParams required: - data - params title: ListEnvironmentsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' post: operationId: createEnvironment summary: Create environment tags: - accounts requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateEnvironmentRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/EnvironmentDetailResponseData' params: type: object description: Input parameters title: CreateEnvironmentParams required: - data - params title: CreateEnvironmentResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /environments/{environment_id}: get: operationId: getEnvironment summary: Get environment tags: - accounts parameters: - name: environment_id in: path description: environment_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/EnvironmentResponseData' params: type: object description: Input parameters title: GetEnvironmentParams required: - data - params title: GetEnvironmentResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' put: operationId: updateEnvironment summary: Update environment tags: - accounts parameters: - name: environment_id in: path description: environment_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateEnvironmentRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/EnvironmentResponseData' params: type: object description: Input parameters title: UpdateEnvironmentParams required: - data - params title: UpdateEnvironmentResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' delete: operationId: deleteEnvironment summary: Delete environment tags: - accounts parameters: - name: environment_id in: path description: environment_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DeleteResponse' params: type: object description: Input parameters title: DeleteEnvironmentParams required: - data - params title: DeleteEnvironmentResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /event-batch: post: operationId: createEventBatch summary: Create event batch tags: - events requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateEventBatchRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/RawEventBatchResponseData' params: type: object description: Input parameters title: CreateEventBatchParams required: - data - params title: CreateEventBatchResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /event-types: get: operationId: getEventSummaries summary: Get event summaries tags: - events parameters: - name: q in: query schema: type: string maxLength: 512 - name: event_subtypes in: query schema: type: array items: type: string maxItems: 100 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/EventSummaryResponseData' title: GetEventSummariesResponseData maxItems: 250 params: type: object description: Input parameters properties: event_subtypes: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string maxLength: 512 title: GetEventSummariesParams required: - data - params title: GetEventSummariesResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /events: get: operationId: listEvents summary: List events tags: - events parameters: - name: company_id in: query schema: type: string - name: event_subtype in: query schema: type: string maxLength: 255 - name: event_types in: query schema: type: array items: $ref: '#/components/schemas/EventType' maxItems: 100 - name: flag_id in: query schema: type: string - name: idempotency_key in: query schema: type: string maxLength: 255 - name: user_id in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/EventDetailResponseData' title: ListEventsResponseData maxItems: 250 params: type: object description: Input parameters properties: company_id: type: string event_subtype: type: string maxLength: 255 event_types: type: array items: $ref: '#/components/schemas/EventType' maxItems: 100 flag_id: type: string idempotency_key: type: string maxLength: 255 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" user_id: type: string title: ListEventsParams required: - data - params title: ListEventsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' post: operationId: createEvent summary: Create event tags: - events requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateEventRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/RawEventResponseData' params: type: object description: Input parameters title: CreateEventParams required: - data - params title: CreateEventResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /events/{event_id}: get: operationId: getEvent summary: Get event tags: - events parameters: - name: event_id in: path description: event_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/EventDetailResponseData' params: type: object description: Input parameters title: GetEventParams required: - data - params title: GetEventResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /feature-companies: get: operationId: listFeatureCompanies summary: List feature companies tags: - entitlements parameters: - name: feature_id in: query required: true schema: type: string - name: q in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/FeatureCompanyResponseData' title: ListFeatureCompaniesResponseData maxItems: 250 params: type: object description: Input parameters properties: feature_id: type: string limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string title: ListFeatureCompaniesParams required: - data - params title: ListFeatureCompaniesResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /feature-companies/count: get: operationId: countFeatureCompanies summary: Count feature companies tags: - entitlements parameters: - name: feature_id in: query required: true schema: type: string - name: q in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: feature_id: type: string limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string title: CountFeatureCompaniesParams required: - data - params title: CountFeatureCompaniesResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /feature-usage: get: operationId: listFeatureUsage summary: List feature usage tags: - entitlements parameters: - name: company_id in: query schema: type: string - name: company_keys in: query schema: additionalProperties: type: string type: object - name: feature_ids in: query schema: type: array items: type: string maxItems: 100 - 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. schema: type: boolean description: Include time-bucketed usage aggregation (today, this week, this month, billing period) for credit-based entitlements. Defaults to false for performance. - name: q in: query schema: type: string - name: without_negative_entitlements in: query schema: type: boolean - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/FeatureUsageResponseData' title: ListFeatureUsageResponseData maxItems: 250 params: type: object description: Input parameters properties: company_id: type: string company_keys: additionalProperties: type: string type: object feature_ids: type: array items: type: string maxItems: 100 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 description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string without_negative_entitlements: type: boolean title: ListFeatureUsageParams required: - data - params title: ListFeatureUsageResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /feature-usage-timeseries: get: operationId: getFeatureUsageTimeSeries summary: Get feature usage time series tags: - entitlements parameters: - name: company_id in: query required: true schema: type: string - name: end_time in: query required: true schema: type: string format: date-time - name: feature_id in: query required: true schema: type: string - name: granularity in: query schema: $ref: '#/components/schemas/TimeSeriesGranularity' - name: start_time in: query required: true schema: type: string format: date-time responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/FeatureUsageTimeSeriesResponseData' params: type: object description: Input parameters properties: company_id: type: string end_time: type: string format: date-time feature_id: type: string granularity: $ref: '#/components/schemas/TimeSeriesGranularity' start_time: type: string format: date-time title: GetFeatureUsageTimeSeriesParams required: - data - params title: GetFeatureUsageTimeSeriesResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /feature-usage/count: get: operationId: countFeatureUsage summary: Count feature usage tags: - entitlements parameters: - name: company_id in: query schema: type: string - name: company_keys in: query schema: additionalProperties: type: string type: object - name: feature_ids in: query schema: type: array items: type: string maxItems: 100 - 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. schema: type: boolean description: Include time-bucketed usage aggregation (today, this week, this month, billing period) for credit-based entitlements. Defaults to false for performance. - name: q in: query schema: type: string - name: without_negative_entitlements in: query schema: type: boolean - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: company_id: type: string company_keys: additionalProperties: type: string type: object feature_ids: type: array items: type: string maxItems: 100 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 description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string without_negative_entitlements: type: boolean title: CountFeatureUsageParams required: - data - params title: CountFeatureUsageResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /feature-users: get: operationId: listFeatureUsers summary: List feature users tags: - entitlements parameters: - name: feature_id in: query required: true schema: type: string - name: q in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/FeatureCompanyUserResponseData' title: ListFeatureUsersResponseData maxItems: 250 params: type: object description: Input parameters properties: feature_id: type: string limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string title: ListFeatureUsersParams required: - data - params title: ListFeatureUsersResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /feature-users/count: get: operationId: countFeatureUsers summary: Count feature users tags: - entitlements parameters: - name: feature_id in: query required: true schema: type: string - name: q in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: feature_id: type: string limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string title: CountFeatureUsersParams required: - data - params title: CountFeatureUsersResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /features: get: operationId: listFeatures 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. schema: type: boolean description: Only return boolean features if there is an associated event. Automatically includes boolean in the feature types filter. - name: feature_type in: query description: Filter by one or more feature types (boolean, event, trait) schema: type: array description: Filter by one or more feature types (boolean, event, trait) items: $ref: '#/components/schemas/FeatureType' maxItems: 100 - name: ids in: query schema: type: array items: type: string maxItems: 100 - 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 schema: type: string description: Filter by plan version ID when used with without_plan_entitlement_for; if not provided, the latest published version is used - name: q in: query description: Search by feature name or ID schema: type: string description: Search by feature name or ID maxLength: 512 - name: without_company_override_for in: query description: Filter out features that already have a company override for the specified company ID schema: type: string description: Filter out features that already have a company override for the specified company ID - name: without_plan_entitlement_for in: query description: Filter out features that already have a plan entitlement for the specified plan ID schema: type: string description: Filter out features that already have a plan entitlement for the specified plan ID - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/FeatureDetailResponseData' title: ListFeaturesResponseData maxItems: 250 params: type: object description: Input parameters 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 description: Filter by one or more feature types (boolean, event, trait) items: $ref: '#/components/schemas/FeatureType' maxItems: 100 ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "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 maxLength: 512 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 title: ListFeaturesParams required: - data - params title: ListFeaturesResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' post: operationId: createFeature summary: Create feature tags: - features requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateFeatureRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/FeatureDetailResponseData' params: type: object description: Input parameters title: CreateFeatureParams required: - data - params title: CreateFeatureResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /features/{feature_id}: get: operationId: getFeature summary: Get feature tags: - features parameters: - name: feature_id in: path description: feature_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/FeatureDetailResponseData' params: type: object description: Input parameters title: GetFeatureParams required: - data - params title: GetFeatureResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' put: operationId: updateFeature summary: Update feature tags: - features parameters: - name: feature_id in: path description: feature_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateFeatureRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/FeatureDetailResponseData' params: type: object description: Input parameters title: UpdateFeatureParams required: - data - params title: UpdateFeatureResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' delete: operationId: deleteFeature summary: Delete feature tags: - features parameters: - name: feature_id in: path description: feature_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DeleteResponse' params: type: object description: Input parameters title: DeleteFeatureParams required: - data - params title: DeleteFeatureResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /features/billing-linked: post: operationId: upsertFeatureForBillingProduct summary: Upsert feature for billing product tags: - features requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateBillingLinkedFeatureRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/FeatureDetailResponseData' params: type: object description: Input parameters title: UpsertFeatureForBillingProductParams required: - data - params title: UpsertFeatureForBillingProductResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /features/count: get: operationId: countFeatures summary: Count 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. schema: type: boolean description: Only return boolean features if there is an associated event. Automatically includes boolean in the feature types filter. - name: feature_type in: query description: Filter by one or more feature types (boolean, event, trait) schema: type: array description: Filter by one or more feature types (boolean, event, trait) items: $ref: '#/components/schemas/FeatureType' maxItems: 100 - name: ids in: query schema: type: array items: type: string maxItems: 100 - 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 schema: type: string description: Filter by plan version ID when used with without_plan_entitlement_for; if not provided, the latest published version is used - name: q in: query description: Search by feature name or ID schema: type: string description: Search by feature name or ID maxLength: 512 - name: without_company_override_for in: query description: Filter out features that already have a company override for the specified company ID schema: type: string description: Filter out features that already have a company override for the specified company ID - name: without_plan_entitlement_for in: query description: Filter out features that already have a plan entitlement for the specified plan ID schema: type: string description: Filter out features that already have a plan entitlement for the specified plan ID - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters 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 description: Filter by one or more feature types (boolean, event, trait) items: $ref: '#/components/schemas/FeatureType' maxItems: 100 ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "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 maxLength: 512 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 title: CountFeaturesParams required: - data - params title: CountFeaturesResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /flags: get: operationId: listFlags summary: List flags tags: - features parameters: - name: feature_id in: query schema: type: string - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: q in: query description: Search by flag name, key, or ID schema: type: string description: Search by flag name, key, or ID maxLength: 512 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/FlagDetailResponseData' title: ListFlagsResponseData maxItems: 250 params: type: object description: Input parameters properties: feature_id: type: string ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string description: Search by flag name, key, or ID maxLength: 512 title: ListFlagsParams required: - data - params title: ListFlagsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' post: operationId: createFlag summary: Create flag tags: - features requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateFlagRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/FlagDetailResponseData' params: type: object description: Input parameters title: CreateFlagParams required: - data - params title: CreateFlagResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /flags/{flag_id}: get: operationId: getFlag summary: Get flag tags: - features parameters: - name: flag_id in: path description: flag_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/FlagDetailResponseData' params: type: object description: Input parameters title: GetFlagParams required: - data - params title: GetFlagResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' put: operationId: updateFlag summary: Update flag tags: - features parameters: - name: flag_id in: path description: flag_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateFlagRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/FlagDetailResponseData' params: type: object description: Input parameters title: UpdateFlagParams required: - data - params title: UpdateFlagResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' delete: operationId: deleteFlag summary: Delete flag tags: - features parameters: - name: flag_id in: path description: flag_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DeleteResponse' params: type: object description: Input parameters title: DeleteFlagParams required: - data - params title: DeleteFlagResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /flags/{flag_id}/rules: put: operationId: updateFlagRules summary: Update flag rules tags: - features parameters: - name: flag_id in: path description: flag_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateFlagRulesRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/RulesDetailResponseData' params: type: object description: Input parameters title: UpdateFlagRulesParams required: - data - params title: UpdateFlagRulesResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /flags/{key}/check: post: operationId: checkFlag summary: Check flag tags: - features parameters: - name: key in: path description: key required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/CheckFlagRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CheckFlagResponseData' params: type: object description: Input parameters title: CheckFlagParams required: - data - params title: CheckFlagResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /flags/check: post: operationId: checkFlags summary: Check flags tags: - features requestBody: content: application/json: schema: $ref: '#/components/schemas/CheckFlagRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CheckFlagsResponseData' params: type: object description: Input parameters title: CheckFlagsParams required: - data - params title: CheckFlagsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /flags/check-bulk: post: operationId: checkFlagsBulk summary: Check flags bulk tags: - features requestBody: content: application/json: schema: $ref: '#/components/schemas/CheckFlagsBulkRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CheckFlagsBulkResponseData' params: type: object description: Input parameters title: CheckFlagsBulkParams required: - data - params title: CheckFlagsBulkResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /flags/count: get: operationId: countFlags summary: Count flags tags: - features parameters: - name: feature_id in: query schema: type: string - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: q in: query description: Search by flag name, key, or ID schema: type: string description: Search by flag name, key, or ID maxLength: 512 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: feature_id: type: string ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string description: Search by flag name, key, or ID maxLength: 512 title: CountFlagsParams required: - data - params title: CountFlagsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /insights/activity: get: operationId: getActivity summary: Get activity tags: - insights parameters: - name: limit in: query schema: type: integer format: int64 maximum: 50 minimum: 1 responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/ActivityResponseResponseData' params: type: object description: Input parameters properties: limit: type: integer format: int64 maximum: 50 minimum: 1 title: GetActivityParams required: - data - params title: GetActivityResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /insights/feature-usage-timeseries: get: operationId: getEnvironmentFeatureUsageTimeSeries summary: Get environment feature usage time series tags: - insights parameters: - name: end_time in: query required: true schema: type: string format: date-time - name: feature_id in: query required: true schema: type: string - name: granularity in: query schema: $ref: '#/components/schemas/TimeSeriesGranularity' - name: start_time in: query required: true schema: type: string format: date-time responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/EnvironmentFeatureUsageTimeSeriesResponseData' params: type: object description: Input parameters properties: end_time: type: string format: date-time feature_id: type: string granularity: $ref: '#/components/schemas/TimeSeriesGranularity' start_time: type: string format: date-time title: GetEnvironmentFeatureUsageTimeSeriesParams required: - data - params title: GetEnvironmentFeatureUsageTimeSeriesResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /insights/plan-growth: get: operationId: getPlanGrowth summary: Get plan growth tags: - insights parameters: - name: months in: query schema: type: integer format: int64 maximum: 24 minimum: 1 responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanGrowthResponseData' params: type: object description: Input parameters properties: months: type: integer format: int64 maximum: 24 minimum: 1 title: GetPlanGrowthParams required: - data - params title: GetPlanGrowthResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /insights/summary: get: operationId: getSummary summary: Get summary tags: - insights responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/InsightsSummaryResponseData' params: type: object description: Input parameters title: GetSummaryParams required: - data - params title: GetSummaryResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /insights/top-features: get: operationId: getTopFeaturesByUsage summary: Get top features by usage tags: - insights parameters: - name: end_time in: query required: true schema: type: string format: date-time - name: limit in: query schema: type: integer format: int64 maximum: 20 minimum: 1 - name: start_time in: query required: true schema: type: string format: date-time responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/TopFeaturesByUsageResponseData' params: type: object description: Input parameters properties: end_time: type: string format: date-time limit: type: integer format: int64 maximum: 20 minimum: 1 start_time: type: string format: date-time title: GetTopFeaturesByUsageParams required: - data - params title: GetTopFeaturesByUsageResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /insights/trait-usage-timeseries: get: operationId: getEnvironmentTraitUsageTimeSeries summary: Get environment trait usage time series tags: - insights parameters: - name: end_time in: query required: true schema: type: string format: date-time - name: feature_id in: query required: true schema: type: string - name: granularity in: query schema: $ref: '#/components/schemas/TimeSeriesGranularity' - name: start_time in: query required: true schema: type: string format: date-time responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/EnvironmentTraitUsageTimeSeriesResponseData' params: type: object description: Input parameters properties: end_time: type: string format: date-time feature_id: type: string granularity: $ref: '#/components/schemas/TimeSeriesGranularity' start_time: type: string format: date-time title: GetEnvironmentTraitUsageTimeSeriesParams required: - data - params title: GetEnvironmentTraitUsageTimeSeriesResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /integration/start/{integration_id}: get: operationId: runIntegration summary: Run integration tags: - integrationsapi parameters: - name: integration_id in: path description: integration_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/IntegrationsResponseData' params: type: object description: Input parameters title: RunIntegrationParams required: - data - params title: RunIntegrationResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /integrations: get: operationId: listIntegrations summary: List integrations tags: - integrationsapi parameters: - name: billing_only in: query schema: type: boolean - name: exclude_ids in: query schema: type: array items: type: string maxItems: 100 - name: id in: query schema: type: string - name: state in: query schema: $ref: '#/components/schemas/IntegrationState' - name: type in: query schema: $ref: '#/components/schemas/IntegrationType' - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/IntegrationsListResponseData' title: ListIntegrationsResponseData maxItems: 250 params: type: object description: Input parameters properties: billing_only: type: boolean exclude_ids: type: array items: type: string maxItems: 100 id: type: string limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" state: $ref: '#/components/schemas/IntegrationState' type: $ref: '#/components/schemas/IntegrationType' title: ListIntegrationsParams required: - data - params title: ListIntegrationsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /integrations/{type}/webhook-url: get: operationId: getIntegrationWebhookUrl summary: Get integration webhook url tags: - integrationsapi parameters: - name: type in: path description: type required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/IntegrationWebhookUrlResponseData' params: type: object description: Input parameters title: GetIntegrationWebhookUrlParams required: - data - params title: GetIntegrationWebhookUrlResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /integrations/start-data-import: post: operationId: startDataImport summary: Start data import tags: - integrationsapi requestBody: content: application/json: schema: $ref: '#/components/schemas/StartDataImportRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/IntegrationsResponseData' params: type: object description: Input parameters title: StartDataImportParams required: - data - params title: StartDataImportResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /integrations/stripe/dataset-sample-v2: get: operationId: loadSampleDataSetV2 summary: Load sample data set V2 tags: - integrationsapi responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/IntegrationsDataSetResponseData' params: type: object description: Input parameters title: LoadSampleDataSetV2Params required: - data - params title: LoadSampleDataSetV2Response "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /integrations/uninstall/{integration_id}: delete: operationId: uninstallIntegration summary: Uninstall integration tags: - integrationsapi parameters: - name: integration_id in: path description: integration_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DeleteResponse' params: type: object description: Input parameters title: UninstallIntegrationParams required: - data - params title: UninstallIntegrationResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /manage-plan: post: operationId: managePlan summary: Manage plan tags: - checkout requestBody: content: application/json: schema: $ref: '#/components/schemas/ManagePlanRequest' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/ManagePlanResponseResponseData' params: type: object description: Input parameters title: ManagePlanParams required: - data - params title: ManagePlanResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /manage-plan/preview: post: operationId: previewManagePlan summary: Preview manage plan tags: - checkout requestBody: content: application/json: schema: $ref: '#/components/schemas/ManagePlanRequest' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/ManagePlanPreviewResponseResponseData' params: type: object description: Input parameters title: PreviewManagePlanParams required: - data - params title: PreviewManagePlanResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /manage-plan/subscription/cancel: post: operationId: cancelSubscription summary: Cancel subscription tags: - checkout requestBody: content: application/json: schema: $ref: '#/components/schemas/CancelSubscriptionRequest' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/ManagePlanResponseResponseData' params: type: object description: Input parameters title: CancelSubscriptionParams required: - data - params title: CancelSubscriptionResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plan-bundles: post: operationId: createPlanBundle summary: Create plan bundle tags: - planbundle requestBody: content: application/json: schema: $ref: '#/components/schemas/CreatePlanBundleRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanBundleResponseData' params: type: object description: Input parameters title: CreatePlanBundleParams required: - data - params title: CreatePlanBundleResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plan-bundles/{plan_bundle_id}: put: operationId: updatePlanBundle summary: Update plan bundle tags: - planbundle parameters: - name: plan_bundle_id in: path description: plan_bundle_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdatePlanBundleRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanBundleResponseData' params: type: object description: Input parameters title: UpdatePlanBundleParams required: - data - params title: UpdatePlanBundleResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plan-changes: get: operationId: listPlanChanges summary: List plan changes tags: - companies parameters: - name: action in: query schema: $ref: '#/components/schemas/PlanChangeAction' - name: base_plan_action in: query schema: $ref: '#/components/schemas/PlanChangeBasePlanAction' - name: company_id in: query schema: type: string - name: company_ids in: query schema: type: array items: type: string maxItems: 100 - name: plan_ids in: query schema: type: array items: type: string maxItems: 100 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/PlanChangeResponseData' title: ListPlanChangesResponseData maxItems: 250 params: type: object description: Input parameters properties: action: $ref: '#/components/schemas/PlanChangeAction' base_plan_action: $ref: '#/components/schemas/PlanChangeBasePlanAction' company_id: type: string company_ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" plan_ids: type: array items: type: string maxItems: 100 title: ListPlanChangesParams required: - data - params title: ListPlanChangesResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plan-changes/{plan_change_id}: get: operationId: getPlanChange summary: Get plan change tags: - companies parameters: - name: plan_change_id in: path description: plan_change_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanChangeResponseData' params: type: object description: Input parameters title: GetPlanChangeParams required: - data - params title: GetPlanChangeResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plan-entitlements: get: operationId: listPlanEntitlements summary: List plan entitlements tags: - entitlements parameters: - name: feature_id in: query description: Filter plan entitlements by a single feature ID (starting with feat_) schema: type: string description: Filter plan entitlements by a single feature ID (starting with feat_) - name: feature_ids in: query description: Filter plan entitlements by multiple feature IDs (starting with feat_) schema: type: array description: Filter plan entitlements by multiple feature IDs (starting with feat_) items: type: string maxItems: 100 - name: ids in: query description: Filter plan entitlements by multiple plan entitlement IDs (starting with pltl_) schema: type: array description: Filter plan entitlements by multiple plan entitlement IDs (starting with pltl_) items: type: string maxItems: 100 - name: plan_id in: query description: Filter plan entitlements by a single plan ID (starting with plan_) schema: type: string description: Filter plan entitlements by a single plan ID (starting with plan_) - name: plan_ids in: query description: Filter plan entitlements by multiple plan IDs (starting with plan_) schema: type: array description: Filter plan entitlements by multiple plan IDs (starting with plan_) items: type: string maxItems: 100 - name: plan_version_id in: query description: Filter plan entitlements by a single plan version ID (starting with plvr_) schema: type: string description: Filter plan entitlements by a single plan version ID (starting with plvr_) - name: plan_version_ids in: query description: Filter plan entitlements by multiple plan version IDs (starting with plvr_) schema: type: array description: Filter plan entitlements by multiple plan version IDs (starting with plvr_) items: type: string maxItems: 100 - name: q in: query description: Search for plan entitlements by feature or company name schema: type: string description: Search for plan entitlements by feature or company name - name: with_metered_products in: query description: Filter plan entitlements only with metered products schema: type: boolean description: Filter plan entitlements only with metered products - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/PlanEntitlementResponseData' title: ListPlanEntitlementsResponseData maxItems: 250 params: type: object description: Input parameters properties: feature_id: type: string description: Filter plan entitlements by a single feature ID (starting with feat_) feature_ids: type: array description: Filter plan entitlements by multiple feature IDs (starting with feat_) items: type: string maxItems: 100 ids: type: array description: Filter plan entitlements by multiple plan entitlement IDs (starting with pltl_) items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" plan_id: type: string description: Filter plan entitlements by a single plan ID (starting with plan_) plan_ids: type: array description: Filter plan entitlements by multiple plan IDs (starting with plan_) items: type: string maxItems: 100 plan_version_id: type: string description: Filter plan entitlements by a single plan version ID (starting with plvr_) plan_version_ids: type: array description: Filter plan entitlements by multiple plan version IDs (starting with plvr_) items: type: string maxItems: 100 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 title: ListPlanEntitlementsParams required: - data - params title: ListPlanEntitlementsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' post: operationId: createPlanEntitlement summary: Create plan entitlement tags: - entitlements requestBody: content: application/json: schema: $ref: '#/components/schemas/CreatePlanEntitlementRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanEntitlementResponseData' params: type: object description: Input parameters title: CreatePlanEntitlementParams required: - data - params title: CreatePlanEntitlementResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plan-entitlements/{plan_entitlement_id}: get: operationId: getPlanEntitlement summary: Get plan entitlement tags: - entitlements parameters: - name: plan_entitlement_id in: path description: plan_entitlement_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanEntitlementResponseData' params: type: object description: Input parameters title: GetPlanEntitlementParams required: - data - params title: GetPlanEntitlementResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' put: operationId: updatePlanEntitlement summary: Update plan entitlement tags: - entitlements parameters: - name: plan_entitlement_id in: path description: plan_entitlement_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdatePlanEntitlementRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanEntitlementResponseData' params: type: object description: Input parameters title: UpdatePlanEntitlementParams required: - data - params title: UpdatePlanEntitlementResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' delete: operationId: deletePlanEntitlement summary: Delete plan entitlement tags: - entitlements parameters: - name: plan_entitlement_id in: path description: plan_entitlement_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DeleteResponse' params: type: object description: Input parameters title: DeletePlanEntitlementParams required: - data - params title: DeletePlanEntitlementResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plan-entitlements/billing-linked: post: operationId: upsertPlanEntitlementForBillingProduct summary: Upsert plan entitlement for billing product tags: - entitlements requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateBillingLinkedPlanEntitlementRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanEntitlementResponseData' params: type: object description: Input parameters title: UpsertPlanEntitlementForBillingProductParams required: - data - params title: UpsertPlanEntitlementForBillingProductResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plan-entitlements/count: get: operationId: countPlanEntitlements summary: Count plan entitlements tags: - entitlements parameters: - name: feature_id in: query description: Filter plan entitlements by a single feature ID (starting with feat_) schema: type: string description: Filter plan entitlements by a single feature ID (starting with feat_) - name: feature_ids in: query description: Filter plan entitlements by multiple feature IDs (starting with feat_) schema: type: array description: Filter plan entitlements by multiple feature IDs (starting with feat_) items: type: string maxItems: 100 - name: ids in: query description: Filter plan entitlements by multiple plan entitlement IDs (starting with pltl_) schema: type: array description: Filter plan entitlements by multiple plan entitlement IDs (starting with pltl_) items: type: string maxItems: 100 - name: plan_id in: query description: Filter plan entitlements by a single plan ID (starting with plan_) schema: type: string description: Filter plan entitlements by a single plan ID (starting with plan_) - name: plan_ids in: query description: Filter plan entitlements by multiple plan IDs (starting with plan_) schema: type: array description: Filter plan entitlements by multiple plan IDs (starting with plan_) items: type: string maxItems: 100 - name: plan_version_id in: query description: Filter plan entitlements by a single plan version ID (starting with plvr_) schema: type: string description: Filter plan entitlements by a single plan version ID (starting with plvr_) - name: plan_version_ids in: query description: Filter plan entitlements by multiple plan version IDs (starting with plvr_) schema: type: array description: Filter plan entitlements by multiple plan version IDs (starting with plvr_) items: type: string maxItems: 100 - name: q in: query description: Search for plan entitlements by feature or company name schema: type: string description: Search for plan entitlements by feature or company name - name: with_metered_products in: query description: Filter plan entitlements only with metered products schema: type: boolean description: Filter plan entitlements only with metered products - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: feature_id: type: string description: Filter plan entitlements by a single feature ID (starting with feat_) feature_ids: type: array description: Filter plan entitlements by multiple feature IDs (starting with feat_) items: type: string maxItems: 100 ids: type: array description: Filter plan entitlements by multiple plan entitlement IDs (starting with pltl_) items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" plan_id: type: string description: Filter plan entitlements by a single plan ID (starting with plan_) plan_ids: type: array description: Filter plan entitlements by multiple plan IDs (starting with plan_) items: type: string maxItems: 100 plan_version_id: type: string description: Filter plan entitlements by a single plan version ID (starting with plvr_) plan_version_ids: type: array description: Filter plan entitlements by multiple plan version IDs (starting with plvr_) items: type: string maxItems: 100 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 title: CountPlanEntitlementsParams required: - data - params title: CountPlanEntitlementsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plan-entitlements/duplicate: post: operationId: duplicatePlanEntitlements summary: Duplicate plan entitlements tags: - entitlements requestBody: content: application/json: schema: $ref: '#/components/schemas/DuplicatePlanEntitlementsRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DuplicatePlanEntitlementsResponseResponseData' params: type: object description: Input parameters title: DuplicatePlanEntitlementsParams required: - data - params title: DuplicatePlanEntitlementsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plan-groups: get: operationId: getPlanGroup summary: Get plan group tags: - plangroups parameters: - name: include_company_counts in: query schema: type: boolean responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanGroupDetailResponseData' params: type: object description: Input parameters properties: include_company_counts: type: boolean title: GetPlanGroupParams required: - data - params title: GetPlanGroupResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' post: operationId: createPlanGroup summary: Create plan group tags: - plangroups requestBody: content: application/json: schema: $ref: '#/components/schemas/CreatePlanGroupRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanGroupResponseData' params: type: object description: Input parameters title: CreatePlanGroupParams required: - data - params title: CreatePlanGroupResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plan-groups/{plan_group_id}: put: operationId: updatePlanGroup summary: Update plan group tags: - plangroups parameters: - name: plan_group_id in: path description: plan_group_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdatePlanGroupRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanGroupResponseData' params: type: object description: Input parameters title: UpdatePlanGroupParams required: - data - params title: UpdatePlanGroupResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plan-traits: get: operationId: listPlanTraits summary: List plan traits tags: - companies parameters: - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: plan_id in: query schema: type: string - name: trait_id in: query schema: type: string - name: trait_ids in: query schema: type: array items: type: string maxItems: 100 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/PlanTraitResponseData' title: ListPlanTraitsResponseData maxItems: 250 params: type: object description: Input parameters properties: ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" plan_id: type: string trait_id: type: string trait_ids: type: array items: type: string maxItems: 100 title: ListPlanTraitsParams required: - data - params title: ListPlanTraitsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plan-traits/{plan_trait_id}: get: operationId: getPlanTrait summary: Get plan trait tags: - companies parameters: - name: plan_trait_id in: path description: plan_trait_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanTraitResponseData' params: type: object description: Input parameters title: GetPlanTraitParams required: - data - params title: GetPlanTraitResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plan-traits/bulk: post: operationId: updatePlanTraitsBulk summary: Update plan traits bulk tags: - companies requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdatePlanTraitBulkRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/PlanTraitResponseData' title: UpdatePlanTraitsBulkResponseData maxItems: 250 params: type: object description: Input parameters title: UpdatePlanTraitsBulkParams required: - data - params title: UpdatePlanTraitsBulkResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plan-traits/count: get: operationId: countPlanTraits summary: Count plan traits tags: - companies parameters: - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: plan_id in: query schema: type: string - name: trait_id in: query schema: type: string - name: trait_ids in: query schema: type: array items: type: string maxItems: 100 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" plan_id: type: string trait_id: type: string trait_ids: type: array items: type: string maxItems: 100 title: CountPlanTraitsParams required: - data - params title: CountPlanTraitsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plan-version-company-migrations: get: operationId: listCompanyMigrations summary: List company migrations tags: - planmigrations parameters: - name: migration_id in: query schema: type: string - name: q in: query schema: type: string maxLength: 512 - name: status in: query schema: $ref: '#/components/schemas/PlanVersionCompanyMigrationStatus' - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/PlanVersionCompanyMigrationResponseData' title: ListCompanyMigrationsResponseData maxItems: 250 params: type: object description: Input parameters properties: limit: type: integer description: Page limit (default 100) format: int64 example: "100" migration_id: type: string offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string maxLength: 512 status: $ref: '#/components/schemas/PlanVersionCompanyMigrationStatus' title: ListCompanyMigrationsParams required: - data - params title: ListCompanyMigrationsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plan-version-company-migrations/count: get: operationId: countCompanyMigrations summary: Count company migrations tags: - planmigrations parameters: - name: migration_id in: query schema: type: string - name: q in: query schema: type: string maxLength: 512 - name: status in: query schema: $ref: '#/components/schemas/PlanVersionCompanyMigrationStatus' - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: limit: type: integer description: Page limit (default 100) format: int64 example: "100" migration_id: type: string offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string maxLength: 512 status: $ref: '#/components/schemas/PlanVersionCompanyMigrationStatus' title: CountCompanyMigrationsParams required: - data - params title: CountCompanyMigrationsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plan-version-migrations: get: operationId: listMigrations summary: List migrations tags: - planmigrations parameters: - name: plan_version_id in: query schema: type: string - name: status in: query schema: $ref: '#/components/schemas/PlanVersionMigrationStatus' - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/PlanVersionMigrationResponseData' title: ListMigrationsResponseData maxItems: 250 params: type: object description: Input parameters properties: limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" plan_version_id: type: string status: $ref: '#/components/schemas/PlanVersionMigrationStatus' title: ListMigrationsParams required: - data - params title: ListMigrationsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plan-version-migrations/{plan_version_migration_id}: get: operationId: getMigration summary: Get migration tags: - planmigrations parameters: - name: plan_version_migration_id in: path description: plan_version_migration_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanVersionMigrationResponseData' params: type: object description: Input parameters title: GetMigrationParams required: - data - params title: GetMigrationResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plan-version-migrations/count: get: operationId: countMigrations summary: Count migrations tags: - planmigrations parameters: - name: plan_version_id in: query schema: type: string - name: status in: query schema: $ref: '#/components/schemas/PlanVersionMigrationStatus' - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" plan_version_id: type: string status: $ref: '#/components/schemas/PlanVersionMigrationStatus' title: CountMigrationsParams required: - data - params title: CountMigrationsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plans: get: operationId: listPlans summary: List plans tags: - plans parameters: - name: company_id in: query schema: type: string - name: exclude_company_scoped in: query description: Exclude plans that are scoped to a company (custom plans assigned to a company) schema: type: boolean description: Exclude plans that are scoped to a company (custom plans assigned to a company) - name: for_fallback_plan in: query description: Filter for plans valid as fallback plans (not linked to billing) schema: type: boolean description: Filter for plans valid as fallback plans (not linked to billing) - name: for_initial_plan in: query description: Filter for plans valid as initial plans (not linked to billing, free, or auto-cancelling trial) schema: type: boolean description: Filter for plans valid as initial plans (not linked to billing, free, or auto-cancelling trial) - name: for_trial_expiry_plan in: query description: Filter for plans valid as trial expiry plans (not linked to billing or free) schema: type: boolean description: Filter for plans valid as trial expiry plans (not linked to billing or free) - name: has_product_id in: query description: Filter out plans that do not have a billing product ID schema: type: boolean description: Filter out plans that do not have a billing product ID - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: include_draft_versions in: query description: Include billing settings from draft versions for plans which have draft version schema: type: boolean description: Include billing settings from draft versions for plans which have draft version - name: plan_type in: query description: Filter by plan type schema: allOf: - $ref: '#/components/schemas/PlanType' description: Filter by plan type - name: q in: query schema: type: string - name: scoped_to_company_id in: query description: Filter plans scoped to a specific company (custom plans) schema: type: string description: Filter plans scoped to a specific company (custom plans) - name: without_entitlement_for in: query description: Filter out plans that already have a plan entitlement for the specified feature ID schema: type: string description: Filter out plans that already have a plan entitlement for the specified feature ID - name: without_paid_product_id in: query description: Filter out plans that have a paid billing product ID schema: type: boolean description: Filter out plans that have a paid billing product ID - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/PlanDetailResponseData' title: ListPlansResponseData maxItems: 250 params: type: object description: Input parameters properties: company_id: type: string 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 maxItems: 100 include_draft_versions: type: boolean description: Include billing settings from draft versions for plans which have draft version limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" plan_type: allOf: - $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) 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 title: ListPlansParams required: - data - params title: ListPlansResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' post: operationId: createPlan summary: Create plan tags: - plans requestBody: content: application/json: schema: $ref: '#/components/schemas/CreatePlanRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanDetailResponseData' params: type: object description: Input parameters title: CreatePlanParams required: - data - params title: CreatePlanResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plans/{plan_id}: get: operationId: getPlan 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 schema: type: string description: Fetch billing settings for a specific plan version responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanDetailResponseData' params: type: object description: Input parameters properties: plan_version_id: type: string description: Fetch billing settings for a specific plan version title: GetPlanParams required: - data - params title: GetPlanResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' put: operationId: updatePlan summary: Update plan tags: - plans parameters: - name: plan_id in: path description: plan_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdatePlanRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanDetailResponseData' params: type: object description: Input parameters title: UpdatePlanParams required: - data - params title: UpdatePlanResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' delete: operationId: deletePlan summary: Delete plan tags: - plans parameters: - name: plan_id in: path description: plan_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DeleteResponse' params: type: object description: Input parameters title: DeletePlanParams required: - data - params title: DeletePlanResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plans/{plan_id}/billing_products: put: operationId: upsertBillingProductPlan summary: Upsert billing product plan tags: - plans parameters: - name: plan_id in: path description: plan_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpsertBillingProductRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingProductPlanResponseData' params: type: object description: Input parameters title: UpsertBillingProductPlanParams required: - data - params title: UpsertBillingProductPlanResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plans/billing-linked: post: operationId: upsertPlanForBillingProduct summary: Upsert plan for billing product tags: - plans requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateBillingLinkedPlanRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanDetailResponseData' params: type: object description: Input parameters title: UpsertPlanForBillingProductParams required: - data - params title: UpsertPlanForBillingProductResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plans/billing-product-match-companies: get: operationId: listBillingProductMatchCompanies summary: List billing product match companies tags: - plans parameters: - name: plan_id in: query description: The plan ID to find billing product match companies for required: true schema: type: string description: The plan ID to find billing product match companies for - name: q in: query description: Search for companies by name, keys or string traits schema: type: string description: Search for companies by name, keys or string traits maxLength: 512 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/CompanyDetailResponseData' title: ListBillingProductMatchCompaniesResponseData maxItems: 250 params: type: object description: Input parameters properties: limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" plan_id: type: string description: The plan ID to find billing product match companies for q: type: string description: Search for companies by name, keys or string traits maxLength: 512 title: ListBillingProductMatchCompaniesParams required: - data - params title: ListBillingProductMatchCompaniesResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plans/billing-product-match-companies/count: get: operationId: countBillingProductMatchCompanies summary: Count billing product match companies tags: - plans parameters: - name: plan_id in: query description: The plan ID to find billing product match companies for required: true schema: type: string description: The plan ID to find billing product match companies for - name: q in: query description: Search for companies by name, keys or string traits schema: type: string description: Search for companies by name, keys or string traits maxLength: 512 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" plan_id: type: string description: The plan ID to find billing product match companies for q: type: string description: Search for companies by name, keys or string traits maxLength: 512 title: CountBillingProductMatchCompaniesParams required: - data - params title: CountBillingProductMatchCompaniesResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plans/count: get: operationId: countPlans summary: Count plans tags: - plans parameters: - name: company_id in: query schema: type: string - name: exclude_company_scoped in: query description: Exclude plans that are scoped to a company (custom plans assigned to a company) schema: type: boolean description: Exclude plans that are scoped to a company (custom plans assigned to a company) - name: for_fallback_plan in: query description: Filter for plans valid as fallback plans (not linked to billing) schema: type: boolean description: Filter for plans valid as fallback plans (not linked to billing) - name: for_initial_plan in: query description: Filter for plans valid as initial plans (not linked to billing, free, or auto-cancelling trial) schema: type: boolean description: Filter for plans valid as initial plans (not linked to billing, free, or auto-cancelling trial) - name: for_trial_expiry_plan in: query description: Filter for plans valid as trial expiry plans (not linked to billing or free) schema: type: boolean description: Filter for plans valid as trial expiry plans (not linked to billing or free) - name: has_product_id in: query description: Filter out plans that do not have a billing product ID schema: type: boolean description: Filter out plans that do not have a billing product ID - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: include_draft_versions in: query description: Include billing settings from draft versions for plans which have draft version schema: type: boolean description: Include billing settings from draft versions for plans which have draft version - name: plan_type in: query description: Filter by plan type schema: allOf: - $ref: '#/components/schemas/PlanType' description: Filter by plan type - name: q in: query schema: type: string - name: scoped_to_company_id in: query description: Filter plans scoped to a specific company (custom plans) schema: type: string description: Filter plans scoped to a specific company (custom plans) - name: without_entitlement_for in: query description: Filter out plans that already have a plan entitlement for the specified feature ID schema: type: string description: Filter out plans that already have a plan entitlement for the specified feature ID - name: without_paid_product_id in: query description: Filter out plans that have a paid billing product ID schema: type: boolean description: Filter out plans that have a paid billing product ID - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: company_id: type: string 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 maxItems: 100 include_draft_versions: type: boolean description: Include billing settings from draft versions for plans which have draft version limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" plan_type: allOf: - $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) 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 title: CountPlansParams required: - data - params title: CountPlansResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plans/issues: get: operationId: listPlanIssues summary: List plan issues tags: - plans parameters: - name: plan_id in: query required: true schema: type: string - name: plan_version_id in: query schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/PlanIssueResponseData' title: ListPlanIssuesResponseData maxItems: 250 params: type: object description: Input parameters properties: plan_id: type: string plan_version_id: type: string title: ListPlanIssuesParams required: - data - params title: ListPlanIssuesResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plans/version/{plan_id}: delete: operationId: deletePlanVersion summary: Delete plan version tags: - plans parameters: - name: plan_id in: path description: plan_id required: true schema: type: string - name: promote_archived_version in: query schema: type: boolean responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DeleteResponse' params: type: object description: Input parameters properties: promote_archived_version: type: boolean title: DeletePlanVersionParams required: - data - params title: DeletePlanVersionResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /plans/version/{plan_id}/publish: put: operationId: publishPlanVersion summary: Publish plan version tags: - plans parameters: - name: plan_id in: path description: plan_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/PublishPlanVersionRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanVersionResponseData' params: type: object description: Input parameters title: PublishPlanVersionParams required: - data - params title: PublishPlanVersionResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /public/plans: get: operationId: getPublicPlans summary: Get public plans tags: - componentspublic responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PublicPlansResponseData' params: type: object description: Input parameters title: GetPublicPlansParams required: - data - params title: GetPublicPlansResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /quickstart: post: operationId: quickstart summary: Quickstart tags: - accounts responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/QuickstartResp' params: type: object description: Input parameters title: QuickstartParams required: - data - params title: QuickstartResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /scheduled-checkout: get: operationId: listScheduledCheckouts summary: List scheduled checkouts tags: - scheduledcheckout parameters: - name: company_id in: query schema: type: string - name: status in: query schema: $ref: '#/components/schemas/ScheduledCheckoutStatus' - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/ScheduledCheckoutResponseData' title: ListScheduledCheckoutsResponseData maxItems: 250 params: type: object description: Input parameters properties: company_id: type: string limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" status: $ref: '#/components/schemas/ScheduledCheckoutStatus' title: ListScheduledCheckoutsParams required: - data - params title: ListScheduledCheckoutsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' post: operationId: createScheduledCheckout summary: Create scheduled checkout tags: - scheduledcheckout requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateScheduledCheckoutRequest' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/ScheduledCheckoutResponseData' params: type: object description: Input parameters title: CreateScheduledCheckoutParams required: - data - params title: CreateScheduledCheckoutResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /scheduled-checkout/{scheduled_checkout_id}: get: operationId: getScheduledCheckout summary: Get scheduled checkout tags: - scheduledcheckout parameters: - name: scheduled_checkout_id in: path description: scheduled_checkout_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/ScheduledCheckoutResponseData' params: type: object description: Input parameters title: GetScheduledCheckoutParams required: - data - params title: GetScheduledCheckoutResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' put: operationId: updateScheduledCheckout summary: Update scheduled checkout tags: - scheduledcheckout parameters: - name: scheduled_checkout_id in: path description: scheduled_checkout_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateScheduledCheckoutRequest' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/ScheduledCheckoutResponseData' params: type: object description: Input parameters title: UpdateScheduledCheckoutParams required: - data - params title: UpdateScheduledCheckoutResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /segment-integration: get: operationId: getSegmentIntegrationStatus summary: Get segment integration status tags: - events responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/SegmentStatusResp' params: type: object description: Input parameters title: GetSegmentIntegrationStatusParams required: - data - params title: GetSegmentIntegrationStatusResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /subscription/{subscription_id}/edit-trial-end: put: operationId: updateCustomerSubscriptionTrialEnd summary: Update customer subscription trial end tags: - checkout parameters: - name: subscription_id in: path description: subscription_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateTrialEndRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/BillingSubscriptionView' params: type: object description: Input parameters title: UpdateCustomerSubscriptionTrialEndParams required: - data - params title: UpdateCustomerSubscriptionTrialEndResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /temporary-access-tokens: post: operationId: issueTemporaryAccessToken summary: Issue temporary access token tags: - accesstokens requestBody: content: application/json: schema: $ref: '#/components/schemas/IssueTemporaryAccessTokenRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/IssueTemporaryAccessTokenResponseData' params: type: object description: Input parameters title: IssueTemporaryAccessTokenParams required: - data - params title: IssueTemporaryAccessTokenResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /usage-by-company: get: operationId: getFeatureUsageByCompany summary: Get feature usage by company tags: - entitlements parameters: - name: keys in: query description: Key/value pairs required: true schema: additionalProperties: type: string type: object responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/FeatureUsageDetailResponseData' params: type: object description: Input parameters properties: keys: additionalProperties: type: string type: object title: GetFeatureUsageByCompanyParams required: - data - params title: GetFeatureUsageByCompanyResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /user-traits: post: operationId: upsertUserTrait summary: Upsert user trait tags: - companies requestBody: content: application/json: schema: $ref: '#/components/schemas/UpsertTraitRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/UserDetailResponseData' params: type: object description: Input parameters title: UpsertUserTraitParams required: - data - params title: UpsertUserTraitResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /users: get: operationId: listUsers summary: List users tags: - companies parameters: - name: company_id in: query description: Filter users by company ID (starts with comp_) schema: type: string description: Filter users by company ID (starts with comp_) - name: ids in: query description: Filter users by multiple user IDs (starts with user_) schema: type: array description: Filter users by multiple user IDs (starts with user_) items: type: string maxItems: 100 - name: plan_id in: query description: Filter users by plan ID (starts with plan_) schema: type: string description: Filter users by plan ID (starts with plan_) - name: q in: query description: Search for users by name, keys or string traits schema: type: string description: Search for users by name, keys or string traits maxLength: 512 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/UserDetailResponseData' title: ListUsersResponseData maxItems: 250 params: type: object description: Input parameters properties: company_id: type: string description: Filter users by company ID (starts with comp_) ids: type: array description: Filter users by multiple user IDs (starts with user_) items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "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 maxLength: 512 title: ListUsersParams required: - data - params title: ListUsersResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' post: operationId: upsertUser summary: Upsert user tags: - companies requestBody: content: application/json: schema: $ref: '#/components/schemas/UpsertUserRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/UserDetailResponseData' params: type: object description: Input parameters title: UpsertUserParams required: - data - params title: UpsertUserResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /users/{user_id}: get: operationId: getUser summary: Get user tags: - companies parameters: - name: user_id in: path description: user_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/UserDetailResponseData' params: type: object description: Input parameters title: GetUserParams required: - data - params title: GetUserResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' delete: operationId: deleteUser summary: Delete user tags: - companies parameters: - name: user_id in: path description: user_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DeleteResponse' params: type: object description: Input parameters title: DeleteUserParams required: - data - params title: DeleteUserResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /users/count: get: operationId: countUsers summary: Count users tags: - companies parameters: - name: company_id in: query description: Filter users by company ID (starts with comp_) schema: type: string description: Filter users by company ID (starts with comp_) - name: ids in: query description: Filter users by multiple user IDs (starts with user_) schema: type: array description: Filter users by multiple user IDs (starts with user_) items: type: string maxItems: 100 - name: plan_id in: query description: Filter users by plan ID (starts with plan_) schema: type: string description: Filter users by plan ID (starts with plan_) - name: q in: query description: Search for users by name, keys or string traits schema: type: string description: Search for users by name, keys or string traits maxLength: 512 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: company_id: type: string description: Filter users by company ID (starts with comp_) ids: type: array description: Filter users by multiple user IDs (starts with user_) items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "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 maxLength: 512 title: CountUsersParams required: - data - params title: CountUsersResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /users/create: post: operationId: createUser summary: Create user tags: - companies requestBody: content: application/json: schema: $ref: '#/components/schemas/UpsertUserRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/UserDetailResponseData' params: type: object description: Input parameters title: CreateUserParams required: - data - params title: CreateUserResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /users/delete: post: operationId: deleteUserByKeys summary: Delete user by keys tags: - companies requestBody: content: application/json: schema: $ref: '#/components/schemas/KeysRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/UserResponseData' params: type: object description: Input parameters title: DeleteUserByKeysParams required: - data - params title: DeleteUserByKeysResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /users/lookup: get: operationId: lookupUser summary: Lookup user tags: - companies parameters: - name: keys in: query description: Key/value pairs required: true schema: additionalProperties: type: string type: object responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/UserDetailResponseData' params: type: object description: Input parameters properties: keys: additionalProperties: type: string type: object title: LookupUserParams required: - data - params title: LookupUserResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /v2/billing/credits/ledger: get: operationId: listCreditEventLedger summary: List credit event ledger tags: - credits parameters: - name: billing_credit_id in: query schema: type: string - name: company_id in: query required: true schema: type: string - name: end_time in: query schema: type: string - name: event_type in: query schema: $ref: '#/components/schemas/CreditEventType' - name: feature_id in: query schema: type: string - name: start_time in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/CreditEventLedgerResponseData' title: ListCreditEventLedgerResponseData maxItems: 250 params: type: object description: Input parameters properties: billing_credit_id: type: string company_id: type: string end_time: type: string event_type: $ref: '#/components/schemas/CreditEventType' feature_id: type: string limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" start_time: type: string title: ListCreditEventLedgerParams required: - data - params title: ListCreditEventLedgerResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /v2/billing/credits/ledger/count: get: operationId: countCreditEventLedger summary: Count credit event ledger tags: - credits parameters: - name: billing_credit_id in: query schema: type: string - name: company_id in: query required: true schema: type: string - name: end_time in: query schema: type: string - name: event_type in: query schema: $ref: '#/components/schemas/CreditEventType' - name: feature_id in: query schema: type: string - name: start_time in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: billing_credit_id: type: string company_id: type: string end_time: type: string event_type: $ref: '#/components/schemas/CreditEventType' feature_id: type: string limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" start_time: type: string title: CountCreditEventLedgerParams required: - data - params title: CountCreditEventLedgerResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /webhook-events: get: operationId: listWebhookEvents summary: List webhook events tags: - webhooks parameters: - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: q in: query schema: type: string - name: webhook_id in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/WebhookEventDetailResponseData' title: ListWebhookEventsResponseData maxItems: 250 params: type: object description: Input parameters properties: ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string webhook_id: type: string title: ListWebhookEventsParams required: - data - params title: ListWebhookEventsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /webhook-events/{webhook_event_id}: get: operationId: getWebhookEvent summary: Get webhook event tags: - webhooks parameters: - name: webhook_event_id in: path description: webhook_event_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/WebhookEventDetailResponseData' params: type: object description: Input parameters title: GetWebhookEventParams required: - data - params title: GetWebhookEventResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /webhook-events/count: get: operationId: countWebhookEvents summary: Count webhook events tags: - webhooks parameters: - name: ids in: query schema: type: array items: type: string maxItems: 100 - name: q in: query schema: type: string - name: webhook_id in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string webhook_id: type: string title: CountWebhookEventsParams required: - data - params title: CountWebhookEventsResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /webhooks: get: operationId: listWebhooks summary: List webhooks tags: - webhooks parameters: - name: q in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/WebhookResponseData' title: ListWebhooksResponseData maxItems: 250 params: type: object description: Input parameters properties: limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string title: ListWebhooksParams required: - data - params title: ListWebhooksResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' post: operationId: createWebhook summary: Create webhook tags: - webhooks requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateWebhookRequestBody' required: true responses: "201": description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/WebhookResponseData' params: type: object description: Input parameters title: CreateWebhookParams required: - data - params title: CreateWebhookResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /webhooks/{webhook_id}: get: operationId: getWebhook summary: Get webhook tags: - webhooks parameters: - name: webhook_id in: path description: webhook_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/WebhookResponseData' params: type: object description: Input parameters title: GetWebhookParams required: - data - params title: GetWebhookResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' put: operationId: updateWebhook summary: Update webhook tags: - webhooks parameters: - name: webhook_id in: path description: webhook_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateWebhookRequestBody' required: true responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/WebhookResponseData' params: type: object description: Input parameters title: UpdateWebhookParams required: - data - params title: UpdateWebhookResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' delete: operationId: deleteWebhook summary: Delete webhook tags: - webhooks parameters: - name: webhook_id in: path description: webhook_id required: true schema: type: string responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DeleteResponse' params: type: object description: Input parameters title: DeleteWebhookParams required: - data - params title: DeleteWebhookResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /webhooks/count: get: operationId: countWebhooks summary: Count webhooks tags: - webhooks parameters: - name: q in: query schema: type: string - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: "100" - name: offset in: query description: Page offset (default 0) schema: type: integer description: Page offset (default 0) format: int64 example: "0" responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CountResponse' params: type: object description: Input parameters properties: limit: type: integer description: Page limit (default 100) format: int64 example: "100" offset: type: integer description: Page offset (default 0) format: int64 example: "0" q: type: string title: CountWebhooksParams required: - data - params title: CountWebhooksResponse "400": $ref: '#/components/responses/BadRequest' "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' /whoami: get: operationId: getWhoAmI summary: Get who am I tags: - accounts responses: "200": description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/WhoAmIResponseData' params: type: object description: Input parameters title: GetWhoAmIParams required: - data - params title: GetWhoAmIResponse "401": $ref: '#/components/responses/Unauthorized' "403": $ref: '#/components/responses/Forbidden' "404": $ref: '#/components/responses/NotFound' "500": $ref: '#/components/responses/ServerError' tags: - name: accesstokens - name: accounts - name: billing - name: checkout - name: companies - name: components - name: componentspublic - name: credits - name: dataexports - name: entitlements - name: events - name: features - name: insights - name: integrationsapi - name: planbundle - name: plangroups - name: planmigrations - name: plans - name: scheduledcheckout - name: webhooks