Read this project’s monetization configuration in the shape monetization.apply accepts, plus what the document cannot state and what it is silent about.
Null when the project has no plans to integrate against
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Unprice Documentation","colors":{"primary":"#ab6400","light":"#ffc53d","dark":"#ffc53d"},"logo":{"light":"https://mintcdn.com/unprice/vXUWXLNyOcaxnjxH/logo/light.svg?fit=max\u0026auto=format\u0026n=vXUWXLNyOcaxnjxH\u0026q=85\u0026s=ce4a214a5ae95d854ad7e6767a821d25","dark":"https://mintcdn.com/unprice/vXUWXLNyOcaxnjxH/logo/dark.svg?fit=max\u0026auto=format\u0026n=vXUWXLNyOcaxnjxH\u0026q=85\u0026s=617e7d83cd1ffb1b6414f793eefa4683"},"favicon":"https://mintcdn.com/unprice/vXUWXLNyOcaxnjxH/favicon.svg?fit=max\u0026auto=format\u0026n=vXUWXLNyOcaxnjxH\u0026q=85\u0026s=9085d9c2380ef09b41e819234a4a858e","api":{"playground":{"display":"interactive"}},"navbar":{"links":[{"href":"mailto:seb@unprice.dev","label":"Support"},{"href":"https://unprice.dev/manifesto","label":"Manifesto"},{"href":"https://app.unprice.dev","label":"Dashboard"}]},"footer":{"socials":{"github":"https://github.com/jhonsfran1165/unprice"}},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Home","icon":"globe","href":"https://unprice.dev"},{"anchor":"Community","icon":"discord","href":"https://discord.gg/unprice"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"unprice","hasAudioNarration":false,"actualSubdomain":"unprice","customDomains":["docs.unprice.dev"],"gitSource":{"type":"github","owner":"jhonsfran","repo":"unprice","deployBranch":"main","contentDirectory":"apps/docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae9e628599afdae0f29e6de","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"default","tag":"API Reference","count":53},{"language":"default","tag":"Endpoints","count":39},{"language":"default","tag":"SDKs","count":24},{"language":"default","tag":"TypeScript SDK","count":24},{"language":"default","tag":"Errors","count":23},{"language":"default","tag":"Guides","count":20},{"language":"default","tag":"budgets","count":10},{"language":"default","tag":"Budgets","count":7},{"language":"default","tag":"Introduction","count":6},{"language":"default","tag":"Features","count":6}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/monetization/get-monetization-configuration","slug":"/api-reference/monetization/get-monetization-configuration","pageMetadata":{"title":"get monetization configuration","description":"Read this project's monetization configuration in the shape monetization.apply accepts, plus what the document cannot state and what it is silent about.","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/monetization/get","href":"/api-reference/monetization/get-monetization-configuration","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Read this project’s monetization configuration in the shape monetization.apply accepts, plus what the document cannot state and what it is silent about.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"get monetization configuration","description":"Read this project's monetization configuration in the shape monetization.apply accepts, plus what the document cannot state and what it is silent about.","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/monetization/get","href":"/api-reference/monetization/get-monetization-configuration","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"monetization.get","summary":"get monetization configuration","description":"Read this project's monetization configuration in the shape monetization.apply accepts, plus what the document cannot state and what it is silent about.","tags":["monetization"],"x-unprice":{"audience":"public","category":"configuration","docs":{"expose":true},"sdk":{"path":["monetization","get"]}},"responses":{"200":"3489425b-efce-45ed-8277-dc7a9c53e471","400":"803dc00e-d731-4ac7-a357-518ba01ae61a","401":"872d1e95-465f-46e6-853a-6ad9cb56ce00","403":"cbcb4f13-05b7-48db-a2a6-91d10417d824","404":"d8b7813a-ce7b-43cd-87b2-afd0f1f98c96","409":"e60807dd-de7e-4f42-bc94-ec9676d47c8b","412":"2d3e14f2-451b-4189-9d84-73f49f6106d4","413":"2c9635c8-7375-4045-8ca2-719f8a25621c","429":"a1b74fb9-a6a2-4c3c-b3a3-8491c17c135c","500":"175e683b-2be0-42a6-ba3d-defec7a4cdbc"},"method":"get","type":"path","servers":["2a1f5b6e-fcd9-4479-b8f0-d8e3524b9e6d","4f0ca25b-7a5f-420c-a0d1-fdd91868a1df","3a662e90-2597-4145-b465-c73b343b810b"],"security":["dd889c9d-c52d-49a3-b0ca-a11333122ffc"],"path":"/v1/monetization/get","baseUrlOptions":["https://api.unprice.dev","http://localhost:8787","https://preview-api.unprice.dev"],"title":"get monetization configuration","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"responses":{"3489425b-efce-45ed-8277-dc7a9c53e471":{"description":"The project's configuration document, its per-plan version state, and everything the document could not carry","content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","properties":{"plans":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","minLength":3,"description":"URL-friendly plan identifier (lowercase, hyphens). Examples: 'starter', 'pro', 'enterprise'. This becomes the parent for all plan versions.","isRequired":true,"uniqueKey":"config.plans.items.[INDEX].slug","typeLabel":"string"},"title":{"type":"string","description":"Human-readable plan title (1-50 chars). Will be UPPERCASED. Examples: 'Starter', 'Pro', 'Enterprise'","isRequired":true,"uniqueKey":"config.plans.items.[INDEX].title","typeLabel":"string"},"version":{"type":"object","properties":{"currency":{"type":"string","enum":["USD","EUR"],"description":"Required. ISO 4217 currency code. Examples: 'USD', 'EUR'. Determines the currency for all pricing in this version","isRequired":true,"uniqueKey":"config.plans.items.[INDEX].version.currency","typeLabel":"enum\u003cstring>"},"paymentProvider":{"type":"string","enum":["stripe","square","sandbox"],"isRequired":true,"uniqueKey":"config.plans.items.[INDEX].version.paymentProvider","typeLabel":"enum\u003cstring>"},"billingConfig":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Human-readable cadence name. Example: 'monthly'","isRequired":true,"uniqueKey":"config.plans.items.[INDEX].version.billingConfig.name","typeLabel":"string"},"interval":{"type":"string","enum":["month","year","week","day","minute","onetime"],"description":"Billing interval. Example: 'month'","isRequired":true,"uniqueKey":"config.plans.items.[INDEX].version.billingConfig.interval","typeLabel":"enum\u003cstring>"},"intervalCount":{"type":"integer","minimum":1,"maximum":60,"description":"Number of intervals per billing period","isRequired":true,"uniqueKey":"config.plans.items.[INDEX].version.billingConfig.intervalCount","typeLabel":"integer"}},"required":["name","interval","intervalCount"],"additionalProperties":false,"description":"Billing cadence for the plan version. The server derives billingAnchor and planType from it","isRequired":true,"uniqueKey":"config.plans.items.[INDEX].version.billingConfig","typeLabel":"object"},"features":{"type":"array","items":{"type":"object","properties":{"featureSlug":{"type":"string","minLength":1,"description":"Slug of a feature declared in this document","isRequired":true,"uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].featureSlug","typeLabel":"string"},"featureType":{"type":"string","enum":["flat","tier","package","usage"],"description":"'flat', 'tier', 'package', or 'usage'","isRequired":true,"uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].featureType","typeLabel":"enum\u003cstring>"},"config":{"type":"object","properties":{"price":{"type":"string","pattern":"^\\d{1,8}(\\.\\d{1,8})?$","description":"Price as a decimal string. Example: '0.000002'","uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].config.price","typeLabel":"string"},"usageMode":{"type":"string","enum":["tier","package","unit"],"description":"How usage is calculated and billed: 'unit' (per-unit pricing), 'tier' (volume-based tiers), or 'package' (bundle of units)","uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].config.usageMode","typeLabel":"enum\u003cstring>"},"tierMode":{"type":"string","enum":["volume","graduated"],"description":"Tier calculation method when usageMode is 'tier': 'volume' or 'graduated'. Only applicable when usageMode is 'tier'","uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].config.tierMode","typeLabel":"enum\u003cstring>"},"tiers":{"type":"array","items":{"type":"object","properties":{"unitPrice":{"type":"string","pattern":"^\\d{1,8}(\\.\\d{1,8})?$","description":"Price per unit inside this tier, as a decimal string","isRequired":true,"uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].config.tiers.items.[INDEX].unitPrice","typeLabel":"string"},"flatPrice":{"type":"string","pattern":"^\\d{1,8}(\\.\\d{1,8})?$","description":"Fixed price for entering this tier, as a decimal string","isRequired":true,"uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].config.tiers.items.[INDEX].flatPrice","typeLabel":"string"},"firstUnit":{"type":"integer","minimum":1,"description":"The starting unit number for this tier (inclusive). Must be 1 for the first tier, and consecutive with previous tier's lastUnit + 1 for subsequent tiers","isRequired":true,"uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].config.tiers.items.[INDEX].firstUnit","typeLabel":"integer"},"lastUnit":{"oneOf":[{"type":"integer","minimum":1,"description":"The ending unit number for this tier (inclusive). Set to null for the final tier to indicate unlimited. Example: 1000 means this tier covers up to 1000 units","isRequired":true,"uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].config.tiers.items.[INDEX].lastUnit.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":1,"description":"The ending unit number for this tier (inclusive). Set to null for the final tier to indicate unlimited. Example: 1000 means this tier covers up to 1000 units","isRequired":true,"uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].config.tiers.items.[INDEX].lastUnit.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].config.tiers.items.[INDEX].lastUnit","typeLabel":"integer | null"},"label":{"type":"string","description":"Display name for this tier shown in pricing UI. Examples: 'Starter', 'Growth', 'Enterprise', '1-100 units'","uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].config.tiers.items.[INDEX].label","typeLabel":"string"}},"required":["unitPrice","flatPrice","firstUnit","lastUnit"],"additionalProperties":false,"description":"Configuration for a single pricing tier defining unit ranges and associated pricing","uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].config.tiers.items.[INDEX]","typeLabel":"object"},"description":"Pricing tiers, decimal strings","uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].config.tiers","typeLabel":"object[]"},"units":{"type":"integer","minimum":1,"description":"Number of units in a package when usageMode is 'package'. Required for package mode. Example: 100 API calls per package","uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].config.units","typeLabel":"integer"}},"additionalProperties":false,"description":"Pricing configuration. Prices cross the boundary as decimal strings, never as Dinero","isRequired":true,"uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].config","typeLabel":"object"},"meterConfig":{"type":"object","properties":{"eventSlug":{"type":"string","minLength":1,"isRequired":true,"uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].meterConfig.eventSlug","typeLabel":"string"},"aggregationMethod":{"type":"string","enum":["sum","count","max","latest"],"description":"How to aggregate usage events within the current billing period. 'sum' totals values, 'count' counts events, 'max' keeps the highest value, and 'latest' keeps the most recent value.","isRequired":true,"uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].meterConfig.aggregationMethod","typeLabel":"enum\u003cstring>"},"aggregationField":{"type":"string","minLength":1,"uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].meterConfig.aggregationField","typeLabel":"string"}},"required":["eventSlug","aggregationMethod"],"additionalProperties":false,"description":"How usage is measured from a declared event","uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].meterConfig","typeLabel":"object"},"limit":{"oneOf":[{"type":"number","description":"Maximum usage per reset window. Omit for unlimited","uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].limit.oneOf.0","typeLabel":"number"},{"type":"string","description":"Maximum usage per reset window. Omit for unlimited","pattern":"^\\d+$","uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].limit.oneOf.1","typeLabel":"string"}],"uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].limit","typeLabel":"number | string"},"resetConfig":{"type":"object","properties":{"interval":{"type":"string","enum":["month","year","week","day","minute","onetime"],"description":"Reset interval. Example: 'day'","isRequired":true,"uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].resetConfig.interval","typeLabel":"enum\u003cstring>"},"intervalCount":{"type":"integer","minimum":1,"maximum":60,"default":1,"description":"Number of intervals per reset window. Defaults to 1","uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].resetConfig.intervalCount","typeLabel":"integer"}},"required":["interval"],"additionalProperties":false,"description":"When usage counters reset. Omit to reset on the billing cadence","uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX].resetConfig","typeLabel":"object"}},"required":["featureSlug","featureType","config"],"additionalProperties":false,"uniqueKey":"config.plans.items.[INDEX].version.features.items.[INDEX]","typeLabel":"object"},"minItems":1,"isRequired":true,"uniqueKey":"config.plans.items.[INDEX].version.features","typeLabel":"object[]"},"paymentMethodRequired":{"type":"boolean","default":true,"description":"Whether a customer must provide a payment method before starting this plan. Defaults to true","uniqueKey":"config.plans.items.[INDEX].version.paymentMethodRequired","typeLabel":"boolean"}},"required":["currency","paymentProvider","billingConfig","features"],"additionalProperties":false,"isRequired":true,"uniqueKey":"config.plans.items.[INDEX].version","typeLabel":"object"},"description":{"type":"string","description":"Description of the plan explaining its target audience and value proposition","uniqueKey":"config.plans.items.[INDEX].description","typeLabel":"string"},"defaultPlan":{"oneOf":[{"type":"boolean","description":"Whether this is the default plan shown to new users (only one plan can be default). Use for your 'Starter' or 'Free' tier.","uniqueKey":"config.plans.items.[INDEX].defaultPlan.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Whether this is the default plan shown to new users (only one plan can be default). Use for your 'Starter' or 'Free' tier.","uniqueKey":"config.plans.items.[INDEX].defaultPlan.oneOf.1","typeLabel":"null"}],"uniqueKey":"config.plans.items.[INDEX].defaultPlan","typeLabel":"boolean | null"}},"required":["slug","title","version"],"additionalProperties":false,"uniqueKey":"config.plans.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"config.plans","typeLabel":"object[]"},"events":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9._-]+$","description":"Project-scoped SDK event slug. Example: 'llm_completion' or 'storage_snapshot'","isRequired":true,"uniqueKey":"config.events.items.[INDEX].slug","typeLabel":"string"},"name":{"type":"string","minLength":1,"maxLength":64,"description":"Human-readable event name. Example: 'AI Completion'","isRequired":true,"uniqueKey":"config.events.items.[INDEX].name","typeLabel":"string"},"availableProperties":{"oneOf":[{"type":"array","items":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9._-]+$","uniqueKey":"config.events.items.[INDEX].availableProperties.oneOf.0.items.[INDEX]","typeLabel":"string"},"description":"Optional list of numeric payload properties available for aggregation. Example: ['input_tokens', 'output_tokens']","uniqueKey":"config.events.items.[INDEX].availableProperties.oneOf.0","typeLabel":"string[]"},{"type":"null","items":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z0-9._-]+$"},"description":"Optional list of numeric payload properties available for aggregation. Example: ['input_tokens', 'output_tokens']","uniqueKey":"config.events.items.[INDEX].availableProperties.oneOf.1","typeLabel":"null"}],"uniqueKey":"config.events.items.[INDEX].availableProperties","typeLabel":"string[] | null"}},"required":["slug","name"],"additionalProperties":false,"description":"An SDK event the application reports. Meters aggregate over these","uniqueKey":"config.events.items.[INDEX]","typeLabel":"object"},"default":[],"uniqueKey":"config.events","typeLabel":"object[]"},"features":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","minLength":1,"description":"URL-friendly unique identifier for the feature. Must be lowercase with hyphens only. Used for API lookups and references. Example: 'api-calls', 'storage-gb', 'team-members'","isRequired":true,"uniqueKey":"config.features.items.[INDEX].slug","typeLabel":"string"},"title":{"type":"string","minLength":1,"maxLength":50,"description":"Human-readable name for the feature displayed to users. Must contain only letters, numbers, and spaces. Example: 'API Calls', 'Storage GB', 'Team Members'","isRequired":true,"uniqueKey":"config.features.items.[INDEX].title","typeLabel":"string"},"description":{"oneOf":[{"type":"string","description":"Detailed explanation of what the feature provides or enables. Helps users understand the feature's purpose and value. Example: 'Number of API requests allowed per billing period'","uniqueKey":"config.features.items.[INDEX].description.oneOf.0","typeLabel":"string"},{"type":"null","description":"Detailed explanation of what the feature provides or enables. Helps users understand the feature's purpose and value. Example: 'Number of API requests allowed per billing period'","uniqueKey":"config.features.items.[INDEX].description.oneOf.1","typeLabel":"null"}],"uniqueKey":"config.features.items.[INDEX].description","typeLabel":"string | null"},"unitOfMeasure":{"type":"string","default":"units","description":"Unit of measurement for the feature. Describes what is being counted or measured. Examples: 'calls', 'GB', 'seats', 'tokens', 'requests', 'minutes'. Defaults to 'units' if not specified","uniqueKey":"config.features.items.[INDEX].unitOfMeasure","typeLabel":"string"}},"required":["slug","title"],"additionalProperties":false,"description":"A feature the application sells. Plan versions price it","uniqueKey":"config.features.items.[INDEX]","typeLabel":"object"},"default":[],"uniqueKey":"config.features","typeLabel":"object[]"}},"required":["plans"],"additionalProperties":false,"description":"A project's monetization configuration, in the shape monetization.apply accepts. Empty when the project has no plans","isRequired":true,"uniqueKey":"config","typeLabel":"object"},"plans":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","isRequired":true,"uniqueKey":"plans.items.[INDEX].slug","typeLabel":"string"},"publishedVersionId":{"oneOf":[{"type":"string","description":"The version customers are on right now, or null while the plan is unpublished","isRequired":true,"uniqueKey":"plans.items.[INDEX].publishedVersionId.oneOf.0","typeLabel":"string"},{"type":"null","description":"The version customers are on right now, or null while the plan is unpublished","isRequired":true,"uniqueKey":"plans.items.[INDEX].publishedVersionId.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"plans.items.[INDEX].publishedVersionId","typeLabel":"string | null"},"draftVersionIds":{"type":"array","items":{"type":"string","uniqueKey":"plans.items.[INDEX].draftVersionIds.items.[INDEX]","typeLabel":"string"},"description":"Every unpublished version of this plan, most recently created first","isRequired":true,"uniqueKey":"plans.items.[INDEX].draftVersionIds","typeLabel":"string[]"}},"required":["slug","publishedVersionId","draftVersionIds"],"uniqueKey":"plans.items.[INDEX]","typeLabel":"object"},"description":"Version state per plan, in the same order as `config.plans`","isRequired":true,"uniqueKey":"plans","typeLabel":"object[]"},"unrepresentablePlans":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","isRequired":true,"uniqueKey":"unrepresentablePlans.items.[INDEX].slug","typeLabel":"string"},"reason":{"type":"string","enum":["no_version","no_features","unsupported_billing_config","invalid_version"],"isRequired":true,"uniqueKey":"unrepresentablePlans.items.[INDEX].reason","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"unrepresentablePlans.items.[INDEX].message","typeLabel":"string"}},"required":["slug","reason","message"],"description":"A plan left out of the document because the boundary cannot state its configuration","uniqueKey":"unrepresentablePlans.items.[INDEX]","typeLabel":"object"},"description":"Plans this project has that the document cannot describe. Reported, never hidden","isRequired":true,"uniqueKey":"unrepresentablePlans","typeLabel":"object[]"},"warnings":{"type":"array","items":{"type":"object","properties":{"planSlug":{"type":"string","isRequired":true,"uniqueKey":"warnings.items.[INDEX].planSlug","typeLabel":"string"},"featureSlug":{"oneOf":[{"type":"string","description":"Null for a warning about the plan version itself","isRequired":true,"uniqueKey":"warnings.items.[INDEX].featureSlug.oneOf.0","typeLabel":"string"},{"type":"null","description":"Null for a warning about the plan version itself","isRequired":true,"uniqueKey":"warnings.items.[INDEX].featureSlug.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"warnings.items.[INDEX].featureSlug","typeLabel":"string | null"},"code":{"type":"string","enum":["enforcement_settings_dropped","version_settings_dropped","feature_settings_dropped","meter_fields_dropped"],"isRequired":true,"uniqueKey":"warnings.items.[INDEX].code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"warnings.items.[INDEX].message","typeLabel":"string"}},"required":["planSlug","featureSlug","code","message"],"description":"Configuration this document is silent about. Emitted anyway, never silently dropped","uniqueKey":"warnings.items.[INDEX]","typeLabel":"object"},"description":"Stored configuration the emitted document is silent about","isRequired":true,"uniqueKey":"warnings","typeLabel":"object[]"},"integrationContract":{"oneOf":[{"type":"object","properties":{"defaultPlan":{"type":"object","properties":{"slug":{"type":"string","isRequired":true,"uniqueKey":"integrationContract.oneOf.0.defaultPlan.slug","typeLabel":"string"},"planVersionId":{"type":"string","isRequired":true,"uniqueKey":"integrationContract.oneOf.0.defaultPlan.planVersionId","typeLabel":"string"},"note":{"type":"string","isRequired":true,"uniqueKey":"integrationContract.oneOf.0.defaultPlan.note","typeLabel":"string"}},"required":["slug","planVersionId","note"],"isRequired":true,"uniqueKey":"integrationContract.oneOf.0.defaultPlan","typeLabel":"object"},"events":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","isRequired":true,"uniqueKey":"integrationContract.oneOf.0.events.items.[INDEX].slug","typeLabel":"string"},"name":{"type":"string","isRequired":true,"uniqueKey":"integrationContract.oneOf.0.events.items.[INDEX].name","typeLabel":"string"},"requiredProperties":{"type":"array","items":{"type":"string","uniqueKey":"integrationContract.oneOf.0.events.items.[INDEX].requiredProperties.items.[INDEX]","typeLabel":"string"},"description":"Numeric payload properties the application must send for the meters to work","isRequired":true,"uniqueKey":"integrationContract.oneOf.0.events.items.[INDEX].requiredProperties","typeLabel":"string[]"}},"required":["slug","name","requiredProperties"],"uniqueKey":"integrationContract.oneOf.0.events.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"integrationContract.oneOf.0.events","typeLabel":"object[]"},"features":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","isRequired":true,"uniqueKey":"integrationContract.oneOf.0.features.items.[INDEX].slug","typeLabel":"string"},"kind":{"type":"string","enum":["flat-access","usage-gate","usage-evidence","run-budget"],"description":"How the application integrates the feature: entitlement check only ('flat-access'), synchronous allowance check before the work ('usage-gate'), usage reported after the work ('usage-evidence'), or work executed inside a budgeted run ('run-budget')","isRequired":true,"uniqueKey":"integrationContract.oneOf.0.features.items.[INDEX].kind","typeLabel":"enum\u003cstring>"},"eventSlug":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"integrationContract.oneOf.0.features.items.[INDEX].eventSlug.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"integrationContract.oneOf.0.features.items.[INDEX].eventSlug.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"integrationContract.oneOf.0.features.items.[INDEX].eventSlug","typeLabel":"string | null"},"planSlugs":{"type":"array","items":{"type":"string","uniqueKey":"integrationContract.oneOf.0.features.items.[INDEX].planSlugs.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"integrationContract.oneOf.0.features.items.[INDEX].planSlugs","typeLabel":"string[]"}},"required":["slug","kind","eventSlug","planSlugs"],"uniqueKey":"integrationContract.oneOf.0.features.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"integrationContract.oneOf.0.features","typeLabel":"object[]"},"warnings":{"type":"array","items":{"type":"object","properties":{"featureSlug":{"type":"string","isRequired":true,"uniqueKey":"integrationContract.oneOf.0.warnings.items.[INDEX].featureSlug","typeLabel":"string"},"code":{"type":"string","enum":["usage_unknown_before_work"],"isRequired":true,"uniqueKey":"integrationContract.oneOf.0.warnings.items.[INDEX].code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","isRequired":true,"uniqueKey":"integrationContract.oneOf.0.warnings.items.[INDEX].message","typeLabel":"string"}},"required":["featureSlug","code","message"],"uniqueKey":"integrationContract.oneOf.0.warnings.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"integrationContract.oneOf.0.warnings","typeLabel":"object[]"}},"required":["defaultPlan","events","features","warnings"],"description":"Null when the project has no plans to integrate against","isRequired":true,"uniqueKey":"integrationContract.oneOf.0","typeLabel":"object"},{"type":"null","properties":{"defaultPlan":{"type":"object","properties":{"slug":{"type":"string"},"planVersionId":{"type":"string"},"note":{"type":"string"}},"required":["slug","planVersionId","note"]},"events":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"requiredProperties":{"type":"array","items":{"type":"string"},"description":"Numeric payload properties the application must send for the meters to work"}},"required":["slug","name","requiredProperties"]}},"features":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"kind":{"type":"string","enum":["flat-access","usage-gate","usage-evidence","run-budget"],"description":"How the application integrates the feature: entitlement check only ('flat-access'), synchronous allowance check before the work ('usage-gate'), usage reported after the work ('usage-evidence'), or work executed inside a budgeted run ('run-budget')"},"eventSlug":{"oneOf":[{"type":"string"},{"type":"null"}]},"planSlugs":{"type":"array","items":{"type":"string"}}},"required":["slug","kind","eventSlug","planSlugs"]}},"warnings":{"type":"array","items":{"type":"object","properties":{"featureSlug":{"type":"string"},"code":{"type":"string","enum":["usage_unknown_before_work"]},"message":{"type":"string"}},"required":["featureSlug","code","message"]}}},"required":["defaultPlan","events","features","warnings"],"description":"Null when the project has no plans to integrate against","isRequired":true,"uniqueKey":"integrationContract.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"integrationContract","typeLabel":"object | null"}},"required":["config","plans","unrepresentablePlans","warnings","integrationContract"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"config":{"plans":[{"slug":"\u003cstring>","title":"\u003cstring>","version":{"currency":"USD","paymentProvider":"stripe","billingConfig":{"name":"\u003cstring>","interval":"month","intervalCount":30},"features":[{"featureSlug":"\u003cstring>","featureType":"flat","config":{"price":"\u003cstring>","usageMode":"tier","tierMode":"volume","tiers":[{"unitPrice":"\u003cstring>","flatPrice":"\u003cstring>","firstUnit":2,"lastUnit":2,"label":"\u003cstring>"}],"units":2},"meterConfig":{"eventSlug":"\u003cstring>","aggregationMethod":"sum","aggregationField":"\u003cstring>"},"limit":123,"resetConfig":{"interval":"month","intervalCount":1}}],"paymentMethodRequired":true},"description":"\u003cstring>","defaultPlan":true}],"events":[],"features":[]},"plans":[{"slug":"\u003cstring>","publishedVersionId":"\u003cstring>","draftVersionIds":["\u003cstring>"]}],"unrepresentablePlans":[{"slug":"\u003cstring>","reason":"no_version","message":"\u003cstring>"}],"warnings":[{"planSlug":"\u003cstring>","featureSlug":"\u003cstring>","code":"enforcement_settings_dropped","message":"\u003cstring>"}],"integrationContract":{"defaultPlan":{"slug":"\u003cstring>","planVersionId":"\u003cstring>","note":"\u003cstring>"},"events":[{"slug":"\u003cstring>","name":"\u003cstring>","requiredProperties":["\u003cstring>"]}],"features":[{"slug":"\u003cstring>","kind":"flat-access","eventSlug":"\u003cstring>","planSlugs":["\u003cstring>"]}],"warnings":[{"featureSlug":"\u003cstring>","code":"usage_unknown_before_work","message":"\u003cstring>"}]}}}},"exampleType":"generated"}},"exampleType":"generated"},"803dc00e-d731-4ac7-a357-518ba01ae61a":{"description":"The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST"],"description":"A machine readable error code.","example":"BAD_REQUEST","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"docs":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://docs.unprice.dev/api-reference/errors/code/BAD_REQUEST","isRequired":true,"uniqueKey":"error.docs","typeLabel":"string"},"message":{"type":"string","description":"A human readable explanation of what went wrong","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Please always include the requestId in your error report","example":"req_1234","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"oneOf":[{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["invalid_config","slug_conflict","unresolved_reference"],"description":"What kind of failure this is","example":"invalid_config","isRequired":true,"uniqueKey":"error.details.oneOf.0.kind","typeLabel":"enum\u003cstring>"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"JSON path into the submitted document","example":"config.plans[0].version.features[1].featureSlug","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].message","typeLabel":"string"}},"required":["path","message"],"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX]","typeLabel":"object"},"description":"Per-location detail, when the failure has locations","uniqueKey":"error.details.oneOf.0.issues","typeLabel":"object[]"}},"uniqueKey":"error.details.oneOf.0","typeLabel":"object"},{"type":"object","required":["kind","blocked","balance"],"properties":{"kind":{"type":"string","enum":["budget_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.kind","typeLabel":"enum\u003cstring>"},"blocked":{"type":"object","properties":{"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.limitId","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.window","typeLabel":"enum\u003cstring>"},"remaining":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remaining","typeLabel":"string"},"held":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.held","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt","typeLabel":"integer | null"},"remedy":{"type":"string","enum":["release_holds","wait_for_reset","raise_limit"],"description":"release_holds: releasing holds makes the request fit all failing limits. wait_for_reset: resetting the failing windows makes the request fit with holds unchanged. raise_limit: neither action alone is sufficient; one or more limits need a change.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remedy","typeLabel":"enum\u003cstring>"}},"required":["limitId","window","remaining","held","resetsAt","remedy"],"description":"A failing hard limit smaller than the request, or otherwise the one that resets last. Other limits can also block the request. The remedy considers all failing limits.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked","typeLabel":"object"},"balance":{"type":"object","properties":{"remaining":{"oneOf":[{"type":"string","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.0","typeLabel":"string"},{"type":"null","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining","typeLabel":"string | null"},"held":{"type":"string","description":"The sum of open holds and the unreported part of open leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.held","typeLabel":"string"},"limits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].id","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].window","typeLabel":"enum\u003cstring>"},"enforce":{"type":"string","enum":["hard","soft"],"description":"hard denies authorize and charge that would exceed the limit; soft never denies. Either kind is reported in `crossed` once usage passes it, and only a record can pass a hard limit.","example":"hard","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].enforce","typeLabel":"enum\u003cstring>"},"amount":{"type":"string","description":"The limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].amount","typeLabel":"string"},"consumed":{"type":"string","description":"Used in the current period","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].consumed","typeLabel":"string"},"held":{"type":"string","description":"Held by open holds and leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].held","typeLabel":"string"},"remaining":{"type":"string","description":"amount - consumed - held; negative for a soft limit, or a hard limit a record passed","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].remaining","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt","typeLabel":"integer | null"}},"required":["id","window","enforce","amount","consumed","held","remaining","resetsAt"],"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits","typeLabel":"object[]"},"asOf":{"type":"integer","description":"When this balance was computed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.asOf","typeLabel":"integer"}},"required":["remaining","held","limits","asOf"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.1","typeLabel":"object"},{"type":"object","required":["kind","closedAt"],"properties":{"kind":{"type":"string","enum":["budget_closed"],"isRequired":true,"uniqueKey":"error.details.oneOf.2.kind","typeLabel":"enum\u003cstring>"},"closedAt":{"type":"integer","description":"When the budget closed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.2.closedAt","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.2","typeLabel":"object"},{"type":"object","required":["kind","holdId","maximum","actual"],"properties":{"kind":{"type":"string","enum":["hold_amount_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.3.kind","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","pattern":"^h_[1-9][0-9]{0,15}$","description":"The hold, as returned by authorize","example":"h_42","isRequired":true,"uniqueKey":"error.details.oneOf.3.holdId","typeLabel":"string"},"maximum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.maximum","typeLabel":"string"},"actual":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.actual","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.3","typeLabel":"object"},{"type":"object","required":["kind","limitId","minimum","requested"],"properties":{"kind":{"type":"string","enum":["limit_below_usage"],"isRequired":true,"uniqueKey":"error.details.oneOf.4.kind","typeLabel":"enum\u003cstring>"},"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.4.limitId","typeLabel":"string"},"minimum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.minimum","typeLabel":"string"},"requested":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.requested","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.4","typeLabel":"object"},{"type":"object","required":["kind","maximum","retained"],"properties":{"kind":{"type":"string","enum":["window_capacity_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.5.kind","typeLabel":"enum\u003cstring>"},"maximum":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.maximum","typeLabel":"integer"},"retained":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.retained","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.5","typeLabel":"object"},{"type":"object","required":["kind","rejection"],"properties":{"kind":{"type":"string","enum":["release_rejected"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.kind","typeLabel":"enum\u003cstring>"},"rejection":{"oneOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["BUDGET_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0.code","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_RETIRED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2","typeLabel":"object"},{"type":"object","required":["code","holdId","status"],"properties":{"code":{"type":"string","enum":["HOLD_CLOSED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.holdId","typeLabel":"string"},"status":{"type":"string","enum":["settled","released","expired"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.status","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.6","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","docs","message","requestId"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"BAD_REQUEST","docs":"https://docs.unprice.dev/api-reference/errors/code/BAD_REQUEST","message":"\u003cstring>","requestId":"req_1234","details":{"kind":"invalid_config","issues":[{"path":"config.plans[0].version.features[1].featureSlug","message":"\u003cstring>"}]}}}}},"exampleType":"generated"}},"exampleType":"generated"},"872d1e95-465f-46e6-853a-6ad9cb56ce00":{"description":"Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["UNAUTHORIZED"],"description":"A machine readable error code.","example":"UNAUTHORIZED","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"docs":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://docs.unprice.dev/api-reference/errors/code/UNAUTHORIZED","isRequired":true,"uniqueKey":"error.docs","typeLabel":"string"},"message":{"type":"string","description":"A human readable explanation of what went wrong","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Please always include the requestId in your error report","example":"req_1234","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"oneOf":[{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["invalid_config","slug_conflict","unresolved_reference"],"description":"What kind of failure this is","example":"invalid_config","isRequired":true,"uniqueKey":"error.details.oneOf.0.kind","typeLabel":"enum\u003cstring>"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"JSON path into the submitted document","example":"config.plans[0].version.features[1].featureSlug","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].message","typeLabel":"string"}},"required":["path","message"],"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX]","typeLabel":"object"},"description":"Per-location detail, when the failure has locations","uniqueKey":"error.details.oneOf.0.issues","typeLabel":"object[]"}},"uniqueKey":"error.details.oneOf.0","typeLabel":"object"},{"type":"object","required":["kind","blocked","balance"],"properties":{"kind":{"type":"string","enum":["budget_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.kind","typeLabel":"enum\u003cstring>"},"blocked":{"type":"object","properties":{"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.limitId","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.window","typeLabel":"enum\u003cstring>"},"remaining":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remaining","typeLabel":"string"},"held":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.held","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt","typeLabel":"integer | null"},"remedy":{"type":"string","enum":["release_holds","wait_for_reset","raise_limit"],"description":"release_holds: releasing holds makes the request fit all failing limits. wait_for_reset: resetting the failing windows makes the request fit with holds unchanged. raise_limit: neither action alone is sufficient; one or more limits need a change.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remedy","typeLabel":"enum\u003cstring>"}},"required":["limitId","window","remaining","held","resetsAt","remedy"],"description":"A failing hard limit smaller than the request, or otherwise the one that resets last. Other limits can also block the request. The remedy considers all failing limits.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked","typeLabel":"object"},"balance":{"type":"object","properties":{"remaining":{"oneOf":[{"type":"string","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.0","typeLabel":"string"},{"type":"null","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining","typeLabel":"string | null"},"held":{"type":"string","description":"The sum of open holds and the unreported part of open leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.held","typeLabel":"string"},"limits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].id","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].window","typeLabel":"enum\u003cstring>"},"enforce":{"type":"string","enum":["hard","soft"],"description":"hard denies authorize and charge that would exceed the limit; soft never denies. Either kind is reported in `crossed` once usage passes it, and only a record can pass a hard limit.","example":"hard","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].enforce","typeLabel":"enum\u003cstring>"},"amount":{"type":"string","description":"The limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].amount","typeLabel":"string"},"consumed":{"type":"string","description":"Used in the current period","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].consumed","typeLabel":"string"},"held":{"type":"string","description":"Held by open holds and leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].held","typeLabel":"string"},"remaining":{"type":"string","description":"amount - consumed - held; negative for a soft limit, or a hard limit a record passed","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].remaining","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt","typeLabel":"integer | null"}},"required":["id","window","enforce","amount","consumed","held","remaining","resetsAt"],"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits","typeLabel":"object[]"},"asOf":{"type":"integer","description":"When this balance was computed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.asOf","typeLabel":"integer"}},"required":["remaining","held","limits","asOf"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.1","typeLabel":"object"},{"type":"object","required":["kind","closedAt"],"properties":{"kind":{"type":"string","enum":["budget_closed"],"isRequired":true,"uniqueKey":"error.details.oneOf.2.kind","typeLabel":"enum\u003cstring>"},"closedAt":{"type":"integer","description":"When the budget closed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.2.closedAt","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.2","typeLabel":"object"},{"type":"object","required":["kind","holdId","maximum","actual"],"properties":{"kind":{"type":"string","enum":["hold_amount_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.3.kind","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","pattern":"^h_[1-9][0-9]{0,15}$","description":"The hold, as returned by authorize","example":"h_42","isRequired":true,"uniqueKey":"error.details.oneOf.3.holdId","typeLabel":"string"},"maximum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.maximum","typeLabel":"string"},"actual":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.actual","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.3","typeLabel":"object"},{"type":"object","required":["kind","limitId","minimum","requested"],"properties":{"kind":{"type":"string","enum":["limit_below_usage"],"isRequired":true,"uniqueKey":"error.details.oneOf.4.kind","typeLabel":"enum\u003cstring>"},"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.4.limitId","typeLabel":"string"},"minimum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.minimum","typeLabel":"string"},"requested":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.requested","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.4","typeLabel":"object"},{"type":"object","required":["kind","maximum","retained"],"properties":{"kind":{"type":"string","enum":["window_capacity_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.5.kind","typeLabel":"enum\u003cstring>"},"maximum":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.maximum","typeLabel":"integer"},"retained":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.retained","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.5","typeLabel":"object"},{"type":"object","required":["kind","rejection"],"properties":{"kind":{"type":"string","enum":["release_rejected"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.kind","typeLabel":"enum\u003cstring>"},"rejection":{"oneOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["BUDGET_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0.code","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_RETIRED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2","typeLabel":"object"},{"type":"object","required":["code","holdId","status"],"properties":{"code":{"type":"string","enum":["HOLD_CLOSED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.holdId","typeLabel":"string"},"status":{"type":"string","enum":["settled","released","expired"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.status","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.6","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","docs","message","requestId"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"UNAUTHORIZED","docs":"https://docs.unprice.dev/api-reference/errors/code/UNAUTHORIZED","message":"\u003cstring>","requestId":"req_1234","details":{"kind":"invalid_config","issues":[{"path":"config.plans[0].version.features[1].featureSlug","message":"\u003cstring>"}]}}}}},"exampleType":"generated"}},"exampleType":"generated"},"cbcb4f13-05b7-48db-a2a6-91d10417d824":{"description":"The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["FORBIDDEN"],"description":"A machine readable error code.","example":"FORBIDDEN","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"docs":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://docs.unprice.dev/api-reference/errors/code/FORBIDDEN","isRequired":true,"uniqueKey":"error.docs","typeLabel":"string"},"message":{"type":"string","description":"A human readable explanation of what went wrong","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Please always include the requestId in your error report","example":"req_1234","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"oneOf":[{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["invalid_config","slug_conflict","unresolved_reference"],"description":"What kind of failure this is","example":"invalid_config","isRequired":true,"uniqueKey":"error.details.oneOf.0.kind","typeLabel":"enum\u003cstring>"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"JSON path into the submitted document","example":"config.plans[0].version.features[1].featureSlug","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].message","typeLabel":"string"}},"required":["path","message"],"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX]","typeLabel":"object"},"description":"Per-location detail, when the failure has locations","uniqueKey":"error.details.oneOf.0.issues","typeLabel":"object[]"}},"uniqueKey":"error.details.oneOf.0","typeLabel":"object"},{"type":"object","required":["kind","blocked","balance"],"properties":{"kind":{"type":"string","enum":["budget_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.kind","typeLabel":"enum\u003cstring>"},"blocked":{"type":"object","properties":{"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.limitId","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.window","typeLabel":"enum\u003cstring>"},"remaining":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remaining","typeLabel":"string"},"held":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.held","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt","typeLabel":"integer | null"},"remedy":{"type":"string","enum":["release_holds","wait_for_reset","raise_limit"],"description":"release_holds: releasing holds makes the request fit all failing limits. wait_for_reset: resetting the failing windows makes the request fit with holds unchanged. raise_limit: neither action alone is sufficient; one or more limits need a change.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remedy","typeLabel":"enum\u003cstring>"}},"required":["limitId","window","remaining","held","resetsAt","remedy"],"description":"A failing hard limit smaller than the request, or otherwise the one that resets last. Other limits can also block the request. The remedy considers all failing limits.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked","typeLabel":"object"},"balance":{"type":"object","properties":{"remaining":{"oneOf":[{"type":"string","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.0","typeLabel":"string"},{"type":"null","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining","typeLabel":"string | null"},"held":{"type":"string","description":"The sum of open holds and the unreported part of open leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.held","typeLabel":"string"},"limits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].id","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].window","typeLabel":"enum\u003cstring>"},"enforce":{"type":"string","enum":["hard","soft"],"description":"hard denies authorize and charge that would exceed the limit; soft never denies. Either kind is reported in `crossed` once usage passes it, and only a record can pass a hard limit.","example":"hard","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].enforce","typeLabel":"enum\u003cstring>"},"amount":{"type":"string","description":"The limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].amount","typeLabel":"string"},"consumed":{"type":"string","description":"Used in the current period","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].consumed","typeLabel":"string"},"held":{"type":"string","description":"Held by open holds and leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].held","typeLabel":"string"},"remaining":{"type":"string","description":"amount - consumed - held; negative for a soft limit, or a hard limit a record passed","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].remaining","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt","typeLabel":"integer | null"}},"required":["id","window","enforce","amount","consumed","held","remaining","resetsAt"],"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits","typeLabel":"object[]"},"asOf":{"type":"integer","description":"When this balance was computed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.asOf","typeLabel":"integer"}},"required":["remaining","held","limits","asOf"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.1","typeLabel":"object"},{"type":"object","required":["kind","closedAt"],"properties":{"kind":{"type":"string","enum":["budget_closed"],"isRequired":true,"uniqueKey":"error.details.oneOf.2.kind","typeLabel":"enum\u003cstring>"},"closedAt":{"type":"integer","description":"When the budget closed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.2.closedAt","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.2","typeLabel":"object"},{"type":"object","required":["kind","holdId","maximum","actual"],"properties":{"kind":{"type":"string","enum":["hold_amount_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.3.kind","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","pattern":"^h_[1-9][0-9]{0,15}$","description":"The hold, as returned by authorize","example":"h_42","isRequired":true,"uniqueKey":"error.details.oneOf.3.holdId","typeLabel":"string"},"maximum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.maximum","typeLabel":"string"},"actual":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.actual","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.3","typeLabel":"object"},{"type":"object","required":["kind","limitId","minimum","requested"],"properties":{"kind":{"type":"string","enum":["limit_below_usage"],"isRequired":true,"uniqueKey":"error.details.oneOf.4.kind","typeLabel":"enum\u003cstring>"},"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.4.limitId","typeLabel":"string"},"minimum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.minimum","typeLabel":"string"},"requested":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.requested","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.4","typeLabel":"object"},{"type":"object","required":["kind","maximum","retained"],"properties":{"kind":{"type":"string","enum":["window_capacity_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.5.kind","typeLabel":"enum\u003cstring>"},"maximum":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.maximum","typeLabel":"integer"},"retained":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.retained","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.5","typeLabel":"object"},{"type":"object","required":["kind","rejection"],"properties":{"kind":{"type":"string","enum":["release_rejected"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.kind","typeLabel":"enum\u003cstring>"},"rejection":{"oneOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["BUDGET_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0.code","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_RETIRED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2","typeLabel":"object"},{"type":"object","required":["code","holdId","status"],"properties":{"code":{"type":"string","enum":["HOLD_CLOSED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.holdId","typeLabel":"string"},"status":{"type":"string","enum":["settled","released","expired"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.status","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.6","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","docs","message","requestId"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"FORBIDDEN","docs":"https://docs.unprice.dev/api-reference/errors/code/FORBIDDEN","message":"\u003cstring>","requestId":"req_1234","details":{"kind":"invalid_config","issues":[{"path":"config.plans[0].version.features[1].featureSlug","message":"\u003cstring>"}]}}}}},"exampleType":"generated"}},"exampleType":"generated"},"d8b7813a-ce7b-43cd-87b2-afd0f1f98c96":{"description":"The server cannot find the requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 Forbidden to hide the existence of a resource from an unauthorized client. This response code is probably the most well known due to its frequent occurrence on the web.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["NOT_FOUND"],"description":"A machine readable error code.","example":"NOT_FOUND","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"docs":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://docs.unprice.dev/api-reference/errors/code/NOT_FOUND","isRequired":true,"uniqueKey":"error.docs","typeLabel":"string"},"message":{"type":"string","description":"A human readable explanation of what went wrong","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Please always include the requestId in your error report","example":"req_1234","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"oneOf":[{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["invalid_config","slug_conflict","unresolved_reference"],"description":"What kind of failure this is","example":"invalid_config","isRequired":true,"uniqueKey":"error.details.oneOf.0.kind","typeLabel":"enum\u003cstring>"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"JSON path into the submitted document","example":"config.plans[0].version.features[1].featureSlug","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].message","typeLabel":"string"}},"required":["path","message"],"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX]","typeLabel":"object"},"description":"Per-location detail, when the failure has locations","uniqueKey":"error.details.oneOf.0.issues","typeLabel":"object[]"}},"uniqueKey":"error.details.oneOf.0","typeLabel":"object"},{"type":"object","required":["kind","blocked","balance"],"properties":{"kind":{"type":"string","enum":["budget_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.kind","typeLabel":"enum\u003cstring>"},"blocked":{"type":"object","properties":{"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.limitId","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.window","typeLabel":"enum\u003cstring>"},"remaining":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remaining","typeLabel":"string"},"held":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.held","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt","typeLabel":"integer | null"},"remedy":{"type":"string","enum":["release_holds","wait_for_reset","raise_limit"],"description":"release_holds: releasing holds makes the request fit all failing limits. wait_for_reset: resetting the failing windows makes the request fit with holds unchanged. raise_limit: neither action alone is sufficient; one or more limits need a change.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remedy","typeLabel":"enum\u003cstring>"}},"required":["limitId","window","remaining","held","resetsAt","remedy"],"description":"A failing hard limit smaller than the request, or otherwise the one that resets last. Other limits can also block the request. The remedy considers all failing limits.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked","typeLabel":"object"},"balance":{"type":"object","properties":{"remaining":{"oneOf":[{"type":"string","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.0","typeLabel":"string"},{"type":"null","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining","typeLabel":"string | null"},"held":{"type":"string","description":"The sum of open holds and the unreported part of open leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.held","typeLabel":"string"},"limits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].id","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].window","typeLabel":"enum\u003cstring>"},"enforce":{"type":"string","enum":["hard","soft"],"description":"hard denies authorize and charge that would exceed the limit; soft never denies. Either kind is reported in `crossed` once usage passes it, and only a record can pass a hard limit.","example":"hard","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].enforce","typeLabel":"enum\u003cstring>"},"amount":{"type":"string","description":"The limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].amount","typeLabel":"string"},"consumed":{"type":"string","description":"Used in the current period","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].consumed","typeLabel":"string"},"held":{"type":"string","description":"Held by open holds and leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].held","typeLabel":"string"},"remaining":{"type":"string","description":"amount - consumed - held; negative for a soft limit, or a hard limit a record passed","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].remaining","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt","typeLabel":"integer | null"}},"required":["id","window","enforce","amount","consumed","held","remaining","resetsAt"],"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits","typeLabel":"object[]"},"asOf":{"type":"integer","description":"When this balance was computed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.asOf","typeLabel":"integer"}},"required":["remaining","held","limits","asOf"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.1","typeLabel":"object"},{"type":"object","required":["kind","closedAt"],"properties":{"kind":{"type":"string","enum":["budget_closed"],"isRequired":true,"uniqueKey":"error.details.oneOf.2.kind","typeLabel":"enum\u003cstring>"},"closedAt":{"type":"integer","description":"When the budget closed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.2.closedAt","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.2","typeLabel":"object"},{"type":"object","required":["kind","holdId","maximum","actual"],"properties":{"kind":{"type":"string","enum":["hold_amount_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.3.kind","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","pattern":"^h_[1-9][0-9]{0,15}$","description":"The hold, as returned by authorize","example":"h_42","isRequired":true,"uniqueKey":"error.details.oneOf.3.holdId","typeLabel":"string"},"maximum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.maximum","typeLabel":"string"},"actual":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.actual","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.3","typeLabel":"object"},{"type":"object","required":["kind","limitId","minimum","requested"],"properties":{"kind":{"type":"string","enum":["limit_below_usage"],"isRequired":true,"uniqueKey":"error.details.oneOf.4.kind","typeLabel":"enum\u003cstring>"},"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.4.limitId","typeLabel":"string"},"minimum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.minimum","typeLabel":"string"},"requested":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.requested","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.4","typeLabel":"object"},{"type":"object","required":["kind","maximum","retained"],"properties":{"kind":{"type":"string","enum":["window_capacity_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.5.kind","typeLabel":"enum\u003cstring>"},"maximum":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.maximum","typeLabel":"integer"},"retained":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.retained","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.5","typeLabel":"object"},{"type":"object","required":["kind","rejection"],"properties":{"kind":{"type":"string","enum":["release_rejected"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.kind","typeLabel":"enum\u003cstring>"},"rejection":{"oneOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["BUDGET_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0.code","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_RETIRED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2","typeLabel":"object"},{"type":"object","required":["code","holdId","status"],"properties":{"code":{"type":"string","enum":["HOLD_CLOSED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.holdId","typeLabel":"string"},"status":{"type":"string","enum":["settled","released","expired"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.status","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.6","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","docs","message","requestId"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"NOT_FOUND","docs":"https://docs.unprice.dev/api-reference/errors/code/NOT_FOUND","message":"\u003cstring>","requestId":"req_1234","details":{"kind":"invalid_config","issues":[{"path":"config.plans[0].version.features[1].featureSlug","message":"\u003cstring>"}]}}}}},"exampleType":"generated"}},"exampleType":"generated"},"e60807dd-de7e-4f42-bc94-ec9676d47c8b":{"description":"This response is sent when a request conflicts with the current state of the server.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["CONFLICT"],"description":"A machine readable error code.","example":"CONFLICT","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"docs":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://docs.unprice.dev/api-reference/errors/code/CONFLICT","isRequired":true,"uniqueKey":"error.docs","typeLabel":"string"},"message":{"type":"string","description":"A human readable explanation of what went wrong","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Please always include the requestId in your error report","example":"req_1234","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"oneOf":[{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["invalid_config","slug_conflict","unresolved_reference"],"description":"What kind of failure this is","example":"invalid_config","isRequired":true,"uniqueKey":"error.details.oneOf.0.kind","typeLabel":"enum\u003cstring>"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"JSON path into the submitted document","example":"config.plans[0].version.features[1].featureSlug","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].message","typeLabel":"string"}},"required":["path","message"],"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX]","typeLabel":"object"},"description":"Per-location detail, when the failure has locations","uniqueKey":"error.details.oneOf.0.issues","typeLabel":"object[]"}},"uniqueKey":"error.details.oneOf.0","typeLabel":"object"},{"type":"object","required":["kind","blocked","balance"],"properties":{"kind":{"type":"string","enum":["budget_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.kind","typeLabel":"enum\u003cstring>"},"blocked":{"type":"object","properties":{"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.limitId","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.window","typeLabel":"enum\u003cstring>"},"remaining":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remaining","typeLabel":"string"},"held":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.held","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt","typeLabel":"integer | null"},"remedy":{"type":"string","enum":["release_holds","wait_for_reset","raise_limit"],"description":"release_holds: releasing holds makes the request fit all failing limits. wait_for_reset: resetting the failing windows makes the request fit with holds unchanged. raise_limit: neither action alone is sufficient; one or more limits need a change.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remedy","typeLabel":"enum\u003cstring>"}},"required":["limitId","window","remaining","held","resetsAt","remedy"],"description":"A failing hard limit smaller than the request, or otherwise the one that resets last. Other limits can also block the request. The remedy considers all failing limits.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked","typeLabel":"object"},"balance":{"type":"object","properties":{"remaining":{"oneOf":[{"type":"string","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.0","typeLabel":"string"},{"type":"null","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining","typeLabel":"string | null"},"held":{"type":"string","description":"The sum of open holds and the unreported part of open leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.held","typeLabel":"string"},"limits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].id","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].window","typeLabel":"enum\u003cstring>"},"enforce":{"type":"string","enum":["hard","soft"],"description":"hard denies authorize and charge that would exceed the limit; soft never denies. Either kind is reported in `crossed` once usage passes it, and only a record can pass a hard limit.","example":"hard","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].enforce","typeLabel":"enum\u003cstring>"},"amount":{"type":"string","description":"The limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].amount","typeLabel":"string"},"consumed":{"type":"string","description":"Used in the current period","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].consumed","typeLabel":"string"},"held":{"type":"string","description":"Held by open holds and leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].held","typeLabel":"string"},"remaining":{"type":"string","description":"amount - consumed - held; negative for a soft limit, or a hard limit a record passed","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].remaining","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt","typeLabel":"integer | null"}},"required":["id","window","enforce","amount","consumed","held","remaining","resetsAt"],"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits","typeLabel":"object[]"},"asOf":{"type":"integer","description":"When this balance was computed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.asOf","typeLabel":"integer"}},"required":["remaining","held","limits","asOf"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.1","typeLabel":"object"},{"type":"object","required":["kind","closedAt"],"properties":{"kind":{"type":"string","enum":["budget_closed"],"isRequired":true,"uniqueKey":"error.details.oneOf.2.kind","typeLabel":"enum\u003cstring>"},"closedAt":{"type":"integer","description":"When the budget closed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.2.closedAt","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.2","typeLabel":"object"},{"type":"object","required":["kind","holdId","maximum","actual"],"properties":{"kind":{"type":"string","enum":["hold_amount_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.3.kind","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","pattern":"^h_[1-9][0-9]{0,15}$","description":"The hold, as returned by authorize","example":"h_42","isRequired":true,"uniqueKey":"error.details.oneOf.3.holdId","typeLabel":"string"},"maximum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.maximum","typeLabel":"string"},"actual":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.actual","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.3","typeLabel":"object"},{"type":"object","required":["kind","limitId","minimum","requested"],"properties":{"kind":{"type":"string","enum":["limit_below_usage"],"isRequired":true,"uniqueKey":"error.details.oneOf.4.kind","typeLabel":"enum\u003cstring>"},"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.4.limitId","typeLabel":"string"},"minimum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.minimum","typeLabel":"string"},"requested":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.requested","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.4","typeLabel":"object"},{"type":"object","required":["kind","maximum","retained"],"properties":{"kind":{"type":"string","enum":["window_capacity_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.5.kind","typeLabel":"enum\u003cstring>"},"maximum":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.maximum","typeLabel":"integer"},"retained":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.retained","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.5","typeLabel":"object"},{"type":"object","required":["kind","rejection"],"properties":{"kind":{"type":"string","enum":["release_rejected"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.kind","typeLabel":"enum\u003cstring>"},"rejection":{"oneOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["BUDGET_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0.code","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_RETIRED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2","typeLabel":"object"},{"type":"object","required":["code","holdId","status"],"properties":{"code":{"type":"string","enum":["HOLD_CLOSED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.holdId","typeLabel":"string"},"status":{"type":"string","enum":["settled","released","expired"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.status","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.6","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","docs","message","requestId"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"CONFLICT","docs":"https://docs.unprice.dev/api-reference/errors/code/CONFLICT","message":"\u003cstring>","requestId":"req_1234","details":{"kind":"invalid_config","issues":[{"path":"config.plans[0].version.features[1].featureSlug","message":"\u003cstring>"}]}}}}},"exampleType":"generated"}},"exampleType":"generated"},"2d3e14f2-451b-4189-9d84-73f49f6106d4":{"description":"The requested operation cannot be completed because certain conditions were not met. This typically occurs when a required resource state or version check fails.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["PRECONDITION_FAILED"],"description":"A machine readable error code.","example":"PRECONDITION_FAILED","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"docs":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://docs.unprice.dev/api-reference/errors/code/PRECONDITION_FAILED","isRequired":true,"uniqueKey":"error.docs","typeLabel":"string"},"message":{"type":"string","description":"A human readable explanation of what went wrong","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Please always include the requestId in your error report","example":"req_1234","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"oneOf":[{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["invalid_config","slug_conflict","unresolved_reference"],"description":"What kind of failure this is","example":"invalid_config","isRequired":true,"uniqueKey":"error.details.oneOf.0.kind","typeLabel":"enum\u003cstring>"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"JSON path into the submitted document","example":"config.plans[0].version.features[1].featureSlug","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].message","typeLabel":"string"}},"required":["path","message"],"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX]","typeLabel":"object"},"description":"Per-location detail, when the failure has locations","uniqueKey":"error.details.oneOf.0.issues","typeLabel":"object[]"}},"uniqueKey":"error.details.oneOf.0","typeLabel":"object"},{"type":"object","required":["kind","blocked","balance"],"properties":{"kind":{"type":"string","enum":["budget_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.kind","typeLabel":"enum\u003cstring>"},"blocked":{"type":"object","properties":{"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.limitId","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.window","typeLabel":"enum\u003cstring>"},"remaining":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remaining","typeLabel":"string"},"held":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.held","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt","typeLabel":"integer | null"},"remedy":{"type":"string","enum":["release_holds","wait_for_reset","raise_limit"],"description":"release_holds: releasing holds makes the request fit all failing limits. wait_for_reset: resetting the failing windows makes the request fit with holds unchanged. raise_limit: neither action alone is sufficient; one or more limits need a change.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remedy","typeLabel":"enum\u003cstring>"}},"required":["limitId","window","remaining","held","resetsAt","remedy"],"description":"A failing hard limit smaller than the request, or otherwise the one that resets last. Other limits can also block the request. The remedy considers all failing limits.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked","typeLabel":"object"},"balance":{"type":"object","properties":{"remaining":{"oneOf":[{"type":"string","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.0","typeLabel":"string"},{"type":"null","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining","typeLabel":"string | null"},"held":{"type":"string","description":"The sum of open holds and the unreported part of open leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.held","typeLabel":"string"},"limits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].id","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].window","typeLabel":"enum\u003cstring>"},"enforce":{"type":"string","enum":["hard","soft"],"description":"hard denies authorize and charge that would exceed the limit; soft never denies. Either kind is reported in `crossed` once usage passes it, and only a record can pass a hard limit.","example":"hard","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].enforce","typeLabel":"enum\u003cstring>"},"amount":{"type":"string","description":"The limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].amount","typeLabel":"string"},"consumed":{"type":"string","description":"Used in the current period","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].consumed","typeLabel":"string"},"held":{"type":"string","description":"Held by open holds and leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].held","typeLabel":"string"},"remaining":{"type":"string","description":"amount - consumed - held; negative for a soft limit, or a hard limit a record passed","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].remaining","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt","typeLabel":"integer | null"}},"required":["id","window","enforce","amount","consumed","held","remaining","resetsAt"],"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits","typeLabel":"object[]"},"asOf":{"type":"integer","description":"When this balance was computed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.asOf","typeLabel":"integer"}},"required":["remaining","held","limits","asOf"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.1","typeLabel":"object"},{"type":"object","required":["kind","closedAt"],"properties":{"kind":{"type":"string","enum":["budget_closed"],"isRequired":true,"uniqueKey":"error.details.oneOf.2.kind","typeLabel":"enum\u003cstring>"},"closedAt":{"type":"integer","description":"When the budget closed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.2.closedAt","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.2","typeLabel":"object"},{"type":"object","required":["kind","holdId","maximum","actual"],"properties":{"kind":{"type":"string","enum":["hold_amount_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.3.kind","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","pattern":"^h_[1-9][0-9]{0,15}$","description":"The hold, as returned by authorize","example":"h_42","isRequired":true,"uniqueKey":"error.details.oneOf.3.holdId","typeLabel":"string"},"maximum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.maximum","typeLabel":"string"},"actual":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.actual","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.3","typeLabel":"object"},{"type":"object","required":["kind","limitId","minimum","requested"],"properties":{"kind":{"type":"string","enum":["limit_below_usage"],"isRequired":true,"uniqueKey":"error.details.oneOf.4.kind","typeLabel":"enum\u003cstring>"},"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.4.limitId","typeLabel":"string"},"minimum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.minimum","typeLabel":"string"},"requested":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.requested","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.4","typeLabel":"object"},{"type":"object","required":["kind","maximum","retained"],"properties":{"kind":{"type":"string","enum":["window_capacity_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.5.kind","typeLabel":"enum\u003cstring>"},"maximum":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.maximum","typeLabel":"integer"},"retained":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.retained","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.5","typeLabel":"object"},{"type":"object","required":["kind","rejection"],"properties":{"kind":{"type":"string","enum":["release_rejected"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.kind","typeLabel":"enum\u003cstring>"},"rejection":{"oneOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["BUDGET_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0.code","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_RETIRED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2","typeLabel":"object"},{"type":"object","required":["code","holdId","status"],"properties":{"code":{"type":"string","enum":["HOLD_CLOSED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.holdId","typeLabel":"string"},"status":{"type":"string","enum":["settled","released","expired"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.status","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.6","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","docs","message","requestId"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"PRECONDITION_FAILED","docs":"https://docs.unprice.dev/api-reference/errors/code/PRECONDITION_FAILED","message":"\u003cstring>","requestId":"req_1234","details":{"kind":"invalid_config","issues":[{"path":"config.plans[0].version.features[1].featureSlug","message":"\u003cstring>"}]}}}}},"exampleType":"generated"}},"exampleType":"generated"},"2c9635c8-7375-4045-8ca2-719f8a25621c":{"description":"The request payload is larger than the server is willing to process.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["PAYLOAD_TOO_LARGE"],"description":"A machine readable error code.","example":"PAYLOAD_TOO_LARGE","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"docs":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://docs.unprice.dev/api-reference/errors/code/PAYLOAD_TOO_LARGE","isRequired":true,"uniqueKey":"error.docs","typeLabel":"string"},"message":{"type":"string","description":"A human readable explanation of what went wrong","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Please always include the requestId in your error report","example":"req_1234","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"oneOf":[{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["invalid_config","slug_conflict","unresolved_reference"],"description":"What kind of failure this is","example":"invalid_config","isRequired":true,"uniqueKey":"error.details.oneOf.0.kind","typeLabel":"enum\u003cstring>"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"JSON path into the submitted document","example":"config.plans[0].version.features[1].featureSlug","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].message","typeLabel":"string"}},"required":["path","message"],"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX]","typeLabel":"object"},"description":"Per-location detail, when the failure has locations","uniqueKey":"error.details.oneOf.0.issues","typeLabel":"object[]"}},"uniqueKey":"error.details.oneOf.0","typeLabel":"object"},{"type":"object","required":["kind","blocked","balance"],"properties":{"kind":{"type":"string","enum":["budget_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.kind","typeLabel":"enum\u003cstring>"},"blocked":{"type":"object","properties":{"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.limitId","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.window","typeLabel":"enum\u003cstring>"},"remaining":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remaining","typeLabel":"string"},"held":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.held","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt","typeLabel":"integer | null"},"remedy":{"type":"string","enum":["release_holds","wait_for_reset","raise_limit"],"description":"release_holds: releasing holds makes the request fit all failing limits. wait_for_reset: resetting the failing windows makes the request fit with holds unchanged. raise_limit: neither action alone is sufficient; one or more limits need a change.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remedy","typeLabel":"enum\u003cstring>"}},"required":["limitId","window","remaining","held","resetsAt","remedy"],"description":"A failing hard limit smaller than the request, or otherwise the one that resets last. Other limits can also block the request. The remedy considers all failing limits.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked","typeLabel":"object"},"balance":{"type":"object","properties":{"remaining":{"oneOf":[{"type":"string","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.0","typeLabel":"string"},{"type":"null","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining","typeLabel":"string | null"},"held":{"type":"string","description":"The sum of open holds and the unreported part of open leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.held","typeLabel":"string"},"limits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].id","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].window","typeLabel":"enum\u003cstring>"},"enforce":{"type":"string","enum":["hard","soft"],"description":"hard denies authorize and charge that would exceed the limit; soft never denies. Either kind is reported in `crossed` once usage passes it, and only a record can pass a hard limit.","example":"hard","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].enforce","typeLabel":"enum\u003cstring>"},"amount":{"type":"string","description":"The limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].amount","typeLabel":"string"},"consumed":{"type":"string","description":"Used in the current period","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].consumed","typeLabel":"string"},"held":{"type":"string","description":"Held by open holds and leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].held","typeLabel":"string"},"remaining":{"type":"string","description":"amount - consumed - held; negative for a soft limit, or a hard limit a record passed","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].remaining","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt","typeLabel":"integer | null"}},"required":["id","window","enforce","amount","consumed","held","remaining","resetsAt"],"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits","typeLabel":"object[]"},"asOf":{"type":"integer","description":"When this balance was computed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.asOf","typeLabel":"integer"}},"required":["remaining","held","limits","asOf"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.1","typeLabel":"object"},{"type":"object","required":["kind","closedAt"],"properties":{"kind":{"type":"string","enum":["budget_closed"],"isRequired":true,"uniqueKey":"error.details.oneOf.2.kind","typeLabel":"enum\u003cstring>"},"closedAt":{"type":"integer","description":"When the budget closed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.2.closedAt","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.2","typeLabel":"object"},{"type":"object","required":["kind","holdId","maximum","actual"],"properties":{"kind":{"type":"string","enum":["hold_amount_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.3.kind","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","pattern":"^h_[1-9][0-9]{0,15}$","description":"The hold, as returned by authorize","example":"h_42","isRequired":true,"uniqueKey":"error.details.oneOf.3.holdId","typeLabel":"string"},"maximum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.maximum","typeLabel":"string"},"actual":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.actual","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.3","typeLabel":"object"},{"type":"object","required":["kind","limitId","minimum","requested"],"properties":{"kind":{"type":"string","enum":["limit_below_usage"],"isRequired":true,"uniqueKey":"error.details.oneOf.4.kind","typeLabel":"enum\u003cstring>"},"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.4.limitId","typeLabel":"string"},"minimum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.minimum","typeLabel":"string"},"requested":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.requested","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.4","typeLabel":"object"},{"type":"object","required":["kind","maximum","retained"],"properties":{"kind":{"type":"string","enum":["window_capacity_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.5.kind","typeLabel":"enum\u003cstring>"},"maximum":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.maximum","typeLabel":"integer"},"retained":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.retained","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.5","typeLabel":"object"},{"type":"object","required":["kind","rejection"],"properties":{"kind":{"type":"string","enum":["release_rejected"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.kind","typeLabel":"enum\u003cstring>"},"rejection":{"oneOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["BUDGET_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0.code","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_RETIRED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2","typeLabel":"object"},{"type":"object","required":["code","holdId","status"],"properties":{"code":{"type":"string","enum":["HOLD_CLOSED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.holdId","typeLabel":"string"},"status":{"type":"string","enum":["settled","released","expired"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.status","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.6","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","docs","message","requestId"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"PAYLOAD_TOO_LARGE","docs":"https://docs.unprice.dev/api-reference/errors/code/PAYLOAD_TOO_LARGE","message":"\u003cstring>","requestId":"req_1234","details":{"kind":"invalid_config","issues":[{"path":"config.plans[0].version.features[1].featureSlug","message":"\u003cstring>"}]}}}}},"exampleType":"generated"}},"exampleType":"generated"},"a1b74fb9-a6a2-4c3c-b3a3-8491c17c135c":{"description":"The user has sent too many requests in a given amount of time (\"rate limiting\")","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["TOO_MANY_REQUESTS"],"description":"A machine readable error code.","example":"TOO_MANY_REQUESTS","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"docs":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://docs.unprice.dev/api-reference/errors/code/TOO_MANY_REQUESTS","isRequired":true,"uniqueKey":"error.docs","typeLabel":"string"},"message":{"type":"string","description":"A human readable explanation of what went wrong","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Please always include the requestId in your error report","example":"req_1234","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"oneOf":[{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["invalid_config","slug_conflict","unresolved_reference"],"description":"What kind of failure this is","example":"invalid_config","isRequired":true,"uniqueKey":"error.details.oneOf.0.kind","typeLabel":"enum\u003cstring>"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"JSON path into the submitted document","example":"config.plans[0].version.features[1].featureSlug","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].message","typeLabel":"string"}},"required":["path","message"],"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX]","typeLabel":"object"},"description":"Per-location detail, when the failure has locations","uniqueKey":"error.details.oneOf.0.issues","typeLabel":"object[]"}},"uniqueKey":"error.details.oneOf.0","typeLabel":"object"},{"type":"object","required":["kind","blocked","balance"],"properties":{"kind":{"type":"string","enum":["budget_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.kind","typeLabel":"enum\u003cstring>"},"blocked":{"type":"object","properties":{"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.limitId","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.window","typeLabel":"enum\u003cstring>"},"remaining":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remaining","typeLabel":"string"},"held":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.held","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt","typeLabel":"integer | null"},"remedy":{"type":"string","enum":["release_holds","wait_for_reset","raise_limit"],"description":"release_holds: releasing holds makes the request fit all failing limits. wait_for_reset: resetting the failing windows makes the request fit with holds unchanged. raise_limit: neither action alone is sufficient; one or more limits need a change.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remedy","typeLabel":"enum\u003cstring>"}},"required":["limitId","window","remaining","held","resetsAt","remedy"],"description":"A failing hard limit smaller than the request, or otherwise the one that resets last. Other limits can also block the request. The remedy considers all failing limits.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked","typeLabel":"object"},"balance":{"type":"object","properties":{"remaining":{"oneOf":[{"type":"string","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.0","typeLabel":"string"},{"type":"null","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining","typeLabel":"string | null"},"held":{"type":"string","description":"The sum of open holds and the unreported part of open leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.held","typeLabel":"string"},"limits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].id","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].window","typeLabel":"enum\u003cstring>"},"enforce":{"type":"string","enum":["hard","soft"],"description":"hard denies authorize and charge that would exceed the limit; soft never denies. Either kind is reported in `crossed` once usage passes it, and only a record can pass a hard limit.","example":"hard","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].enforce","typeLabel":"enum\u003cstring>"},"amount":{"type":"string","description":"The limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].amount","typeLabel":"string"},"consumed":{"type":"string","description":"Used in the current period","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].consumed","typeLabel":"string"},"held":{"type":"string","description":"Held by open holds and leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].held","typeLabel":"string"},"remaining":{"type":"string","description":"amount - consumed - held; negative for a soft limit, or a hard limit a record passed","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].remaining","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt","typeLabel":"integer | null"}},"required":["id","window","enforce","amount","consumed","held","remaining","resetsAt"],"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits","typeLabel":"object[]"},"asOf":{"type":"integer","description":"When this balance was computed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.asOf","typeLabel":"integer"}},"required":["remaining","held","limits","asOf"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.1","typeLabel":"object"},{"type":"object","required":["kind","closedAt"],"properties":{"kind":{"type":"string","enum":["budget_closed"],"isRequired":true,"uniqueKey":"error.details.oneOf.2.kind","typeLabel":"enum\u003cstring>"},"closedAt":{"type":"integer","description":"When the budget closed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.2.closedAt","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.2","typeLabel":"object"},{"type":"object","required":["kind","holdId","maximum","actual"],"properties":{"kind":{"type":"string","enum":["hold_amount_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.3.kind","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","pattern":"^h_[1-9][0-9]{0,15}$","description":"The hold, as returned by authorize","example":"h_42","isRequired":true,"uniqueKey":"error.details.oneOf.3.holdId","typeLabel":"string"},"maximum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.maximum","typeLabel":"string"},"actual":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.actual","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.3","typeLabel":"object"},{"type":"object","required":["kind","limitId","minimum","requested"],"properties":{"kind":{"type":"string","enum":["limit_below_usage"],"isRequired":true,"uniqueKey":"error.details.oneOf.4.kind","typeLabel":"enum\u003cstring>"},"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.4.limitId","typeLabel":"string"},"minimum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.minimum","typeLabel":"string"},"requested":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.requested","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.4","typeLabel":"object"},{"type":"object","required":["kind","maximum","retained"],"properties":{"kind":{"type":"string","enum":["window_capacity_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.5.kind","typeLabel":"enum\u003cstring>"},"maximum":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.maximum","typeLabel":"integer"},"retained":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.retained","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.5","typeLabel":"object"},{"type":"object","required":["kind","rejection"],"properties":{"kind":{"type":"string","enum":["release_rejected"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.kind","typeLabel":"enum\u003cstring>"},"rejection":{"oneOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["BUDGET_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0.code","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_RETIRED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2","typeLabel":"object"},{"type":"object","required":["code","holdId","status"],"properties":{"code":{"type":"string","enum":["HOLD_CLOSED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.holdId","typeLabel":"string"},"status":{"type":"string","enum":["settled","released","expired"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.status","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.6","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","docs","message","requestId"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"TOO_MANY_REQUESTS","docs":"https://docs.unprice.dev/api-reference/errors/code/TOO_MANY_REQUESTS","message":"\u003cstring>","requestId":"req_1234","details":{"kind":"invalid_config","issues":[{"path":"config.plans[0].version.features[1].featureSlug","message":"\u003cstring>"}]}}}}},"exampleType":"generated"}},"exampleType":"generated"},"175e683b-2be0-42a6-ba3d-defec7a4cdbc":{"description":"The server has encountered a situation it does not know how to handle.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["INTERNAL_SERVER_ERROR"],"description":"A machine readable error code.","example":"INTERNAL_SERVER_ERROR","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"docs":{"type":"string","description":"A link to our documentation with more details about this error code","example":"https://docs.unprice.dev/api-reference/errors/code/INTERNAL_SERVER_ERROR","isRequired":true,"uniqueKey":"error.docs","typeLabel":"string"},"message":{"type":"string","description":"A human readable explanation of what went wrong","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Please always include the requestId in your error report","example":"req_1234","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"oneOf":[{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["invalid_config","slug_conflict","unresolved_reference"],"description":"What kind of failure this is","example":"invalid_config","isRequired":true,"uniqueKey":"error.details.oneOf.0.kind","typeLabel":"enum\u003cstring>"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"JSON path into the submitted document","example":"config.plans[0].version.features[1].featureSlug","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].path","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX].message","typeLabel":"string"}},"required":["path","message"],"uniqueKey":"error.details.oneOf.0.issues.items.[INDEX]","typeLabel":"object"},"description":"Per-location detail, when the failure has locations","uniqueKey":"error.details.oneOf.0.issues","typeLabel":"object[]"}},"uniqueKey":"error.details.oneOf.0","typeLabel":"object"},{"type":"object","required":["kind","blocked","balance"],"properties":{"kind":{"type":"string","enum":["budget_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.kind","typeLabel":"enum\u003cstring>"},"blocked":{"type":"object","properties":{"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.limitId","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.window","typeLabel":"enum\u003cstring>"},"remaining":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remaining","typeLabel":"string"},"held":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.held","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.resetsAt","typeLabel":"integer | null"},"remedy":{"type":"string","enum":["release_holds","wait_for_reset","raise_limit"],"description":"release_holds: releasing holds makes the request fit all failing limits. wait_for_reset: resetting the failing windows makes the request fit with holds unchanged. raise_limit: neither action alone is sufficient; one or more limits need a change.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked.remedy","typeLabel":"enum\u003cstring>"}},"required":["limitId","window","remaining","held","resetsAt","remedy"],"description":"A failing hard limit smaller than the request, or otherwise the one that resets last. Other limits can also block the request. The remedy considers all failing limits.","isRequired":true,"uniqueKey":"error.details.oneOf.1.blocked","typeLabel":"object"},"balance":{"type":"object","properties":{"remaining":{"oneOf":[{"type":"string","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.0","typeLabel":"string"},{"type":"null","description":"The least remaining over hard limits; null when the budget has no hard limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.remaining","typeLabel":"string | null"},"held":{"type":"string","description":"The sum of open holds and the unreported part of open leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.held","typeLabel":"string"},"limits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].id","typeLabel":"string"},"window":{"type":"string","enum":["hour","day","week","month","never"],"description":"The period a limit counts over. hour, day, week (ISO, from Monday), and month are UTC calendar periods unless anchored; never counts for the life of the budget.","example":"month","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].window","typeLabel":"enum\u003cstring>"},"enforce":{"type":"string","enum":["hard","soft"],"description":"hard denies authorize and charge that would exceed the limit; soft never denies. Either kind is reported in `crossed` once usage passes it, and only a record can pass a hard limit.","example":"hard","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].enforce","typeLabel":"enum\u003cstring>"},"amount":{"type":"string","description":"The limit","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].amount","typeLabel":"string"},"consumed":{"type":"string","description":"Used in the current period","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].consumed","typeLabel":"string"},"held":{"type":"string","description":"Held by open holds and leases","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].held","typeLabel":"string"},"remaining":{"type":"string","description":"amount - consumed - held; negative for a soft limit, or a hard limit a record passed","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].remaining","typeLabel":"string"},"resetsAt":{"oneOf":[{"type":"integer","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.0","typeLabel":"integer"},{"type":"null","description":"When the limit's current period ends, in epoch milliseconds; null for never","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX].resetsAt","typeLabel":"integer | null"}},"required":["id","window","enforce","amount","consumed","held","remaining","resetsAt"],"uniqueKey":"error.details.oneOf.1.balance.limits.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.limits","typeLabel":"object[]"},"asOf":{"type":"integer","description":"When this balance was computed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.1.balance.asOf","typeLabel":"integer"}},"required":["remaining","held","limits","asOf"],"isRequired":true,"uniqueKey":"error.details.oneOf.1.balance","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.1","typeLabel":"object"},{"type":"object","required":["kind","closedAt"],"properties":{"kind":{"type":"string","enum":["budget_closed"],"isRequired":true,"uniqueKey":"error.details.oneOf.2.kind","typeLabel":"enum\u003cstring>"},"closedAt":{"type":"integer","description":"When the budget closed, in epoch milliseconds","isRequired":true,"uniqueKey":"error.details.oneOf.2.closedAt","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.2","typeLabel":"object"},{"type":"object","required":["kind","holdId","maximum","actual"],"properties":{"kind":{"type":"string","enum":["hold_amount_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.3.kind","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","pattern":"^h_[1-9][0-9]{0,15}$","description":"The hold, as returned by authorize","example":"h_42","isRequired":true,"uniqueKey":"error.details.oneOf.3.holdId","typeLabel":"string"},"maximum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.maximum","typeLabel":"string"},"actual":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.3.actual","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.3","typeLabel":"object"},{"type":"object","required":["kind","limitId","minimum","requested"],"properties":{"kind":{"type":"string","enum":["limit_below_usage"],"isRequired":true,"uniqueKey":"error.details.oneOf.4.kind","typeLabel":"enum\u003cstring>"},"limitId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.4.limitId","typeLabel":"string"},"minimum":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.minimum","typeLabel":"string"},"requested":{"type":"string","description":"A decimal amount in the budget's unit","isRequired":true,"uniqueKey":"error.details.oneOf.4.requested","typeLabel":"string"}},"uniqueKey":"error.details.oneOf.4","typeLabel":"object"},{"type":"object","required":["kind","maximum","retained"],"properties":{"kind":{"type":"string","enum":["window_capacity_exceeded"],"isRequired":true,"uniqueKey":"error.details.oneOf.5.kind","typeLabel":"enum\u003cstring>"},"maximum":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.maximum","typeLabel":"integer"},"retained":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"error.details.oneOf.5.retained","typeLabel":"integer"}},"uniqueKey":"error.details.oneOf.5","typeLabel":"object"},{"type":"object","required":["kind","rejection"],"properties":{"kind":{"type":"string","enum":["release_rejected"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.kind","typeLabel":"enum\u003cstring>"},"rejection":{"oneOf":[{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["BUDGET_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0.code","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.0","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_NOT_FOUND"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.1","typeLabel":"object"},{"type":"object","required":["code","holdId"],"properties":{"code":{"type":"string","enum":["HOLD_RETIRED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2.holdId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.2","typeLabel":"object"},{"type":"object","required":["code","holdId","status"],"properties":{"code":{"type":"string","enum":["HOLD_CLOSED"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.code","typeLabel":"enum\u003cstring>"},"holdId":{"type":"string","isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.holdId","typeLabel":"string"},"status":{"type":"string","enum":["settled","released","expired"],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3.status","typeLabel":"enum\u003cstring>"}},"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"error.details.oneOf.6.rejection","typeLabel":"object"}},"uniqueKey":"error.details.oneOf.6","typeLabel":"object"}],"uniqueKey":"error.details","typeLabel":"object"}},"required":["code","docs","message","requestId"],"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"INTERNAL_SERVER_ERROR","docs":"https://docs.unprice.dev/api-reference/errors/code/INTERNAL_SERVER_ERROR","message":"\u003cstring>","requestId":"req_1234","details":{"kind":"invalid_config","issues":[{"path":"config.plans[0].version.features[1].featureSlug","message":"\u003cstring>"}]}}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"dd889c9d-c52d-49a3-b0ca-a11333122ffc":{"bearerAuth":{"bearerFormat":"root key","type":"http","scheme":"bearer","x-speakeasy-example":"UNPRICE_API_KEY","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"2a1f5b6e-fcd9-4479-b8f0-d8e3524b9e6d":{"url":"https://api.unprice.dev","description":"Production"},"4f0ca25b-7a5f-420c-a0d1-fdd91868a1df":{"url":"http://localhost:8787","description":"Development"},"3a662e90-2597-4145-b465-c73b343b810b":{"url":"https://preview-api.unprice.dev","description":"Preview"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"bearerFormat":"root key","type":"http","scheme":"bearer","x-speakeasy-example":"UNPRICE_API_KEY","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"openapi.json"},"subdomain":"unprice","siteName":"Unprice Documentation","title":"get monetization configuration - Unprice Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-22T00:04:25.639Z","originalFileLocation":"api-reference/monetization/get-monetization-configuration.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Read this project\u0026#x27;s monetization configuration in the shape monetization.apply accepts, plus what the document cannot state and what it is silent about.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Unprice Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/unprice/Tby7nRt_ND4FF19p/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/unprice/Tby7nRt_ND4FF19p/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/unprice/Tby7nRt_ND4FF19p/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/unprice/Tby7nRt_ND4FF19p/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/unprice/Tby7nRt_ND4FF19p/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/unprice/Tby7nRt_ND4FF19p/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/unprice/Tby7nRt_ND4FF19p/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/unprice/Tby7nRt_ND4FF19p/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/unprice/Tby7nRt_ND4FF19p/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"get monetization configuration - Unprice Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Read this project\u0026#x27;s monetization configuration in the shape monetization.apply accepts, plus what the document cannot state and what it is silent about.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Unprice Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.unprice.dev/api-reference/monetization/get-monetization-configuration\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://unprice.mintlify.site/_mintlify/api/og/v2?division=monetization\u0026amp;title=get+monetization+configuration\u0026amp;description=Read+this+project%27s+monetization+configuration+in+the+shape+monetization.apply+accepts%2C+plus+what+the+document+cannot+state+and+what+it+is+silent+about.\u0026amp;theme=2843c968777e7cca9e0085b5\u0026amp;signature=7ae65a27b8200b5b704f3004499d78a91dbf618c39859218afc283657d6e7e7a\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"get monetization configuration - Unprice Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Read this project\u0026#x27;s monetization configuration in the shape monetization.apply accepts, plus what the document cannot state and what it is silent about.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://unprice.mintlify.site/_mintlify/api/og/v2?division=monetization\u0026amp;title=get+monetization+configuration\u0026amp;description=Read+this+project%27s+monetization+configuration+in+the+shape+monetization.apply+accepts%2C+plus+what+the+document+cannot+state+and+what+it+is+silent+about.\u0026amp;theme=2843c968777e7cca9e0085b5\u0026amp;signature=7ae65a27b8200b5b704f3004499d78a91dbf618c39859218afc283657d6e7e7a\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/unprice/Tby7nRt_ND4FF19p/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Unprice Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#ab6400\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.unprice.dev/api-reference/monetization/get-monetization-configuration\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/monetization/get-monetization-configuration.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.unprice.dev/#organization\",\"name\":\"Unprice Documentation\",\"url\":\"https://docs.unprice.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/unprice/vXUWXLNyOcaxnjxH/logo/light.svg?fit=max\u0026auto=format\u0026n=vXUWXLNyOcaxnjxH\u0026q=85\u0026s=ce4a214a5ae95d854ad7e6767a821d25\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.unprice.dev#website\",\"name\":\"Unprice Documentation\",\"url\":\"https://docs.unprice.dev\",\"publisher\":{\"@id\":\"https://docs.unprice.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.unprice.dev/api-reference/monetization/get-monetization-configuration#webpage\",\"url\":\"https://docs.unprice.dev/api-reference/monetization/get-monetization-configuration\",\"name\":\"get monetization configuration\",\"description\":\"Read this project's monetization configuration in the shape monetization.apply accepts, plus what the document cannot state and what it is silent about.\",\"dateModified\":\"2026-10-22T00:04:25.639Z\",\"isPartOf\":{\"@id\":\"https://docs.unprice.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.unprice.dev/api-reference/monetization/get-monetization-configuration#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.unprice.dev/api-reference/monetization/get-monetization-configuration#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://docs.unprice.dev/api-reference/access/update-acl\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"monetization\",\"item\":\"https://docs.unprice.dev/api-reference/monetization/apply-monetization-configuration\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"get monetization configuration\",\"item\":\"https://docs.unprice.dev/api-reference/monetization/get-monetization-configuration\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.unprice.dev/api-reference/monetization/get-monetization-configuration#apireference\",\"headline\":\"get monetization configuration\",\"name\":\"get monetization configuration\",\"description\":\"Read this project's monetization configuration in the shape monetization.apply accepts, plus what the document cannot state and what it is silent about.\",\"url\":\"https://docs.unprice.dev/api-reference/monetization/get-monetization-configuration\",\"mainEntityOfPage\":{\"@id\":\"https://docs.unprice.dev/api-reference/monetization/get-monetization-configuration#webpage\"},\"dateModified\":\"2026-10-22T00:04:25.639Z\",\"publisher\":{\"@id\":\"https://docs.unprice.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.unprice.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Unprice Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Unprice Documentation","nav":{"global":{"anchors":[{"anchor":"Home","icon":"globe","href":"https://unprice.dev"},{"anchor":"Community","icon":"discord","href":"https://discord.gg/unprice"}]},"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"Budgets","pages":[{"title":"Budgets","href":"/budgets/overview"}]},{"tab":"API Reference","groups":[{"group":"API Documentation","pages":[{"title":"Overview","href":"/api-reference/overview"},{"title":"Authentication","href":"/api-reference/authentication"}]},{"group":"Errors","pages":[{"title":"Introduction","href":"/api-reference/errors/introduction"},{"group":"Errors","pages":[{"title":"BAD_REQUEST","href":"/api-reference/errors/code/BAD_REQUEST"},{"title":"UNAUTHORIZED","href":"/api-reference/errors/code/UNAUTHORIZED"},{"title":"BUDGET_EXCEEDED","href":"/api-reference/errors/code/BUDGET_EXCEEDED"},{"title":"FORBIDDEN","href":"/api-reference/errors/code/FORBIDDEN"},{"title":"INSUFFICIENT_PERMISSIONS","href":"/api-reference/errors/code/INSUFFICIENT_PERMISSIONS"},{"title":"NOT_FOUND","href":"/api-reference/errors/code/NOT_FOUND"},{"title":"CONFLICT","href":"/api-reference/errors/code/CONFLICT"},{"title":"PRECONDITION_FAILED","href":"/api-reference/errors/code/PRECONDITION_FAILED"},{"title":"TOO_MANY_REQUESTS","href":"/api-reference/errors/code/TOO_MANY_REQUESTS"},{"title":"PAYLOAD_TOO_LARGE","href":"/api-reference/errors/code/PAYLOAD_TOO_LARGE"},{"title":"INTERNAL_SERVER_ERROR","href":"/api-reference/errors/code/INTERNAL_SERVER_ERROR"}]}]},{"group":"Endpoints","pages":[{"group":"access","pages":[{"title":"update ACL","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/access/update","href":"/api-reference/access/update-acl"},{"title":"get customer entitlements","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/access/entitlements/list","href":"/api-reference/access/get-customer-entitlements"},{"title":"get current customer entitlements","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/access/entitlements/current","href":"/api-reference/access/get-current-customer-entitlements"},{"title":"get current feature status","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/access/check","href":"/api-reference/access/get-current-feature-status"}]},{"group":"runs","pages":[{"title":"start a budgeted run","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/runs/start","href":"/api-reference/runs/start-a-budgeted-run"},{"title":"apply sync metered event to a run","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/runs/consume/{runId}","href":"/api-reference/runs/apply-sync-metered-event-to-a-run"},{"title":"settle incurred usage against a run","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/runs/settle/{runId}","href":"/api-reference/runs/settle-incurred-usage-against-a-run"},{"title":"end a budgeted run","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/runs/end/{runId}","href":"/api-reference/runs/end-a-budgeted-run"},{"title":"get a budgeted run","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/runs/get/{runId}","href":"/api-reference/runs/get-a-budgeted-run"}]},{"group":"budgets","pages":[{"title":"create or update a budget","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/budgets/upsert","href":"/api-reference/budgets/create-or-update-a-budget"},{"title":"reserve the maximum permitted usage before work runs","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/budgets/authorize","href":"/api-reference/budgets/reserve-the-maximum-permitted-usage-before-work-runs"},{"title":"settle a hold with the actual amount","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/budgets/settle","href":"/api-reference/budgets/settle-a-hold-with-the-actual-amount"},{"title":"release a hold without consuming","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/budgets/release","href":"/api-reference/budgets/release-a-hold-without-consuming"},{"title":"consume an amount if it fits","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/budgets/charge","href":"/api-reference/budgets/consume-an-amount-if-it-fits"},{"title":"record usage that already happened","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/budgets/record","href":"/api-reference/budgets/record-usage-that-already-happened"},{"title":"get a budget and its balance","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/budgets/get","href":"/api-reference/budgets/get-a-budget-and-its-balance"},{"title":"debit capacity for a long-lived process to spend locally","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/budgets/lease","href":"/api-reference/budgets/debit-capacity-for-a-long-lived-process-to-spend-locally"},{"title":"report a lease's usage, and extend or close it","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/budgets/report","href":"/api-reference/budgets/report-a-leases-usage-and-extend-or-close-it"},{"title":"token rates and limits of models","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/budgets/models","href":"/api-reference/budgets/token-rates-and-limits-of-models"}]},{"group":"customers","pages":[{"title":"sign up","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/customers/sign-up","href":"/api-reference/customers/sign-up"},{"title":"change a customer's active plan","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/customers/change-plan","href":"/api-reference/customers/change-a-customers-active-plan"}]},{"group":"usage","pages":[{"title":"ingest raw event","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/usage/record","href":"/api-reference/usage/ingest-raw-event"},{"title":"ingest raw event synchronously for a feature","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/usage/consume","href":"/api-reference/usage/ingest-raw-event-synchronously-for-a-feature"}]},{"group":"ingestionEvents","pages":[{"title":"replay failed ingestion events","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/ingestion-events/replay","href":"/api-reference/ingestionevents/replay-failed-ingestion-events"},{"title":"get ingestion status","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/ingestion-events/status","href":"/api-reference/ingestionevents/get-ingestion-status"}]},{"group":"features","pages":[{"title":"get features","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/features/list","href":"/api-reference/features/get-features"}]},{"group":"invoices","pages":[{"title":"get invoice","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/invoices/get/{invoiceId}","href":"/api-reference/invoices/get-invoice"}]},{"group":"monetization","pages":[{"title":"apply monetization configuration","description":"Turn one configuration document into draft plan versions for this project. Nothing is published: a human reviews and publishes the drafts from the dashboard.","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/monetization/apply","href":"/api-reference/monetization/apply-monetization-configuration"},{"title":"get monetization configuration","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/monetization/get","href":"/api-reference/monetization/get-monetization-configuration"}]},{"group":"paymentMethods","pages":[{"title":"list payment methods","description":"Get payment methods for a customer","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/payment-methods/list","href":"/api-reference/paymentmethods/list-payment-methods"},{"title":"create payment method","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/payment-methods/create","href":"/api-reference/paymentmethods/create-payment-method"}]},{"group":"planVersions","pages":[{"title":"get plan version","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/plan-versions/get/{planVersionId}","href":"/api-reference/planversions/get-plan-version"},{"title":"list all plan versions","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/plan-versions/list","href":"/api-reference/planversions/list-all-plan-versions"}]},{"group":"subscriptions","pages":[{"title":"get subscription","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/subscriptions/get","href":"/api-reference/subscriptions/get-subscription"}]},{"group":"analytics","pages":[{"title":"explain charge","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/analytics/charges/explain","href":"/api-reference/analytics/explain-charge"},{"title":"get usage","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/analytics/usage/get","href":"/api-reference/analytics/get-usage"},{"title":"get current billing-period usage","deprecated":null,"version":null,"openapi":"/openapi.json post /v1/analytics/usage/current-billing-period","href":"/api-reference/analytics/get-current-billing-period-usage"}]},{"group":"wallet","pages":[{"title":"get wallet balance","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/wallet/balance","href":"/api-reference/wallet/get-wallet-balance"}]},{"group":"walletCredits","pages":[{"title":"get wallet credit balance","deprecated":null,"version":null,"openapi":"/openapi.json get /v1/wallet-credits/balance/{walletId}","href":"/api-reference/walletcredits/get-wallet-credit-balance"}]}]}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/libraries/ts/sdk/overview"}]}]},"basePath":"","title":"get monetization configuration - Unprice Documentation","buildId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","deploymentId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-C-hEh3I2.js","utils-CnF4QiUD.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C7PVNbel.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-8ytevL2A.js","snippetPresets-BT1alx3v.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BLXC0i_W.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CyLIGI9_.js","shallow-DC0lGVIW.js","getApiPlaygroundDisplay-CgDQ85tN.js","CodeSnippet-6-I-Gpv9.js","CodeSnippets-BAk1kDdu.js","Page-C945cI-W.js","getPastedJson-B276RuWN.js","icon-BqP8etTm.js","MethodPill-DM6sbxG1.js","DuplicateIcon-PyJglOaE.js","createIcon-CMeOMAc_.js","DynamicMarkdown-BoyYAA8K.js","SectionHeading-DAYv3gvZ.js","axios-vUo_bRtp.js","Markdown-BhTTmazV.js","clsx-CR-RHrVC.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CBUH0-zX.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BmARFYNC.js"]}