{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Autumn","colors":{"primary":"#8838ff","light":"#9b5cff","dark":"#8838ff"},"logo":{"light":"https://mintcdn.com/autumn-b9b4c0fb/BOEMpWFJsAdGcii1/assets/logo/autumn-dark.svg?fit=max\u0026auto=format\u0026n=BOEMpWFJsAdGcii1\u0026q=85\u0026s=720bd2227c435e77f2c91cbfcbccd274","dark":"https://mintcdn.com/autumn-b9b4c0fb/BOEMpWFJsAdGcii1/assets/logo/autumn-light.svg?fit=max\u0026auto=format\u0026n=BOEMpWFJsAdGcii1\u0026q=85\u0026s=f700b862e5d0ada8c89a5976d27863fe"},"favicon":"https://mintcdn.com/autumn-b9b4c0fb/ihHX49Ug6NamJ10t/favicon.svg?fit=max\u0026auto=format\u0026n=ihHX49Ug6NamJ10t\u0026q=85\u0026s=b1fd8b3e3086e5a3855a8cf8c45dd57a","api":{"playground":{"display":"interactive"},"examples":{"languages":["typescript","python","bash"]}},"appearance":{"default":"system","strict":false},"background":{"color":{"light":"#FFFFFF","dark":"#0A0A0A"}},"navbar":{"primary":{"type":"button","label":"Dashboard","href":"https://app.useautumn.com"}},"footer":{"socials":{"x":"https://x.com/autumnpricing","linkedin":"https://linkedin.com/company/useautumn"}},"fonts":{"heading":{"family":"Inter"},"body":{"family":"Inter"}},"contextual":{"options":["copy","cursor","view"],"display":"header"},"interaction":{"drilldown":true},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Discord","icon":"discord","href":"https://discord.gg/STqxY92zuS"},{"anchor":"Website","icon":"globe","href":"https://useautumn.com"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"autumn-b9b4c0fb","hasAudioNarration":false,"actualSubdomain":"autumn-b9b4c0fb","customDomains":["docs.useautumn.com"],"gitSource":{"type":"github","owner":"useautumn","repo":"autumn","deployBranch":"main","contentDirectory":"apps/docs/mintlify","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae8c61fe4f1cb0cd68b70dd","collectionId":"fa5e2fe7-05f9-467c-be95-df54bd1b9705","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae8c61fe4f1cb0cd68b70dd"},"feedback":{"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae8d59b13a6dcd51a375ddf","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"default","tag":"API Reference","count":105},{"language":"default","tag":"Documentation","count":64},{"language":"default","tag":"Billing","count":21},{"language":"default","tag":"Configure Pricing","count":19},{"language":"default","tag":"Customers","count":16},{"language":"default","tag":"Additional Resources","count":16},{"language":"default","tag":"Rewards \u0026 Referrals","count":13},{"language":"default","tag":"Balances","count":12},{"language":"default","tag":"Webhook Events","count":10},{"language":"default","tag":"Invoices","count":8}],"searchSettings":{"tuning":{"anchor":{"titleCoverageRelabel":true}}}},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"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":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"language-tabs.css","content":""},{"filePath":"style.css","content":".prose>.api-section{display:none!important}"}],"page":{"pagePath":"api-reference/rewards/createReward","slug":"/api-reference/rewards/createReward","pageMetadata":{"title":"Create Reward","openapi":"openapi POST /v1/rewards.create","description":"Create a coupon or feature grant.","href":"/api-reference/rewards/createReward"},"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: \"Create a coupon or feature grant.\"\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];const DynamicResponseExample=({json,statusCode=`200`})=>{const{CodeBlock,ResponseExample}=_provideComponents()||{};if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);const toCamelCase=str=>{return str.replace(/_([a-z])/g,(_,c)=>c.toUpperCase())};const convertKeysToCamelCase=obj=>{if(Array.isArray(obj)){return obj.map(item=>convertKeysToCamelCase(item))}if(obj!==null\u0026\u0026typeof obj===`object`){return Object.keys(obj).reduce((acc,key)=>{const camelKey=toCamelCase(key);acc[camelKey]=convertKeysToCamelCase(obj[key]);return acc},{})}return obj};const[isTypeScript,setIsTypeScript]=useState(()=>{if(typeof window!==`undefined`){try{const lang=localStorage.getItem(`code`);return JSON.parse(lang)===`typescript`}catch{return true}}return true});useEffect(()=>{const onMintlifyStorage=event=>{if(event.detail?.key===`code`){try{const value=JSON.parse(event.detail.value);setIsTypeScript(value===`typescript`)}catch{}}};const pollInterval=setInterval(()=>{try{const lang=localStorage.getItem(`code`);const value=JSON.parse(lang);setIsTypeScript(value===`typescript`)}catch{}},300);document.addEventListener(`mintlify-localstorage`,onMintlifyStorage);return()=>{document.removeEventListener(`mintlify-localstorage`,onMintlifyStorage);clearInterval(pollInterval)}},[]);const camelCaseJson=useMemo(()=>convertKeysToCamelCase(json),[json]);const snakeCaseString=JSON.stringify(json,null,2);const camelCaseString=JSON.stringify(camelCaseJson,null,2);return _jsx(ResponseExample,{children:isTypeScript?_jsx(CodeBlock,{language:`json`,filename:statusCode,children:camelCaseString}):_jsx(CodeBlock,{language:`json`,filename:statusCode,children:snakeCaseString})})};const DynamicResponseField=({children,name,...props})=>{const{ResponseField}=_provideComponents()||{};if(!ResponseField)_missingMdxReference(`ResponseField`,true);const convertToCamelCase=str=>{if(typeof str!==`string`)return str;return str.replace(/[_-](\\w)/g,(_,c)=>c.toUpperCase())};const[lang,setLang]=useState(()=>{if(typeof window!==`undefined`){const stored=localStorage.getItem(`code`);return stored||`\"typescript\"`}return`\"typescript\"`});useEffect(()=>{const onMintlifyStorage=event=>{const key=event.detail?.key;if(key===`code`){setLang(event.detail.value)}};const pollInterval=setInterval(()=>{const current=localStorage.getItem(`code`);if(current\u0026\u0026current!==lang){setLang(current)}},500);document.addEventListener(`mintlify-localstorage`,onMintlifyStorage);return()=>{document.removeEventListener(`mintlify-localstorage`,onMintlifyStorage);clearInterval(pollInterval)}},[lang]);const resolvedName=useMemo(()=>{try{const value=JSON.parse(lang);const useCamelCase=value===`typescript`;return useCamelCase?convertToCamelCase(name):name}catch{return name}},[name,lang]);return _jsx(ResponseField,{name:resolvedName,...props,children})};const DynamicParamField=({children,body,path,...props})=>{const{ParamField}=_provideComponents()||{};if(!ParamField)_missingMdxReference(`ParamField`,true);const convertToCamelCase=str=>{if(typeof str!==`string`)return str;return str.replace(/[_-](\\w)/g,(_,c)=>c.toUpperCase())};const[lang,setLang]=useState(()=>{if(typeof window!==`undefined`){const stored=localStorage.getItem(`code`);return stored||`\"typescript\"`}return`\"typescript\"`});useEffect(()=>{const onMintlifyStorage=event=>{const key=event.detail?.key;if(key===`code`){setLang(event.detail.value)}};const pollInterval=setInterval(()=>{const current=localStorage.getItem(`code`);if(current\u0026\u0026current!==lang){setLang(current)}},500);document.addEventListener(`mintlify-localstorage`,onMintlifyStorage);return()=>{document.removeEventListener(`mintlify-localstorage`,onMintlifyStorage);clearInterval(pollInterval)}},[lang]);const resolvedBody=useMemo(()=>{try{const value=JSON.parse(lang);const useCamelCase=value===`typescript`;return useCamelCase?convertToCamelCase(body):body}catch{return body}},[body,lang]);const resolvedPath=useMemo(()=>{try{const value=JSON.parse(lang);const useCamelCase=value===`typescript`;return useCamelCase?convertToCamelCase(path):path}catch{return path}},[path,lang]);return _jsx(ParamField,{body:resolvedBody,path:resolvedPath,...props,children})};function _createMdxContent(props){const _components={code:`code`,p:`p`,..._provideComponents(),...props.components},{Expandable,Heading,_MdxComponentBoundary}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`3`,id:`body-parameters`,children:`Body Parameters`}),`\n`,_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsxs(DynamicParamField,{body:`coupon`,type:`object`,children:[_jsx(_components.p,{children:`Provide exactly one of coupon or feature_grant, not both.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`id`,type:`string`,required:true})}),_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`name`,type:`string`,required:true})}),_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsxs(DynamicParamField,{body:`duration`,type:`object`,required:true,children:[_jsx(_components.p,{children:`Use a positive integer length for months, and null for one_off or forever.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`type`,type:`'one_off' | 'months' | 'forever'`,required:true})}),_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`length`,type:`integer | null`,required:true})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`plan_ids`,type:`string[] | null`,required:true,children:_jsx(_components.p,{children:`Plan IDs must be unique.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsxs(DynamicParamField,{body:`promo_codes`,type:`object[]`,required:true,children:[_jsx(_components.p,{children:`Promo code values must be unique.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`code`,type:`string`,required:true})}),_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`global_max_redemption`,type:`integer | null`})}),_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`first_time_transaction`,type:`boolean | null`})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`internal_id`,type:`string`,children:_jsx(_components.p,{children:`Address an existing reward by its stable id. Omit when creating — the server generates one.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`type`,type:`'percentage_discount' | 'fixed_discount'`,required:true})}),_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`value`,type:`number`,required:true,children:_jsx(_components.p,{children:`Percentage discounts must be at most 100; fixed discounts must be positive.`})})})]})]})}),`\n`,_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsxs(DynamicParamField,{body:`feature_grant`,type:`object`,children:[_jsx(_components.p,{children:`Provide exactly one of coupon or feature_grant, not both.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`id`,type:`string`,required:true})}),_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`name`,type:`string`,required:true})}),_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsxs(DynamicParamField,{body:`grants`,type:`object[]`,required:true,children:[_jsx(_components.p,{children:`Feature IDs must be unique.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`feature_id`,type:`string`,required:true})}),_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`included`,type:`number | null`,required:true,children:_jsx(_components.p,{children:`A non-negative amount to grant, or null for boolean features.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`expiry`,type:`object | null`,required:true,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`type`,type:`'day' | 'week' | 'month' | 'year'`,required:true,children:_jsx(_components.p,{children:`The unit of time the grant lasts.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`length`,type:`integer`,required:true,children:_jsx(_components.p,{children:`The positive integer count of periods before the grant expires.`})})})]})})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsxs(DynamicParamField,{body:`promo_codes`,type:`object[]`,required:true,children:[_jsx(_components.p,{children:`Promo code values must be unique.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`code`,type:`string`,required:true})}),_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`max_uses`,type:`integer | null`,required:true,children:_jsx(_components.p,{children:`A positive redemption limit, or null for unlimited uses.`})})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicParamField`,children:_jsx(DynamicParamField,{body:`internal_id`,type:`string`,children:_jsx(_components.p,{children:`Address an existing reward by its stable id. Omit when creating — the server generates one.`})})})]})]})}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`coupon`,type:`object`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`id`,type:`string`,children:_jsx(_components.p,{children:`The unique identifier for the coupon.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`name`,type:`string | null`,children:_jsx(_components.p,{children:`A human-readable name for the coupon.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`type`,type:`'percentage_discount' | 'fixed_discount' | 'invoice_credits'`,children:_jsx(_components.p,{children:`The type of discount: percentage_discount, fixed_discount, or invoice_credits.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`value`,type:`number`,children:_jsx(_components.p,{children:`The discount value. A percentage for percentage_discount, or an amount for fixed_discount / invoice_credits.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`duration`,type:`object`,children:[_jsx(_components.p,{children:`How long the coupon applies once redeemed.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`type`,type:`'one_off' | 'months' | 'forever'`,children:_jsx(_components.p,{children:`The unit of time the duration is measured in.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`length`,type:`number | null`,children:_jsxs(_components.p,{children:[`The number of `,_jsx(_components.code,{children:`type`}),` periods the duration lasts, or null when the type has no length (e.g. one_off, forever).`]})})})]})]})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`plan_ids`,type:`string[] | null`,children:_jsx(_components.p,{children:`The plan IDs the coupon applies to, or null when it applies to all plans.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`promo_codes`,type:`object[]`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`code`,type:`string`,children:_jsx(_components.p,{children:`The promo code customers enter to redeem the coupon.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`global_max_redemption`,type:`number | null`,children:_jsx(_components.p,{children:`Maximum number of times this promo code can be redeemed across all customers, or null for unlimited.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`first_time_transaction`,type:`boolean | null`,children:_jsx(_components.p,{children:`Whether this promo code can only be applied to a customer’s first transaction.`})})})]})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`created_at`,type:`number`,children:_jsx(_components.p,{children:`The Unix timestamp (in milliseconds) when the coupon was created.`})})})]})})}),`\n`,_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`feature_grant`,type:`object`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`id`,type:`string`,children:_jsx(_components.p,{children:`The unique identifier for the feature grant.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`name`,type:`string | null`,children:_jsx(_components.p,{children:`A human-readable name for the feature grant.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`grants`,type:`object[]`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`feature_id`,type:`string`,children:_jsx(_components.p,{children:`The feature ID this grant applies to.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`included`,type:`number | null`,children:_jsx(_components.p,{children:`The amount of the feature granted, or null for boolean features.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsxs(DynamicResponseField,{name:`expiry`,type:`object | null`,children:[_jsx(_components.p,{children:`How long the granted amount lasts before expiring, or null for a permanent grant.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`type`,type:`'day' | 'week' | 'month' | 'year'`,children:_jsx(_components.p,{children:`The unit of time the grant lasts.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`length`,type:`integer`,children:_jsx(_components.p,{children:`The positive integer count of periods before the grant expires.`})})})]})]})})]})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`promo_codes`,type:`object[]`,children:_jsxs(Expandable,{title:`properties`,children:[_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`code`,type:`string`,children:_jsx(_components.p,{children:`The promo code customers enter to redeem the feature grant.`})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`max_uses`,type:`number | null`,children:_jsx(_components.p,{children:`Maximum number of times this promo code can be redeemed, or null for unlimited.`})})})]})})}),_jsx(_MdxComponentBoundary,{name:`DynamicResponseField`,children:_jsx(DynamicResponseField,{name:`created_at`,type:`number`,children:_jsx(_components.p,{children:`The Unix timestamp (in milliseconds) when the feature grant was created.`})})})]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{DynamicResponseExample,DynamicResponseField,DynamicParamField,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":"Create Reward","openapi":"openapi POST /v1/rewards.create","description":"Create a coupon or feature grant.","href":"/api-reference/rewards/createReward"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[158,4333,")=>null;const DynamicResponseField=()=>null;const DynamicParamField=()=>null;fun"]]},"mdxExtracts":{"tableOfContents":[{"title":"Body Parameters","slug":"body-parameters","depth":3,"children":[]},{"title":"Response","slug":"response","depth":3,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/autumn-b9b4c0fb/d78b8c063824141d/dynamic-response.js"],"openApiReferenceData":{"operation":{"operationId":"createReward","description":"Create a coupon or feature grant.","tags":["rewards"],"requestBody":"91e3ae7f-f7ad-4282-a6e8-f57f71ab0fdd","responses":{"200":"be6ef9ef-30fd-41d0-8c93-e7fe5a3b8f45"},"x-speakeasy-name-override":"create","parameters":["2abd51cf-3e49-4e02-a565-722e64ebf6c7"],"x-codeSamples":[{"lang":"typescript","label":"Typescript (SDK)","source":"import { Autumn } from 'autumn-js'\n\nconst autumn = new Autumn()\n\nconst result = await autumn.rewards.create({\n coupon: {\n id: \"summer_sale\",\n name: \"Summer Sale\",\n duration: {\n type: \"months\",\n length: 3,\n },\n planIds: null,\n promoCodes: [\n {\n code: \"SUMMER20\",\n },\n ],\n type: \"percentage_discount\",\n value: 20,\n },\n});"},{"lang":"python","label":"Python (SDK)","source":"from autumn_sdk import Autumn\n\nautumn = Autumn(secret_key=\"am_sk_test...\")\n\nres = autumn.rewards.create(\n coupon={\n \"id\": \"summer_sale\",\n \"name\": \"Summer Sale\",\n \"duration\": {\n \"type\": \"months\",\n \"length\": 3,\n },\n \"plan_ids\": None,\n \"promo_codes\": [\n {\n \"code\": \"SUMMER20\",\n },\n ],\n \"type\": \"percentage_discount\",\n \"value\": 20,\n },\n)"}],"method":"post","type":"path","servers":["cc7ba66a-ff89-44b9-8aaf-f9cafa099a58"],"security":["7d8a93d3-9d94-4d5b-8813-c63b96b6e0a7"],"path":"/v1/rewards.create","baseUrlOptions":["https://api.useautumn.com"],"title":"","codeSamples":[{"label":"Typescript (SDK)","lang":"typescript","source":"import { Autumn } from 'autumn-js'\n\nconst autumn = new Autumn()\n\nconst result = await autumn.rewards.create({\n coupon: {\n id: \"summer_sale\",\n name: \"Summer Sale\",\n duration: {\n type: \"months\",\n length: 3,\n },\n planIds: null,\n promoCodes: [\n {\n code: \"SUMMER20\",\n },\n ],\n type: \"percentage_discount\",\n value: 20,\n },\n});"},{"label":"Python (SDK)","lang":"python","source":"from autumn_sdk import Autumn\n\nautumn = Autumn(secret_key=\"am_sk_test...\")\n\nres = autumn.rewards.create(\n coupon={\n \"id\": \"summer_sale\",\n \"name\": \"Summer Sale\",\n \"duration\": {\n \"type\": \"months\",\n \"length\": 3,\n },\n \"plan_ids\": None,\n \"promo_codes\": [\n {\n \"code\": \"SUMMER20\",\n },\n ],\n \"type\": \"percentage_discount\",\n \"value\": 20,\n },\n)"}],"requestExampleLanguages":["typescript","python","bash"],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{"2abd51cf-3e49-4e02-a565-722e64ebf6c7":{"name":"x-api-version","in":"header","required":true,"schema":{"type":"string","default":"2.6.0","isRequired":true,"uniqueKey":"","typeLabel":"string"},"x-speakeasy-globals-hidden":true}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"coupon":{"type":"object","properties":{"id":{"type":"string","minLength":1,"isRequired":true,"uniqueKey":"coupon.id","typeLabel":"string"},"name":{"type":"string","minLength":1,"maxLength":40,"isRequired":true,"uniqueKey":"coupon.name","typeLabel":"string"},"duration":{"type":"object","properties":{"type":{"enum":["one_off","months","forever"],"type":"string","isRequired":true,"uniqueKey":"coupon.duration.type","typeLabel":"enum\u003cstring>"},"length":{"oneOf":[{"type":"integer","maximum":9007199254740991,"minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"coupon.duration.length.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"coupon.duration.length.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"coupon.duration.length","typeLabel":"integer | null"}},"required":["type","length"],"additionalProperties":false,"description":"Use a positive integer length for months, and null for one_off or forever.","isRequired":true,"uniqueKey":"coupon.duration","typeLabel":"object"},"plan_ids":{"oneOf":[{"type":"array","items":{"type":"string","minLength":1,"uniqueKey":"coupon.plan_ids.oneOf.0.items.[INDEX]","typeLabel":"string"},"description":"Plan IDs must be unique.","minItems":1,"isRequired":true,"uniqueKey":"coupon.plan_ids.oneOf.0","typeLabel":"string[]"},{"type":"null","description":"Plan IDs must be unique.","isRequired":true,"uniqueKey":"coupon.plan_ids.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"coupon.plan_ids","typeLabel":"string[] | null"},"promo_codes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"isRequired":true,"uniqueKey":"coupon.promo_codes.items.[INDEX].code","typeLabel":"string"},"global_max_redemption":{"oneOf":[{"type":"integer","maximum":9007199254740991,"minimum":0,"exclusiveMinimum":true,"uniqueKey":"coupon.promo_codes.items.[INDEX].global_max_redemption.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"coupon.promo_codes.items.[INDEX].global_max_redemption.oneOf.1","typeLabel":"null"}],"uniqueKey":"coupon.promo_codes.items.[INDEX].global_max_redemption","typeLabel":"integer | null"},"first_time_transaction":{"oneOf":[{"type":"boolean","uniqueKey":"coupon.promo_codes.items.[INDEX].first_time_transaction.oneOf.0","typeLabel":"boolean"},{"type":"null","uniqueKey":"coupon.promo_codes.items.[INDEX].first_time_transaction.oneOf.1","typeLabel":"null"}],"uniqueKey":"coupon.promo_codes.items.[INDEX].first_time_transaction","typeLabel":"boolean | null"}},"required":["code"],"additionalProperties":false,"uniqueKey":"coupon.promo_codes.items.[INDEX]","typeLabel":"object"},"description":"Promo code values must be unique.","isRequired":true,"uniqueKey":"coupon.promo_codes","typeLabel":"object[]"},"type":{"enum":["percentage_discount","fixed_discount"],"type":"string","isRequired":true,"uniqueKey":"coupon.type","typeLabel":"enum\u003cstring>"},"value":{"type":"number","exclusiveMinimum":0,"description":"Percentage discounts must be at most 100; fixed discounts must be positive.","isRequired":true,"uniqueKey":"coupon.value","typeLabel":"number"},"internal_id":{"type":"string","minLength":1,"description":"Address an existing reward by its stable id. Omit when creating — the server generates one.","uniqueKey":"coupon.internal_id","typeLabel":"string"}},"required":["id","name","duration","plan_ids","promo_codes","type","value"],"additionalProperties":false,"title":"CreateRewardCouponRequest","description":"Provide exactly one of coupon or feature_grant, not both.","uniqueKey":"coupon","typeLabel":"CreateRewardCouponRequest · object"},"feature_grant":{"type":"object","properties":{"id":{"type":"string","minLength":1,"isRequired":true,"uniqueKey":"feature_grant.id","typeLabel":"string"},"name":{"type":"string","minLength":1,"isRequired":true,"uniqueKey":"feature_grant.name","typeLabel":"string"},"grants":{"type":"array","minItems":1,"items":{"type":"object","properties":{"feature_id":{"type":"string","minLength":1,"isRequired":true,"uniqueKey":"feature_grant.grants.items.[INDEX].feature_id","typeLabel":"string"},"included":{"oneOf":[{"type":"number","description":"A non-negative amount to grant, or null for boolean features.","minimum":0,"isRequired":true,"uniqueKey":"feature_grant.grants.items.[INDEX].included.oneOf.0","typeLabel":"number"},{"type":"null","description":"A non-negative amount to grant, or null for boolean features.","isRequired":true,"uniqueKey":"feature_grant.grants.items.[INDEX].included.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"feature_grant.grants.items.[INDEX].included","typeLabel":"number | null"},"expiry":{"oneOf":[{"type":"object","required":["type","length"],"properties":{"type":{"enum":["day","week","month","year"],"type":"string","description":"The unit of time the grant lasts.","isRequired":true,"uniqueKey":"feature_grant.grants.items.[INDEX].expiry.oneOf.0.type","typeLabel":"enum\u003cstring>"},"length":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"The positive integer count of periods before the grant expires.","isRequired":true,"uniqueKey":"feature_grant.grants.items.[INDEX].expiry.oneOf.0.length","typeLabel":"integer"}},"additionalProperties":false,"isRequired":true,"uniqueKey":"feature_grant.grants.items.[INDEX].expiry.oneOf.0","typeLabel":"object"},{"type":"null","isRequired":true,"uniqueKey":"feature_grant.grants.items.[INDEX].expiry.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"feature_grant.grants.items.[INDEX].expiry","typeLabel":"object | null"}},"required":["feature_id","included","expiry"],"additionalProperties":false,"uniqueKey":"feature_grant.grants.items.[INDEX]","typeLabel":"object"},"description":"Feature IDs must be unique.","isRequired":true,"uniqueKey":"feature_grant.grants","typeLabel":"object[]"},"promo_codes":{"type":"array","minItems":1,"items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"isRequired":true,"uniqueKey":"feature_grant.promo_codes.items.[INDEX].code","typeLabel":"string"},"max_uses":{"oneOf":[{"type":"integer","description":"A positive redemption limit, or null for unlimited uses.","maximum":9007199254740991,"minimum":0,"exclusiveMinimum":true,"isRequired":true,"uniqueKey":"feature_grant.promo_codes.items.[INDEX].max_uses.oneOf.0","typeLabel":"integer"},{"type":"null","description":"A positive redemption limit, or null for unlimited uses.","isRequired":true,"uniqueKey":"feature_grant.promo_codes.items.[INDEX].max_uses.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"feature_grant.promo_codes.items.[INDEX].max_uses","typeLabel":"integer | null"}},"required":["code","max_uses"],"additionalProperties":false,"uniqueKey":"feature_grant.promo_codes.items.[INDEX]","typeLabel":"object"},"description":"Promo code values must be unique.","isRequired":true,"uniqueKey":"feature_grant.promo_codes","typeLabel":"object[]"},"internal_id":{"type":"string","minLength":1,"description":"Address an existing reward by its stable id. Omit when creating — the server generates one.","uniqueKey":"feature_grant.internal_id","typeLabel":"string"}},"required":["id","name","grants","promo_codes"],"additionalProperties":false,"title":"CreateRewardFeatureGrantRequest","description":"Provide exactly one of coupon or feature_grant, not both.","uniqueKey":"feature_grant","typeLabel":"CreateRewardFeatureGrantRequest · object"}},"additionalProperties":false,"title":"CreateRewardParams","examples":[{"coupon":{"id":"summer_sale","name":"Summer Sale","type":"percentage_discount","value":20,"duration":{"type":"months","length":3},"plan_ids":null,"promo_codes":[{"code":"SUMMER20"}]}}],"uniqueKey":"","typeLabel":"CreateRewardParams · object"},"example":{"coupon":{"id":"summer_sale","name":"Summer Sale","type":"percentage_discount","value":20,"duration":{"type":"months","length":3},"plan_ids":null,"promo_codes":[{"code":"SUMMER20"}]}},"examples":{"Example":{"title":"Example","value":{"coupon":{"id":"summer_sale","name":"Summer Sale","type":"percentage_discount","value":20,"duration":{"type":"months","length":3},"plan_ids":null,"promo_codes":[{"code":"SUMMER20"}]}}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"be6ef9ef-30fd-41d0-8c93-e7fe5a3b8f45":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"coupon":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the coupon.","isRequired":true,"uniqueKey":"coupon.id","typeLabel":"string"},"type":{"enum":["percentage_discount","fixed_discount","invoice_credits"],"type":"string","description":"The type of discount: percentage_discount, fixed_discount, or invoice_credits.","isRequired":true,"uniqueKey":"coupon.type","typeLabel":"enum\u003cstring>"},"value":{"type":"number","description":"The discount value. A percentage for percentage_discount, or an amount for fixed_discount / invoice_credits.","isRequired":true,"uniqueKey":"coupon.value","typeLabel":"number"},"duration":{"type":"object","properties":{"type":{"enum":["one_off","months","forever"],"type":"string","description":"The unit of time the duration is measured in.","isRequired":true,"uniqueKey":"coupon.duration.type","typeLabel":"enum\u003cstring>"},"length":{"oneOf":[{"type":"number","description":"The number of `type` periods the duration lasts, or null when the type has no length (e.g. one_off, forever).","isRequired":true,"uniqueKey":"coupon.duration.length.oneOf.0","typeLabel":"number"},{"type":"null","description":"The number of `type` periods the duration lasts, or null when the type has no length (e.g. one_off, forever).","isRequired":true,"uniqueKey":"coupon.duration.length.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"coupon.duration.length","typeLabel":"number | null"}},"required":["type","length"],"title":"CreateRewardDurationResponse","description":"How long the coupon applies once redeemed.","isRequired":true,"uniqueKey":"coupon.duration","typeLabel":"CreateRewardDurationResponse · object"},"plan_ids":{"oneOf":[{"type":"array","items":{"type":"string","uniqueKey":"coupon.plan_ids.oneOf.0.items.[INDEX]","typeLabel":"string"},"description":"The plan IDs the coupon applies to, or null when it applies to all plans.","isRequired":true,"uniqueKey":"coupon.plan_ids.oneOf.0","typeLabel":"string[]"},{"type":"null","description":"The plan IDs the coupon applies to, or null when it applies to all plans.","isRequired":true,"uniqueKey":"coupon.plan_ids.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"coupon.plan_ids","typeLabel":"string[] | null"},"promo_codes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"The promo code customers enter to redeem the coupon.","isRequired":true,"uniqueKey":"coupon.promo_codes.items.[INDEX].code","typeLabel":"string"},"global_max_redemption":{"oneOf":[{"type":"number","description":"Maximum number of times this promo code can be redeemed across all customers, or null for unlimited.","uniqueKey":"coupon.promo_codes.items.[INDEX].global_max_redemption.oneOf.0","typeLabel":"number"},{"type":"null","description":"Maximum number of times this promo code can be redeemed across all customers, or null for unlimited.","uniqueKey":"coupon.promo_codes.items.[INDEX].global_max_redemption.oneOf.1","typeLabel":"null"}],"uniqueKey":"coupon.promo_codes.items.[INDEX].global_max_redemption","typeLabel":"number | null"},"first_time_transaction":{"oneOf":[{"type":"boolean","description":"Whether this promo code can only be applied to a customer's first transaction.","uniqueKey":"coupon.promo_codes.items.[INDEX].first_time_transaction.oneOf.0","typeLabel":"boolean"},{"type":"null","description":"Whether this promo code can only be applied to a customer's first transaction.","uniqueKey":"coupon.promo_codes.items.[INDEX].first_time_transaction.oneOf.1","typeLabel":"null"}],"uniqueKey":"coupon.promo_codes.items.[INDEX].first_time_transaction","typeLabel":"boolean | null"}},"required":["code"],"title":"CreateRewardCouponPromoCodeResponse","uniqueKey":"coupon.promo_codes.items.[INDEX]","typeLabel":"CreateRewardCouponPromoCodeResponse · object"},"isRequired":true,"uniqueKey":"coupon.promo_codes","typeLabel":"CreateRewardCouponPromoCodeResponse · object[]"},"created_at":{"type":"number","description":"The Unix timestamp (in milliseconds) when the coupon was created.","isRequired":true,"uniqueKey":"coupon.created_at","typeLabel":"number"},"name":{"oneOf":[{"type":"string","description":"A human-readable name for the coupon.","uniqueKey":"coupon.name.oneOf.0","typeLabel":"string"},{"type":"null","description":"A human-readable name for the coupon.","uniqueKey":"coupon.name.oneOf.1","typeLabel":"null"}],"uniqueKey":"coupon.name","typeLabel":"string | null"}},"required":["id","type","value","duration","plan_ids","promo_codes","created_at"],"title":"CreateRewardCouponResponse","examples":[{"id":"summer_sale","name":"Summer Sale","type":"percentage_discount","value":20,"duration":{"type":"months","length":3},"plan_ids":["pro","starter"],"promo_codes":[{"code":"SUMMER20","global_max_redemption":100,"first_time_transaction":false}],"created_at":1718000000000}],"uniqueKey":"coupon","typeLabel":"CreateRewardCouponResponse · object"},"feature_grant":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier for the feature grant.","isRequired":true,"uniqueKey":"feature_grant.id","typeLabel":"string"},"grants":{"type":"array","items":{"type":"object","properties":{"feature_id":{"type":"string","description":"The feature ID this grant applies to.","isRequired":true,"uniqueKey":"feature_grant.grants.items.[INDEX].feature_id","typeLabel":"string"},"included":{"oneOf":[{"type":"number","description":"The amount of the feature granted, or null for boolean features.","isRequired":true,"uniqueKey":"feature_grant.grants.items.[INDEX].included.oneOf.0","typeLabel":"number"},{"type":"null","description":"The amount of the feature granted, or null for boolean features.","isRequired":true,"uniqueKey":"feature_grant.grants.items.[INDEX].included.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"feature_grant.grants.items.[INDEX].included","typeLabel":"number | null"},"expiry":{"oneOf":[{"type":"object","title":"CreateRewardExpiryResponse","description":"How long the granted amount lasts before expiring, or null for a permanent grant.","required":["type","length"],"properties":{"type":{"enum":["day","week","month","year"],"type":"string","description":"The unit of time the grant lasts.","isRequired":true,"uniqueKey":"feature_grant.grants.items.[INDEX].expiry.oneOf.0.type","typeLabel":"enum\u003cstring>"},"length":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"The positive integer count of periods before the grant expires.","isRequired":true,"uniqueKey":"feature_grant.grants.items.[INDEX].expiry.oneOf.0.length","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"feature_grant.grants.items.[INDEX].expiry.oneOf.0","typeLabel":"CreateRewardExpiryResponse · object"},{"type":"null","title":"CreateRewardExpiryResponse","description":"How long the granted amount lasts before expiring, or null for a permanent grant.","isRequired":true,"uniqueKey":"feature_grant.grants.items.[INDEX].expiry.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"feature_grant.grants.items.[INDEX].expiry","typeLabel":"CreateRewardExpiryResponse · object | null"}},"required":["feature_id","included","expiry"],"title":"CreateRewardGrantResponse","uniqueKey":"feature_grant.grants.items.[INDEX]","typeLabel":"CreateRewardGrantResponse · object"},"isRequired":true,"uniqueKey":"feature_grant.grants","typeLabel":"CreateRewardGrantResponse · object[]"},"promo_codes":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"The promo code customers enter to redeem the feature grant.","isRequired":true,"uniqueKey":"feature_grant.promo_codes.items.[INDEX].code","typeLabel":"string"},"max_uses":{"oneOf":[{"type":"number","description":"Maximum number of times this promo code can be redeemed, or null for unlimited.","isRequired":true,"uniqueKey":"feature_grant.promo_codes.items.[INDEX].max_uses.oneOf.0","typeLabel":"number"},{"type":"null","description":"Maximum number of times this promo code can be redeemed, or null for unlimited.","isRequired":true,"uniqueKey":"feature_grant.promo_codes.items.[INDEX].max_uses.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"feature_grant.promo_codes.items.[INDEX].max_uses","typeLabel":"number | null"}},"required":["code","max_uses"],"title":"CreateRewardFeatureGrantPromoCodeResponse","uniqueKey":"feature_grant.promo_codes.items.[INDEX]","typeLabel":"CreateRewardFeatureGrantPromoCodeResponse · object"},"isRequired":true,"uniqueKey":"feature_grant.promo_codes","typeLabel":"CreateRewardFeatureGrantPromoCodeResponse · object[]"},"created_at":{"type":"number","description":"The Unix timestamp (in milliseconds) when the feature grant was created.","isRequired":true,"uniqueKey":"feature_grant.created_at","typeLabel":"number"},"name":{"oneOf":[{"type":"string","description":"A human-readable name for the feature grant.","uniqueKey":"feature_grant.name.oneOf.0","typeLabel":"string"},{"type":"null","description":"A human-readable name for the feature grant.","uniqueKey":"feature_grant.name.oneOf.1","typeLabel":"null"}],"uniqueKey":"feature_grant.name","typeLabel":"string | null"}},"required":["id","grants","promo_codes","created_at"],"title":"CreateRewardFeatureGrantResponse","examples":[{"id":"beta_credits_grant","name":"Beta Tester Credits","promo_codes":[{"code":"BETA2024","max_uses":500}],"grants":[{"feature_id":"credits","included":1000,"expiry":{"type":"month","length":1}}],"created_at":1718000000000}],"uniqueKey":"feature_grant","typeLabel":"CreateRewardFeatureGrantResponse · object"}},"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"coupon":{"id":"summer_sale","name":"Summer Sale","type":"percentage_discount","value":20,"duration":{"type":"months","length":3},"plan_ids":["pro","starter"],"promo_codes":[{"code":"SUMMER20","global_max_redemption":100,"first_time_transaction":false}],"created_at":1718000000000},"feature_grant":{"id":"beta_credits_grant","name":"Beta Tester Credits","promo_codes":[{"code":"BETA2024","max_uses":500}],"grants":[{"feature_id":"credits","included":1000,"expiry":{"type":"month","length":1}}],"created_at":1718000000000}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"7d8a93d3-9d94-4d5b-8813-c63b96b6e0a7":{"secretKey":{"type":"http","scheme":"bearer","bearerFormat":"JWT","scopes":[],"schemeName":"secretKey"}}},"servers":{"cc7ba66a-ff89-44b9-8aaf-f9cafa099a58":{"url":"https://api.useautumn.com","description":"Production server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","scopes":[],"schemeName":"secretKey"},"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":"secretKey","name":"Authorization"}],"title":"secretKey"}]},"originalFileLocation":"api/openapi.yml"},"subdomain":"autumn-b9b4c0fb","siteName":"Autumn","title":"Create Reward - Autumn","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-09T18:05:47.798Z","originalFileLocation":"api-reference/rewards/createReward.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=\"Create a coupon or feature grant.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Autumn\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/autumn-b9b4c0fb/LQO5vXfVIKEXnzb8/_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/autumn-b9b4c0fb/LQO5vXfVIKEXnzb8/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/autumn-b9b4c0fb/LQO5vXfVIKEXnzb8/_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/autumn-b9b4c0fb/LQO5vXfVIKEXnzb8/_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/autumn-b9b4c0fb/LQO5vXfVIKEXnzb8/_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/autumn-b9b4c0fb/LQO5vXfVIKEXnzb8/_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/autumn-b9b4c0fb/LQO5vXfVIKEXnzb8/_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/autumn-b9b4c0fb/LQO5vXfVIKEXnzb8/_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/autumn-b9b4c0fb/LQO5vXfVIKEXnzb8/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Reward - Autumn\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create a coupon or feature grant.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Autumn\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.useautumn.com/api-reference/rewards/createReward\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://autumn-b9b4c0fb.mintlify.app/_mintlify/api/og/v2?division=Rewards+%26+Referrals\u0026amp;title=Create+Reward\u0026amp;description=Create+a+coupon+or+feature+grant.\u0026amp;theme=3bf7e6d15826cac91d0b643c\u0026amp;signature=67e8b5f31f71d64743d25f25295deedfdc5b187c32bbeaad1cdd41ec88fbacf4\">\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=\"Create Reward - Autumn\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create a coupon or feature grant.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://autumn-b9b4c0fb.mintlify.app/_mintlify/api/og/v2?division=Rewards+%26+Referrals\u0026amp;title=Create+Reward\u0026amp;description=Create+a+coupon+or+feature+grant.\u0026amp;theme=3bf7e6d15826cac91d0b643c\u0026amp;signature=67e8b5f31f71d64743d25f25295deedfdc5b187c32bbeaad1cdd41ec88fbacf4\">\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/autumn-b9b4c0fb/LQO5vXfVIKEXnzb8/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Autumn\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#8838ff\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.useautumn.com/api-reference/rewards/createReward\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/rewards/createReward.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.useautumn.com/#organization\",\"name\":\"Autumn\",\"url\":\"https://docs.useautumn.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/autumn-b9b4c0fb/BOEMpWFJsAdGcii1/assets/logo/autumn-dark.svg?fit=max\u0026auto=format\u0026n=BOEMpWFJsAdGcii1\u0026q=85\u0026s=720bd2227c435e77f2c91cbfcbccd274\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.useautumn.com#website\",\"name\":\"Autumn\",\"url\":\"https://docs.useautumn.com\",\"publisher\":{\"@id\":\"https://docs.useautumn.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.useautumn.com/api-reference/rewards/createReward#webpage\",\"url\":\"https://docs.useautumn.com/api-reference/rewards/createReward\",\"name\":\"Create Reward\",\"description\":\"Create a coupon or feature grant.\",\"dateModified\":\"2026-09-09T18:05:47.798Z\",\"isPartOf\":{\"@id\":\"https://docs.useautumn.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.useautumn.com/api-reference/rewards/createReward#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.useautumn.com/api-reference/rewards/createReward#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Rewards \u0026 Referrals\",\"item\":\"https://docs.useautumn.com/api-reference/referrals/createReferralProgram\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Reward\",\"item\":\"https://docs.useautumn.com/api-reference/rewards/createReward\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.useautumn.com/api-reference/rewards/createReward#apireference\",\"headline\":\"Create Reward\",\"name\":\"Create Reward\",\"description\":\"Create a coupon or feature grant.\",\"url\":\"https://docs.useautumn.com/api-reference/rewards/createReward\",\"mainEntityOfPage\":{\"@id\":\"https://docs.useautumn.com/api-reference/rewards/createReward#webpage\"},\"dateModified\":\"2026-09-09T18:05:47.798Z\",\"publisher\":{\"@id\":\"https://docs.useautumn.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.useautumn.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Autumn\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Autumn","nav":{"global":{"anchors":[{"anchor":"Discord","icon":"discord","href":"https://discord.gg/STqxY92zuS"},{"anchor":"Website","icon":"globe","href":"https://useautumn.com"}]},"tabs":[{"tab":"Documentation","icon":"folder-open","pages":[{"title":"Documentation","href":"/welcome"}]},{"tab":"Examples","icon":"graduation-cap","pages":[{"title":"Examples","href":"/examples/monetary-credits"}]},{"tab":"CLI","icon":"square-terminal","pages":[{"title":"CLI","href":"/cli/getting-started"}]},{"tab":"API Reference","icon":"display-code","groups":[{"group":"Billing","pages":[{"title":"Attach","openapi":"openapi POST /v1/billing.attach","href":"/api-reference/billing/attach"},{"title":"Update Subscription","openapi":"openapi POST /v1/billing.update","href":"/api-reference/billing/billingUpdate"},{"title":"Open Customer Portal","openapi":"openapi POST /v1/billing.open_customer_portal","href":"/api-reference/billing/openCustomerPortal"},{"title":"Setup Payment","openapi":"openapi POST /v1/billing.setup_payment","href":"/api-reference/billing/setupPayment"},{"title":"Transfer Plan","openapi":"openapi POST /v1/billing.transfer","href":"/api-reference/billing/billingTransfer"},{"title":"Multi Attach","openapi":"openapi POST /v1/billing.multi_attach","href":"/api-reference/billing/multiAttach"},{"title":"Multi Update","openapi":"openapi POST /v1/billing.multi_update","href":"/api-reference/billing/multiUpdate"},{"title":"Create Schedule","openapi":"openapi POST /v1/billing.create_schedule","href":"/api-reference/billing/createSchedule"},{"title":"Verify","openapi":"openapi POST /v1/billing.verify","href":"/api-reference/billing/verify"},{"title":"Import","openapi":"openapi POST /v1/billing.import","href":"/api-reference/billing/import"},{"group":"Previews","pages":[{"title":"Preview Attach","openapi":"openapi POST /v1/billing.preview_attach","href":"/api-reference/billing/previewAttach"},{"title":"Preview Update","openapi":"openapi POST /v1/billing.preview_update","href":"/api-reference/billing/previewUpdate"},{"title":"Preview Multi Attach","openapi":"openapi POST /v1/billing.preview_multi_attach","href":"/api-reference/billing/previewMultiAttach"},{"title":"Preview Multi Update","openapi":"openapi POST /v1/billing.preview_multi_update","href":"/api-reference/billing/previewMultiUpdate"}]},{"group":"Licenses","pages":[{"title":"Attach License","openapi":"openapi POST /v1/licenses.attach","href":"/api-reference/licenses/attachLicense"},{"title":"Release License","openapi":"openapi POST /v1/licenses.release","href":"/api-reference/licenses/releaseLicense"},{"title":"List Licenses","openapi":"openapi POST /v1/licenses.list","href":"/api-reference/licenses/listLicenses"},{"title":"List License Assignments","openapi":"openapi POST /v1/licenses.list_assignments","href":"/api-reference/licenses/listLicenseAssignments"}]}]},{"group":"Balances","pages":[{"title":"Check Permissions","openapi":"openapi POST /v1/balances.check","href":"/api-reference/core/check"},{"title":"Track Usage","openapi":"openapi POST /v1/balances.track","href":"/api-reference/core/track"},{"title":"Batch Track Usage","openapi":"openapi POST /v1/balances.batch_track","href":"/api-reference/core/batchTrack"},{"title":"List Balances","openapi":"openapi POST /v1/balances.list","href":"/api-reference/balances/listBalances"},{"title":"List Balance Ledger","openapi":"openapi POST /v1/balances.list_ledger","href":"/api-reference/balances/listBalanceLedger"},{"title":"Aggregate Balance Ledger","openapi":"openapi POST /v1/balances.aggregate_ledger","href":"/api-reference/balances/aggregateBalanceLedger"},{"title":"Create Balance","openapi":"openapi POST /v1/balances.create","href":"/api-reference/balances/createBalance"},{"title":"Update Balance","openapi":"openapi POST /v1/balances.update","href":"/api-reference/balances/updateBalance"},{"title":"Delete Balance","openapi":"openapi POST /v1/balances.delete","href":"/api-reference/balances/deleteBalance"},{"title":"Finalize Lock","openapi":"openapi POST /v1/balances.finalize","href":"/api-reference/balances/finalizeLock"}]},{"group":"Customers","pages":[{"title":"Get or Create Customer","openapi":"openapi POST /v1/customers.get_or_create","href":"/api-reference/customers/getOrCreateCustomer"},{"title":"Get Customer","openapi":"openapi POST /v1/customers.get","href":"/api-reference/customers/getCustomer"},{"title":"List Customers","openapi":"openapi POST /v1/customers.list","href":"/api-reference/customers/listCustomers"},{"title":"List Subscriptions","openapi":"openapi POST /v1/subscriptions.list","href":"/api-reference/customers/listSubscriptions"},{"title":"List Purchases","openapi":"openapi POST /v1/purchases.list","href":"/api-reference/customers/listPurchases"},{"title":"Update Customer","openapi":"openapi POST /v1/customers.update","href":"/api-reference/customers/updateCustomer"},{"title":"Delete Customer","openapi":"openapi POST /v1/customers.delete","href":"/api-reference/customers/deleteCustomer"},{"title":"Swap Customer IDs","openapi":"openapi POST /v1/customers.swap","href":"/api-reference/customers/swapCustomers"}]},{"group":"Invoices","pages":[{"title":"List Invoices","openapi":"openapi POST /v1/invoices.list","href":"/api-reference/invoices/listInvoices"},{"title":"Create Invoice","openapi":"openapi POST /v1/invoices.create","href":"/api-reference/invoices/createInvoice"},{"title":"Mark Invoice as Paid","openapi":"openapi POST /v1/invoices.pay","href":"/api-reference/invoices/payInvoice"},{"title":"Void Invoice","openapi":"openapi POST /v1/invoices.void","href":"/api-reference/invoices/voidInvoice"},{"title":"Reissue Invoice","openapi":"openapi POST /v1/invoices.reissue","href":"/api-reference/invoices/reissueInvoice"},{"title":"Issue Credit Note","openapi":"openapi POST /v1/invoices.issue_credit_note","href":"/api-reference/invoices/issueCreditNote"},{"title":"Backfill Invoices","openapi":"openapi POST /v1/invoices.insert","href":"/api-reference/invoices/insertInvoices"},{"title":"List Invoice Templates","openapi":"openapi POST /v1/invoices.listTemplates","href":"/api-reference/invoices/listInvoiceTemplates"}]},{"group":"Authorization","pages":[{"title":"Mint","openapi":"openapi POST /v1/keys.mint","href":"/api-reference/keys/mintKey"},{"title":"Refresh","openapi":"openapi POST /v1/keys.refresh","href":"/api-reference/keys/refreshKey"},{"title":"Revoke","openapi":"openapi POST /v1/keys.revoke","href":"/api-reference/keys/revokeKey"}]},{"group":"Events","pages":[{"title":"List Events","openapi":"openapi POST /v1/events.list","href":"/api-reference/events/listEvents"},{"title":"Aggregate Events","openapi":"openapi POST /v1/events.aggregate","href":"/api-reference/events/aggregateEvents"}]},{"group":"Logs","pages":[{"title":"Search Request Logs","openapi":"openapi POST /v1/logs.search","href":"/api-reference/logs/searchRequestLogs"}]},{"group":"Entities","pages":[{"title":"Get Entity","openapi":"openapi POST /v1/entities.get","href":"/api-reference/entities/getEntity"},{"title":"List Entities","openapi":"openapi POST /v1/entities.list","href":"/api-reference/entities/listEntities"},{"title":"Create Entity","openapi":"openapi POST /v1/entities.create","href":"/api-reference/entities/createEntity"},{"title":"Update Entity","openapi":"openapi POST /v1/entities.update","href":"/api-reference/entities/updateEntity"},{"title":"Delete Entity","openapi":"openapi POST /v1/entities.delete","href":"/api-reference/entities/deleteEntity"}]},{"group":"Accounts","pages":[{"title":"Get Account","openapi":"openapi POST /v1/accounts.get","href":"/api-reference/accounts/getAccount"},{"title":"Update Account","openapi":"openapi POST /v1/accounts.update","href":"/api-reference/accounts/updateAccount"}]},{"group":"Plans","pages":[{"title":"Get a plan","openapi":"openapi POST /v1/plans.get","href":"/api-reference/plans/getPlan"},{"title":"List all plans","openapi":"openapi POST /v1/plans.list","href":"/api-reference/plans/listPlans"},{"title":"Create a plan","openapi":"openapi POST /v1/plans.create","href":"/api-reference/plans/createPlan"},{"title":"Update a plan","openapi":"openapi POST /v1/plans.update","href":"/api-reference/plans/updatePlan"},{"title":"Delete a plan","openapi":"openapi POST /v1/plans.delete","href":"/api-reference/plans/deletePlan"}]},{"group":"Features","pages":[{"title":"Get Feature","openapi":"openapi POST /v1/features.get","href":"/api-reference/features/getFeature"},{"title":"List Features","openapi":"openapi POST /v1/features.list","href":"/api-reference/features/listFeatures"},{"title":"Create Feature","openapi":"openapi POST /v1/features.create","href":"/api-reference/features/createFeature"},{"title":"Update Feature","openapi":"openapi POST /v1/features.update","href":"/api-reference/features/updateFeature"},{"title":"Delete Feature","openapi":"openapi POST /v1/features.delete","href":"/api-reference/features/deleteFeature"}]},{"group":"Rewards \u0026 Referrals","pages":[{"title":"Create Referral Program","openapi":"openapi POST /v1/referral_programs.create","href":"/api-reference/referrals/createReferralProgram"},{"title":"List Referral Programs","openapi":"openapi POST /v1/referral_programs.list","href":"/api-reference/referrals/listReferralPrograms"},{"title":"Get Referral Program","openapi":"openapi POST /v1/referral_programs.get","href":"/api-reference/referrals/getReferralProgram"},{"title":"Update Referral Program","openapi":"openapi POST /v1/referral_programs.update","href":"/api-reference/referrals/updateReferralProgram"},{"title":"Delete Referral Program","openapi":"openapi POST /v1/referral_programs.delete","href":"/api-reference/referrals/deleteReferralProgram"},{"title":"Create Referral Code","openapi":"openapi POST /v1/referrals.create_code","href":"/api-reference/referrals/createReferralCode"},{"title":"Redeem Referral Code","openapi":"openapi POST /v1/referrals.redeem_code","description":"Redeem a referral code for a customer.","href":"/api-reference/referrals/redeemReferralCode"},{"title":"Create Reward","openapi":"openapi POST /v1/rewards.create","href":"/api-reference/rewards/createReward"},{"title":"List Rewards","openapi":"openapi POST /v1/rewards.list","description":"List the coupons and feature grants configured for the org.","href":"/api-reference/rewards/listRewards"},{"title":"Get Reward","openapi":"openapi POST /v1/rewards.get","href":"/api-reference/rewards/getReward"},{"title":"Update Reward","openapi":"openapi POST /v1/rewards.update","href":"/api-reference/rewards/updateReward"},{"title":"Delete Reward","openapi":"openapi POST /v1/rewards.delete","href":"/api-reference/rewards/deleteReward"},{"title":"Redeem Reward Code","openapi":"openapi POST /v1/rewards.redeem","href":"/api-reference/rewards/redeemRewardCode"}]},{"group":"Webhooks","pages":[{"title":"Get Webhook","openapi":"openapi POST /v1/webhooks.get","href":"/api-reference/webhooks/getWebhook"},{"title":"List Webhooks","openapi":"openapi POST /v1/webhooks.list","href":"/api-reference/webhooks/listWebhooks"},{"title":"Create Webhook","openapi":"openapi POST /v1/webhooks.create","href":"/api-reference/webhooks/createWebhook"},{"title":"Update Webhook","openapi":"openapi POST /v1/webhooks.update","href":"/api-reference/webhooks/updateWebhook"},{"title":"Delete Webhook","openapi":"openapi POST /v1/webhooks.delete","href":"/api-reference/webhooks/deleteWebhook"},{"title":"Sync Webhooks","openapi":"openapi POST /v1/webhooks.sync","href":"/api-reference/webhooks/syncWebhooks"},{"group":"Previews","pages":[{"title":"Preview Sync Webhooks","openapi":"openapi POST /v1/webhooks.preview_sync","href":"/api-reference/webhooks/previewSyncWebhooks"}]}]},{"group":"Webhook Events","pages":[{"group":"Balances","pages":[{"title":"Usage Alert Triggered","openapi":"api/openapi.yml webhook balances.usage_alert_triggered","href":"/api-reference/webhooks/balancesUsageAlertTriggered"},{"title":"Limit Reached","openapi":"api/openapi.yml webhook balances.limit_reached","href":"/api-reference/webhooks/balancesLimitReached"}]},{"group":"Billing","pages":[{"title":"Auto Top-Up Failed","openapi":"api/openapi.yml webhook billing.auto_topup_failed","href":"/api-reference/webhooks/billingAutoTopupFailed"},{"title":"Auto Top-Up Succeeded","openapi":"api/openapi.yml webhook billing.auto_topup_succeeded","href":"/api-reference/webhooks/billingAutoTopupSucceeded"},{"title":"Plans Updated","openapi":"api/openapi.yml webhook billing.updated","href":"/api-reference/webhooks/billingUpdated"}]},{"group":"Invoice","pages":[{"title":"Invoice Finalized","openapi":"api/openapi.yml webhook invoice.finalized","href":"/api-reference/webhooks/invoiceFinalized"}]},{"group":"Vercel","pages":[{"title":"Resource Deleted","openapi":"api/openapi.yml webhook vercel.resources.deleted","href":"/api-reference/webhooks/vercelResourcesDeleted"},{"title":"Resource Provisioned","openapi":"api/openapi.yml webhook vercel.resources.provisioned","href":"/api-reference/webhooks/vercelResourcesProvisioned"},{"title":"Rotate Secrets","openapi":"api/openapi.yml webhook vercel.resources.rotate_secrets","href":"/api-reference/webhooks/vercelResourcesRotateSecrets"},{"title":"Webhook Event","openapi":"api/openapi.yml webhook vercel.webhooks.event","href":"/api-reference/webhooks/vercelWebhooksEvent"}]}]},{"group":"Platform (Beta)","pages":[{"title":"Overview","href":"/api-reference/platform/overview"},{"title":"Create Organization","openapi":"platform POST /platform/organizations","href":"/api-reference/platform/create-organization"},{"title":"Generate Stripe OAuth URL","openapi":"platform POST /platform/oauth_url","href":"/api-reference/platform/oauth-url"},{"title":"Get Stripe Connection","openapi":"openapi POST /v1/platform.get_stripe_connection","href":"/api-reference/platform/getStripeConnection"},{"title":"Disconnect Stripe","openapi":"openapi POST /v1/platform.disconnect_stripe","href":"/api-reference/platform/disconnectStripe"},{"title":"Update Connected Stripe Account","openapi":"platform POST /platform/organizations/stripe","href":"/api-reference/platform/update-stripe"},{"title":"List Users","openapi":"platform GET /platform/users","href":"/api-reference/platform/list-users"},{"title":"List Organizations","openapi":"platform GET /platform/organizations","href":"/api-reference/platform/list-orgs"}]}]},{"tab":"Changelog","icon":"list-ol","pages":[{"title":"Changelog","href":"/changelog/changelog"}]}]},"basePath":"","title":"Create Reward - Autumn","buildId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","deploymentId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DCDCdBVX.js","utils-ME8dDnLe.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-0e84ACsd.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-wgRBj-ia.js","snippetPresets-C11Sgb-o.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-C0lapOpP.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-ZeRQV8fF.js","shallow-BupWh095.js","getApiPlaygroundDisplay-BnYQO2Ss.js","CodeSnippet-RKKOc8c_.js","CodeSnippets-Drf_m8wS.js","Page-Bevw23-4.js","getPastedJson-u6QiPzNZ.js","icon-Bb-CBSxO.js","MethodPill-F7l5AI7V.js","DuplicateIcon-IiAXkdSg.js","createIcon-FliI8EBc.js","DynamicMarkdown-B62XqCSI.js","SectionHeading-Dj31pT03.js","axios-vUo_bRtp.js","Markdown-BOgQCTwD.js","clsx-BIWXJmsZ.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-DKZWslLH.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-UDqbR6xh.js"]}