{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Benji","colors":{"primary":"#9900ff","light":"#07C983","dark":"#0D9373"},"logo":{"light":"https://mintcdn.com/benji/E3tFqos-Cc64Y5MH/logo/benji-docs-logo.svg?fit=max\u0026auto=format\u0026n=E3tFqos-Cc64Y5MH\u0026q=85\u0026s=60b7d848ffe4ab0c66efcfcbf573e3be","dark":"https://mintcdn.com/benji/E3tFqos-Cc64Y5MH/logo/benji-docs-logo.svg?fit=max\u0026auto=format\u0026n=E3tFqos-Cc64Y5MH\u0026q=85\u0026s=60b7d848ffe4ab0c66efcfcbf573e3be"},"favicon":"https://mintcdn.com/benji/E3tFqos-Cc64Y5MH/favicon.svg?fit=max\u0026auto=format\u0026n=E3tFqos-Cc64Y5MH\u0026q=85\u0026s=0d4db635c5349274277a1e3f4575d6c3","api":{"mdx":{"auth":{"method":"key","name":"x-api-key"},"server":["https://mintlify.com/api","https://mintlify.com/api2"]}},"appearance":{"default":"light","strict":true},"navbar":{"links":[{"href":"mailto:support@withbenji.com","label":"Support"}],"primary":{"type":"button","label":"Go to Pilot","href":"https://pilot-staging.withbenji.com/login"}},"footer":{"socials":{"website":"https://withbenji.com"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"benji","hasAudioNarration":false,"actualSubdomain":"benji","customDomains":["docs.withbenji.com"],"gitSource":{"type":"github","owner":"benji-money","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6adfb18f141a85a6119e97a5","clientVersion":"0.0.4117","searchFilterCounts":[{"language":"default","tag":"Platform","count":13},{"language":"default","tag":"Benji Integrations","count":12},{"language":"default","tag":"Pilot","count":11},{"language":"default","tag":"API Reference","count":9},{"language":"default","tag":"Benji Connect","count":8},{"language":"default","tag":"Partnerships","count":5},{"language":"default","tag":"Benji Connect SDK","count":4},{"language":"default","tag":"Square","count":4},{"language":"default","tag":"Webhooks","count":3},{"language":"default","tag":"Getting Started","count":3}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/webhooks/subscribe","slug":"/api-reference/webhooks/subscribe","pageMetadata":{"title":"Subscribe to a webhook event","description":"Subscribe to a specific event or all entity events on the Benji Platform","sidebarTitle":"Subscribe","api":"POST https://notificationservice-staging.withbenji.com/webhooks/subscribe","href":"/api-reference/webhooks/subscribe"},"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: \"Subscribe to a specific event or all entity events on the Benji Platform\"\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={code:`code`,li:`li`,p:`p`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Expandable,Heading,Note,ParamField,ResponseField}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsxs(Note,{children:[`The `,_jsx(_components.code,{children:`x-api-key`}),` header value to be used on this API is your `,_jsx(_components.strong,{children:`partner API key`}),`, which can be generated through the dashboard.`]}),`\n`,_jsx(ParamField,{body:`endpoint`,type:`string`,required:true,id:`param-endpoint`,children:_jsx(_components.p,{children:`Your endpoint URL that will receive the event webhooks`})}),`\n`,_jsx(ParamField,{body:`event_name`,type:`string`,id:`param-event-name`,children:_jsx(_components.p,{children:`The event you are subscribing to. Note that if an event is not specified, all events for the entity type specified will be subscribed to.`})}),`\n`,_jsxs(ParamField,{body:`entity_type`,type:`integer`,id:`param-entity-type`,children:[_jsx(_components.p,{children:`Integer representing an enum of one of the following entity type values to subscribe to:`}),_jsx(Expandable,{title:`possible entity type values`,type:`enum`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`USER (1)`}),` : Indicating a user entity `,_jsx(`br`,{})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`CAMPAIGN (2)`}),` : Indicating a campaign entity `,_jsx(`br`,{})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`TRANSACTION (3)`}),` : Indicating a reward transaction entity`]}),`\n`]})})]}),`\n`,_jsx(Note,{children:`If you do not specify an entity type or an event, you will be subscribing to all webhook events with the provided endpoint.`}),`\n`,_jsx(Heading,{level:`3`,id:`return-values`,children:`Return values`}),`\n`,_jsx(ResponseField,{name:`subscribed`,type:`boolean`,required:true,id:`param-subscribed`,children:_jsx(_components.p,{children:`A true or false value indicating whether the subscription was successful.`})})]})}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":"Subscribe to a webhook event","description":"Subscribe to a specific event or all entity events on the Benji Platform","sidebarTitle":"Subscribe","api":"POST https://notificationservice-staging.withbenji.com/webhooks/subscribe","href":"/api-reference/webhooks/subscribe"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,Note,ParamField,ResponseExample,ResponseField}=_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(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsxs(Note,{children:[`The `,_jsx(_components.code,{children:`x-api-key`}),` header value to be used on this API is your `,_jsx(_components.strong,{children:`partner API key`}),`, which can be generated through the dashboard.`]}),`\n`,_jsx(ParamField,{body:`endpoint`,type:`string`,required:true,id:`param-endpoint`,children:_jsx(_components.p,{children:`Your endpoint URL that will receive the event webhooks`})}),`\n`,_jsx(ParamField,{body:`event_name`,type:`string`,id:`param-event-name`,children:_jsx(_components.p,{children:`The event you are subscribing to. Note that if an event is not specified, all events for the entity type specified will be subscribed to.`})}),`\n`,_jsxs(ParamField,{body:`entity_type`,type:`integer`,id:`param-entity-type`,children:[_jsx(_components.p,{children:`Integer representing an enum of one of the following entity type values to subscribe to:`}),_jsx(Expandable,{title:`possible entity type values`,type:`enum`,children:_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`USER (1)`}),` : Indicating a user entity `,_jsx(`br`,{})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`CAMPAIGN (2)`}),` : Indicating a campaign entity `,_jsx(`br`,{})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`TRANSACTION (3)`}),` : Indicating a reward transaction entity`]}),`\n`]})})]}),`\n`,_jsx(Note,{children:`If you do not specify an entity type or an event, you will be subscribing to all webhook events with the provided endpoint.`}),`\n`,_jsx(Heading,{level:`3`,id:`return-values`,children:`Return values`}),`\n`,_jsx(ResponseField,{name:`subscribed`,type:`boolean`,required:true,id:`param-subscribed`,children:_jsx(_components.p,{children:`A true or false value indicating whether the subscription was successful.`})}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`200`,numberOfLines:`6`,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:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ok\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"subscribed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\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:`400`,numberOfLines:`4`,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:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"invalid_subscription\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Invalid entity or event\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`400`,numberOfLines:`4`,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:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"subscription_already_exists\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"A subscription already exists for this event\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`401`,numberOfLines:`4`,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:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"unauthorized_partner\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Invalid key, or key is not authorized to make this call\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`500`,numberOfLines:`4`,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:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"unexpected_error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"An unexpected error has occurred\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_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":"Subscribe to a webhook event","description":"Subscribe to a specific event or all entity events on the Benji Platform","sidebarTitle":"Subscribe","api":"POST https://notificationservice-staging.withbenji.com/webhooks/subscribe","href":"/api-reference/webhooks/subscribe"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Return values","slug":"return-values","depth":3,"children":[]}],"codeExamples":{"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=\"6\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"ok\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"data\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"subscribed\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\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":"400","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=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"invalid_subscription\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Invalid entity or event\"\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":"400","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=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"subscription_already_exists\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"A subscription already exists for this event\"\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":"401","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=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"unauthorized_partner\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Invalid key, or key is not authorized to make this call\"\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":"500","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=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"unexpected_error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"An unexpected error has occurred\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Subscribe to a webhook event","path":"/webhooks/subscribe","servers":[{"url":"https://notificationservice-staging.withbenji.com"}],"method":"post","request":{"security":[{"title":"API Key Auth","parameters":{"header":{"x-api-key":{"type":"apiKey"}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"endpoint":[{"type":"string","description":"Your endpoint URL that will receive the event webhooks","required":true}],"event_name":[{"type":"string","description":"The event you are subscribing to. Note that if an event is not specified, all events for the entity type specified will be subscribed to."}],"entity_type":[{"type":"integer","description":"Integer representing an enum of one of the following entity type values to subscribe to:"}]}}],"examples":{"example":{"value":{"endpoint":"\u003cstring>","event_name":"\u003cstring>","entity_type":123}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"subscribed":[{"type":"boolean","description":"A true or false value indicating whether the subscription was successful.","required":true}]}}],"examples":{"example":{"value":{"subscribed":true}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"benji","siteName":"Benji","title":"Subscribe to a webhook event - Benji","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-04-16T16:01:15.078Z","originalFileLocation":"api-reference/webhooks/subscribe.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";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=\"light\"}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=\"Subscribe to a specific event or all entity events on the Benji Platform\">\u003cmeta data-mint-head name=\"application-name\" content=\"Benji\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/benji/dbMCKxLdMt2ho1P-/_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/benji/dbMCKxLdMt2ho1P-/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/benji/dbMCKxLdMt2ho1P-/_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/benji/dbMCKxLdMt2ho1P-/_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/benji/dbMCKxLdMt2ho1P-/_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/benji/dbMCKxLdMt2ho1P-/_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/benji/dbMCKxLdMt2ho1P-/_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/benji/dbMCKxLdMt2ho1P-/_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/benji/dbMCKxLdMt2ho1P-/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Subscribe to a webhook event - Benji\">\u003cmeta data-mint-head property=\"og:description\" content=\"Subscribe to a specific event or all entity events on the Benji Platform\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Benji\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.withbenji.com/api-reference/webhooks/subscribe\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://benji.mintlify.site/_mintlify/api/og/v2?division=Webhooks\u0026amp;title=Subscribe+to+a+webhook+event\u0026amp;description=Subscribe+to+a+specific+event+or+all+entity+events+on+the+Benji+Platform\u0026amp;theme=c6069e65afe5566508648c56\u0026amp;signature=a56161024ff3d2c28ff4c1f79eed20dd6ea896d7eed805e037be42ec79f87274\">\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=\"Subscribe to a webhook event - Benji\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Subscribe to a specific event or all entity events on the Benji Platform\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://benji.mintlify.site/_mintlify/api/og/v2?division=Webhooks\u0026amp;title=Subscribe+to+a+webhook+event\u0026amp;description=Subscribe+to+a+specific+event+or+all+entity+events+on+the+Benji+Platform\u0026amp;theme=c6069e65afe5566508648c56\u0026amp;signature=a56161024ff3d2c28ff4c1f79eed20dd6ea896d7eed805e037be42ec79f87274\">\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/benji/dbMCKxLdMt2ho1P-/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Benji\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#9900ff\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.withbenji.com/api-reference/webhooks/subscribe\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/webhooks/subscribe.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.withbenji.com/#organization\",\"name\":\"Benji\",\"url\":\"https://docs.withbenji.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/benji/E3tFqos-Cc64Y5MH/logo/benji-docs-logo.svg?fit=max\u0026auto=format\u0026n=E3tFqos-Cc64Y5MH\u0026q=85\u0026s=60b7d848ffe4ab0c66efcfcbf573e3be\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.withbenji.com#website\",\"name\":\"Benji\",\"url\":\"https://docs.withbenji.com\",\"publisher\":{\"@id\":\"https://docs.withbenji.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.withbenji.com/api-reference/webhooks/subscribe#webpage\",\"url\":\"https://docs.withbenji.com/api-reference/webhooks/subscribe\",\"name\":\"Subscribe to a webhook event\",\"description\":\"Subscribe to a specific event or all entity events on the Benji Platform\",\"dateModified\":\"2026-04-16T16:01:15.078Z\",\"isPartOf\":{\"@id\":\"https://docs.withbenji.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.withbenji.com/api-reference/webhooks/subscribe#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.withbenji.com/api-reference/webhooks/subscribe#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Webhooks\",\"item\":\"https://docs.withbenji.com/api-reference/webhooks/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Subscribe to a webhook event\",\"item\":\"https://docs.withbenji.com/api-reference/webhooks/subscribe\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.withbenji.com/api-reference/webhooks/subscribe#apireference\",\"headline\":\"Subscribe to a webhook event\",\"name\":\"Subscribe to a webhook event\",\"description\":\"Subscribe to a specific event or all entity events on the Benji Platform\",\"url\":\"https://docs.withbenji.com/api-reference/webhooks/subscribe\",\"mainEntityOfPage\":{\"@id\":\"https://docs.withbenji.com/api-reference/webhooks/subscribe#webpage\"},\"dateModified\":\"2026-04-16T16:01:15.078Z\",\"publisher\":{\"@id\":\"https://docs.withbenji.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.withbenji.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Benji\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Benji\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/webhooks/subscribe.md","siteName":"Benji","nav":{"global":null,"tabs":[{"tab":"Platform","pages":[{"title":"Platform","href":"/pilot/overview"}]},{"tab":"Benji Connect","pages":[{"title":"Benji Connect","href":"/connect/overview"}]},{"tab":"Benji Integrations","pages":[{"title":"Benji Integrations","href":"/integrations/introduction"}]},{"tab":"API Reference","groups":[{"group":"API Documentation","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"API Authentication","sidebarTitle":"Authentication","href":"/api-reference/authentication"}]},{"group":"Member API","pages":[{"title":"Get User","sidebarTitle":"Get User","api":"GET https://api-staging.withbenji.com/users/{id}","href":"/api-reference/endpoint/users/get"}]},{"group":"Reward API","pages":[{"title":"Get Reward Transaction","sidebarTitle":"Get Transaction","api":"GET https://api-staging.withbenji.com/transactions/{id}","href":"/api-reference/endpoint/transactions/get"}]},{"group":"Partnerships","pages":[{"title":"Get Partnership","sidebarTitle":"Get Partnership","api":"GET https://api-staging.withbenji.com/partnerships/{id}","href":"/api-reference/endpoint/partnerships/get"},{"title":"Send Trigger Event","sidebarTitle":"Send Trigger","api":"POST https://api-staging.withbenji.com/partnerships/{partnership_id}/triggers","href":"/api-reference/endpoint/triggers/send"}]},{"group":"Webhooks","pages":[{"title":"Benji Platform Webhooks Overview","description":"An overview of the Benji Platform webhooks, allowing you to receive real-time updates on users, campaigns, and reward transactions.","sidebarTitle":"Overview","href":"/api-reference/webhooks/overview"},{"title":"Subscribe to a webhook event","sidebarTitle":"Subscribe","api":"POST https://notificationservice-staging.withbenji.com/webhooks/subscribe","href":"/api-reference/webhooks/subscribe"},{"title":"Update a webhook subscription","description":"Update a webhook subscription for a specific event or all entity events on the Benji Platform","sidebarTitle":"Update","api":"PUT https://notificationservice-staging.withbenji.com/webhooks/subscribe","href":"/api-reference/webhooks/update"}]}]}]},"basePath":"","title":"Subscribe to a webhook event - Benji","buildId":"dpl_41S5Z2jG9QnfDRwN1KZrLdBwj7DM","deploymentId":"dpl_41S5Z2jG9QnfDRwN1KZrLdBwj7DM","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-DDP9JXtj.js","utils-8yQyvEtx.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-CBCFR8Sn.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-rQaXkUHa.js","snippetPresets-J5KpBTgV.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-BVxVH4Cj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BxdQ2vIi.js","shallow-BjV2tFiD.js","getApiPlaygroundDisplay-C_55tL4O.js","CodeSnippet-C0JpiCOC.js","CodeSnippets-w9Ps7djG.js","Page-DTNSD-0M.js","getPastedJson-BDfB-H8d.js","icon-g-kUkkO9.js","MethodPill-v4l6fq0h.js","DuplicateIcon-CvLo-CfU.js","createIcon-165clrrV.js","DynamicMarkdown-D3RQ-fEj.js","SectionHeading-vvo-3yLf.js","axios-vUo_bRtp.js"]}