I’m currently working on upgrading our HubSpot project to the new unified app structure (2025.2), and I’m facing an issue related to serverless functions, which HubSpot has recently deprecated.
Previous setup (Legacy Private App)
In our earlier app structure, we used serverless functions to handle backend logic, like CRM API calls and custom business logic, inside a folder such as:
This approach worked perfectly until the recent HubSpot update.
Current situation (Unified Model / 2025.2)
After updating to the latest HubSpot app model, I noticed the following changes:
hubspot.serverless is no longer supported.
When I try to use it, I get this error:
[hubspot.serverless] hubspot.serverless is only available for Legacy Private apps. For apps using the new unified model, please use HubSpot.fetch instead.
In the new unified app structure, we now have folders like:
I’m aware of the new hubspot.fetch() method, but it seems to only support frontend requests to the HubSpot API without the ability to include custom headers or Bearer tokens, making it difficult to securely call external APIs or internal logic like we used to with serverless functions.
What I’ve tried
Migrated logic from /serverless/ to frontend JSX files using hubspot.fetch().
Tried calling HubSpot API endpoints directly, e.g.:
If your app relies heavily on HubSpot serverless functions and you are on v2025.01, it might be worth waiting a a few months before migrating, as there is a planned future release (v2026.03) that should support HubSpot serverless functions again.
Hi @hafizusama , you’ve already uncovered the hard truth, so I’ll just help frame it clearly. With how HubSpot works now in 2025.2, there is no true in-platform replacement for hubspot.serverless yet. The unified app model intentionally removed serverless execution, and hubspot.fetch() is not meant to be a general backend runtime. It’s a controlled client-side proxy with tight limits, not a secure logic layer.
So the guidance you’re seeing from Evaldas and Bérangère is unfortunately the correct state of things today. If your serverless functions contained real business logic, orchestration, or external API calls, HubSpot’s own recommendation is effectively: don’t migrate yet, or move that logic out of HubSpot entirely. The planned reintroduction in v2026.03 is real, but it’s also future-facing, not something you can rely on right now.
In practice, teams are doing one of three things. They stay on 2025.1 and accept missing new features. They split apps, keeping legacy serverless for core logic and using a new unified app only for UI extensions. Or they externalize everything into their own backend and treat HubSpot purely as a client and auth surface, using hubspot.fetch() only as a thin, signed call layer. There is no supported way today to recreate the old “HubSpot-hosted backend” experience inside 2025.2 (https://developers.hubspot.com/docs/apps/developer-platform/build-apps/overview).
Small disclosure since I’m close to this space: I work on Stacksync. We’ve had to make the same call when dealing with secure backend logic and replayable data flows, and right now the only stable option is to own that backend explicitly rather than waiting on HubSpot’s roadmap.
Your instincts are solid. This isn’t a migration you’re doing wrong, it’s a gap in the platform that HubSpot has acknowledged but not fully closed yet.
Did my answer help? Please mark it as a solution to help others find it too.
Ruben Burdin HubSpot Advisor Founder @ Stacksync Real-Time Data Sync between any CRM and Database
If your app relies heavily on HubSpot serverless functions and you are on v2025.01, it might be worth waiting a a few months before migrating, as there is a planned future release (v2026.03) that should support HubSpot serverless functions again.
Hi @rascasse83 and thanks so much for your help! 🧡
Hi @hafizusama, to reply to your question, based on the migration documentation, here's the recommended approach for handling serverless functions in the new unified app model (2025.2):
For serverless functions with core logic, HubSpot recommends NOT migrating to 2025.2 yet. According to the migration guide, if your serverless functions contain core logic (e.g., transforming data, custom business logic), you should wait until a full migration path is released.
For simple proxy functions, you need to:
- Host your own backend service (Vercel, AWS, DigitalOcean, etc.) - Migrate your serverless logic to this third-party platform - Use hubspot.fetch() to call your hosted endpoints from frontend extensions - Add your backend URLs to permittedUrls.fetch in your app-hsmeta.json
Please note the following:
- hubspot.fetch() does support an Authorization header for passing tokens
- However, you cannot pass custom headers beyond Authorization
- Request/response headers are not fully supported
- You must validate requests using HubSpot's signature validation
Here are the possible next steps/options for you:
- Wait for full migration support if you have complex serverless functions - Build a new 2025.2 app alongside your existing app for new features - Use platform version 2025.1 which still supports serverless functions (though it lacks newer 2025.2 features)
Hey @hafizusama - thank you for posting in the Community!
I'd like to tag some experts to see what insight they may have for us regarding this inquiry! @zach_threadint, @evaldas, and @Stephanie-OG - any thoughts here?
Shane, Senior Community Moderator
Loop Marketing is a new four-stage approach that combines AI efficiency and human authenticity to drive growth.