You can do this directly through AWS, but we prefer to use Serverless which creates a helpful layer of abstraction on top of Lambda.First install their framework:
npm install -g serverless
Then run their setup command:
serverless
You will need to plug in your AWS credentials during setup, which you can find in your AWS console.When asked which template you want to use, select AWS - Node.js - HTTP API as this tutorial will be using Node.js.If you cd into the directory that was created, you should see an index.js file which is where we will be writing our code.It will look something like this:
We need to create a webhook inside Dynamic that will send a POST request to our serverless function whenever a new user signs up.To do this we can visit the webhooks section of the Dynamic Console and click “Create Webhook”. It will ask you for a URL and to mark the events you want to listen to.For now we can use a fake URL, which we can generate from webhook.site. This will give us a URL that we can use to test our webhook, and will show us the data that is being sent to it.For the events, you should make sure user.created is selected, and that’s it! Save away and a test event will be sent to your URL.
Step 3: Adapt the function to receive a Dynamic webhook event
Let’s say in this instance we are most interested in the user object, as this is returned by the user.created event. You can find the full list of events here.As you’ll see from the event reference, the only required field on the object is the ID, so if you want to collect more information you’ll need to make sure you’re doing Info Capture on signup.
In this tutorial we will assume we are using email signup with embedded
wallets, so we’ll always have email available on the user object at time of
signup
In the test event, when you inspect it using webhook.site, you’ll see the payload comes with a data field, and it’s inside this field that the user object will be present. Here’s how we can use the email inside the function:
Serverless hooks into the AWS local testing functionality using invoke local.You can find the function name in the serverless.yml file, and then run the following command to test it:
serverless invoke local --function FUNCTION_NAME_HERE --data '{data: {"email":"test@mail.com"}}'
If you get a log of the user email, you’re ready to deploy your function so you can run:
serverless deploy
As long as this is successful, you should get a URL for your function and you can use that to update your webhook in Dynamic from the webhook.site URL. Now you’re ready to run it!
You can use this approach to send notifications for any event, and you can use any service you like to handle the processing of the event.Don’t hesitate to check out Zapier Webhooks to hook into many other services, CRMs and so on.
Last modified on October 29, 2026
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Dynamic","colors":{"primary":"#4779FF","light":"#A0BFFF","dark":"#69A5FF"},"logo":{"light":"https://mintcdn.com/dynamic-docs-testing/CXYm3HK725eun9ev/logo/dynamic-fireblocks-icon-light.svg?fit=max\u0026auto=format\u0026n=CXYm3HK725eun9ev\u0026q=85\u0026s=c050cd8c41715aa71119f91c19221cb3","dark":"https://mintcdn.com/dynamic-docs-testing/CXYm3HK725eun9ev/logo/dynamic-fireblocks-icon-dark.svg?fit=max\u0026auto=format\u0026n=CXYm3HK725eun9ev\u0026q=85\u0026s=434fa110e5847b7a23adc1abd636719e"},"favicon":"https://mintcdn.com/dynamic-docs-testing/C-CltRmvvkSqoMFQ/assets/favicon.png?fit=max\u0026auto=format\u0026n=C-CltRmvvkSqoMFQ\u0026q=85\u0026s=2bbf17fee49c1d60434f1fd77a2d8f38","api":{"mdx":{"auth":{"method":"bearer"}}},"background":{"image":"https://mintcdn.com/dynamic-docs-testing/C-CltRmvvkSqoMFQ/assets/images/general/background-image.png?fit=max\u0026auto=format\u0026n=C-CltRmvvkSqoMFQ\u0026q=85\u0026s=67a354a23840d92de3d1cb25c24ff27c","decoration":"gradient"},"navbar":{"links":[{"href":"https://www.dynamic.xyz/get-started","label":"Start Free"}],"primary":{"type":"button","label":"See it in action","href":"https://demo.dynamic.xyz/"}},"footer":{"socials":{"x":"https://x.com/dynamic_xyz","linkedin":"https://www.linkedin.com/company/dynamiclabs","slack":"https://www.dynamic.xyz/join-slack"}},"styling":{"eyebrows":"breadcrumbs","codeblocks":"system","latex":true},"integrations":{"gtm":{"tagId":"GTM-K9NXSDK"},"cookies":{"key":"dynamic-docs-cookie-consent","value":"accepted"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"metadata":{"timestamp":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"dynamic-docs-testing","hasAudioNarration":false,"actualSubdomain":"dynamic-docs-testing","customDomains":["www.dynamic.xyz"],"gitSource":{"type":"github","owner":"dynamic-labs","repo":"documentation","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aeca4c6754501e0c6b682aa","collectionId":"ea23aa8b-d710-42bc-b27c-e7fa0a546b58","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aeca4c6754501e0c6b682aa"},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aeca4c6754501e0c6b682aa","clientVersion":"0.0.4067","searchFilterCounts":[{"language":"default","tag":"Reference","count":1964},{"language":"default","tag":"REST API","count":1181},{"language":"default","tag":"Schemas","count":636},{"language":"default","tag":"Endpoints","count":541},{"language":"default","tag":"Javascript, React \u0026 React Native","count":307},{"language":"default","tag":"Legacy React","count":287},{"language":"default","tag":"SDK","count":238},{"language":"default","tag":"JavaScript SDK Reference","count":230},{"language":"default","tag":"Implement","count":212},{"language":"default","tag":"Wallets","count":186}]},"assistantConfig":{},"basePath":"/docs","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":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","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},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".dynamic-demos-link{position:relative;overflow:hidden;margin:0.5rem 0 2rem;padding:2rem 1.75rem;border-radius:16px;border:1px solid rgba(148, 163, 184, 0.14);background:rgba(148, 163, 184, 0.04);text-align:center}html.dark .dynamic-demos-link{border-color:rgba(148, 163, 184, 0.12);background:rgba(148, 163, 184, 0.03)}.ddl-glow{position:absolute;inset:-40% auto auto 50%;width:28rem;height:28rem;transform:translateX(-50%);border-radius:50%;background:radial-gradient(circle, rgba(71, 121, 255, 0.18), transparent 70%);pointer-events:none}html.dark .ddl-glow{background:radial-gradient(circle, rgba(71, 121, 255, 0.22), transparent 70%)}.ddl-content{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;max-width:32rem;margin:0 auto}.ddl-icon{display:inline-flex;align-items:center;justify-content:center;width:3rem;height:3rem;margin-bottom:1rem;border-radius:999px;background:rgba(71, 121, 255, 0.12);color:#4779ff}html.dark .ddl-icon{background:rgba(71, 121, 255, 0.18);color:#93b4ff}.ddl-icon svg{width:1.25rem;height:1.25rem}.ddl-title{margin:0 0 0.65rem;font-size:1.5rem;font-weight:700;line-height:1.25;letter-spacing:-0.02em;color:#0f172a}html.dark .ddl-title{color:#f1f5f9}.ddl-copy{margin:0 0 1.35rem;font-size:1rem;line-height:1.65;color:#64748b}html.dark .ddl-copy{color:#94a3b8}.ddl-copy strong{color:#4779ff;font-weight:600}html.dark .ddl-copy strong{color:#93b4ff}.ddl-button{display:inline-flex;align-items:center;gap:0.45rem;padding:0.75rem 1.15rem;border-radius:10px;background:#4779ff;color:#fff;font-size:0.95rem;font-weight:600;line-height:1;text-decoration:none;transition:background-color 160ms cubic-bezier(0.2, 0, 0, 1),\n transform 160ms cubic-bezier(0.2, 0, 0, 1)}.ddl-button:hover{background:#2f5fe0;transform:translateY(-1px)}.ddl-button:focus-visible{outline:2px solid #4779ff;outline-offset:3px}.ddl-button-icon{width:1rem;height:1rem}@media (prefers-reduced-motion: reduce){.ddl-button{transition:none}.ddl-button:hover{transform:none}}.welcome-section{padding:1.3rem 1.5rem 0;border-radius:14px;border:1px solid rgba(148, 163, 184, 0.12);background:rgba(148, 163, 184, 0.04);margin-bottom:2rem}html.dark .welcome-section{border-color:rgba(148, 163, 184, 0.1);background:rgba(148, 163, 184, 0.03)}.welcome-word-rotator{margin:0 0 1rem;padding:0 0 1rem;border-bottom:1px dashed rgba(148, 163, 184, 0.2)}html.dark .welcome-word-rotator{border-bottom-color:rgba(148, 163, 184, 0.15)}.welcome-section h3{margin-top:1.75rem;margin-bottom:-1rem}.wwr-title{margin:0;font-size:2rem;font-weight:700;line-height:1.3;letter-spacing:-0.02em;color:#0f172a}html.dark .wwr-title{color:#f1f5f9}.wwr-line{display:block}.wwr-line+.wwr-line{margin-top:0.1rem}.wwr-word{white-space:nowrap}.wwr-char{display:inline-block;will-change:transform, opacity, filter;transform-style:preserve-3d;backface-visibility:hidden}.wwr-accent{color:#4779ff;font-weight:550;perspective:400px}html.dark .wwr-accent{color:#93b4ff}#banner{background-color:#4779ff}.event-hero{margin:0 0 1.5rem}.event-hero-banner{width:100%;height:auto;display:block;border-radius:14px;box-shadow:0 10px 32px rgba(15, 23, 42, 0.22)}.event-hero-meta{display:flex;flex-wrap:wrap;gap:0.5rem;margin-top:0.9rem}.event-tag{display:inline-flex;align-items:center;gap:0.4rem;padding:0.35rem 0.85rem;border-radius:999px;font-size:0.85rem;font-weight:600;color:#2f5fe0;background:rgba(71, 121, 255, 0.12);border:1px solid rgba(71, 121, 255, 0.25)}html.dark .event-tag{color:#93b4ff;background:rgba(71, 121, 255, 0.16);border-color:rgba(71, 121, 255, 0.32)}@media (min-width: 768px){.nav-logo{height:2.25rem!important;max-width:18rem!important}}.mcp-install-button{pointer-events:none!important;user-select:none!important;-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important}.before\\:bg-background-light::before,.chat-assistant-floating-input::before{content:none!important;display:none!important;background:none!important;background-color:transparent!important;height:0!important}.rn-qs-dark{display:none}.rn-qs-light{display:block}html.dark .rn-qs-dark{display:block}html.dark .rn-qs-light{display:none}html.light .rn-qs-dark{display:none}html.light .rn-qs-light{display:block}.llm-copy-btn{display:inline-flex;align-items:center;gap:6px;margin-bottom:12px;padding:7px 14px;background-color:#4779ff;color:#fff;font-size:13px;font-weight:500;border:none;border-radius:6px;cursor:pointer;transition:background-color 0.15s ease, opacity 0.15s ease}.llm-copy-btn:hover{background-color:#2f5fe0}.llm-copy-btn--copied{background-color:#16a34a}.llm-copy-btn--copied:hover{background-color:#15803d}html.dark{--ds-bg: #0c0e13;--ds-elevated: #1b1d22;--ds-border: #282b33;--ds-text: #ececec;--ds-muted: #6f7177;--ds-subtitle: #8f93ab;--ds-primary: #5c89ff}html.light{--ds-bg: #ffffff;--ds-elevated: #fafafb;--ds-border: #e9ecf2;--ds-text: #26272e;--ds-muted: #5f6478;--ds-subtitle: #8f93ab;--ds-primary: #5c89ff}html:is(.light,.dark) .DocSearch-Container,html:is(.light,.dark) .DocSearch-Modal{--docsearch-primary-color: var(--ds-primary);--docsearch-highlight-color: var(--ds-primary);--docsearch-logo-color: var(--ds-muted);--docsearch-text-color: var(--ds-text);--docsearch-muted-color: var(--ds-muted);--docsearch-hit-color: var(--ds-text);--docsearch-hit-active-color: var(--ds-text);--docsearch-container-background: rgb(0 0 0 / 0.6);--docsearch-modal-background: var(--ds-bg);--docsearch-searchbox-background: transparent;--docsearch-searchbox-focus-background: transparent;--docsearch-hit-background: transparent;--docsearch-footer-background: var(--ds-bg);--docsearch-modal-shadow: 0 4px 8px -6px rgb(24 39 75 / 0.02),\n 0 8px 24px -4px rgb(24 39 75 / 0.05),\n 0 0 0 1px var(--ds-border);--docsearch-hit-shadow: none;--docsearch-footer-shadow: 0 -1px 0 0 var(--ds-border);--docsearch-searchbox-shadow: none;--docsearch-key-gradient: var(--ds-bg);--docsearch-key-shadow: inset 0 0 0 1px var(--ds-border),\n 0 2px 0 0 var(--ds-border);--docsearch-key-pressed-shadow: inset 0 0 0 1px var(--ds-border),\n 0 1px 0 0 var(--ds-border);--docsearch-hit-height: auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}html:is(.light,.dark) .DocSearch-Modal{max-width:558px;height:auto;max-height:min(80vh, 720px);border-radius:12px;overflow:hidden}html:is(.light,.dark) .DocSearch-Dropdown{height:auto;padding:12px 16px;max-height:calc(min(80vh, 720px) - 56px - 54px)}html:is(.light,.dark) .DocSearch-Dropdown-Container{display:flex;flex-direction:column;gap:17px}html:is(.light,.dark) .DocSearch-Hits ul{display:flex;flex-direction:column;gap:2px}html:is(.light,.dark) .DocSearch-SearchBar{padding:12px;border-bottom:1px solid var(--ds-border)}html:is(.light,.dark) .DocSearch-SearchBar:has(.DocSearch-Input:not(:placeholder-shown)){background:var(--ds-elevated)}html:is(.light,.dark) .DocSearch-Form{height:auto;padding:0;gap:8px;background:transparent;box-shadow:none}html:is(.light,.dark) .DocSearch-Input{padding:0;font-size:14px;font-weight:400;line-height:20px;color:var(--ds-text)}html:is(.light,.dark) .DocSearch-Input::placeholder{color:var(--ds-muted);opacity:1}html:is(.light,.dark) .DocSearch-Hit-source{height:auto;margin:0 0 6px;padding:0;background:transparent;font-size:12px;font-weight:500;line-height:18px;letter-spacing:0;text-transform:none;color:var(--ds-primary)}html:is(.light,.dark) .DocSearch-Hit{height:auto;padding:0}html:is(.light,.dark) .DocSearch-Hit a{height:54px;padding:8px 10px;border:1px solid transparent;border-radius:8px;background:transparent;display:flex;align-items:center;transition-property:background-color, border-color;transition-duration:120ms;transition-timing-function:cubic-bezier(0.2, 0, 0, 1)}html:is(.light,.dark) .DocSearch-Hit[aria-selected=\"true\"] a{background:var(--ds-elevated);border-color:var(--ds-border)}html:is(.light,.dark) .DocSearch-Hit-Container{display:flex;align-items:center;width:100%;height:auto;min-height:0;gap:8px}html:is(.light,.dark) .DocSearch-Hit-content-wrapper{flex:1 1 auto;min-width:0}html:is(.light,.dark) .DocSearch-Hit-action{margin-left:auto;flex-shrink:0}html:is(.light,.dark) .DocSearch-Hit-title{font-size:14px;font-weight:500;line-height:20px;color:var(--ds-text)}html:is(.light,.dark) .DocSearch-Hit-path{font-size:12px;font-weight:400;line-height:18px;color:var(--ds-muted)}html:is(.light,.dark) .DocSearch-Hit[aria-selected=\"true\"] .DocSearch-Hit-path{color:var(--ds-subtitle)}html:is(.light,.dark) .DocSearch-Hit--Result.DocSearch-Hit--Lvl1 .DocSearch-Hit-title,html:is(.light,.dark) .DocSearch-Hit--Result.DocSearch-Hit--Child .DocSearch-Hit-title,html:is(.light,.dark) .DocSearch-Hit[aria-selected=\"true\"] .DocSearch-Hit-title,html:is(.light,.dark) .DocSearch-Hit[aria-selected=\"true\"] mark{color:var(--ds-primary)}html:is(.light,.dark) .DocSearch-Hit-action{display:none}html:is(.light,.dark) .DocSearch-Hit[aria-selected=\"true\"] .DocSearch-Hit-action{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;padding:2px;border-radius:4px;background:var(--ds-bg);box-shadow:inset 0 0 0 1px var(--ds-border),\n 0 2px 0 0 var(--ds-border);flex-shrink:0}html:is(.light,.dark) .DocSearch-Footer{height:auto;padding:16px;background:var(--ds-bg);border-top:1px solid var(--ds-border);border-radius:0 0 12px 12px;box-shadow:none}html:is(.light,.dark) .DocSearch-Commands{gap:20px}html:is(.light,.dark) .DocSearch-Commands li{gap:6px}html:is(.light,.dark) .DocSearch-Commands-Key{position:relative;width:22px;height:22px;min-width:22px;margin:0;padding:2px;border-radius:4px;display:inline-flex;align-items:center;justify-content:center;font-size:11px;font-weight:500;color:var(--ds-muted)}html:is(.light,.dark) .DocSearch-Label{font-size:14px;font-weight:400;line-height:20px;color:var(--ds-muted)}html:is(.light,.dark) .DocSearch-Logo a>*{display:none}html:is(.light,.dark) .DocSearch-Logo a{font-size:11px;font-weight:400;line-height:1;color:var(--ds-muted);text-decoration:none;border-radius:2px;opacity:0.6;transition-property:opacity;transition-duration:150ms;transition-timing-function:cubic-bezier(0.2, 0, 0, 1)}html:is(.light,.dark) .DocSearch-Logo a::before{content:'Search by Algolia'}html:is(.light,.dark) .DocSearch-MagnifierLabel>*,html:is(.light,.dark) .DocSearch-Reset>*,html:is(.light,.dark) .DocSearch-Hit-icon>*,html:is(.light,.dark) .DocSearch-Hit-action>*{display:none!important}html:is(.light,.dark) .DocSearch-Commands li:nth-child(1) .DocSearch-Commands-Key>*,html:is(.light,.dark) .DocSearch-Commands li:nth-child(2) .DocSearch-Commands-Key>*{display:none!important}html:is(.light,.dark) .DocSearch-Hit-Tree,html:is(.light,.dark) .DocSearch-Hit-action-button,html:is(.light,.dark) .DocSearch-Hit-action~.DocSearch-Hit-action{display:none!important}html:is(.light,.dark) .DocSearch-MagnifierLabel,html:is(.light,.dark) .DocSearch-Reset,html:is(.light,.dark) .DocSearch-Hit-icon{display:inline-block;width:16px;height:16px;padding:0;background-color:var(--ds-muted);-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}html:is(.light,.dark) .DocSearch-MagnifierLabel{-webkit-mask-image:url(\"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1zZWFyY2giIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiA+IDxwYXRoIGQ9Im0yMSAyMS00LjM0LTQuMzQiIC8+IDxjaXJjbGUgY3g9IjExIiBjeT0iMTEiIHI9IjgiIC8+IDwvc3ZnPg==\");mask-image:url(\"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1zZWFyY2giIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiA+IDxwYXRoIGQ9Im0yMSAyMS00LjM0LTQuMzQiIC8+IDxjaXJjbGUgY3g9IjExIiBjeT0iMTEiIHI9IjgiIC8+IDwvc3ZnPg==\")}html:is(.light,.dark) .DocSearch-Reset{position:relative;width:16px;height:16px;border:0;border-radius:2px;cursor:pointer;transition-property:transform, opacity;transition-duration:100ms;transition-timing-function:cubic-bezier(0.2, 0, 0, 1);-webkit-mask-image:url(\"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibHVjaWRlIGx1Y2lkZS14IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgPiA8cGF0aCBkPSJNMTggNiA2IDE4IiAvPiA8cGF0aCBkPSJtNiA2IDEyIDEyIiAvPiA8L3N2Zz4=\");mask-image:url(\"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibHVjaWRlIGx1Y2lkZS14IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgPiA8cGF0aCBkPSJNMTggNiA2IDE4IiAvPiA8cGF0aCBkPSJtNiA2IDEyIDEyIiAvPiA8L3N2Zz4=\")}html:is(.light,.dark) .DocSearch-Reset[hidden]{display:none}html:is(.light,.dark) .DocSearch-Reset::after{content:'';position:absolute;inset:-12px}html:is(.light,.dark) .DocSearch-Hit-icon{-webkit-mask-image:url(\"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1maWxlLXRleHQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiA+IDxwYXRoIGQ9Ik02IDIyYTIgMiAwIDAgMS0yLTJWNGEyIDIgMCAwIDEgMi0yaDhhMi40IDIuNCAwIDAgMSAxLjcwNC43MDZsMy41ODggMy41ODhBMi40IDIuNCAwIDAgMSAyMCA4djEyYTIgMiAwIDAgMS0yIDJ6IiAvPiA8cGF0aCBkPSJNMTQgMnY1YTEgMSAwIDAgMCAxIDFoNSIgLz4gPHBhdGggZD0iTTEwIDlIOCIgLz4gPHBhdGggZD0iTTE2IDEzSDgiIC8+IDxwYXRoIGQ9Ik0xNiAxN0g4IiAvPiA8L3N2Zz4=\");mask-image:url(\"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1maWxlLXRleHQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIGZpbGw9Im5vbmUiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiA+IDxwYXRoIGQ9Ik02IDIyYTIgMiAwIDAgMS0yLTJWNGEyIDIgMCAwIDEgMi0yaDhhMi40IDIuNCAwIDAgMSAxLjcwNC43MDZsMy41ODggMy41ODhBMi40IDIuNCAwIDAgMSAyMCA4djEyYTIgMiAwIDAgMS0yIDJ6IiAvPiA8cGF0aCBkPSJNMTQgMnY1YTEgMSAwIDAgMCAxIDFoNSIgLz4gPHBhdGggZD0iTTEwIDlIOCIgLz4gPHBhdGggZD0iTTE2IDEzSDgiIC8+IDxwYXRoIGQ9Ik0xNiAxN0g4IiAvPiA8L3N2Zz4=\")}html:is(.light,.dark) .DocSearch-Hit--Result.DocSearch-Hit--Lvl1 .DocSearch-Hit-icon,html:is(.light,.dark) .DocSearch-Hit--Result.DocSearch-Hit--Child .DocSearch-Hit-icon{-webkit-mask-image:url(\"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1oYXNoIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgPiA8bGluZSB4MT0iNCIgeDI9IjIwIiB5MT0iOSIgeTI9IjkiIC8+IDxsaW5lIHgxPSI0IiB4Mj0iMjAiIHkxPSIxNSIgeTI9IjE1IiAvPiA8bGluZSB4MT0iMTAiIHgyPSI4IiB5MT0iMyIgeTI9IjIxIiAvPiA8bGluZSB4MT0iMTYiIHgyPSIxNCIgeTE9IjMiIHkyPSIyMSIgLz4gPC9zdmc+\");mask-image:url(\"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1oYXNoIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgPiA8bGluZSB4MT0iNCIgeDI9IjIwIiB5MT0iOSIgeTI9IjkiIC8+IDxsaW5lIHgxPSI0IiB4Mj0iMjAiIHkxPSIxNSIgeTI9IjE1IiAvPiA8bGluZSB4MT0iMTAiIHgyPSI4IiB5MT0iMyIgeTI9IjIxIiAvPiA8bGluZSB4MT0iMTYiIHgyPSIxNCIgeTE9IjMiIHkyPSIyMSIgLz4gPC9zdmc+\")}html:is(.light,.dark) .DocSearch-Hit[aria-selected=\"true\"] .DocSearch-Hit-icon{background-color:var(--ds-text)}html:is(.light,.dark) .DocSearch-Hit[aria-selected=\"true\"] .DocSearch-Hit-action::before{content:'';width:16px;height:16px;background-color:var(--ds-text);-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-image:url(\"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1jb3JuZXItZG93bi1sZWZ0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgPiA8cGF0aCBkPSJNMjAgNHY3YTQgNCAwIDAgMS00IDRINCIgLz4gPHBhdGggZD0ibTkgMTAtNSA1IDUgNSIgLz4gPC9zdmc+\");mask-image:url(\"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1jb3JuZXItZG93bi1sZWZ0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgPiA8cGF0aCBkPSJNMjAgNHY3YTQgNCAwIDAgMS00IDRINCIgLz4gPHBhdGggZD0ibTkgMTAtNSA1IDUgNSIgLz4gPC9zdmc+\")}html:is(.light,.dark) .DocSearch-Commands li:nth-child(1) .DocSearch-Commands-Key::before,html:is(.light,.dark) .DocSearch-Commands li:nth-child(2) .DocSearch-Commands-Key:nth-child(1)::before,html:is(.light,.dark) .DocSearch-Commands li:nth-child(2) .DocSearch-Commands-Key:nth-child(2)::before{content:'';width:16px;height:16px;background-color:var(--ds-muted);-webkit-mask-position:center;mask-position:center;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}html:is(.light,.dark) .DocSearch-Commands li:nth-child(1) .DocSearch-Commands-Key::before{-webkit-mask-image:url(\"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1jb3JuZXItZG93bi1sZWZ0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgPiA8cGF0aCBkPSJNMjAgNHY3YTQgNCAwIDAgMS00IDRINCIgLz4gPHBhdGggZD0ibTkgMTAtNSA1IDUgNSIgLz4gPC9zdmc+\");mask-image:url(\"data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ibHVjaWRlIGx1Y2lkZS1jb3JuZXItZG93bi1sZWZ0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgPiA8cGF0aCBkPSJNMjAgNHY3YTQgNCAwIDAgMS00IDRINCIgLz4gPHBhdGggZD0ibTkgMTAtNSA1IDUgNSIgLz4gPC9zdmc+\")}html:is(.light,.dark) .DocSearch-Commands li:nth-child(2) .DocSearch-Commands-Key:nth-child(1)::before{-webkit-mask-image:url(\"data:image/svg+xml;utf8,\u003csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'>\u003cpath d='m5 12 7-7 7 7'/>\u003cpath d='M12 19V5'/>\u003c/svg>\");mask-image:url(\"data:image/svg+xml;utf8,\u003csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'>\u003cpath d='m5 12 7-7 7 7'/>\u003cpath d='M12 19V5'/>\u003c/svg>\")}html:is(.light,.dark) .DocSearch-Commands li:nth-child(2) .DocSearch-Commands-Key:nth-child(2)::before{-webkit-mask-image:url(\"data:image/svg+xml;utf8,\u003csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'>\u003cpath d='M12 5v14'/>\u003cpath d='m19 12-7 7-7-7'/>\u003c/svg>\");mask-image:url(\"data:image/svg+xml;utf8,\u003csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'>\u003cpath d='M12 5v14'/>\u003cpath d='m19 12-7 7-7-7'/>\u003c/svg>\")}html:is(.light,.dark) .DocSearch-Reset:focus-visible,html:is(.light,.dark) .DocSearch-Logo a:focus-visible{outline:2px solid var(--ds-primary);outline-offset:4px}html:is(.light,.dark) .DocSearch-Logo a:focus-visible{opacity:1;outline-offset:3px}html:is(.light,.dark) .DocSearch-Reset:active{transform:scale(0.96)}@media (hover: hover){html:is(.light,.dark) .DocSearch-Reset:hover{opacity:0.8}html:is(.light,.dark) .DocSearch-Logo a:hover{opacity:1}}@media (prefers-reduced-motion: reduce){html:is(.light,.dark) .DocSearch-Hit a,html:is(.light,.dark) .DocSearch-Logo a,html:is(.light,.dark) .DocSearch-Reset{transition:none}html:is(.light,.dark) .DocSearch-Reset:active{transform:none}}.nav-tabs{flex:1 1 auto;min-width:0;align-items:center;gap:0.25rem!important;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-ms-overflow-style:none;scroll-padding-inline:0.625rem}.nav-tabs::-webkit-scrollbar{display:none}.nav-tabs-item{flex:0 0 auto}.nav-tabs-item{white-space:nowrap;height:auto;padding:0.375rem 0.625rem;border-radius:0.5rem;gap:0!important;color:#5f6478;transition:background-color 0.15s ease,\n color 0.15s ease}.nav-tabs-item>svg,.nav-tabs-item>div>svg{display:none}.nav-tabs-item>div.absolute{display:none!important}.nav-tabs-item[data-active=\"true\"]{background-color:#edf1fe;color:#2b55c7}.nav-tabs-item:focus-visible{outline:2px solid #4779ff;outline-offset:2px;color:#26272e}html.dark .nav-tabs-item{color:#8f93ab}html.dark .nav-tabs-item:focus-visible{outline-color:#69a5ff;color:#ececec}html.dark .nav-tabs-item[data-active=\"true\"]{background-color:rgb(105 165 255 / 14%);color:#a0bfff}@media (hover: hover){.nav-tabs-item:hover{background-color:#f4f5f8;color:#26272e}.nav-tabs-item[data-active=\"true\"]:hover{background-color:#e4ebfd;color:#2b55c7}html.dark .nav-tabs-item:hover{background-color:#1b1d22;color:#ececec}html.dark .nav-tabs-item[data-active=\"true\"]:hover{background-color:rgb(105 165 255 / 20%);color:#a0bfff}}@media (prefers-reduced-motion: reduce){.nav-tabs-item{transition:none}}div:has(>.nav-tabs){border-bottom:1px solid #e9ecf2}html.dark div:has(>.nav-tabs){border-bottom-color:#282b33}a[href$=\"demo.dynamic.xyz/\"]>span[class*=\"bg-primary-dark\"]{background-color:#2e57d1}@media (hover: hover){a[href$=\"demo.dynamic.xyz/\"]:hover>span[class*=\"bg-primary-dark\"]{background-color:#22409e}}div:has(>.nav-tabs){height:auto!important;padding-block:0.4375rem}#sidebar-content .sidebar-group li:has(>button>div:first-child:not(.flex-1))>ul{margin-left:1.5rem}"}],"page":{"pagePath":"recipes/webhooks-serverless","slug":"/recipes/webhooks-serverless","pageMetadata":{"title":"Webhooks using a serverless function","description":null,"href":"/recipes/webhooks-serverless"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`This guide will teach you how to catch events from Dynamic webhooks using a serverless function.`}),`\n`,_jsx(Heading,{level:`2`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`A `,_jsx(_components.a,{href:`https://dynamic.xyz`,children:`Dynamic`}),` account`]}),`\n`,_jsxs(_components.li,{children:[`An `,_jsx(_components.a,{href:`https://aws.amazon.com/`,children:`AWS`}),` account`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`step-1-scaffold-a-serverless-function`,children:`Step 1: Scaffold a serverless function`}),`\n`,_jsxs(_components.p,{children:[`You can do this directly through AWS, but we prefer to use `,_jsx(_components.a,{href:`https://www.serverless.com/`,children:`Serverless`}),` which creates a helpful layer of abstraction on top of Lambda.`]}),`\n`,_jsx(_components.p,{children:`First install their framework:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -g`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` serverless`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Then run their setup command:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`serverless`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`You will need to plug in your AWS credentials during setup, which you can find in your AWS console.`}),`\n`,_jsxs(_components.p,{children:[`When asked which template you want to use, select `,_jsx(_components.code,{children:`AWS - Node.js - HTTP API`}),` as this tutorial will be using Node.js.`]}),`\n`,_jsxs(_components.p,{children:[`If you cd into the directory that was created, you should see an `,_jsx(_components.code,{children:`index.js`}),` file which is where we will be writing our code.`]}),`\n`,_jsx(_components.p,{children:`It will look something like this:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`module`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`exports`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`handler`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` statusCode:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 200`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` message:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Go Serverless v3.0! Your function executed successfully!\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` input:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` event`}),_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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 2`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` };`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`step-2-create-our-webhook-inside-dynamic`,children:`Step 2: Create our webhook inside Dynamic`}),`\n`,_jsx(_components.p,{children:`We need to create a webhook inside Dynamic that will send a POST request to our serverless function whenever a new user signs up.`}),`\n`,_jsxs(_components.p,{children:[`To do this we can visit `,_jsx(_components.a,{href:`https://console.dynamic.xyz/dashboard/developer/webhooks`,children:`the webhooks section of the Dynamic Console`}),` and click “Create Webhook”. It will ask you for a URL and to mark the events you want to listen to.`]}),`\n`,_jsxs(_components.p,{children:[`For now we can use a fake URL, which we can generate from `,_jsx(_components.a,{href:`https://webhook.site/`,children:`webhook.site`}),`. This will give us a URL that we can use to test our webhook, and will show us the data that is being sent to it.`]}),`\n`,_jsx(_components.p,{children:`For the events, you should make sure user.created is selected, and that’s it! Save away and a test event will be sent to your URL.`}),`\n`,_jsx(Heading,{level:`2`,id:`step-3-adapt-the-function-to-receive-a-dynamic-webhook-event`,children:`Step 3: Adapt the function to receive a Dynamic webhook event`}),`\n`,_jsxs(_components.p,{children:[`Let’s say in this instance we are most interested in `,_jsx(_components.a,{href:`/api-reference/schemas/User`,children:`the user object`}),`, as this is returned by the user.created event. You can find the full list of events `,_jsx(_components.a,{href:`/platform/console/webhooks/events`,children:`here`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`As you’ll see from the event reference, the only required field on the object is the ID, so if you want to collect more information you’ll need to make sure you’re doing `,_jsx(_components.a,{href:`/react/users/information-capture`,children:`Info Capture`}),` on signup.`]}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`In this tutorial we will assume we are using email signup with embedded\nwallets, so we’ll always have email available on the user object at time of\nsignup`})}),`\n`,_jsxs(_components.p,{children:[`In the test event, when you inspect it using webhook.site, you’ll see the payload comes with a `,_jsx(_components.code,{children:`data`}),` field, and it’s inside this field that the user object will be present. Here’s how we can use the email inside the function:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`module`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`exports`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`handler`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` email`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`email`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`email`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Note that we are not adding error handling in the end response, you should do so by adapting the returned status code and message etc.`}),`\n`,_jsx(Heading,{level:`2`,id:`step-4-test-\u0026-deploy-your-function`,children:`Step 4: Test \u0026 deploy your function`}),`\n`,_jsxs(_components.p,{children:[`Serverless hooks into the AWS local testing functionality using `,_jsx(_components.a,{href:`https://www.serverless.com/framework/docs/providers/aws/cli-reference/invoke-local`,children:`invoke local`}),`.`]}),`\n`,_jsx(_components.p,{children:`You can find the function name in the serverless.yml file, and then run the following command to test it:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`serverless`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` invoke`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` local`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --function`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` FUNCTION_NAME_HERE`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{data: {\"email\":\"test@mail.com\"}}'`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`If you get a log of the user email, you’re ready to deploy your function so you can run:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`serverless`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` deploy`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`As long as this is successful, you should get a URL for your function and you can use that to update your webhook in Dynamic from the webhook.site URL. Now you’re ready to run it!`}),`\n`,_jsx(Heading,{level:`2`,id:`step-5-going-further`,children:`Step 5: Going further`}),`\n`,_jsx(_components.p,{children:`You can use this approach to send notifications for any event, and you can use any service you like to handle the processing of the event.`}),`\n`,_jsxs(_components.p,{children:[`Don’t hesitate to check out `,_jsx(_components.a,{href:`https://zapier.com/apps/webhook/integrations`,children:`Zapier Webhooks`}),` to hook into many other services, CRMs and so on.`]})]})}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":{"codeStyling":"system","config":{},"pageMetadata":{"title":"Webhooks using a serverless function","description":null,"href":"/recipes/webhooks-serverless"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Prerequisites","slug":"prerequisites","depth":2,"children":[]},{"title":"Step 1: Scaffold a serverless function","slug":"step-1-scaffold-a-serverless-function","depth":2,"children":[]},{"title":"Step 2: Create our webhook inside Dynamic","slug":"step-2-create-our-webhook-inside-dynamic","depth":2,"children":[]},{"title":"Step 3: Adapt the function to receive a Dynamic webhook event","slug":"step-3-adapt-the-function-to-receive-a-dynamic-webhook-event","depth":2,"children":[]},{"title":"Step 4: Test \u0026 deploy your function","slug":"step-4-test-\u0026-deploy-your-function","depth":2,"children":[]},{"title":"Step 5: Going further","slug":"step-5-going-further","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/dynamic-docs-testing/fd6becaed25bf0d8/algolia-docsearch.js","/docs/_mintlify/custom/dynamic-docs-testing/078be96a1e454d1f/generate-llms.js","/docs/_mintlify/custom/dynamic-docs-testing/14f3898c5e985cd5/snippets/gsap-text-plugin.js","/docs/_mintlify/custom/dynamic-docs-testing/c174bfce53a72941/snippets/gsap.js","/docs/_mintlify/custom/dynamic-docs-testing/ea6028ffcc794f21/llm-copy-button.js","/docs/_mintlify/custom/dynamic-docs-testing/c071bd14c4f40dfd/onetrust.js"],"subdomain":"dynamic-docs-testing","siteName":"Dynamic","title":"Webhooks using a serverless function - Dynamic","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-05T15:47:13.422Z","gitLastModified":"2026-10-29T09:57:42.000Z","originalFileLocation":"recipes/webhooks-serverless.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=\"application-name\" content=\"Dynamic\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/dynamic-docs-testing/mdILYDruq-iWk8yv/_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=\"/docs/mintlify-assets/_mintlify/favicons/dynamic-docs-testing/mdILYDruq-iWk8yv/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/dynamic-docs-testing/mdILYDruq-iWk8yv/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/dynamic-docs-testing/mdILYDruq-iWk8yv/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/dynamic-docs-testing/mdILYDruq-iWk8yv/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/dynamic-docs-testing/mdILYDruq-iWk8yv/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/dynamic-docs-testing/mdILYDruq-iWk8yv/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/dynamic-docs-testing/mdILYDruq-iWk8yv/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/dynamic-docs-testing/mdILYDruq-iWk8yv/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Webhooks using a serverless function - Dynamic\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Dynamic\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.dynamic.xyz/docs/recipes/webhooks-serverless\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://dynamic-docs-testing.mintlify.app/_mintlify/api/og/v2?division=Webhook+Guides\u0026amp;title=Webhooks+using+a+serverless+function\u0026amp;theme=9bec92bca96868fc0aaaeb3b\u0026amp;signature=a5e061c0238766775ced0f4989976059b49ee749a0cacca7c90ccf904a0539ef\">\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=\"Webhooks using a serverless function - Dynamic\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://dynamic-docs-testing.mintlify.app/_mintlify/api/og/v2?division=Webhook+Guides\u0026amp;title=Webhooks+using+a+serverless+function\u0026amp;theme=9bec92bca96868fc0aaaeb3b\u0026amp;signature=a5e061c0238766775ced0f4989976059b49ee749a0cacca7c90ccf904a0539ef\">\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=\"/docs/mintlify-assets/_mintlify/favicons/dynamic-docs-testing/mdILYDruq-iWk8yv/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Dynamic\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4779FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.dynamic.xyz/docs/recipes/webhooks-serverless\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/recipes/webhooks-serverless.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.dynamic.xyz/#organization\",\"name\":\"Dynamic\",\"url\":\"https://www.dynamic.xyz\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/dynamic-docs-testing/CXYm3HK725eun9ev/logo/dynamic-fireblocks-icon-light.svg?fit=max\u0026auto=format\u0026n=CXYm3HK725eun9ev\u0026q=85\u0026s=c050cd8c41715aa71119f91c19221cb3\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.dynamic.xyz/docs#website\",\"name\":\"Dynamic\",\"url\":\"https://www.dynamic.xyz/docs\",\"publisher\":{\"@id\":\"https://www.dynamic.xyz/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.dynamic.xyz/docs/recipes/webhooks-serverless#webpage\",\"url\":\"https://www.dynamic.xyz/docs/recipes/webhooks-serverless\",\"name\":\"Webhooks using a serverless function\",\"dateModified\":\"2026-10-29T09:57:42.000Z\",\"isPartOf\":{\"@id\":\"https://www.dynamic.xyz/docs#website\"},\"breadcrumb\":{\"@id\":\"https://www.dynamic.xyz/docs/recipes/webhooks-serverless#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.dynamic.xyz/docs/recipes/webhooks-serverless#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Recipes\",\"item\":\"https://www.dynamic.xyz/docs/recipes/recipes\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Webhook Guides\",\"item\":\"https://www.dynamic.xyz/docs/recipes/webhooks-signature-validation\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Webhooks using a serverless function\",\"item\":\"https://www.dynamic.xyz/docs/recipes/webhooks-serverless\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://www.dynamic.xyz/docs/recipes/webhooks-serverless#article\",\"headline\":\"Webhooks using a serverless function\",\"name\":\"Webhooks using a serverless function\",\"url\":\"https://www.dynamic.xyz/docs/recipes/webhooks-serverless\",\"mainEntityOfPage\":{\"@id\":\"https://www.dynamic.xyz/docs/recipes/webhooks-serverless#webpage\"},\"dateModified\":\"2026-10-29T09:57:42.000Z\",\"publisher\":{\"@id\":\"https://www.dynamic.xyz/#organization\"},\"isPartOf\":{\"@id\":\"https://www.dynamic.xyz/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Dynamic\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Dynamic","nav":{"global":null,"tabs":[{"tab":"Get Started","icon":"rocket","pages":[{"title":"Get Started","href":"/get-started/welcome"}]},{"tab":"Embedded Wallets","icon":"wallet","pages":[{"title":"Embedded Wallets","href":"/embedded-wallets/mpc/overview"}]},{"tab":"Business Accounts","icon":"building","pages":[{"title":"Business Accounts","href":"/business-accounts/accounts"}]},{"tab":"Policies","icon":"shield-check","pages":[{"title":"Policies","href":"/embedded-wallets/mpc/policies/overview"}]},{"tab":"Auth","icon":"door-open","pages":[{"title":"Auth","href":"/auth/overview"}]},{"tab":"Agents","icon":"server","pages":[{"title":"Agents","href":"/agents/overview"}]},{"tab":"Fireblocks Flow","icon":"coins","pages":[{"title":"Fireblocks Flow","href":"/flow/overview"}]},{"tab":"Earn","icon":"chart-line","pages":[{"title":"Earn","href":"/earn/overview"}]},{"tab":"Funding","icon":"money-bill-transfer","pages":[{"title":"Funding","href":"/funding/overview"}]},{"tab":"Reference","icon":"book-open","menu":[{"item":"Javascript, React \u0026 React Native","icon":"js","pages":[{"title":"Javascript, React \u0026 React Native","href":"/javascript/reference/overview"}]},{"item":"Swift","icon":"swift","pages":[{"title":"Swift","href":"/swift/sdk-reference/overview"}]},{"item":"Kotlin","icon":"android","pages":[{"title":"Kotlin","href":"/kotlin/sdk-reference/overview"}]},{"item":"Flutter","icon":"flutter","pages":[{"title":"Flutter","href":"/flutter/sdk-reference/overview"}]},{"item":"Unity","icon":"unity","pages":[{"title":"Unity","href":"/unity/sdk-reference/overview"}]},{"item":"Node","icon":"node","pages":[{"title":"Node","href":"/node/reference/auth/authenticate-jwt"}]},{"item":"REST API","icon":"code","pages":[{"title":"REST API","href":"/api-reference/overview"}]},{"item":"Legacy React","icon":"react","pages":[{"title":"Legacy React","href":"/react/reference/quickstart"}]},{"item":"Legacy React Native","icon":"mobile-screen","pages":[{"title":"Legacy React Native","href":"/react-native/reference/introduction"}]}],"pages":[{"title":"Reference","href":"/javascript/reference/overview"}]},{"tab":"Recipes","icon":"book-open","groups":[{"group":"Recipes","icon":"hat-chef","expanded":false,"pages":[{"title":"Recipes Introduction","href":"/recipes/recipes"},{"group":"Stablecoin Accounts","pages":[{"title":"Building with Stablecoin Accounts","href":"/recipes/stablecoins/quick-start"},{"title":"Sending USDC","href":"/recipes/stablecoins/sending-usdc"},{"title":"Buying USDC","href":"/recipes/stablecoins/buy-usdc"},{"title":"Receiving USDC","href":"/recipes/stablecoins/receive-usdc"},{"title":"Send USDC to Your Friend, Whether They Have a Wallet or Not","href":"/recipes/stablecoins/transfer-usdc-by-identifier"},{"title":"Send USDC to Your Friend, Whether They Have a Wallet or Not (React Native Version)","href":"/recipes/stablecoins/transfer-usdc-by-identifier-react-native"},{"title":"Virtual Debit Cards Powered by Stablecoins","href":"/recipes/stablecoins/stablecoin-card"}]},{"group":"Yield","pages":[{"title":"Aave lending markets","href":"/recipes/integrations/yield/aave"},{"title":"Kamino yield vaults","href":"/recipes/integrations/yield/kamino"},{"title":"Moonwell lending","href":"/recipes/integrations/yield/moonwell"},{"title":"Earn yield on stablecoins with Pods","href":"/recipes/integrations/yield/stablecoin-yield-pods"}]},{"group":"Prediction Markets","pages":[{"title":"Build a prediction market trading app with Kalshi","href":"/recipes/integrations/prediction-markets/kalshi"},{"title":"Build a prediction market trading app with Polymarket","href":"/recipes/integrations/prediction-markets/polymarket"}]},{"group":"Swap and bridge","pages":[{"title":"Token swaps via API","href":"/recipes/integrations/swaps/swap-api"},{"title":"Cross-chain swaps with LI.FI","href":"/recipes/integrations/swaps/lifi"},{"title":"Cross-chain swaps with Mayan","href":"/recipes/integrations/swaps/mayan"},{"title":"Circle USDC Gateway with embedded wallets","href":"/recipes/integrations/swaps/circle-gateway"}]},{"group":"Gas Sponsorship","pages":[{"title":"EVM Server-Controlled Sponsorship","href":"/recipes/integrations/evm-server-controlled-sponsorship"},{"title":"SVM Server-Controlled Sponsorship","href":"/recipes/integrations/svm-server-controlled-sponsorship"},{"title":"Handle Gas for TRON Transactions","href":"/recipes/integrations/tron-gas"}]},{"group":"Offramp / Onramp","pages":[{"title":"Crypto to fiat onramp and offramp with Iron and Dynamic","href":"/recipes/integrations/offramp-onramp/iron"},{"title":"USDC to cash offramp with MoneyGram and Dynamic","href":"/recipes/integrations/offramp-onramp/moneygram-ramp"}]},{"group":"402","pages":[{"title":"Overview","href":"/recipes/integrations/x402/overview"},{"title":"Using Dynamic with x402","href":"/recipes/integrations/x402/implementation"},{"title":"Machine Payments with MPP (Node.js)","href":"/recipes/integrations/mpp"}]},{"group":"Chains","pages":[{"title":"Private Payments on Aleo","href":"/recipes/chains/aleo-private-payments"},{"title":"Monad Integration with Dynamic","href":"/recipes/chains/monad"}]},{"group":"Telegram","pages":[{"title":"Telegram Mini App","href":"/recipes/integrations/telegram/telegram-mini-app"},{"title":"Telegram Bot using server wallets","href":"/recipes/integrations/telegram/telegram-server-wallets-bots"}]},{"group":"Frameworks","pages":[{"title":"NextAuth \u0026 Dynamic","href":"/recipes/frameworks/next-auth"},{"title":"Create-web3-dapp \u0026 Dynamic","href":"/recipes/frameworks/web3-dapp"},{"title":"Using Anchor with Dynamic","href":"/recipes/frameworks/anchor"},{"title":"Testing Your Next.js App with the Dynamic JavaScript SDK","href":"/recipes/frameworks/testing-nextjs-dynamic"}]},{"group":"Hyperliquid","pages":[{"title":"Hyperliquid SDK Integration","href":"/recipes/integrations/hyperliquid"},{"title":"HyperCore with embedded wallets","href":"/recipes/integrations/hyperliquid-hypercore"},{"title":"Hyperliquid agent wallets","href":"/recipes/integrations/hyperliquid-agent-wallets"}]},{"group":"Particle Network Universal Accounts","pages":[{"title":"How to use Dynamic with Particle Network's EIP-7702 Universal Account","href":"/recipes/integrations/particle/particle-network-universal-accounts"}]},{"group":"MetaMask Delegation Framework","pages":[{"title":"MetaMask Delegation Framework (EIP-7710) with Dynamic","href":"/recipes/integrations/eip-7710-metamask-delegation"}]},{"group":"Webhook Guides","pages":[{"title":"Verifying webhook message signatures","href":"/recipes/webhooks-signature-validation"},{"title":"Add new users to your CRM","description":null,"href":"/recipes/webhooks-crm"},{"title":"Webhooks using a serverless function","href":"/recipes/webhooks-serverless"},{"title":"Slack notifications of new signups","description":"Post in a slack channel when you have a new signup","href":"/recipes/webhooks-slack"},{"title":"Send new users an XMTP message","href":"/recipes/webhooks-xmtp"}]},{"group":"Transaction Protection","pages":[{"title":"Transaction Protection with Shield3","href":"/recipes/integrations/shield-3"}]}]}]}]},"basePath":"","title":"Webhooks using a serverless function - Dynamic","buildId":"dpl_9yaRmq8qi7yyMZn9oEWmKEdYMvGZ","deploymentId":"dpl_9yaRmq8qi7yyMZn9oEWmKEdYMvGZ","dynamics":[],"chunks":[]}