info: title: Schematic API version: '0.1' description: Schematic API x-rules-engine-schema-version: v5b3e7220 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: - companies_edit - company_users_edit - components_edit - custom_plans_edit - data_exports_edit - features_edit - flag_rules_edit - flags_edit - overrides_edit - plan_billing_edit - plan_entitlements_edit - plan_versions_edit - plans_edit - webhooks_edit - webhooks_reveal_secret AccountMemberResponseData: type: object properties: created_at: type: string format: date-time email: type: string nullable: true first_name: type: string nullable: true id: type: string image_url: type: string nullable: true last_name: 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 AcquireCreditLeaseRequestBody: type: object properties: company_id: type: string credit_type_id: type: string expires_at: type: string format: date-time nullable: true requested_amount: type: number format: double required: - company_id - credit_type_id - requested_amount title: AcquireCreditLeaseRequestBody 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 integration: $ref: '#/components/schemas/ApiKeyIntegrationResponseData' last_used_at: type: string format: date-time nullable: true name: type: string rate_limit_percent: type: integer format: int64 nullable: true 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 ApiKeyIntegrationResponseData: type: object properties: id: type: string state: $ref: '#/components/schemas/IntegrationState' type: $ref: '#/components/schemas/IntegrationType' required: - id - state - type title: ApiKeyIntegrationResponseData 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 integration: $ref: '#/components/schemas/ApiKeyIntegrationResponseData' last_used_at: type: string format: date-time nullable: true name: type: string rate_limit_percent: type: integer format: int64 nullable: true 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 AuditLogExportMetadata: type: object properties: actor_type: type: string description: Restrict the export to audit log entries from this actor type nullable: true end_time: type: string description: >- Restrict the export to audit log entries that started before this time format: date-time nullable: true export_type: type: string description: 'Discriminator: always "audit-log" for this variant' enum: - audit-log notification_email_recipient_email_addresses: type: array description: >- Account member emails to notify when the export completes; empty means the artifact is only retrievable via the API items: type: string maxItems: 100 q: type: string description: Free-text search over audit log entries nullable: true start_time: type: string description: >- Restrict the export to audit log entries that started at or after this time format: date-time nullable: true required: - export_type title: AuditLogExportMetadata AuditLogListResponseData: type: object properties: actor_type: $ref: '#/components/schemas/ActorType' api_key: $ref: '#/components/schemas/ApiKeyResponseData' 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: $ref: '#/components/schemas/ApiKeyResponseData' 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 format: double 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 BillingCreditAutoTopupAvailability: type: string enum: - 'off' - automatic - user_controlled 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 - rollover 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: number format: double quantity_remaining: type: number format: double quantity_used: type: number format: double renewal_enabled: type: boolean renewal_period: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetCadence' nullable: true reserved: type: number format: double nullable: true settled: type: number format: double nullable: true source_grant_id: type: string description: >- For rollover grants, the ID of the source grant that this grant rolled from. 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: - customer_archived - expired - integration_uninstalled - license_retired - manual - plan_change - plan_period_reset - reconciled BillingCreditLedgerAuthority: type: string enum: - schematic_authoritative - external_mirror - external_rated 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 ledger_authority: $ref: '#/components/schemas/BillingCreditLedgerAuthority' 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 - ledger_authority - 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 - every_6_months - monthly - quarterly - 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_availability: $ref: '#/components/schemas/BillingCreditAutoTopupAvailability' auto_topup_enabled: type: boolean description: Derived from auto_topup_availability; use that instead. deprecated: 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 auto_topup_self_service: type: boolean description: Derived from auto_topup_availability; use that instead. deprecated: true auto_topup_threshold_credits: type: integer format: int64 nullable: true auto_topup_threshold_percent: type: integer format: int64 nullable: true can_buy_bundles: type: boolean description: >- Whether buyers can purchase one-time credit bundles on this grant, independent of auto top-up availability. 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 license_id: type: string description: >- The license whose quantity scales this grant. Set only when scaling is per_license. nullable: true 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 rollover_percentage: type: integer description: >- Percentage of unused credits that carry over when this grant resets. Only meaningful when reset_type is plan_period. format: int64 scaling: allOf: - $ref: '#/components/schemas/PlanCreditGrantScaling' description: >- Whether the grant is a fixed amount per company, or issued once per license the company holds. updated_at: type: string format: date-time required: - id - credit_id - plan_id - plan_name - credit_amount - credit_name - scaling - auto_topup_availability - can_buy_bundles - auto_topup_enabled - auto_topup_self_service - rollover_percentage - 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' interval_count: type: integer format: int64 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 - interval_count - 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' interval_count: type: integer format: int64 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 - interval_count - 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 format: double 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 format: double subscription_count: type: integer format: int64 updated_at: type: string format: date-time required: - account_id - created_at - environment_id - external_id - is_active - name - price - 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 interval_count: type: integer format: int64 nullable: true 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 format: double 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 billing_strategy: $ref: '#/components/schemas/BillingStrategy' 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 - billing_strategy - 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' interval_count: type: integer format: int64 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 - interval_count - 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 format: double price_decimal: type: string nullable: true product_id: type: string provider_type: $ref: '#/components/schemas/BillingProviderType' quantity: type: number format: double updated_at: type: string format: date-time required: - account_id - created_at - environment_id - external_id - is_active - name - price - product_id - provider_type - quantity - updated_at title: BillingProductResponseData BillingProviderType: type: string enum: - metronome - orb - schematic - stripe BillingStrategy: type: string enum: - schematic_managed - provider_managed - no_billing 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 format: double 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 BindCatalogRequestBody: type: object properties: catalog_id: type: string nullable: true title: BindCatalogRequestBody 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 CatalogConfigOrderedBundle: type: object properties: bundle_id: type: string required: - bundle_id title: CatalogConfigOrderedBundle CatalogConfigOrderedBundleResponseData: type: object properties: bundle_id: type: string required: - bundle_id title: CatalogConfigOrderedBundleResponseData CatalogConfigOrderedEntitlement: type: object properties: feature_id: type: string visible: type: boolean nullable: true required: - feature_id title: CatalogConfigOrderedEntitlement CatalogConfigOrderedEntitlementResponseData: type: object properties: feature_id: type: string visible: type: boolean required: - feature_id - visible title: CatalogConfigOrderedEntitlementResponseData CatalogConfigOrderedPlan: type: object properties: entitlements: type: array items: $ref: '#/components/schemas/CatalogConfigOrderedEntitlement' nullable: true maxItems: 200 plan_id: type: string required: - plan_id title: CatalogConfigOrderedPlan CatalogConfigOrderedPlanResponseData: type: object properties: entitlements: type: array items: $ref: '#/components/schemas/CatalogConfigOrderedEntitlementResponseData' maxItems: 1000 plan_id: type: string required: - plan_id - entitlements title: CatalogConfigOrderedPlanResponseData CatalogConfigurationResponseData: type: object properties: add_ons: type: array items: $ref: '#/components/schemas/PlanGroupPlanDetailResponseData' maxItems: 1000 custom_plan_cta_text: type: string nullable: true custom_plan_cta_url: type: string nullable: true custom_plan_price_text: type: string nullable: true custom_plans_visible: type: boolean ordered_add_ons: type: array items: $ref: '#/components/schemas/CatalogConfigOrderedPlanResponseData' maxItems: 1000 ordered_bundles: type: array items: $ref: '#/components/schemas/CatalogConfigOrderedBundleResponseData' maxItems: 1000 ordered_plans: type: array items: $ref: '#/components/schemas/CatalogConfigOrderedPlanResponseData' maxItems: 1000 plans: type: array items: $ref: '#/components/schemas/PlanGroupPlanDetailResponseData' maxItems: 1000 pricing_model: type: string nullable: true pricing_url: type: string nullable: true required: - custom_plans_visible - plans - add_ons - ordered_plans - ordered_add_ons - ordered_bundles title: CatalogConfigurationResponseData CatalogCreditBundleIDsResponseData: type: object properties: credit_bundle_ids: type: array items: type: string maxItems: 1000 required: - credit_bundle_ids title: CatalogCreditBundleIDsResponseData CatalogDerivedFeatureResponseData: type: object properties: icon: type: string id: type: string name: type: string required: - id - icon - name title: CatalogDerivedFeatureResponseData CatalogDerivedFeaturesResponseData: type: object properties: features: type: array items: $ref: '#/components/schemas/CatalogDerivedFeatureResponseData' maxItems: 1000 required: - features title: CatalogDerivedFeaturesResponseData CatalogPlanIDsResponseData: type: object properties: plan_ids: type: array items: type: string maxItems: 1000 required: - plan_ids title: CatalogPlanIDsResponseData CatalogResponseData: type: object properties: account_id: type: string created_at: type: string format: date-time custom_plan_cta_text: type: string nullable: true custom_plan_cta_url: type: string nullable: true custom_plan_price_text: type: string nullable: true custom_plans_visible: type: boolean description: type: string nullable: true id: type: string is_default: type: boolean name: type: string pricing_model: type: string nullable: true pricing_url: type: string nullable: true updated_at: type: string format: date-time required: - id - account_id - name - is_default - created_at - updated_at - custom_plans_visible title: CatalogResponseData ChangeSubscriptionInternalRequestBody: type: object properties: add_on_ids: type: array items: $ref: '#/components/schemas/UpdateAddOnRequestBody' maxItems: 100 auto_topup_overrides: type: array items: $ref: '#/components/schemas/UpdateAutoTopupOverrideRequestBody' maxItems: 100 billing_entity_id: type: string nullable: true company_id: type: string coupon_external_id: type: string nullable: true maxLength: 255 credit_bundles: type: array items: $ref: '#/components/schemas/UpdateCreditBundleRequestBody' maxItems: 100 custom_field_values: type: array items: $ref: '#/components/schemas/CheckoutFieldValue' maxItems: 100 new_plan_id: type: string new_price_id: type: string opt_in_accepted: type: boolean nullable: true 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 - auto_topup_overrides - credit_bundles - custom_field_values - new_plan_id - new_price_id - pay_in_advance - skip_trial - company_id title: ChangeSubscriptionInternalRequestBody ChangeSubscriptionRequestBody: type: object properties: add_on_ids: type: array items: $ref: '#/components/schemas/UpdateAddOnRequestBody' maxItems: 100 auto_topup_overrides: type: array items: $ref: '#/components/schemas/UpdateAutoTopupOverrideRequestBody' maxItems: 100 billing_entity_id: type: string nullable: true coupon_external_id: type: string nullable: true maxLength: 255 credit_bundles: type: array items: $ref: '#/components/schemas/UpdateCreditBundleRequestBody' maxItems: 100 custom_field_values: type: array items: $ref: '#/components/schemas/CheckoutFieldValue' maxItems: 100 new_plan_id: type: string new_price_id: type: string opt_in_accepted: type: boolean nullable: true 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 - auto_topup_overrides - credit_bundles - custom_field_values - new_plan_id - new_price_id - pay_in_advance - skip_trial title: ChangeSubscriptionRequestBody ChargeType: type: string enum: - free - none - 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: credit_balances: additionalProperties: $ref: '#/components/schemas/CompanyCreditBalance' type: object description: >- Lease-aware credit balances keyed by credit ID, covering every credit type the company holds a balance in flags: type: array items: $ref: '#/components/schemas/CheckFlagResponseData' maxItems: 1000 plan: $ref: '#/components/schemas/DatastreamCompanyPlan' required: - flags title: CheckFlagsResponseData CheckoutDataRequestBody: type: object properties: company_id: type: string currency: type: string nullable: true maxLength: 3 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' custom_checkout_fields: type: array items: $ref: '#/components/schemas/CheckoutFieldWithValue' maxItems: 1000 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 - custom_checkout_fields - available_credit_bundles - selected_credit_bundles title: CheckoutDataResponseData CheckoutFieldInput: type: object properties: definition_id: type: string nullable: true helper_text: type: string nullable: true maxLength: 512 id: type: string nullable: true name: type: string maxLength: 255 required: type: boolean stripe_metadata_key: type: string maxLength: 255 required: - name - required - stripe_metadata_key title: CheckoutFieldInput CheckoutFieldResponseData: type: object properties: created_at: type: string format: date-time definition_id: type: string helper_text: type: string nullable: true id: type: string name: type: string position: type: integer format: int64 required: type: boolean stripe_metadata_key: type: string trait_hierarchy: type: array items: type: string maxItems: 1000 updated_at: type: string format: date-time required: - created_at - definition_id - id - name - position - required - stripe_metadata_key - trait_hierarchy - updated_at title: CheckoutFieldResponseData CheckoutFieldValue: type: object properties: id: type: string value: type: string maxLength: 1024 required: - id - value title: CheckoutFieldValue CheckoutFieldWithValue: type: object properties: definition_id: type: string helper_text: type: string nullable: true id: type: string name: type: string required: type: boolean stripe_metadata_key: type: string value: type: string nullable: true required: - definition_id - id - name - required - stripe_metadata_key title: CheckoutFieldWithValue CheckoutSettingsResponseData: type: object properties: collect_address: type: boolean collect_email: type: boolean collect_phone: type: boolean opt_in_enabled: type: boolean opt_in_text: type: string nullable: true opt_in_title: type: string nullable: true required: - collect_address - collect_email - collect_phone - opt_in_enabled 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_id: type: string nullable: true 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 CompanyBillingAddressView: type: object properties: city: type: string country: type: string line1: type: string line2: type: string postal_code: type: string state: type: string required: - city - country - line1 - line2 - postal_code - state title: CompanyBillingAddressView CompanyBillingCheckoutSettings: type: object properties: collect_address: type: boolean collect_email: type: boolean collect_phone: type: boolean required: - collect_address - collect_email - collect_phone title: CompanyBillingCheckoutSettings CompanyBillingDetailsResponseData: type: object properties: address: $ref: '#/components/schemas/CompanyBillingAddressView' checkout_settings: $ref: '#/components/schemas/CompanyBillingCheckoutSettings' custom_fields: type: array items: $ref: '#/components/schemas/CheckoutFieldWithValue' maxItems: 1000 email: type: string nullable: true phone: type: string nullable: true tax_ids: type: array items: $ref: '#/components/schemas/CompanyTaxIDView' maxItems: 1000 required: - checkout_settings - custom_fields - tax_ids title: CompanyBillingDetailsResponseData CompanyBillingDetailsView: type: object properties: address: $ref: '#/components/schemas/CompanyBillingAddressView' checkout_settings: $ref: '#/components/schemas/CompanyBillingCheckoutSettings' custom_fields: type: array items: $ref: '#/components/schemas/CheckoutFieldWithValue' maxItems: 1000 email: type: string nullable: true phone: type: string nullable: true tax_ids: type: array items: $ref: '#/components/schemas/CompanyTaxIDView' maxItems: 1000 required: - checkout_settings - custom_fields - tax_ids title: CompanyBillingDetailsView CompanyBillingEntityResponseData: type: object properties: billing_entity: $ref: '#/components/schemas/CompanyResponseData' has_own_stripe_customer: type: boolean required: - has_own_stripe_customer title: CompanyBillingEntityResponseData CompanyBillingEntitySubscriptionResponseData: type: object properties: cancel_at: type: string format: date-time nullable: true cancel_at_period_end: type: boolean company: $ref: '#/components/schemas/CompanyResponseData' 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 is_initial: type: boolean latest_invoice: $ref: '#/components/schemas/InvoiceResponseData' payment_method: $ref: '#/components/schemas/PaymentMethodResponseData' plan_name: type: string 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 - is_initial - cancel_at_period_end - plan_name title: CompanyBillingEntitySubscriptionResponseData CompanyCreditBalance: type: object properties: remaining: type: number description: >- Remaining credit, excluding any open lease hold (the value SDKs gate on) format: double reserved: type: number description: Amount held by the company's open credit lease, 0 when none is open format: double settled: type: number description: >- Spendable balance including the open lease hold (remaining + reserved) format: double required: - remaining - reserved - settled title: CompanyCreditBalance CompanyCreditBalanceResponseData: type: object properties: credit_id: type: string remaining: type: number format: double reserved: type: number format: double settled: type: number format: double source: $ref: '#/components/schemas/BillingProviderType' total: type: number format: double nullable: true required: - credit_id - remaining - reserved - settled - source title: CompanyCreditBalanceResponseData CompanyDetailResponseData: type: object properties: add_ons: type: array items: $ref: '#/components/schemas/CompanyPlanWithBillingSubView' maxItems: 1000 billing_credit_balances: additionalProperties: type: number format: double 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 CompanyFeatureUsageExportMetadata: type: object properties: company_ids: type: array description: >- Restrict the export to these Schematic company IDs (starting with 'comp_') items: type: string nullable: true maxItems: 100 credit_type_ids: type: array description: Restrict the export to companies with these billing credit type IDs items: type: string nullable: true maxItems: 100 export_type: type: string description: 'Discriminator: always "company-feature-usage" for this variant' enum: - company-feature-usage feature_ids: type: array description: >- Schematic feature IDs (starting with 'feat_') to include as usage columns; at least one is required items: type: string maxItems: 100 has_scheduled_downgrade: type: boolean description: >- Restrict the export to companies that do (or do not) have a scheduled downgrade nullable: true monetized_subscriptions: type: boolean description: >- Restrict the export to companies with (or without) a monetized subscription nullable: true notification_email_recipient_email_addresses: type: array description: >- Account member emails to notify when the export completes; empty means the artifact is only retrievable via the API items: type: string maxItems: 100 plan_id: type: string description: >- Restrict the export to companies on this plan ID (starting with 'plan_') nullable: true plan_ids: type: array description: Restrict the export to companies on any of these plan IDs items: type: string nullable: true maxItems: 100 plan_version_id: type: string description: Restrict the export to companies on this plan version ID nullable: true q: type: string description: Free-text search over company name and keys nullable: true subscription_statuses: type: array description: >- Restrict the export to companies whose subscription has one of these statuses items: type: string nullable: true maxItems: 100 subscription_types: type: array description: >- Restrict the export to companies whose subscription has one of these types items: type: string nullable: true maxItems: 100 with_entitlement_for: type: string description: >- Restrict the export to companies that have an entitlement for this feature ID nullable: true with_subscription: type: boolean description: Restrict the export to companies with a subscription nullable: true without_feature_override_for: type: string description: >- Restrict the export to companies without a company-level override for this feature ID nullable: true without_plan: type: boolean description: Restrict the export to companies without a plan nullable: true without_subscription: type: boolean description: Restrict the export to companies without a subscription nullable: true required: - export_type - feature_ids title: CompanyFeatureUsageExportMetadata 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 format: double 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 CompanyPlanCreditGrantView: 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_availability: allOf: - $ref: '#/components/schemas/BillingCreditAutoTopupAvailability' 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_self_service: type: boolean billing_credit_auto_topup_threshold_credits: type: integer format: int64 nullable: true billing_credit_auto_topup_threshold_percent: type: integer format: int64 nullable: true billing_credit_can_buy_bundles: type: boolean company_auto_topup_amount: type: integer format: int64 nullable: true company_auto_topup_enabled: type: boolean nullable: true company_auto_topup_threshold_credits: 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 license_id: type: string nullable: true 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' rollover_percentage: type: integer format: int64 scaling: $ref: '#/components/schemas/PlanCreditGrantScaling' 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 - billing_credit_auto_topup_self_service - billing_credit_can_buy_bundles - rollover_percentage - scaling - created_at - updated_at title: CompanyPlanCreditGrantView CompanyPlanDetailResponseData: type: object properties: active_version: $ref: '#/components/schemas/PlanVersionResponseData' audience_type: type: string nullable: true deprecated: true available_periods: type: array items: $ref: '#/components/schemas/PlanPriceCadence' maxItems: 1000 billing_linked_resource: $ref: '#/components/schemas/BillingLinkedResourceResponseData' billing_product: $ref: '#/components/schemas/BillingProductDetailResponseData' billing_strategy: $ref: '#/components/schemas/BillingStrategy' catalogs: type: array items: $ref: '#/components/schemas/PlanCatalogMembershipResponseData' maxItems: 1000 charge_type: $ref: '#/components/schemas/ChargeType' company_can_trial: type: boolean company_count: type: integer format: int64 company_id: type: string nullable: true company_logo_url: 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 credits: type: array items: $ref: '#/components/schemas/BillingCreditResponseData' maxItems: 1000 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' nullable: true 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 description: >- Deprecated: reports the plan's charge type, not its price. Read the plan's prices to tell whether it costs anything, or billing_strategy to tell how it is billed. nullable: true deprecated: true is_trialable: type: boolean monthly_price: $ref: '#/components/schemas/BillingPriceResponseData' name: type: string one_time_price: $ref: '#/components/schemas/BillingPriceResponseData' plan_type: $ref: '#/components/schemas/PlanType' quarterly_price: $ref: '#/components/schemas/BillingPriceResponseData' trial_days: type: integer 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 - billing_strategy - charge_type - company_count - controlled_by - currency_prices - credits - features - is_default - is_trialable - versions - is_custom - compatible_plan_ids - available_periods - 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/CompanyPlanCreditGrantView' 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 is_initial: type: boolean 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 - is_initial - cancel_at_period_end title: CompanySubscriptionResponseData CompanyTaxIDView: type: object properties: country: type: string id: type: string type: type: string value: type: string verification_status: type: string nullable: true required: - country - id - type - value title: CompanyTaxIDView 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 proration_behavior: $ref: '#/components/schemas/ProrationBehavior' tax_collection_enabled: type: boolean required: - collect_email - collect_address - collect_phone - proration_behavior - 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 custom_checkout_fields: type: array items: $ref: '#/components/schemas/CheckoutFieldWithValue' 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 - custom_checkout_fields - 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 custom_checkout_fields: type: array items: $ref: '#/components/schemas/CheckoutFieldWithValue' 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 - custom_checkout_fields - 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 format: double type: object catalog_id: type: string nullable: true 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 format: double 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 format: double 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 format: double 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 format: int64 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 format: double 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 rate_limit_percent: type: integer format: int64 nullable: true maximum: 99 minimum: 0 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 format: double 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 quarterly_metered_price_id: type: string nullable: true deprecated: true quarterly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 quarterly_unit_price: type: integer format: int64 nullable: true quarterly_unit_price_decimal: type: string nullable: true soft_limit: type: integer format: int64 nullable: true tier_mode: allOf: - $ref: '#/components/schemas/BillingTiersMode' nullable: true usage_quantity: type: integer description: >- The committed unit quantity for this entitlement. For custom plans this is the quantity the company is contractually committed to; for standard plans it is the quantity pre-filled when subscribing. Only applies to pay-in-advance entitlements. Note: this is not yet enforced/auto-provisioned as a true default — it is currently stored for downstream billing use. format: int64 nullable: true minimum: 0 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' warning_tiers: type: array items: $ref: '#/components/schemas/WarningTierRequestBody' nullable: true maxItems: 1 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_availability: allOf: - $ref: '#/components/schemas/BillingCreditAutoTopupAvailability' 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_self_service: type: boolean nullable: true 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 can_buy_bundles: type: boolean nullable: true 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 license_id: type: string description: >- The license whose quantity scales this grant. Required when scaling is per_license. nullable: true 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 rollover_percentage: type: integer description: >- Percentage of unused credits that carry over when this grant resets. Only applies when reset_type is plan_period. Rolled-over credits expire at the next reset and are not rolled again. Defaults to 0. format: int64 nullable: true maximum: 100 minimum: 0 scaling: allOf: - $ref: '#/components/schemas/PlanCreditGrantScaling' description: >- Whether the grant is a fixed amount per company, or issued once per license the company holds. Defaults to fixed. 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 interval_count: type: integer format: int64 nullable: true 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 format: double 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 company_id: type: string nullable: true 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 CreateCatalogRequestBody: type: object properties: description: type: string nullable: true maxLength: 1024 name: type: string maxLength: 255 required: - name title: CreateCatalogRequestBody 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 format: double 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 format: double 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 format: double 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 CreateCustomPlanBundlePlanRequestBody: type: object properties: company_id: type: string 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: CreateCustomPlanBundlePlanRequestBody CreateCustomPlanBundleRequestBody: 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/CreateCustomPlanBundlePlanRequestBody' required: - entitlements title: CreateCustomPlanBundleRequestBody 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: $ref: '#/components/schemas/DataExportMetadata' output_file_type: $ref: '#/components/schemas/DataExportOutputFileType' required: - export_type - output_file_type 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 format: double 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 quarterly_metered_price_id: type: string nullable: true deprecated: true quarterly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 quarterly_unit_price: type: integer format: int64 nullable: true quarterly_unit_price_decimal: type: string nullable: true soft_limit: type: integer format: int64 nullable: true tier_mode: allOf: - $ref: '#/components/schemas/BillingTiersMode' nullable: true usage_quantity: type: integer description: >- The committed unit quantity for this entitlement. For custom plans this is the quantity the company is contractually committed to; for standard plans it is the quantity pre-filled when subscribing. Only applies to pay-in-advance entitlements. Note: this is not yet enforced/auto-provisioned as a true default — it is currently stored for downstream billing use. format: int64 nullable: true minimum: 0 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' warning_tiers: type: array items: $ref: '#/components/schemas/WarningTierRequestBody' nullable: true maxItems: 1 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 format: double 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: backfill: type: boolean description: >- Requires a secret API key, and trusted_client_clock. Import historical data without affecting billing. nullable: true 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 trusted_client_clock: type: boolean description: >- Requires a secret API key and sent_at. Use sent_at as the effective timestamp. 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 ending_balance: type: integer format: int64 nullable: true external_id: type: string nullable: true maxLength: 255 payment_method_external_id: type: string nullable: true maxLength: 255 starting_balance: type: integer format: int64 nullable: true 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 CreateMigrationInput: type: object properties: company_ids: type: array items: type: string maxItems: 10000 excluded_company_ids: type: array items: type: string maxItems: 10000 plan_id: type: string plan_version_id_to: type: string plan_version_ids_from: type: array items: type: string maxItems: 20 strategy: $ref: '#/components/schemas/PlanVersionMigrationStrategy' target_plan_type: $ref: '#/components/schemas/PlanType' required: - company_ids - excluded_company_ids - plan_id - plan_version_ids_from - plan_version_id_to - strategy - target_plan_type title: CreateMigrationInput 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 format: double 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' 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 format: double 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 quarterly_metered_price_id: type: string nullable: true deprecated: true quarterly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 quarterly_unit_price: type: integer format: int64 nullable: true quarterly_unit_price_decimal: type: string nullable: true soft_limit: type: integer format: int64 nullable: true tier_mode: allOf: - $ref: '#/components/schemas/BillingTiersMode' nullable: true usage_quantity: type: integer description: >- The committed unit quantity for this entitlement. For custom plans this is the quantity the company is contractually committed to; for standard plans it is the quantity pre-filled when subscribing. Only applies to pay-in-advance entitlements. Note: this is not yet enforced/auto-provisioned as a true default — it is currently stored for downstream billing use. format: int64 nullable: true minimum: 0 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' warning_tiers: type: array items: $ref: '#/components/schemas/WarningTierRequestBody' nullable: true maxItems: 1 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_checkout_fields: type: array items: $ref: '#/components/schemas/CheckoutFieldInput' nullable: true maxItems: 100 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 opt_in_enabled: type: boolean opt_in_text: type: string nullable: true maxLength: 1024 opt_in_title: type: string nullable: true maxLength: 80 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 - opt_in_enabled - 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: number format: double quantity_remaining: type: number format: double quantity_used: type: number format: double renewal_enabled: type: boolean renewal_period: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetCadence' nullable: true reserved: type: number format: double nullable: true settled: type: number format: double nullable: true singular_name: type: string nullable: true source_grant_id: 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 format: double 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: number format: double nullable: true grant_quantity_remaining: type: number format: double 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 format: double nullable: true quantity_remaining_at_zero_out: type: number format: double nullable: true source_id: type: integer format: int64 to_grant_id: type: string nullable: true usage_event_id: type: string nullable: true usage_reason: allOf: - $ref: '#/components/schemas/CreditUsageReason' 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 format: double 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 CreditLeaseResponseData: type: object properties: company_id: type: string created_at: type: string format: date-time credit_type_id: type: string expires_at: type: string format: date-time granted_amount: type: number format: double id: type: string released_at: type: string format: date-time nullable: true updated_at: type: string format: date-time required: - id - company_id - credit_type_id - granted_amount - expires_at - created_at - updated_at title: CreditLeaseResponseData CreditTransferResponseData: type: object properties: amount: type: number format: double created_at: type: string format: date-time direction: type: string id: type: string reason: type: string related_grant_id: type: string required: - amount - created_at - direction - id - reason - related_grant_id title: CreditTransferResponseData CreditTransferView: type: object properties: amount: type: number format: double created_at: type: string format: date-time direction: type: string id: type: string reason: type: string related_grant_id: type: string required: - 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 format: double nullable: true credit_grant_counts: additionalProperties: type: number format: double type: object credit_grant_details: type: array items: $ref: '#/components/schemas/CreditGrantDetail' maxItems: 1000 credit_remaining: type: number format: double nullable: true credit_total: type: number format: double nullable: true credit_type_icon: type: string nullable: true credit_type_name: type: string nullable: true credit_used: type: number format: double 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 format: double nullable: true usage_this_calendar_month: type: number description: Credit usage within the current calendar month format: double nullable: true usage_this_week: type: number description: Credit usage within the current calendar week (Monday to Sunday) format: double nullable: true usage_today: type: number description: Credit usage for the current day format: double nullable: true title: CreditUsageAggregation CreditUsageReason: type: string enum: - lease_hold - lease_release - manual_adjustment - reconciliation - track 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 CreditsAutoTopupSuccess: type: object properties: company: $ref: '#/components/schemas/CreditsAutoTopupCompanySummary' credit: $ref: '#/components/schemas/CreditsAutoTopupCreditSummary' grant_id: type: string quantity: type: integer format: int64 required: - grant_id - quantity title: CreditsAutoTopupSuccess CreditsCreditPurchaseSuccess: type: object properties: bundle_id: type: string bundle_name: type: string company: $ref: '#/components/schemas/CreditsWebhookCompanySummary' credit: $ref: '#/components/schemas/CreditsWebhookCreditSummary' grant_ids: type: array items: type: string maxItems: 1000 quantity: type: integer format: int64 required: - bundle_id - bundle_name - grant_ids - quantity title: CreditsCreditPurchaseSuccess CreditsWebhookCompanySummary: type: object properties: id: type: string name: type: string required: - id - name title: CreditsWebhookCompanySummary CreditsWebhookCreditSummary: type: object properties: id: type: string name: type: string required: - id - name title: CreditsWebhookCreditSummary 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 quarterly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 quarterly_unit_price: type: integer format: int64 nullable: true quarterly_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 external_invoice_id: type: string nullable: true 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 send_invoice: type: boolean 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 - send_invoice - 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 CustomerBillingAddress: type: object properties: city: type: string maxLength: 255 country: type: string maxLength: 255 line1: type: string maxLength: 255 line2: type: string maxLength: 255 postal_code: type: string maxLength: 255 state: type: string maxLength: 255 required: - city - country - line1 - line2 - postal_code - state title: CustomerBillingAddress DataEventPayload: type: object properties: api_key: type: string backfill: type: boolean nullable: true body: type: object idempotency_key: type: string nullable: true maxLength: 255 sent_at: type: string format: date-time nullable: true trusted_client_clock: type: boolean nullable: true type: $ref: '#/components/schemas/EventType' required: - api_key - type title: DataEventPayload DataExportMetadata: type: object discriminator: propertyName: export_type mapping: audit-log: '#/components/schemas/AuditLogExportMetadata' company-feature-usage: '#/components/schemas/CompanyFeatureUsageExportMetadata' oneOf: - $ref: '#/components/schemas/CompanyFeatureUsageExportMetadata' - $ref: '#/components/schemas/AuditLogExportMetadata' title: DataExportMetadata DataExportOutputFileType: type: string enum: - csv - csv.gz 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: $ref: '#/components/schemas/DataExportMetadata' 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 - output_file_type - created_at - updated_at title: DataExportResponseData DataExportStatus: type: string enum: - failure - pending - success DataExportType: type: string enum: - audit-log - 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 issues: type: array items: $ref: '#/components/schemas/PlanIssueResponseData' maxItems: 1000 skipped: type: array items: $ref: '#/components/schemas/SkippedEntitlementResponseData' maxItems: 1000 required: - data - issues - skipped title: DuplicatePlanEntitlementsResponseResponseData EntitlementCurrencyPricesResponseData: type: object properties: currency: type: string monthly_price: $ref: '#/components/schemas/BillingPriceView' quarterly_price: $ref: '#/components/schemas/BillingPriceView' yearly_price: $ref: '#/components/schemas/BillingPriceView' required: - currency title: EntitlementCurrencyPricesResponseData 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' - $ref: '#/components/schemas/EventBodyInference' 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 EventBodyInference: type: object properties: cached_input_tokens: type: integer description: Number of input tokens served from cache format: int64 company: additionalProperties: type: string type: object description: >- Key-value pairs to identify the company associated with the inference event cost: type: string description: >- Provided cost of the inference request as a decimal string; derived from model pricing when omitted currency: type: string description: ISO 4217 currency code for the provided cost; defaults to 'usd' event: type: string description: Optional track event name to fan out for usage-based billing input_tokens: type: integer description: Number of input tokens for the inference request format: int64 operation: type: string description: The inference operation; defaults to 'chat' output_tokens: type: integer description: Number of output tokens for the inference request format: int64 provider: type: string description: The inference provider (e.g. 'anthropic', 'openai') reasoning_tokens: type: integer description: Number of reasoning tokens for the inference request format: int64 request_model: type: string description: The model requested for the inference request requests: type: integer description: Number of requests represented by this event; defaults to 1 format: int64 response_model: type: string description: The model that served the inference response user: additionalProperties: type: string type: object description: >- Key-value pairs to identify the user associated with the inference event required: - company - input_tokens - output_tokens - provider - response_model title: EventBodyInference 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 lease_id: type: string description: Credit lease ID this track event is redeeming against quantity: type: integer description: Optionally specify the quantity of the event format: int64 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 api_key_view: $ref: '#/components/schemas/ApiKeyResponseData' 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 lease_id: 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 lease_id: 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 - inference - track ExtendCreditLeaseRequestBody: type: object properties: additional_amount: type: number format: double expires_at: type: string format: date-time nullable: true required: - additional_amount title: ExtendCreditLeaseRequestBody 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 format: double nullable: true credit_grant_counts: additionalProperties: type: number format: double 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 format: double nullable: true credit_total: type: number description: 'Deprecated: Use credit_remaining instead.' format: double 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 format: double 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 format: double 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+) format: double 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 quarterly_usage_based_price: $ref: '#/components/schemas/BillingPriceView' 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' billing_product: allOf: - $ref: '#/components/schemas/BillingProductResponseData' description: >- The billing provider product that sells this feature in the current environment. Set for license features once they have been priced in a plan; a feature priced in several environments has a different product in each. created_at: type: string format: date-time description: type: string event_subtype: type: string 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 license_id: type: string description: >- The license sold through this feature. Set only on features of type license, and created automatically with them. nullable: true 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 usage_limit_trait_id: type: string description: >- Set when the feature carries a pay-in-advance quantity. Provisioned lazily for other feature types, and at creation for license features. nullable: true 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 consumption_rate: type: number description: >- If the company has a credit-based entitlement for this feature, the credit cost per unit of usage format: double 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 credit available to fund new consumption or a new lease hold — open lease holds are excluded. Clients that hold a lease should gate on this plus their own unspent hold; clients with no lease awareness should use credit_settled instead format: double nullable: true credit_reserved: type: number description: >- If the company has a credit-based entitlement for this feature, the unspent amount held by an open credit lease. Returns to credit_remaining when the lease is released format: double nullable: true credit_settled: type: number description: >- If the company has a credit-based entitlement for this feature, the balance net of actual consumption, unaffected by open lease holds (credit_remaining plus credit_reserved). The number to display to end users format: double nullable: true credit_total: type: number description: >- If the company has a credit-based entitlement for this feature, the total credit amount format: double nullable: true credit_used: type: number description: >- If the company has a credit-based entitlement for this feature, the amount of credit used format: double nullable: true event_name: type: string description: >- If the feature is event-based, the name of the event tracked for usage nullable: true event_subtype: type: string description: >- For event-based or credit-metered feature entitlements, the event subtype whose usage is tracked 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 warning_tiers: type: array description: >- Customer-defined usage warning thresholds configured on this entitlement items: $ref: '#/components/schemas/WarningTier' maxItems: 1000 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 license_id: type: string description: >- The license sold through this feature. Set only on features of type license, and created automatically with them. nullable: true 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 usage_limit_trait_id: type: string description: >- Set when the feature carries a pay-in-advance quantity. Provisioned lazily for other feature types, and at creation for license features. nullable: true 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 license_id: type: string description: >- The license sold through this feature. Set only on features of type license, and created automatically with them. nullable: true 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 usage_limit_trait_id: type: string description: >- Set when the feature carries a pay-in-advance quantity. Provisioned lazily for other feature types, and at creation for license features. nullable: true required: - id - name - description - feature_type - icon - created_at - updated_at title: FeatureResponseData FeatureType: type: string enum: - boolean - event - license - 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 format: double nullable: true credit_grant_counts: additionalProperties: type: number format: double 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 format: double nullable: true credit_total: type: number description: 'Deprecated: Use credit_remaining instead.' format: double 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 format: double 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 format: double 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+) format: double 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 quarterly_usage_based_price: $ref: '#/components/schemas/BillingPriceView' 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' billing_product: $ref: '#/components/schemas/BillingProductResponseData' 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 license_id: type: string nullable: true 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 usage_limit_trait_id: type: string nullable: true 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 format: double 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 InstallIntegrationRequestBody: type: object properties: company_matching_criteria: allOf: - $ref: '#/components/schemas/CompanyMatchingCriteria' nullable: true company_matching_field: type: string nullable: true config: type: object is_sandbox: type: boolean nullable: true live_mode: type: boolean nullable: true type: $ref: '#/components/schemas/IntegrationType' required: - type title: InstallIntegrationRequestBody 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' metronome: '#/components/schemas/MetronomeIntegrationConfig' orb: '#/components/schemas/OrbIntegrationConfig' stripe: '#/components/schemas/StripeIntegrationConfig' workos: '#/components/schemas/WorkOSIntegrationConfig' oneOf: - $ref: '#/components/schemas/StripeIntegrationConfig' - $ref: '#/components/schemas/OrbIntegrationConfig' - $ref: '#/components/schemas/ClerkIntegrationConfig' - $ref: '#/components/schemas/WorkOSIntegrationConfig' - $ref: '#/components/schemas/MetronomeIntegrationConfig' title: IntegrationConfig IntegrationInstallConfig: type: object properties: company_matching_criteria: allOf: - $ref: '#/components/schemas/CompanyMatchingCriteria' nullable: true company_matching_field: type: string nullable: true config: $ref: '#/components/schemas/IntegrationConfig' created_at: type: string format: date-time id: type: string integration_id: type: string is_app_install: type: boolean is_connect_install: type: boolean live_mode: type: boolean updated_at: type: string format: date-time required: - created_at - id - integration_id - is_app_install - is_connect_install - live_mode - updated_at title: IntegrationInstallConfig IntegrationInstallResponseData: type: object properties: capabilities: $ref: '#/components/schemas/IntegrationCapabilities' config: $ref: '#/components/schemas/IntegrationInstallConfig' integration: $ref: '#/components/schemas/IntegrationResponseData' required: - capabilities - config - integration title: IntegrationInstallResponseData 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 - metronome - orb - stripe - unknown - workos 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 last_webhook_received_at: type: string format: date-time nullable: true 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 ending_balance: type: integer format: int64 nullable: true payment_method_external_id: type: string nullable: true maxLength: 255 starting_balance: type: integer format: int64 nullable: true 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 ending_balance: type: integer format: int64 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' starting_balance: type: integer format: int64 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 - ending_balance - environment_id - provider_type - starting_balance - 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 LicenseResponseData: type: object properties: created_at: type: string format: date-time id: type: string name: type: string updated_at: type: string format: date-time required: - id - name - created_at - updated_at title: LicenseResponseData 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 billing_entity_id: type: string description: >- The company that pays for this subscription. Must already have a Stripe customer. Only honored when starting a new subscription. 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 custom_field_values: type: array items: $ref: '#/components/schemas/CheckoutFieldValue' 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 - custom_field_values - pay_in_advance_entitlements title: ManagePlanRequest ManagePlanResponseResponseData: type: object properties: company: $ref: '#/components/schemas/CompanyDetailResponseData' success: type: boolean required: - success title: ManagePlanResponseResponseData MarkCustomPlanBillingPaidRequestBody: type: object title: MarkCustomPlanBillingPaidRequestBody 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 MetronomeIntegrationConfig: type: object properties: external_customer_id_key: type: string description: >- Schematic company key used to store the Metronome customer's ingest alias; when unset, imported customers carry only metronome_customer_id nullable: true type: type: string description: 'Discriminator: always "metronome" for this variant' enum: - metronome required: - type title: MetronomeIntegrationConfig MigrationErrorCode: type: string enum: - ambiguous_subscription_item - multiple_subscriptions - no_price_for_interval - not_on_origin_version - operation_item_not_found - permanent_config - permanent_decline - transient_decline - transient_infra - transient_stripe - unknown - would_leave_empty_subscription 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' title: PlanBundleResponseData PlanCatalogMembershipResponseData: type: object properties: id: type: string name: type: string required: - id - name title: PlanCatalogMembershipResponseData 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 integration: allOf: - $ref: '#/components/schemas/IntegrationResponseData' description: >- The integration that performed this change, when the actor is an integration-owned API key (e.g. a billing-provider sync). is_version_upgrade: type: boolean description: >- True when this change moved the company to a different version of the same plan (e.g. a plan version migration) rather than to a different plan. 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 - is_version_upgrade - traits_updated - updated_at title: PlanChangeResponseData PlanChangeSubscriptionAction: type: string enum: - adjustment - downgrade - invalid - subscribe - unsubscribe - upgrade - upgrade_trial PlanCreditGrantScaling: type: string enum: - fixed - per_license 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_availability: allOf: - $ref: '#/components/schemas/BillingCreditAutoTopupAvailability' 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_self_service: type: boolean billing_credit_auto_topup_threshold_credits: type: integer format: int64 nullable: true billing_credit_auto_topup_threshold_percent: type: integer format: int64 nullable: true billing_credit_can_buy_bundles: type: boolean 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 license_id: type: string nullable: true 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' rollover_percentage: type: integer format: int64 scaling: $ref: '#/components/schemas/PlanCreditGrantScaling' 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 - billing_credit_auto_topup_self_service - billing_credit_can_buy_bundles - rollover_percentage - scaling - 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 quarterly_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' quarterly_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' billing_strategy: $ref: '#/components/schemas/BillingStrategy' catalogs: type: array items: $ref: '#/components/schemas/PlanCatalogMembershipResponseData' maxItems: 1000 charge_type: $ref: '#/components/schemas/ChargeType' company_count: type: integer format: int64 company_id: type: string nullable: true company_logo_url: 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 credits: type: array items: $ref: '#/components/schemas/BillingCreditResponseData' maxItems: 1000 currency_prices: type: array items: $ref: '#/components/schemas/PlanCurrencyPricesResponseData' maxItems: 1000 description: type: string draft_version: $ref: '#/components/schemas/PlanVersionResponseData' entitlements: type: array items: $ref: '#/components/schemas/PlanEntitlementResponseData' nullable: true 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_default: type: boolean deprecated: true is_free: type: boolean description: >- Deprecated: reports the plan's charge type, not its price. Read the plan's prices to tell whether it costs anything, or billing_strategy to tell how it is billed. nullable: true deprecated: true is_trialable: type: boolean monthly_price: $ref: '#/components/schemas/BillingPriceResponseData' name: type: string one_time_price: $ref: '#/components/schemas/BillingPriceResponseData' plan_type: $ref: '#/components/schemas/PlanType' quarterly_price: $ref: '#/components/schemas/BillingPriceResponseData' trial_days: type: integer 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 - billing_strategy - charge_type - company_count - controlled_by - currency_prices - credits - features - is_default - 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 format: double 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_quarterly_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' usage_quantity: type: integer description: >- The committed unit quantity for this entitlement. For custom plans this is the quantity the company is contractually committed to; for standard plans it is the quantity pre-filled when subscribing. Only applies to pay-in-advance entitlements. Note: this is not yet enforced/auto-provisioned as a true default — it is currently stored for downstream billing use. format: int64 nullable: true 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' warning_tiers: type: array items: $ref: '#/components/schemas/WarningTierResponseData' maxItems: 1000 required: - created_at - currency_prices - environment_id - feature_id - id - plan_id - rule_id - updated_at - value_type - warning_tiers 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_checkout_fields: type: array items: $ref: '#/components/schemas/CheckoutFieldResponseData' maxItems: 1000 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 - custom_checkout_fields - 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 available_periods: type: array items: $ref: '#/components/schemas/PlanPriceCadence' maxItems: 1000 billing_linked_resource: $ref: '#/components/schemas/BillingLinkedResourceResponseData' billing_product: $ref: '#/components/schemas/BillingProductDetailResponseData' billing_strategy: $ref: '#/components/schemas/BillingStrategy' catalogs: type: array items: $ref: '#/components/schemas/PlanCatalogMembershipResponseData' maxItems: 1000 charge_type: $ref: '#/components/schemas/ChargeType' company_count: type: integer format: int64 company_id: type: string nullable: true company_logo_url: 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 credits: type: array items: $ref: '#/components/schemas/BillingCreditResponseData' maxItems: 1000 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' nullable: true 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 description: >- Deprecated: reports the plan's charge type, not its price. Read the plan's prices to tell whether it costs anything, or billing_strategy to tell how it is billed. nullable: true deprecated: true is_trialable: type: boolean monthly_price: $ref: '#/components/schemas/BillingPriceResponseData' name: type: string one_time_price: $ref: '#/components/schemas/BillingPriceResponseData' plan_type: $ref: '#/components/schemas/PlanType' quarterly_price: $ref: '#/components/schemas/BillingPriceResponseData' trial_days: type: integer 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 - billing_strategy - charge_type - company_count - controlled_by - currency_prices - credits - features - is_default - is_trialable - versions - is_custom - compatible_plan_ids - available_periods 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 PlanPriceCadence: type: string enum: - monthly - quarterly - yearly 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 error_code: allOf: - $ref: '#/components/schemas/MigrationErrorCode' 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 PlanVersionMigrationPreviewCompanyResponseData: type: object properties: company_id: type: string has_billing_changes: type: boolean has_custom_pricing: type: boolean note: type: string nullable: true plan_version_id_from: type: string nullable: true will_update_subscription: type: boolean required: - company_id - has_billing_changes - has_custom_pricing - will_update_subscription title: PlanVersionMigrationPreviewCompanyResponseData PlanVersionMigrationPreviewResponseData: type: object properties: companies: type: array items: $ref: >- #/components/schemas/PlanVersionMigrationPreviewCompanyResponseData maxItems: 1000 required: - companies title: PlanVersionMigrationPreviewResponseData 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 plan_version_ids_from: type: array items: type: string maxItems: 1000 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_ids_from - 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 available_periods: type: array items: $ref: '#/components/schemas/PlanPriceCadence' maxItems: 1000 billing_linked_resource: $ref: '#/components/schemas/BillingLinkedResourceResponseData' billing_product: $ref: '#/components/schemas/BillingProductDetailResponseData' billing_strategy: $ref: '#/components/schemas/BillingStrategy' catalogs: type: array items: $ref: '#/components/schemas/PlanCatalogMembershipResponseData' maxItems: 1000 charge_type: $ref: '#/components/schemas/ChargeType' company_count: type: integer format: int64 company_id: type: string nullable: true company_logo_url: 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 credits: type: array items: $ref: '#/components/schemas/BillingCreditResponseData' maxItems: 1000 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' nullable: true 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 description: >- Deprecated: reports the plan's charge type, not its price. Read the plan's prices to tell whether it costs anything, or billing_strategy to tell how it is billed. nullable: true deprecated: true is_trialable: type: boolean monthly_price: $ref: '#/components/schemas/BillingPriceResponseData' name: type: string one_time_price: $ref: '#/components/schemas/BillingPriceResponseData' plan_type: $ref: '#/components/schemas/PlanType' quarterly_price: $ref: '#/components/schemas/BillingPriceResponseData' trial_days: type: integer 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 - billing_strategy - charge_type - company_count - controlled_by - currency_prices - credits - features - is_default - is_trialable - versions - is_custom - compatible_plan_ids - available_periods - custom - included_credit_grants title: PlanViewPublicResponseData PreviewMigrationRequestBody: type: object properties: company_ids: type: array items: type: string maxItems: 100 minItems: 1 plan_id: type: string plan_version_id_to: type: string target_plan_type: $ref: '#/components/schemas/PlanType' required: - company_ids - plan_id - plan_version_id_to - target_plan_type title: PreviewMigrationRequestBody 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 opt_in_required: type: boolean opt_in_text: type: string nullable: true opt_in_title: type: string nullable: true payment_method_required: type: boolean percent_off: type: number format: double 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 - opt_in_required - payment_method_required - usage_violations title: PreviewSubscriptionChangeResponseData PreviewSubscriptionDiscountResponseData: type: object properties: amount_off: type: integer format: int64 nullable: true coupon_name: type: string currency: type: string nullable: true customer_facing_code: type: string nullable: true 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 format: double nullable: true promo_code_external_id: type: string nullable: true started_at: type: string format: date-time required: - coupon_name - duration - is_active - started_at title: PreviewSubscriptionDiscountResponseData PreviewSubscriptionFinanceResponseData: type: object properties: amount_off: type: integer format: int64 discounts: type: array items: $ref: '#/components/schemas/PreviewSubscriptionDiscountResponseData' maxItems: 1000 due_now: type: integer format: int64 new_charges: type: integer format: int64 percent_off: type: number format: double period_end: type: string format: date-time 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 - discounts - due_now - upcoming_invoice_line_items - new_charges - percent_off - period_end - 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 address: $ref: '#/components/schemas/CustomerBillingAddress' coupon_external_id: type: string nullable: true maxLength: 255 custom_field_values: type: array items: $ref: '#/components/schemas/CheckoutFieldValue' nullable: true maxItems: 100 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' phone: type: string nullable: true maxLength: 255 send_invoice: type: boolean description: >- Whether Stripe emails the invoice when it is finalized. Defaults to true. nullable: true tax_id: $ref: '#/components/schemas/TaxIDInput' required: - excluded_company_ids - migration_strategy 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 ReleaseCreditLeaseRequestBody: type: object title: ReleaseCreditLeaseRequestBody 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 send_invoice: type: boolean description: >- Whether Stripe emails the invoice when it is finalized. Defaults to true. nullable: true required: - customer_email title: RetryCustomPlanBillingRequestBody RetryMigrationRequestBody: type: object properties: error_codes: type: array items: $ref: '#/components/schemas/MigrationErrorCode' maxItems: 10 required: - error_codes title: RetryMigrationRequestBody 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: - v5b3e7220 - 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 format: double 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 format: double 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 consumption_rate: type: number description: >- If the company has a credit-based entitlement for this feature, the credit cost per unit of usage format: double 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 credit available to fund new consumption or a new lease hold — open lease holds are excluded. Clients that hold a lease should gate on this plus their own unspent hold; clients with no lease awareness should use credit_settled instead format: double nullable: true credit_reserved: type: number description: >- If the company has a credit-based entitlement for this feature, the unspent amount held by an open credit lease. Returns to credit_remaining when the lease is released format: double nullable: true credit_settled: type: number description: >- If the company has a credit-based entitlement for this feature, the balance net of actual consumption, unaffected by open lease holds (credit_remaining plus credit_reserved). The number to display to end users format: double nullable: true credit_total: type: number description: >- If the company has a credit-based entitlement for this feature, the total credit amount format: double nullable: true credit_used: type: number description: >- If the company has a credit-based entitlement for this feature, the amount of credit used format: double nullable: true event_name: type: string description: >- If the feature is event-based, the name of the event tracked for usage nullable: true event_subtype: type: string description: >- For event-based or credit-metered feature entitlements, the event subtype whose usage is tracked 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 warning_tiers: type: array description: >- Customer-defined usage warning thresholds configured on this entitlement items: $ref: '#/components/schemas/RulesengineWarningTier' maxItems: 1000 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 RulesengineWarningTier: type: object properties: key: type: string description: A customer-defined identifier for the warning tier value: type: integer description: The warning threshold, in the entitlement's usage units format: int64 required: - key - value title: RulesengineWarningTier 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 required: - type - is_sandbox - live_mode 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 TaxIDInput: type: object properties: type: $ref: '#/components/schemas/TaxIdType' value: type: string maxLength: 255 required: - type - value title: TaxIDInput TaxIdType: type: string enum: - ae_trn - au_abn - au_arn - br_cnpj - br_cpf - ca_bn - ca_gst_hst - ca_pst_bc - ca_pst_mb - ca_pst_sk - ca_qst - ch_uid - ch_vat - eu_vat - gb_vat - hk_br - id_npwp - il_vat - in_gst - jp_cn - jp_rn - jp_trn - kr_brn - mx_rfc - my_frp - my_itn - my_sst - no_vat - nz_gst - ph_tin - sa_vat - sg_gst - sg_uen - th_vat - tr_tin - tw_vat - us_ein - za_vat 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 TestWebhookRequestBody: type: object properties: request_type: $ref: '#/components/schemas/WebhookRequestType' required: - request_type title: TestWebhookRequestBody TestWebhookResponseData: type: object properties: response_code: type: integer format: int64 success: type: boolean required: - response_code - success title: TestWebhookResponseData TimeSeriesGranularity: type: string enum: - daily - hourly - monthly - weekly TopFeatureByUsageResponseData: type: object properties: change_pct: type: number format: double 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 rate_limit_percent: type: integer format: int64 nullable: true maximum: 99 minimum: 0 title: UpdateApiKeyRequestBody UpdateAutoTopupOverrideRequestBody: type: object properties: auto_topup_amount: type: integer format: int64 nullable: true minimum: 1 auto_topup_enabled: type: boolean nullable: true auto_topup_threshold_credits: type: integer format: int64 nullable: true minimum: 0 plan_credit_grant_id: type: string required: - plan_credit_grant_id title: UpdateAutoTopupOverrideRequestBody 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_availability: allOf: - $ref: '#/components/schemas/BillingCreditAutoTopupAvailability' 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_self_service: type: boolean nullable: true 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 can_buy_bundles: type: boolean nullable: true 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 license_id: type: string description: >- The license whose quantity scales this grant. Cannot be changed after creation. nullable: true reset_cadence: $ref: '#/components/schemas/BillingPlanCreditGrantResetCadence' reset_start: $ref: '#/components/schemas/BillingPlanCreditGrantResetStart' reset_type: allOf: - $ref: '#/components/schemas/BillingPlanCreditGrantResetType' nullable: true rollover_percentage: type: integer description: >- Percentage of unused credits that carry over when this grant resets. Only applies when reset_type is plan_period. Rolled-over credits expire at the next reset and are not rolled again. format: int64 nullable: true maximum: 100 minimum: 0 scaling: allOf: - $ref: '#/components/schemas/PlanCreditGrantScaling' description: >- Whether the grant is a fixed amount per company, or issued once per license the company holds. Cannot be changed after creation. nullable: true required: - reset_cadence - reset_start title: UpdateBillingPlanCreditGrantRequestBody UpdateCatalogConfigurationRequestBody: type: object properties: custom_plan_cta_text: type: string nullable: true maxLength: 255 custom_plan_cta_url: type: string nullable: true maxLength: 512 custom_plan_price_text: type: string nullable: true maxLength: 255 custom_plans_visible: type: boolean nullable: true ordered_add_ons: type: array items: $ref: '#/components/schemas/CatalogConfigOrderedPlan' nullable: true maxItems: 100 ordered_bundles: type: array items: $ref: '#/components/schemas/CatalogConfigOrderedBundle' nullable: true maxItems: 100 ordered_plans: type: array items: $ref: '#/components/schemas/CatalogConfigOrderedPlan' nullable: true maxItems: 100 pricing_model: type: string nullable: true maxLength: 255 pricing_url: type: string nullable: true maxLength: 512 title: UpdateCatalogConfigurationRequestBody UpdateCatalogRequestBody: type: object properties: description: type: string nullable: true maxLength: 1024 is_default: type: boolean nullable: true name: type: string nullable: true maxLength: 255 title: UpdateCatalogRequestBody UpdateCompanyBillingDetailsRequestBody: type: object properties: address: $ref: '#/components/schemas/CustomerBillingAddress' email: type: string nullable: true maxLength: 255 phone: type: string nullable: true maxLength: 255 tax_id: $ref: '#/components/schemas/TaxIDInput' values: type: array items: $ref: '#/components/schemas/CheckoutFieldValue' maxItems: 100 required: - values title: UpdateCompanyBillingDetailsRequestBody UpdateCompanyOverrideRequestBody: type: object properties: credit_consumption_rate: type: number format: double 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 format: double 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 format: double 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 minimum: 0 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 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 format: double 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 quarterly_metered_price_id: type: string nullable: true deprecated: true quarterly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 quarterly_unit_price: type: integer format: int64 nullable: true quarterly_unit_price_decimal: type: string nullable: true soft_limit: type: integer format: int64 nullable: true tier_mode: allOf: - $ref: '#/components/schemas/BillingTiersMode' nullable: true usage_quantity: type: integer description: >- The committed unit quantity for this entitlement. For custom plans this is the quantity the company is contractually committed to; for standard plans it is the quantity pre-filled when subscribing. Only applies to pay-in-advance entitlements. Note: this is not yet enforced/auto-provisioned as a true default — it is currently stored for downstream billing use. format: int64 nullable: true minimum: 0 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' warning_tiers: type: array items: $ref: '#/components/schemas/WarningTierRequestBody' nullable: true maxItems: 1 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_checkout_fields: type: array items: $ref: '#/components/schemas/CheckoutFieldInput' nullable: true maxItems: 100 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 opt_in_enabled: type: boolean opt_in_text: type: string nullable: true maxLength: 1024 opt_in_title: type: string nullable: true maxLength: 80 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 - opt_in_enabled - 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 billing_strategy: allOf: - $ref: '#/components/schemas/BillingStrategy' 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 quarterly_price: type: integer format: int64 nullable: true quarterly_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: base_plan_id: type: string description: >- Assign this base plan when creating the company (starts with plan_). Takes precedence over the environment's initial plan and must be provisionable without a payment method. nullable: true base_plan_price_id: type: string description: >- The Schematic price to provision for base_plan_id (starts with bilpp_). Required and must be $0 for a billing-linked plan; omit for a plan that is not billing-linked. nullable: true 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 quarterly_metered_price_id: type: string nullable: true deprecated: true quarterly_price_tiers: type: array items: $ref: '#/components/schemas/CreatePriceTierRequestBody' nullable: true maxItems: 100 quarterly_unit_price: type: integer format: int64 nullable: true quarterly_unit_price_decimal: type: string nullable: true soft_limit: type: integer format: int64 nullable: true tier_mode: allOf: - $ref: '#/components/schemas/BillingTiersMode' nullable: true usage_quantity: type: integer description: >- The committed unit quantity for this entitlement. For custom plans this is the quantity the company is contractually committed to; for standard plans it is the quantity pre-filled when subscribing. Only applies to pay-in-advance entitlements. Note: this is not yet enforced/auto-provisioned as a true default — it is currently stored for downstream billing use. format: int64 nullable: true minimum: 0 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 format: double 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 quarterly_usage_based_price: $ref: '#/components/schemas/BillingPriceView' usage_quantity: type: integer description: >- The committed unit quantity for this entitlement. For custom plans this is the quantity the company is contractually committed to; for standard plans it is the quantity pre-filled when subscribing. Only applies to pay-in-advance entitlements. Note: this is not yet enforced/auto-provisioned as a true default — it is currently stored for downstream billing use. format: int64 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 UserCreditUsageResponseData: type: object properties: billing_credit_id: type: string credit_name: type: string description: The display name of the credit type credits_used: type: number description: >- The user's net track-driven consumption of the credit within the window (draws minus refunds) format: double share: type: number description: >- This row's fraction (0-1) of the company's total track-driven consumption of the credit within the window, including unattributed consumption format: double user: allOf: - $ref: '#/components/schemas/UserResponseData' description: >- The user the consumption is attributed to; null for consumption from events sent without a user user_id: type: string description: >- The user the consumption is attributed to; null for unattributed consumption nullable: true required: - billing_credit_id - credit_name - credits_used - share title: UserCreditUsageResponseData UserDailyCreditPointResponseData: type: object properties: credits_used: type: number description: The user's net credit consumption on the day format: double date: type: string description: The UTC day format: date-time required: - credits_used - date title: UserDailyCreditPointResponseData UserDailyUsagePointResponseData: type: object properties: date: type: string description: The UTC day format: date-time feature: $ref: '#/components/schemas/FeatureResponseData' value: type: integer description: The user's usage of the feature on the day format: int64 required: - date - value title: UserDailyUsagePointResponseData 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 UserFeatureUsageResponseData: type: object properties: feature: $ref: '#/components/schemas/FeatureResponseData' last_seen: type: string description: When the user last used the feature within the window format: date-time share: type: number description: >- This row's fraction (0-1) of the company's total usage of the feature within the window, including unattributed usage format: double user: allOf: - $ref: '#/components/schemas/UserResponseData' description: >- The user the usage is attributed to; null for usage from events sent without a user user_id: type: string description: The user the usage is attributed to; null for unattributed usage nullable: true value: type: integer description: The user's usage of the feature within the window format: int64 required: - last_seen - share - value title: UserFeatureUsageResponseData 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 UserUsageByCompanyResponseData: type: object properties: credits: type: array description: Per-user net credit consumption within the window items: $ref: '#/components/schemas/UserCreditUsageResponseData' maxItems: 1000 end_time: type: string description: End of the usage window (exclusive) format: date-time rows: type: array description: >- Per-user, per-feature usage within the window; rows for a feature sum to the company total items: $ref: '#/components/schemas/UserFeatureUsageResponseData' maxItems: 1000 start_time: type: string description: Start of the usage window format: date-time required: - credits - end_time - rows - start_time title: UserUsageByCompanyResponseData UserUsageDetailResponseData: type: object properties: credits: type: array description: The user's net credit consumption within the window items: $ref: '#/components/schemas/UserCreditUsageResponseData' maxItems: 1000 daily_credit_points: type: array description: The user's net credit consumption by UTC day items: $ref: '#/components/schemas/UserDailyCreditPointResponseData' maxItems: 1000 daily_points: type: array description: The user's per-feature usage by UTC day items: $ref: '#/components/schemas/UserDailyUsagePointResponseData' maxItems: 1000 end_time: type: string description: End of the usage window (exclusive) format: date-time feature_totals: type: array description: The user's per-feature usage totals within the window items: $ref: '#/components/schemas/UserFeatureUsageResponseData' maxItems: 1000 start_time: type: string description: Start of the usage window format: date-time user: $ref: '#/components/schemas/UserResponseData' required: - credits - daily_credit_points - daily_points - end_time - feature_totals - start_time title: UserUsageDetailResponseData WarningTier: type: object properties: key: type: string description: A customer-defined identifier for the warning tier value: type: integer description: The warning threshold, in the entitlement's usage units format: int64 required: - key - value title: WarningTier WarningTierRequestBody: type: object properties: key: type: string maxLength: 255 value: type: integer format: int64 maximum: 9999999999999 minimum: 1 required: - key - value title: WarningTierRequestBody WarningTierResponseData: type: object properties: id: type: string key: type: string value: type: integer format: int64 required: - id - key - value title: WarningTierResponseData 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 - credit.purchase.success - 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 - auto.topup.success 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 nullable: true environment_id: type: string nullable: true 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 WorkOSIntegrationConfig: type: object properties: first_events_received: type: boolean description: >- Whether Schematic has received the first webhook event from WorkOS after install nullable: true type: type: string description: 'Discriminator: always "workos" for this variant' enum: - workos webhook_url: type: string description: >- URL configured on the WorkOS webhook endpoint that delivers events to Schematic nullable: true required: - type title: WorkOSIntegrationConfig 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: role in: query description: Filter by member role schema: allOf: - $ref: '#/components/schemas/AccountMemberRole' description: Filter by member role - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: '100' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 offset: type: integer description: Page offset (default 0) format: int64 example: '0' q: type: string description: Search filter maxLength: 512 role: allOf: - $ref: '#/components/schemas/AccountMemberRole' description: Filter by member role 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' /account-members/count: get: operationId: countAccountMembers summary: Count 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: role in: query description: Filter by member role schema: allOf: - $ref: '#/components/schemas/AccountMemberRole' description: Filter by member role - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: '100' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 offset: type: integer description: Page offset (default 0) format: int64 example: '0' q: type: string description: Search filter maxLength: 512 role: allOf: - $ref: '#/components/schemas/AccountMemberRole' description: Filter by member role title: CountAccountMembersParams required: - data - params title: CountAccountMembersResponse '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: 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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/coupons/{billing_id}: delete: operationId: deleteBillingCoupon summary: Delete billing coupon 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: DeleteBillingCouponParams required: - data - params title: DeleteBillingCouponResponse '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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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/lease: post: operationId: acquireCreditLease summary: Acquire credit lease tags: - credits requestBody: content: application/json: schema: $ref: '#/components/schemas/AcquireCreditLeaseRequestBody' required: true responses: '201': description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CreditLeaseResponseData' params: type: object description: Input parameters title: AcquireCreditLeaseParams required: - data - params title: AcquireCreditLeaseResponse '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/lease/{lease_id}/extend: put: operationId: extendCreditLease summary: Extend credit lease tags: - credits parameters: - name: lease_id in: path description: lease_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/ExtendCreditLeaseRequestBody' required: true responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CreditLeaseResponseData' params: type: object description: Input parameters title: ExtendCreditLeaseParams required: - data - params title: ExtendCreditLeaseResponse '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/lease/{lease_id}/release: put: operationId: releaseCreditLease summary: Release credit lease tags: - credits parameters: - name: lease_id in: path description: lease_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/ReleaseCreditLeaseRequestBody' required: true responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CreditLeaseResponseData' params: type: object description: Input parameters title: ReleaseCreditLeaseParams required: - data - params title: ReleaseCreditLeaseResponse '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: plan_version_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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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 plan_version_ids: type: array items: type: string maxItems: 100 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: plan_version_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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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 plan_version_ids: type: array items: type: string maxItems: 100 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/{billing_id}: delete: operationId: deleteBillingCustomer summary: Delete billing customer 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: DeleteBillingCustomerParams required: - data - params title: DeleteBillingCustomerResponse '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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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/invoices/{billing_id}: delete: operationId: deleteBillingInvoice summary: Delete billing invoice 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: DeleteBillingInvoiceParams required: - data - params title: DeleteBillingInvoiceResponse '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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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/payment-methods/{billing_id}: delete: operationId: deletePaymentMethodByExternalID summary: Delete payment method by external ID 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: DeletePaymentMethodByExternalIDParams required: - data - params title: DeletePaymentMethodByExternalIDResponse '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: interval_count in: query description: >- Filter for prices billed every N intervals; combine with interval (e.g. interval=month, interval_count=3 for quarterly) schema: type: integer description: >- Filter for prices billed every N intervals; combine with interval (e.g. interval=month, interval_count=3 for quarterly) format: int64 minimum: 1 - 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: plan_version_id in: query description: >- Filter for prices belonging to a specific plan version (e.g. the latest published version) schema: type: string description: >- Filter for prices belonging to a specific plan version (e.g. the latest published version) - 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' maximum: 250 minimum: 0 - 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 interval_count: type: integer description: >- Filter for prices billed every N intervals; combine with interval (e.g. interval=month, interval_count=3 for quarterly) format: int64 minimum: 1 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' maximum: 250 minimum: 0 offset: type: integer description: Page offset (default 0) format: int64 example: '0' plan_version_id: type: string description: >- Filter for prices belonging to a specific plan version (e.g. the latest published version) 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: interval_count in: query description: >- Filter for prices billed every N intervals; combine with interval (e.g. interval=month, interval_count=3 for quarterly) schema: type: integer description: >- Filter for prices billed every N intervals; combine with interval (e.g. interval=month, interval_count=3 for quarterly) format: int64 minimum: 1 - 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: plan_version_id in: query description: >- Filter for prices belonging to a specific plan version (e.g. the latest published version) schema: type: string description: >- Filter for prices belonging to a specific plan version (e.g. the latest published version) - 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' maximum: 250 minimum: 0 - 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 interval_count: type: integer description: >- Filter for prices billed every N intervals; combine with interval (e.g. interval=month, interval_count=3 for quarterly) format: int64 minimum: 1 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' maximum: 250 minimum: 0 offset: type: integer description: Page offset (default 0) format: int64 example: '0' plan_version_id: type: string description: >- Filter for prices belonging to a specific plan version (e.g. the latest published version) 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' /catalogs: get: operationId: listCatalogs summary: List catalogs tags: - catalogs parameters: - name: is_default in: query schema: type: boolean - name: q in: query description: Search by catalog name schema: type: string description: Search by catalog name maxLength: 512 - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: '100' maximum: 250 minimum: 0 - 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/CatalogResponseData' title: ListCatalogsResponseData maxItems: 250 params: type: object description: Input parameters properties: is_default: type: boolean limit: type: integer description: Page limit (default 100) format: int64 example: '100' maximum: 250 minimum: 0 offset: type: integer description: Page offset (default 0) format: int64 example: '0' q: type: string description: Search by catalog name maxLength: 512 title: ListCatalogsParams required: - data - params title: ListCatalogsResponse '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: createCatalog summary: Create catalog tags: - catalogs requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateCatalogRequestBody' required: true responses: '201': description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CatalogResponseData' params: type: object description: Input parameters title: CreateCatalogParams required: - data - params title: CreateCatalogResponse '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' /catalogs/{catalog_id}: get: operationId: getCatalog summary: Get catalog tags: - catalogs parameters: - name: catalog_id in: path description: catalog_id required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CatalogResponseData' params: type: object description: Input parameters title: GetCatalogParams required: - data - params title: GetCatalogResponse '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' put: operationId: updateCatalog summary: Update catalog tags: - catalogs parameters: - name: catalog_id in: path description: catalog_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateCatalogRequestBody' required: true responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CatalogResponseData' params: type: object description: Input parameters title: UpdateCatalogParams required: - data - params title: UpdateCatalogResponse '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: deleteCatalog summary: Delete catalog tags: - catalogs parameters: - name: catalog_id in: path description: catalog_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: DeleteCatalogParams required: - data - params title: DeleteCatalogResponse '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' /catalogs/{catalog_id}/configuration: get: operationId: getConfiguration summary: Get configuration tags: - catalogs parameters: - name: catalog_id in: path description: catalog_id required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CatalogConfigurationResponseData' params: type: object description: Input parameters title: GetConfigurationParams required: - data - params title: GetConfigurationResponse '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' put: operationId: updateConfiguration summary: Update configuration tags: - catalogs parameters: - name: catalog_id in: path description: catalog_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateCatalogConfigurationRequestBody' required: true responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CatalogResponseData' params: type: object description: Input parameters title: UpdateConfigurationParams required: - data - params title: UpdateConfigurationResponse '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' /catalogs/{catalog_id}/credit-bundles: get: operationId: getCreditBundlesInCatalog summary: Get credit bundles in catalog tags: - catalogs parameters: - name: catalog_id in: path description: catalog_id required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CatalogCreditBundleIDsResponseData' params: type: object description: Input parameters title: GetCreditBundlesInCatalogParams required: - data - params title: GetCreditBundlesInCatalogResponse '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /catalogs/{catalog_id}/credit-bundles/{credit_bundle_id}: post: operationId: addCreditBundle summary: Add credit bundle tags: - catalogs parameters: - name: catalog_id in: path description: catalog_id required: true schema: type: string - name: credit_bundle_id in: path description: credit_bundle_id required: true schema: type: string responses: '204': description: No Content content: {} '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: removeCreditBundle summary: Remove credit bundle tags: - catalogs parameters: - name: catalog_id in: path description: catalog_id required: true schema: type: string - name: credit_bundle_id in: path description: credit_bundle_id required: true schema: type: string responses: '204': description: No Content content: {} '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' /catalogs/{catalog_id}/features: get: operationId: getDerivedFeatures summary: Get derived features tags: - catalogs parameters: - name: catalog_id in: path description: catalog_id required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CatalogDerivedFeaturesResponseData' params: type: object description: Input parameters title: GetDerivedFeaturesParams required: - data - params title: GetDerivedFeaturesResponse '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /catalogs/{catalog_id}/plans: get: operationId: getPlansInCatalog summary: Get plans in catalog tags: - catalogs parameters: - name: catalog_id in: path description: catalog_id required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CatalogPlanIDsResponseData' params: type: object description: Input parameters title: GetPlansInCatalogParams required: - data - params title: GetPlansInCatalogResponse '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /catalogs/{catalog_id}/plans/{plan_id}: post: operationId: addPlan summary: Add plan tags: - catalogs parameters: - name: catalog_id in: path description: catalog_id required: true schema: type: string - name: plan_id in: path description: plan_id required: true schema: type: string responses: '204': description: No Content content: {} '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: removePlan summary: Remove plan tags: - catalogs parameters: - name: catalog_id in: path description: catalog_id required: true schema: type: string - name: plan_id in: path description: plan_id required: true schema: type: string responses: '204': description: No Content content: {} '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: plan_version_ids in: query description: >- Filter companies by one or more plan version IDs (each ID starts with plvr_). Takes precedence over plan_version_id when set. schema: type: array description: >- Filter companies by one or more plan version IDs (each ID starts with plvr_). Takes precedence over plan_version_id when set. items: type: string maxItems: 100 - 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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_) plan_version_ids: type: array description: >- Filter companies by one or more plan version IDs (each ID starts with plvr_). Takes precedence over plan_version_id when set. items: type: string maxItems: 100 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/{company_id}/billing-details: get: operationId: getCompanyBillingDetails summary: Get company billing details tags: - checkout 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/CompanyBillingDetailsResponseData' params: type: object description: Input parameters title: GetCompanyBillingDetailsParams required: - data - params title: GetCompanyBillingDetailsResponse '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' put: operationId: updateCompanyBillingDetails summary: Update company billing details tags: - checkout parameters: - name: company_id in: path description: company_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateCompanyBillingDetailsRequestBody' required: true responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/CompanyBillingDetailsResponseData' params: type: object description: Input parameters title: UpdateCompanyBillingDetailsParams required: - data - params title: UpdateCompanyBillingDetailsResponse '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: plan_version_ids in: query description: >- Filter companies by one or more plan version IDs (each ID starts with plvr_). Takes precedence over plan_version_id when set. schema: type: array description: >- Filter companies by one or more plan version IDs (each ID starts with plvr_). Takes precedence over plan_version_id when set. items: type: string maxItems: 100 - 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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_) plan_version_ids: type: array description: >- Filter companies by one or more plan version IDs (each ID starts with plvr_). Takes precedence over plan_version_id when set. items: type: string maxItems: 100 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-billing-entity: get: operationId: getCompanyBillingEntity summary: Get company billing entity tags: - companies parameters: - name: company_id in: query schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: '#/components/schemas/CompanyBillingEntityResponseData' title: GetCompanyBillingEntityResponseData maxItems: 250 params: type: object description: Input parameters properties: company_id: type: string title: GetCompanyBillingEntityParams required: - data - params title: GetCompanyBillingEntityResponse '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-billing-entity-subscriptions: get: operationId: getBillingEntityChildSubscriptions summary: Get billing entity child subscriptions tags: - companies parameters: - name: company_id in: query schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: data: type: array items: $ref: >- #/components/schemas/CompanyBillingEntitySubscriptionResponseData title: GetBillingEntityChildSubscriptionsResponseData maxItems: 250 params: type: object description: Input parameters properties: company_id: type: string title: GetBillingEntityChildSubscriptionsParams required: - data - params title: GetBillingEntityChildSubscriptionsResponse '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: 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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/{component_id}/catalog: put: operationId: bindCatalog summary: Bind catalog tags: - components parameters: - name: component_id in: path description: component_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/BindCatalogRequestBody' 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: BindCatalogParams required: - data - params title: BindCatalogResponse '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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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}/mark-paid: put: operationId: markCustomPlanBillingPaid summary: Mark custom plan billing paid 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/MarkCustomPlanBillingPaidRequestBody' 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: MarkCustomPlanBillingPaidParams required: - data - params title: MarkCustomPlanBillingPaidResponse '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-plan-bundles: post: operationId: createCustomPlanBundle summary: Create custom plan bundle tags: - planbundle requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateCustomPlanBundleRequestBody' 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: CreateCustomPlanBundleParams required: - data - params title: CreateCustomPlanBundleResponse '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: get: operationId: listDataExports summary: List data exports tags: - dataexports parameters: - name: export_type in: query schema: $ref: '#/components/schemas/DataExportType' - name: status in: query schema: $ref: '#/components/schemas/DataExportStatus' - name: limit in: query description: Page limit (default 100) schema: type: integer description: Page limit (default 100) format: int64 example: '100' maximum: 250 minimum: 0 - 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/DataExportResponseData' title: ListDataExportsResponseData maxItems: 250 params: type: object description: Input parameters properties: export_type: $ref: '#/components/schemas/DataExportType' limit: type: integer description: Page limit (default 100) format: int64 example: '100' maximum: 250 minimum: 0 offset: type: integer description: Page offset (default 0) format: int64 example: '0' status: $ref: '#/components/schemas/DataExportStatus' title: ListDataExportsParams required: - data - params title: ListDataExportsResponse '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: 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}: get: operationId: getDataExport summary: Get data export tags: - dataexports parameters: - name: data_export_id in: path description: data_export_id required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/DataExportResponseData' params: type: object description: Input parameters title: GetDataExportParams required: - data - params title: GetDataExportResponse '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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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: managed_by in: query description: >- Filter for features managed by a billing provider, or by Schematic (no billing provider) schema: allOf: - $ref: '#/components/schemas/BillingProviderType' description: >- Filter for features managed by a billing provider, or by Schematic (no billing provider) - 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 managed_by: allOf: - $ref: '#/components/schemas/BillingProviderType' description: >- Filter for features managed by a billing provider, or by Schematic (no billing provider) 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: managed_by in: query description: >- Filter for features managed by a billing provider, or by Schematic (no billing provider) schema: allOf: - $ref: '#/components/schemas/BillingProviderType' description: >- Filter for features managed by a billing provider, or by Schematic (no billing provider) - 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 managed_by: allOf: - $ref: '#/components/schemas/BillingProviderType' description: >- Filter for features managed by a billing provider, or by Schematic (no billing provider) 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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: managed_by in: query description: >- Filter for features managed by a billing provider, or by Schematic (no billing provider) schema: allOf: - $ref: '#/components/schemas/BillingProviderType' description: >- Filter for features managed by a billing provider, or by Schematic (no billing provider) - 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 managed_by: allOf: - $ref: '#/components/schemas/BillingProviderType' description: >- Filter for features managed by a billing provider, or by Schematic (no billing provider) 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: managed_by in: query description: >- Filter for features managed by a billing provider, or by Schematic (no billing provider) schema: allOf: - $ref: '#/components/schemas/BillingProviderType' description: >- Filter for features managed by a billing provider, or by Schematic (no billing provider) - 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 managed_by: allOf: - $ref: '#/components/schemas/BillingProviderType' description: >- Filter for features managed by a billing provider, or by Schematic (no billing provider) 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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/install: post: operationId: installIntegration summary: Install integration tags: - integrationsapi requestBody: content: application/json: schema: $ref: '#/components/schemas/InstallIntegrationRequestBody' required: true responses: '201': description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/IntegrationInstallResponseData' params: type: object description: Input parameters title: InstallIntegrationParams required: - data - params title: InstallIntegrationResponse '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/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: loadSampleDataSet summary: Load sample data set 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: LoadSampleDataSetParams required: - data - params title: LoadSampleDataSetResponse '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /integrations/stripe/v2/assume-installed: post: operationId: assumeStripeInstalled summary: Assume stripe installed tags: - integrationsapi requestBody: content: application/json: schema: $ref: '#/components/schemas/InstallIntegrationRequestBody' required: true responses: '201': description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/IntegrationInstallResponseData' params: type: object description: Input parameters title: AssumeStripeInstalledParams required: - data - params title: AssumeStripeInstalledResponse '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/v2/install: post: operationId: installStripe summary: Install stripe tags: - integrationsapi requestBody: content: application/json: schema: $ref: '#/components/schemas/InstallIntegrationRequestBody' required: true responses: '201': description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/IntegrationInstallResponseData' params: type: object description: Input parameters title: InstallStripeParams required: - data - params title: InstallStripeResponse '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/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' /licenses: get: operationId: listLicenses summary: List licenses tags: - licenses parameters: - name: feature_ids in: query schema: type: array items: type: string maxItems: 100 - 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' maximum: 250 minimum: 0 - 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/LicenseResponseData' title: ListLicensesResponseData maxItems: 250 params: type: object description: Input parameters properties: feature_ids: type: array items: type: string maxItems: 100 ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: '100' maximum: 250 minimum: 0 name: type: string maxLength: 255 offset: type: integer description: Page offset (default 0) format: int64 example: '0' title: ListLicensesParams required: - data - params title: ListLicensesResponse '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' /licenses/{license_id}: get: operationId: getSingleLicense summary: Get single license tags: - licenses parameters: - name: license_id in: path description: license_id required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/LicenseResponseData' params: type: object description: Input parameters title: GetSingleLicenseParams required: - data - params title: GetSingleLicenseResponse '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /licenses/count: get: operationId: countLicenses summary: Count licenses tags: - licenses parameters: - name: feature_ids in: query schema: type: array items: type: string maxItems: 100 - 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' maximum: 250 minimum: 0 - 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_ids: type: array items: type: string maxItems: 100 ids: type: array items: type: string maxItems: 100 limit: type: integer description: Page limit (default 100) format: int64 example: '100' maximum: 250 minimum: 0 name: type: string maxLength: 255 offset: type: integer description: Page offset (default 0) format: int64 example: '0' title: CountLicensesParams required: - data - params title: CountLicensesResponse '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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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/{plan_version_company_migration_id}/retry: post: operationId: retryCompanyMigration summary: Retry company migration tags: - planmigrations parameters: - name: plan_version_company_migration_id in: path description: plan_version_company_migration_id required: true schema: type: string responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: >- #/components/schemas/PlanVersionCompanyMigrationResponseData params: type: object description: Input parameters title: RetryCompanyMigrationParams required: - data - params title: RetryCompanyMigrationResponse '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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' post: operationId: createMigration summary: Create migration tags: - planmigrations requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateMigrationInput' required: true responses: '201': description: Created content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanVersionMigrationResponseData' params: type: object description: Input parameters title: CreateMigrationParams required: - data - params title: CreateMigrationResponse '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/{plan_version_migration_id}/retry: post: operationId: retryMigration summary: Retry migration tags: - planmigrations parameters: - name: plan_version_migration_id in: path description: plan_version_migration_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/RetryMigrationRequestBody' required: true responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/PlanVersionMigrationResponseData' params: type: object description: Input parameters title: RetryMigrationParams required: - data - params title: RetryMigrationResponse '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/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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' /plan-version-migrations/preview: post: operationId: previewMigration summary: Preview migration tags: - planmigrations requestBody: content: application/json: schema: $ref: '#/components/schemas/PreviewMigrationRequestBody' required: true responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: >- #/components/schemas/PlanVersionMigrationPreviewResponseData params: type: object description: Input parameters title: PreviewMigrationParams required: - data - params title: PreviewMigrationResponse '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: company_scoped_only in: query description: >- Only return plans that are scoped to a company (custom plans assigned to a company) schema: type: boolean description: >- Only return plans that are scoped to a company (custom plans assigned to a company) - 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: with_entitlements in: query description: Include each plan's entitlements in the response schema: type: boolean description: Include each plan's entitlements in the response - 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' maximum: 250 minimum: 0 - 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 company_scoped_only: type: boolean description: >- Only return plans that are scoped to a company (custom plans assigned to a company) exclude_company_scoped: type: boolean description: >- Exclude plans that are scoped to a company (custom plans assigned to a company) for_fallback_plan: type: boolean description: >- Filter for plans valid as fallback plans (not linked to billing) for_initial_plan: type: boolean description: >- Filter for plans valid as initial plans (not linked to billing, free, or auto-cancelling trial) for_trial_expiry_plan: type: boolean description: >- Filter for plans valid as trial expiry plans (not linked to billing or free) has_product_id: type: boolean description: Filter out plans that do not have a billing product ID ids: type: array items: type: string 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' maximum: 250 minimum: 0 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) with_entitlements: type: boolean description: Include each plan's entitlements in the response without_entitlement_for: type: string description: >- Filter out plans that already have a plan entitlement for the specified feature ID without_paid_product_id: type: boolean description: Filter out plans that have a paid billing product ID 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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: company_scoped_only in: query description: >- Only return plans that are scoped to a company (custom plans assigned to a company) schema: type: boolean description: >- Only return plans that are scoped to a company (custom plans assigned to a company) - 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: with_entitlements in: query description: Include each plan's entitlements in the response schema: type: boolean description: Include each plan's entitlements in the response - 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' maximum: 250 minimum: 0 - 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_scoped_only: type: boolean description: >- Only return plans that are scoped to a company (custom plans assigned to a company) exclude_company_scoped: type: boolean description: >- Exclude plans that are scoped to a company (custom plans assigned to a company) for_fallback_plan: type: boolean description: >- Filter for plans valid as fallback plans (not linked to billing) for_initial_plan: type: boolean description: >- Filter for plans valid as initial plans (not linked to billing, free, or auto-cancelling trial) for_trial_expiry_plan: type: boolean description: >- Filter for plans valid as trial expiry plans (not linked to billing or free) has_product_id: type: boolean description: Filter out plans that do not have a billing product ID ids: type: array items: type: string 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' maximum: 250 minimum: 0 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) with_entitlements: type: boolean description: Include each plan's entitlements in the response without_entitlement_for: type: string description: >- Filter out plans that already have a plan entitlement for the specified feature ID without_paid_product_id: type: boolean description: Filter out plans that have a paid billing product ID 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' /user-usage-by-company: get: operationId: getUserUsageByCompany summary: Get user usage by company tags: - entitlements parameters: - name: company_id in: query description: Company to break usage down for required: true schema: type: string description: Company to break usage down for - name: end_time in: query description: End of the usage window (exclusive); defaults to now schema: type: string description: End of the usage window (exclusive); defaults to now format: date-time - name: feature_id in: query description: Restrict to a single event-based feature schema: type: string description: Restrict to a single event-based feature - name: start_time in: query description: Start of the usage window; defaults to 30 days before the end schema: type: string description: Start of the usage window; defaults to 30 days before the end format: date-time responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/UserUsageByCompanyResponseData' params: type: object description: Input parameters properties: company_id: type: string description: Company to break usage down for end_time: type: string description: End of the usage window (exclusive); defaults to now format: date-time feature_id: type: string description: Restrict to a single event-based feature start_time: type: string description: >- Start of the usage window; defaults to 30 days before the end format: date-time title: GetUserUsageByCompanyParams required: - data - params title: GetUserUsageByCompanyResponse '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/ServerError' /user-usage-detail: get: operationId: getUserUsageDetail summary: Get user usage detail tags: - entitlements parameters: - name: company_id in: query description: Company the user belongs to required: true schema: type: string description: Company the user belongs to - name: end_time in: query description: End of the usage window (exclusive); defaults to now schema: type: string description: End of the usage window (exclusive); defaults to now format: date-time - name: start_time in: query description: Start of the usage window; defaults to 30 days before the end schema: type: string description: Start of the usage window; defaults to 30 days before the end format: date-time - name: user_id in: query description: User to break usage down for required: true schema: type: string description: User to break usage down for responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/UserUsageDetailResponseData' params: type: object description: Input parameters properties: company_id: type: string description: Company the user belongs to end_time: type: string description: End of the usage window (exclusive); defaults to now format: date-time start_time: type: string description: >- Start of the usage window; defaults to 30 days before the end format: date-time user_id: type: string description: User to break usage down for title: GetUserUsageDetailParams required: - data - params title: GetUserUsageDetailResponse '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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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/{webhook_id}/test: post: operationId: sendTestWebhookAction summary: Send test webhook action tags: - webhooks parameters: - name: webhook_id in: path description: webhook_id required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/TestWebhookRequestBody' required: true responses: '200': description: OK content: application/json: schema: type: object properties: data: $ref: '#/components/schemas/TestWebhookResponseData' params: type: object description: Input parameters title: SendTestWebhookActionParams required: - data - params title: SendTestWebhookActionResponse '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' maximum: 250 minimum: 0 - 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' maximum: 250 minimum: 0 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: catalogs - name: checkout - name: companies - name: components - name: componentspublic - name: credits - name: dataexports - name: entitlements - name: events - name: features - name: insights - name: integrationsapi - name: licenses - name: planbundle - name: plangroups - name: planmigrations - name: plans - name: scheduledcheckout - name: webhooks