On an internal project, this route returns a 400 wrong_project_type: use Set key metrics instead.A customer can have several lines in the same month, such as several invoices.
First month of a multi-month period (e.g. a quarter), booked instead of a single month: amount is split evenly over its months. Set either month or both month_start and month_end on a row, never both forms. YYYY-MM.
Overwrite a row whose revenue_id already exists. When false, a revenue_id already used fails the whole request with a 422 on rows (id(s) already used: ...) and nothing is written.
Revenue posted through the API adds up with the Stripe and CSV revenue of the same customer and month. Use one source per customer and month to avoid counting revenue twice.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Weflayr Docs","description":"Weflayr: route every LLM call to the cheapest model that keeps your quality, and see your AI cost and margin per customer.","colors":{"primary":"#2E1B11","light":"#C7F04A","dark":"#0F0704"},"logo":{"light":"https://mintcdn.com/weflayr/jf99vD0W4dsGuj5S/images/logo-light-mode.svg?fit=max\u0026auto=format\u0026n=jf99vD0W4dsGuj5S\u0026q=85\u0026s=946f2cb0880dbdf0a0fbeaef912f21cd","dark":"https://mintcdn.com/weflayr/jf99vD0W4dsGuj5S/images/logo-dark-mode.svg?fit=max\u0026auto=format\u0026n=jf99vD0W4dsGuj5S\u0026q=85\u0026s=7b7356cb9bc85d3c21d94701fc3a4170","href":"/"},"favicon":"https://mintcdn.com/weflayr/5F8K-KIhlauIBT6x/images/favicon.svg?fit=max\u0026auto=format\u0026n=5F8K-KIhlauIBT6x\u0026q=85\u0026s=9f295bd67465b8cc7513661a806cb547","api":{"playground":{"display":"interactive"},"mdx":{"auth":{"method":"bearer"}}},"background":{"color":{"light":"#F9F5F1","dark":"#100C0A"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"For agents","icon":{"style":"regular","name":"robot"},"href":"https://docs.weflayr.com/for-agents"},{"anchor":"Talk to us","icon":{"style":"regular","name":"calendar"},"href":"https://calendly.com/noe-weflayr/30min"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"weflayr","hasAudioNarration":false,"actualSubdomain":"weflayr","customDomains":["docs.weflayr.com"],"gitSource":{"type":"github","owner":"weflayr","repo":"weflayr","deployBranch":"mintlify-doc","contentDirectory":"docs/mintlify_documentation","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6af3631b1f38dc5cafeaf1ff","clientVersion":"0.0.4102","searchFilterCounts":[{"language":"default","tag":"API reference","count":49},{"language":"default","tag":"Management","count":43},{"language":"default","tag":"Platform","count":15},{"language":"default","tag":"Get started","count":11},{"language":"default","tag":"Benchmarks","count":9},{"language":"default","tag":"SDKs","count":9},{"language":"default","tag":"Project","count":7},{"language":"default","tag":"Configure","count":7},{"language":"default","tag":"Routing strategies","count":6},{"language":"default","tag":"Evaluators","count":6}],"searchSettings":{"maxResults":10}},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","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}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":":root{--weflayr-font-sans: \"Helvetica Neue\", Helvetica, \"Segoe UI\", Arial, sans-serif;--weflayr-content: #201713;--weflayr-supportive: #68554b;--weflayr-line: #ece6df;--weflayr-surface: #ffffff;--weflayr-hover: rgb(74 61 54 / 0.08);--weflayr-focus: #a5988d;--weflayr-brand: #c7f04a;--weflayr-on-brand: #2e1b11}html.dark{--weflayr-content: #f9f5f1;--weflayr-supportive: #a5988d;--weflayr-line: #4a3d36;--weflayr-surface: #201713;--weflayr-hover: rgb(165 152 141 / 0.12);--weflayr-focus: #68554b}html,body{font-family:var(--weflayr-font-sans)}#content-area{color:var(--weflayr-content)}#content-area h1{font-size:1.875rem;line-height:2.375rem;letter-spacing:-0.02em}#content-area h2:not([data-component-part]){font-size:1.3125rem;line-height:1.75rem}#content-area h3:not([data-component-part]){font-size:1.0625rem;line-height:1.5rem}#sidebar{width:16rem}#sidebar a,#sidebar button{padding-top:0.25rem;padding-bottom:0.25rem}#sidebar a[aria-current=\"page\"],#sidebar button.text-primary{background-color:var(--weflayr-surface);box-shadow:inset 0 0 0 1px var(--weflayr-line);color:var(--weflayr-content)}#sidebar a:not([aria-current=\"page\"]):hover{background-color:var(--weflayr-hover)}.card{background-color:var(--weflayr-surface);border-color:var(--weflayr-line);border-radius:12px}.card:hover{border-color:var(--weflayr-focus)!important}.card [data-component-part=\"card-title\"]{color:var(--weflayr-content)}.card [data-component-part=\"card-content\"]{color:var(--weflayr-supportive)}.card [data-component-part=\"card-icon\"]>svg{background-color:var(--weflayr-on-brand)}html.dark .card [data-component-part=\"card-icon\"]>svg{background-color:var(--weflayr-brand)}#navbar .nav-logo{height:1.25rem}html.dark img[src*=\"/images/icons/\"]{filter:invert(1)}#sidebar svg[class*=\"bg-[color:CanvasText]\"]{background-color:black}html.dark #sidebar svg[class*=\"bg-[color:CanvasText]\"]{background-color:white}#sidebar .nav-anchor>div{box-shadow:none;background:none!important;padding:0;margin-right:0.75rem}"}],"page":{"pagePath":"api/management/set-revenue","slug":"/api/management/set-revenue","pageMetadata":{"title":"Set revenue","api":"POST https://app.weflayr.com/api/revenue/","description":"Send what each customer paid you each month, so Weflayr computes your margin per customer.","href":"/api/management/set-revenue"},"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: \"Send what each customer paid you each month, so Weflayr computes your margin per customer.\"\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,..._provideComponents(),...props.components},{Expandable,Heading,Note,ParamField}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`On an `,_jsx(_components.a,{href:`/product/organizations-and-projects#internal-projects`,children:`internal project`}),`, this route returns a 400 `,_jsx(_components.code,{children:`wrong_project_type`}),`: use `,_jsx(_components.a,{href:`/api/management/set-key-metrics`,children:`Set key metrics`}),` instead.`]}),`\n`,_jsx(_components.p,{children:`A customer can have several lines in the same month, such as several invoices.`}),`\n`,_jsx(Heading,{level:`2`,id:`parameters`,children:`Parameters`}),`\n`,_jsxs(ParamField,{body:`rows`,type:`object[]`,required:true,id:`param-rows`,children:[_jsx(_components.p,{children:`The revenue lines to book, described below. Up to 1,000 per call.`}),_jsxs(Expandable,{title:`row`,children:[_jsx(ParamField,{body:`customer_name`,type:`string`,required:true,id:`param-customer-name`,children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`customer_name`}),` your LLM calls carry (see `,_jsx(_components.a,{href:`/api/gateway/responses#param-customer-name`,children:_jsx(_components.code,{children:`customer_name`})}),`), so revenue and AI cost land on the same customer.`]})}),_jsx(ParamField,{body:`amount`,type:`number`,required:true,id:`param-amount`,children:_jsx(_components.p,{children:`The value to book.`})}),_jsx(ParamField,{body:`month`,type:`string`,placeholder:`2026-10`,id:`param-month`,children:_jsxs(_components.p,{children:[`The calendar month the value belongs to. Required unless you set `,_jsx(_components.code,{children:`month_start`}),` and `,_jsx(_components.code,{children:`month_end`}),` instead. `,_jsx(_components.code,{children:`YYYY-MM`}),`.`]})}),_jsx(ParamField,{body:`month_start`,type:`string`,placeholder:`2026-07`,id:`param-month-start`,children:_jsxs(_components.p,{children:[`First month of a multi-month period (e.g. a quarter), booked instead of a single `,_jsx(_components.code,{children:`month`}),`: `,_jsx(_components.code,{children:`amount`}),` is split evenly over its months. Set either `,_jsx(_components.code,{children:`month`}),` or both `,_jsx(_components.code,{children:`month_start`}),` and `,_jsx(_components.code,{children:`month_end`}),` on a row, never both forms. `,_jsx(_components.code,{children:`YYYY-MM`}),`.`]})}),_jsx(ParamField,{body:`month_end`,type:`string`,placeholder:`2026-09`,id:`param-month-end`,children:_jsxs(_components.p,{children:[`Last month of that period, inclusive. `,_jsx(_components.code,{children:`YYYY-MM`}),`.`]})}),_jsx(ParamField,{body:`revenue_id`,type:`string`,id:`param-revenue-id`,children:_jsx(_components.p,{children:`An id for the row, checked for uniqueness, typically from your billing system.`})})]})]}),`\n`,_jsx(ParamField,{body:`upsert`,type:`boolean`,default:`false`,id:`param-upsert`,children:_jsxs(_components.p,{children:[`Overwrite a row whose `,_jsx(_components.code,{children:`revenue_id`}),` already exists. When false, a `,_jsx(_components.code,{children:`revenue_id`}),` already used fails the whole request with a 422 on `,_jsx(_components.code,{children:`rows`}),` (`,_jsx(_components.code,{children:`id(s) already used: ...`}),`) and nothing is written.`]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Revenue posted through the API adds up with the `,_jsx(_components.a,{href:`/product/sync-revenue`,children:`Stripe and CSV`}),` revenue of the same customer and month. Use one source per customer and month to avoid counting revenue twice.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Set revenue","api":"POST https://app.weflayr.com/api/revenue/","description":"Send what each customer paid you each month, so Weflayr computes your margin per customer.","href":"/api/management/set-revenue"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,Note,ParamField,RequestExample,ResponseExample}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`On an `,_jsx(_components.a,{href:`/product/organizations-and-projects#internal-projects`,children:`internal project`}),`, this route returns a 400 `,_jsx(_components.code,{children:`wrong_project_type`}),`: use `,_jsx(_components.a,{href:`/api/management/set-key-metrics`,children:`Set key metrics`}),` instead.`]}),`\n`,_jsx(_components.p,{children:`A customer can have several lines in the same month, such as several invoices.`}),`\n`,_jsx(Heading,{level:`2`,id:`parameters`,children:`Parameters`}),`\n`,_jsxs(ParamField,{body:`rows`,type:`object[]`,required:true,id:`param-rows`,children:[_jsx(_components.p,{children:`The revenue lines to book, described below. Up to 1,000 per call.`}),_jsxs(Expandable,{title:`row`,children:[_jsx(ParamField,{body:`customer_name`,type:`string`,required:true,id:`param-customer-name`,children:_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`customer_name`}),` your LLM calls carry (see `,_jsx(_components.a,{href:`/api/gateway/responses#param-customer-name`,children:_jsx(_components.code,{children:`customer_name`})}),`), so revenue and AI cost land on the same customer.`]})}),_jsx(ParamField,{body:`amount`,type:`number`,required:true,id:`param-amount`,children:_jsx(_components.p,{children:`The value to book.`})}),_jsx(ParamField,{body:`month`,type:`string`,placeholder:`2026-10`,id:`param-month`,children:_jsxs(_components.p,{children:[`The calendar month the value belongs to. Required unless you set `,_jsx(_components.code,{children:`month_start`}),` and `,_jsx(_components.code,{children:`month_end`}),` instead. `,_jsx(_components.code,{children:`YYYY-MM`}),`.`]})}),_jsx(ParamField,{body:`month_start`,type:`string`,placeholder:`2026-07`,id:`param-month-start`,children:_jsxs(_components.p,{children:[`First month of a multi-month period (e.g. a quarter), booked instead of a single `,_jsx(_components.code,{children:`month`}),`: `,_jsx(_components.code,{children:`amount`}),` is split evenly over its months. Set either `,_jsx(_components.code,{children:`month`}),` or both `,_jsx(_components.code,{children:`month_start`}),` and `,_jsx(_components.code,{children:`month_end`}),` on a row, never both forms. `,_jsx(_components.code,{children:`YYYY-MM`}),`.`]})}),_jsx(ParamField,{body:`month_end`,type:`string`,placeholder:`2026-09`,id:`param-month-end`,children:_jsxs(_components.p,{children:[`Last month of that period, inclusive. `,_jsx(_components.code,{children:`YYYY-MM`}),`.`]})}),_jsx(ParamField,{body:`revenue_id`,type:`string`,id:`param-revenue-id`,children:_jsx(_components.p,{children:`An id for the row, checked for uniqueness, typically from your billing system.`})})]})]}),`\n`,_jsx(ParamField,{body:`upsert`,type:`boolean`,default:`false`,id:`param-upsert`,children:_jsxs(_components.p,{children:[`Overwrite a row whose `,_jsx(_components.code,{children:`revenue_id`}),` already exists. When false, a `,_jsx(_components.code,{children:`revenue_id`}),` already used fails the whole request with a 422 on `,_jsx(_components.code,{children:`rows`}),` (`,_jsx(_components.code,{children:`id(s) already used: ...`}),`) and nothing is written.`]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Revenue posted through the API adds up with the `,_jsx(_components.a,{href:`/product/sync-revenue`,children:`Stripe and CSV`}),` revenue of the same customer and month. Use one source per customer and month to avoid counting revenue twice.`]})}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`11`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` weflayr`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` weflayr.openapi.models `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` SetRevenueInput`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` weflayr.client() `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# reads WEFLAYR_API_KEY`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client.set_revenue(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`SetRevenueInput.from_dict({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"rows\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"customer_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"c_123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1200.50`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"month\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-06\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"customer_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"c_456\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`800`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"month\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-06\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}))`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`14`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` weflayr`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` require`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'weflayr'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` weflayr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// reads WEFLAYR_API_KEY`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` weflayr`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`api`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`setRevenue`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` throwOnError:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` rows:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`customerName:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'c_123'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`amount:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1200.50`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`month:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '2026-06'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`customerName:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'c_456'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`amount:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 800`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`month:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '2026-06'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`9`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://app.weflayr.com/api/revenue/`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$WEFLAYR_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"rows\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {\"customer_name\": \"c_123\", \"amount\": 1200.50, \"month\": \"2026-06\"},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {\"customer_name\": \"c_456\", \"amount\": 800, \"month\": \"2026-06\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})]}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`200`,numberOfLines:`1`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"ok\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"rows_inserted\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`]})})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Set revenue","api":"POST https://app.weflayr.com/api/revenue/","description":"Send what each customer paid you each month, so Weflayr computes your margin per customer.","href":"/api/management/set-revenue"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Parameters","slug":"parameters","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"11\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> weflayr\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">from\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> weflayr.openapi.models \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> SetRevenueInput\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">client \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> weflayr.client() \u003c/span>\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\"># reads WEFLAYR_API_KEY\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">client.set_revenue(\u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">body\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">SetRevenueInput.from_dict({\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"rows\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"customer_name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"c_123\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"amount\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1200.50\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"month\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-06\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"customer_name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"c_456\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"amount\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">800\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"month\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-06\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}))\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Node.js","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"javascript\">\u003ccode language=\"javascript\" numberOfLines=\"14\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> weflayr\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> require\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'weflayr'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> client\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> weflayr\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">client\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(); \u003c/span>\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\">// reads WEFLAYR_API_KEY\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">await\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> weflayr\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">api\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">setRevenue\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">({\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> client\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> throwOnError:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> body:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> rows:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">customerName:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'c_123'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">amount:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\"> 1200.50\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">month:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '2026-06'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">customerName:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'c_456'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">amount:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\"> 800\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">month:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '2026-06'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">});\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"9\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://app.weflayr.com/api/revenue/\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization: Bearer \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$WEFLAYR_API_KEY\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"rows\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> {\"customer_name\": \"c_123\", \"amount\": 1200.50, \"month\": \"2026-06\"},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> {\"customer_name\": \"c_456\", \"amount\": 800, \"month\": \"2026-06\"}\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"200","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"1\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"ok\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"rows_inserted\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">2\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Set revenue","path":"/api/revenue/","servers":[{"url":"https://app.weflayr.com"}],"method":"post","request":{"security":[{"title":"Bearer Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"rows":[{"type":"array","items":[{"type":"object","properties":{"customer_name":[{"type":"string","description":"The `customer_name` your LLM calls carry (see `customer_name` ), so revenue and AI cost land on the same customer.","required":true}],"amount":[{"type":"number","description":"The value to book.","required":true}],"month":[{"type":"string","description":"The calendar month the value belongs to. Required unless you set `month_start` and `month_end` instead. `YYYY-MM` .","placeholder":"2026-10"}],"month_start":[{"type":"string","description":"First month of a multi-month period (e.g. a quarter), booked instead of a single `month` : `amount` is split evenly over its months. Set either `month` or both `month_start` and `month_end` on a row, never both forms. `YYYY-MM` .","placeholder":"2026-07"}],"month_end":[{"type":"string","description":"Last month of that period, inclusive. `YYYY-MM` .","placeholder":"2026-09"}],"revenue_id":[{"type":"string","description":"An id for the row, checked for uniqueness, typically from your billing system."}]}}],"description":"The revenue lines to book, described below. Up to 1,000 per call.","required":true}],"upsert":[{"type":"boolean","description":"Overwrite a row whose `revenue_id` already exists. When false, a `revenue_id` already used fails the whole request with a 422 on `rows` ( `id(s) already used: ...` ) and nothing is written."}]}}],"examples":{"example":{"value":{"rows":[{"customer_name":"\u003cstring>","amount":123,"month":"\u003cstring>","month_start":"\u003cstring>","month_end":"\u003cstring>","revenue_id":"\u003cstring>"}],"upsert":true}}}}}},"response":{},"deprecated":false}},"jsLinks":[],"subdomain":"weflayr","siteName":"Weflayr Docs","title":"Set revenue - Weflayr Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-10T06:25:25.039Z","originalFileLocation":"api/management/set-revenue.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=\"Send what each customer paid you each month, so Weflayr computes your margin per customer.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Weflayr Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/weflayr/WfwX99VEbh4c__vK/_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/weflayr/WfwX99VEbh4c__vK/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/weflayr/WfwX99VEbh4c__vK/_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/weflayr/WfwX99VEbh4c__vK/_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/weflayr/WfwX99VEbh4c__vK/_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/weflayr/WfwX99VEbh4c__vK/_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/weflayr/WfwX99VEbh4c__vK/_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/weflayr/WfwX99VEbh4c__vK/_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/weflayr/WfwX99VEbh4c__vK/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Set revenue - Weflayr Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Send what each customer paid you each month, so Weflayr computes your margin per customer.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Weflayr Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.weflayr.com/api/management/set-revenue\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://weflayr.mintlify.site/_mintlify/api/og/v2?division=Revenue\u0026amp;title=Set+revenue\u0026amp;description=Send+what+each+customer+paid+you+each+month%2C+so+Weflayr+computes+your+margin+per+customer.\u0026amp;theme=4f4324149ad1615461e5eea4\u0026amp;signature=67bec9c6f327585b2b7bbe0d16e2aee102cea5f122ea7da92c78c691744b3dc2\">\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=\"Set revenue - Weflayr Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Send what each customer paid you each month, so Weflayr computes your margin per customer.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://weflayr.mintlify.site/_mintlify/api/og/v2?division=Revenue\u0026amp;title=Set+revenue\u0026amp;description=Send+what+each+customer+paid+you+each+month%2C+so+Weflayr+computes+your+margin+per+customer.\u0026amp;theme=4f4324149ad1615461e5eea4\u0026amp;signature=67bec9c6f327585b2b7bbe0d16e2aee102cea5f122ea7da92c78c691744b3dc2\">\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/weflayr/WfwX99VEbh4c__vK/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Weflayr Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2E1B11\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.weflayr.com/api/management/set-revenue\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api/management/set-revenue.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.weflayr.com/#organization\",\"name\":\"Weflayr Docs\",\"url\":\"https://docs.weflayr.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/weflayr/jf99vD0W4dsGuj5S/images/logo-light-mode.svg?fit=max\u0026auto=format\u0026n=jf99vD0W4dsGuj5S\u0026q=85\u0026s=946f2cb0880dbdf0a0fbeaef912f21cd\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.weflayr.com#website\",\"name\":\"Weflayr Docs\",\"url\":\"https://docs.weflayr.com\",\"publisher\":{\"@id\":\"https://docs.weflayr.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.weflayr.com/api/management/set-revenue#webpage\",\"url\":\"https://docs.weflayr.com/api/management/set-revenue\",\"name\":\"Set revenue\",\"description\":\"Send what each customer paid you each month, so Weflayr computes your margin per customer.\",\"dateModified\":\"2026-11-10T06:25:25.039Z\",\"isPartOf\":{\"@id\":\"https://docs.weflayr.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.weflayr.com/api/management/set-revenue#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.weflayr.com/api/management/set-revenue#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Management\",\"item\":\"https://docs.weflayr.com/api/management/get-costs\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Set revenue\",\"item\":\"https://docs.weflayr.com/api/management/set-revenue\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.weflayr.com/api/management/set-revenue#apireference\",\"headline\":\"Set revenue\",\"name\":\"Set revenue\",\"description\":\"Send what each customer paid you each month, so Weflayr computes your margin per customer.\",\"url\":\"https://docs.weflayr.com/api/management/set-revenue\",\"mainEntityOfPage\":{\"@id\":\"https://docs.weflayr.com/api/management/set-revenue#webpage\"},\"dateModified\":\"2026-11-10T06:25:25.039Z\",\"publisher\":{\"@id\":\"https://docs.weflayr.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.weflayr.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Weflayr Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Weflayr Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api/management/set-revenue.md","siteName":"Weflayr Docs","nav":{"global":{"anchors":[{"anchor":"For agents","icon":{"style":"regular","name":"robot"},"href":"https://docs.weflayr.com/for-agents"},{"anchor":"Talk to us","icon":{"style":"regular","name":"calendar"},"href":"https://calendly.com/noe-weflayr/30min"}]},"tabs":[{"tab":"Get started","pages":[{"title":"Get started","href":""}]},{"tab":"How it works","pages":[{"title":"How it works","href":"/concepts/benchmark-driven-routing"}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/sdks/python"}]},{"tab":"API reference","groups":[{"group":"Get started","pages":[{"title":"API reference","sidebarTitle":"Introduction","icon":"https://mintlify.s3.us-west-1.amazonaws.com/weflayr/images/icons/book.svg","href":"/api/introduction"}]},{"group":"Gateway","pages":[{"title":"Responses","api":"POST https://gateway.weflayr.com/v1/responses","href":"/api/gateway/responses"},{"title":"Chat completions","api":"POST https://gateway.weflayr.com/v1/chat/completions","href":"/api/gateway/chat-completions"},{"title":"Embeddings","api":"POST https://gateway.weflayr.com/v1/embeddings","href":"/api/gateway/embeddings"},{"title":"Models","api":"GET https://gateway.weflayr.com/v1/models","href":"/api/gateway/models"},{"title":"Errors","icon":"https://mintlify.s3.us-west-1.amazonaws.com/weflayr/images/icons/alert-triangle.svg","href":"/api/gateway/errors"}]},{"group":"Management","pages":[{"group":"Dashboard data","icon":"/images/icons/chart-line.svg","pages":[{"title":"Get costs","api":"POST https://app.weflayr.com/api/costs/","href":"/api/management/get-costs"},{"title":"Get margin","api":"POST https://app.weflayr.com/api/margin/","href":"/api/management/get-margin"},{"title":"Get performance","api":"POST https://app.weflayr.com/api/performance/","description":"Get your AI cost and key metrics per day, week, month, quarter or year, with the cost per unit of each metric, optionally split by user or call name.","href":"/api/management/get-performance"}]},{"group":"Revenue","icon":"/images/icons/currency-dollar.svg","pages":[{"title":"Set revenue","api":"POST https://app.weflayr.com/api/revenue/","href":"/api/management/set-revenue"},{"title":"Get revenue","api":"GET https://app.weflayr.com/api/revenue/","description":"List the revenue of each customer, per month.","href":"/api/management/get-revenue"},{"title":"Delete revenue","api":"DELETE https://app.weflayr.com/api/revenue/","href":"/api/management/delete-revenue"}]},{"group":"Key metrics","icon":"/images/icons/target.svg","pages":[{"title":"Set key metrics","api":"POST https://app.weflayr.com/api/key-metrics/","href":"/api/management/set-key-metrics"},{"title":"Get key metrics","api":"GET https://app.weflayr.com/api/key-metrics/","href":"/api/management/get-key-metrics"},{"title":"Delete key metrics","api":"DELETE https://app.weflayr.com/api/key-metrics/","href":"/api/management/delete-key-metrics"}]},{"group":"Customer tags","icon":"/images/icons/tags.svg","pages":[{"title":"Set customer tags","api":"POST https://app.weflayr.com/api/customer-tags/","href":"/api/management/set-customer-tags"},{"title":"Get customer tags","api":"GET https://app.weflayr.com/api/customer-tags/","href":"/api/management/get-customer-tags"},{"title":"Delete customer tags","api":"DELETE https://app.weflayr.com/api/customer-tags/","href":"/api/management/delete-customer-tags"}]},{"group":"Calls","icon":"/images/icons/list.svg","pages":[{"title":"Get calls","api":"GET https://app.weflayr.com/api/calls/","href":"/api/management/get-calls"}]},{"group":"Evaluators","icon":"/images/icons/flask.svg","pages":[{"title":"Get evaluators","api":"GET https://app.weflayr.com/api/evaluators/","href":"/api/management/get-evaluators"},{"title":"Get evaluator","api":"GET https://app.weflayr.com/api/evaluator/","href":"/api/management/get-evaluator"},{"title":"Set evaluator","api":"POST https://app.weflayr.com/api/evaluators/","href":"/api/management/set-evaluator"},{"title":"Delete evaluator","api":"DELETE https://app.weflayr.com/api/evaluators/","href":"/api/management/delete-evaluator"},{"title":"Generate evaluators","api":"POST https://app.weflayr.com/api/evaluator-generation/","href":"/api/management/generate-evaluators"},{"title":"Test evaluator","api":"POST https://app.weflayr.com/api/evaluator-test/","href":"/api/management/test-evaluator"}]},{"group":"Benchmarks","icon":"/images/icons/chart-bar.svg","pages":[{"title":"Get benchmark candidates","api":"POST https://app.weflayr.com/api/benchmark-candidates/","href":"/api/management/get-benchmark-candidates"},{"title":"Get benchmarks","api":"GET https://app.weflayr.com/api/benchmarks/","href":"/api/management/get-benchmarks"},{"title":"Get benchmark","api":"GET https://app.weflayr.com/api/benchmark/","href":"/api/management/get-benchmark"},{"title":"Set benchmark","api":"POST https://app.weflayr.com/api/benchmarks/","href":"/api/management/set-benchmark"},{"title":"Delete benchmark","api":"DELETE https://app.weflayr.com/api/benchmarks/","href":"/api/management/delete-benchmark"},{"title":"Get benchmark examples","api":"GET https://app.weflayr.com/api/benchmark-examples/","href":"/api/management/get-benchmark-examples"},{"title":"Start or resume benchmark","api":"POST https://app.weflayr.com/api/benchmark-start/","href":"/api/management/start-or-resume-benchmark"},{"title":"Stop benchmark","api":"POST https://app.weflayr.com/api/benchmark-stop/","href":"/api/management/stop-benchmark"},{"title":"Import past data","api":"POST https://app.weflayr.com/api/past-data-imports/","href":"/api/management/import-past-data"}]},{"group":"Routing strategies","icon":"/images/icons/route.svg","pages":[{"title":"Get routing strategies","api":"GET https://app.weflayr.com/api/routing-strategies/","href":"/api/management/get-routing-strategies"},{"title":"Get routing strategy","api":"GET https://app.weflayr.com/api/routing-strategy/","href":"/api/management/get-routing-strategy"},{"title":"Set routing strategy","api":"POST https://app.weflayr.com/api/routing-strategies/","href":"/api/management/set-routing-strategy"},{"title":"Archive routing strategy","api":"POST https://app.weflayr.com/api/routing-strategy-archive/","href":"/api/management/archive-routing-strategy"},{"title":"Restore routing strategy","api":"POST https://app.weflayr.com/api/routing-strategy-restore/","href":"/api/management/restore-routing-strategy"},{"title":"Get routing strategy results","api":"GET https://app.weflayr.com/api/routing-strategy-results/","href":"/api/management/get-routing-strategy-results"}]},{"group":"Project","icon":"/images/icons/folder.svg","pages":[{"title":"Get project","api":"GET https://app.weflayr.com/api/project/","href":"/api/management/get-project"},{"title":"Get API key info","api":"GET https://app.weflayr.com/api/api-key/","href":"/api/management/get-api-key-info"},{"title":"Get tags","api":"GET https://app.weflayr.com/api/tags/","href":"/api/management/get-tags"},{"title":"Get models","api":"GET https://app.weflayr.com/api/models/","href":"/api/management/get-models"},{"title":"Get providers","api":"GET https://app.weflayr.com/api/providers/","href":"/api/management/get-providers"},{"title":"Get customers","api":"GET https://app.weflayr.com/api/customers/","href":"/api/management/get-customers"},{"title":"Get features","api":"GET https://app.weflayr.com/api/features/","href":"/api/management/get-features"}]},{"title":"MCP server","href":"/api/management/mcp-server"},{"title":"Errors","icon":"https://mintlify.s3.us-west-1.amazonaws.com/weflayr/images/icons/alert-triangle.svg","href":"/api/management/errors"}]}]},{"tab":"Platform","pages":[{"title":"Platform","href":"/product/model-benchmarks"}]}]},"basePath":"","title":"Set revenue - Weflayr Docs","buildId":"dpl_596ePT575z4qnAFksq1biRW97aLY","deploymentId":"dpl_596ePT575z4qnAFksq1biRW97aLY","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-C9Wu0MeN.js","utils-jWgu-6Qf.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DBD8f9qn.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BGuX1ui5.js","snippetPresets-Evy63nQB.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BQHO1lnV.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-B6C8m-t_.js","shallow-BG4cT0fH.js","getApiPlaygroundDisplay-CgEPrE-D.js","CodeSnippet-CU8JyZ9N.js","CodeSnippets-BnxHU32T.js","Page-D6S0Yh6q.js","getPastedJson-CwiYOonh.js","icon-DYDpWmDf.js","MethodPill-C-J-l7_c.js","DuplicateIcon-B6ARwg9w.js","createIcon-Dsv4MtDq.js","DynamicMarkdown-CtasenyM.js","SectionHeading-YNcgYwjB.js","axios-vUo_bRtp.js"]}