I’m building a public app for the HubSpot Marketplace (developer platform 2026.03, OAuth).
The app needs to create a custom event definition in each customer’s portal via the
custom events API (POST /events/2026-03/event-definitions), with properties that each
customer chooses from their own CRM properties, including custom properties. So the
event schema is different in every portal.
The docs for app events say they’re intended for marketplace apps, but app event types
are defined statically in the project config, so every portal gets the same schema.
That doesn’t fit our use case.
Questions:
Is it allowed for a marketplace app to create and send to custom events (not app
events) in customer portals using the customer’s OAuth token?
Would this approach cause any issue during app certification or marketplace review?
Which OAuth scopes are needed to create event definitions and send occurrences?
Welcome to the Community! The required OAuth scopes are listed on the API reference pages for defining events and sending occurrences, so those could be a good place to begin. I don’t see that the docs explicitly state how custom events fit into marketplace review, so that could be a great place for the community to chime in!
While we wait for some peer input, heres are a few dev docs that you may find helpful:
I’d keep the API capability question separate from the Marketplace approval question. Even if an OAuth token can create event definitions, that doesn’t necessarily mean dynamically defined schemas will pass certification
For the implementation, I’d use a stable naming convention per portal, check whether a definition already exists before creating one, and version the schemas when property types change instead of assuming they can be updated in place
I’d also get explicit confirmation from HubSpot Developer Support on the Marketplace policy before locking in this architecture
Hey @mashverse Yes, you can do this. Custom events work fine from a marketplace app using the customer’s OAuth token, and nothing in the certification or listing requirements blocks it. App events have a fixed schema in your project config, so they really only suit apps that send the same event to every portal. Since your schema is different in every portal, custom events are the right fit.
For scopes you’ll need behavioral_events.event_definitions.read_write to create the definition and analytics.behavioral_events.send for the occurrences. You’ll also need the CRM schema/read scopes for whatever objects you’re pulling properties from for the picker.
One thing that can catch you out is tier. Creating definitions needs Enterprise, so if you make those scopes required, installs will fail on Starter/Pro portals. Someone hit the same PORTAL_UNAUTHORIZED error here a while back: Scope/OAuth issues using the Events V3 API . I’d put them under optional scopes and only turn the feature on when they’re granted. That also covers you in review, since every scope you request has to be used.
A couple of other things I’d plan for. Event properties don’t actually link to CRM properties. You create matching ones by type and copy the dropdown options across, so if the customer changes the CRM property later you’ll need to re-sync it. Also, your app shares the customer’s limits of 500 event definitions and 30M occurrences a month. Prefixing your event names with your app name and mentioning this in your setup docs saves confusion later. The definitions also stay in the portal after uninstall, so say what happens to that data in your docs. Reviewers do look for that.
+1 for Alex - Just a couple things to add. I believe HubSpot expanded custom events to the Professional tier.
Also, how are you planning to associate event occurrences with CRM records? Are these primarily contact-based events, or do you need to support deals, companies, and custom objects too?
Thanks Uttam. They’re daily snapshot events, one occurrence per record per day. Mainly deals, then contacts, companies and tickets (custom objects later), one event per object type, linked by objectId. I’ve seen both Pro and Enterprise mentioned for creating definitions, so I’ll test on a Pro portal and post the result here.
One thing I’d pay attention to is how quickly the monthly event occurrence limit gets used.
For example, 50k deals with one snapshot per day comes to roughly 1.5M occurrences/month, before adding contacts, companies and tickets. Pro accounts have a 10M monthly limit, while Enterprise has 30M, shared across custom events in the portal.
I’d use a consistent UUID based on the event type, record ID and snapshot date. HubSpot deduplicates UUIDs within an event type over a one-year period, which is useful for handling retries.
Daily snapshots per object type is a clean way to do it. For your Pro test, I’d check which scopes the token actually got at install before the first definition call. I think optional scopes can come back ungranted depending on the portal, so the feature should switch on from that check, not from a failed request.
Did your Pro portal let you create the definition, or did it throw PORTAL_UNAUTHORIZED?