HubSpot: Retrieve events
HubSpot events.getEvents: arguments, response, policy and SDK examples.
← Events operations · Get started
Operation hubspot.events_get_events
Provider route: GET /events/event-occurrences/2026-09. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/hubspot with npm, or alter-sdk-hubspot with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { HubSpotIntegration } from "@alter-ai/hubspot";
async function execute(input: Parameters<HubSpotIntegration["events"]["getEvents"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new HubSpotIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.events.getEvents(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_hubspot import HubSpotIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = HubSpotIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.events.get_events(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
query | object | Optional | Additional keys: not allowed |
query.after | string | Optional | |
query.before | string | Optional | |
query.eventType | string | Optional | |
query.id | array | Optional | |
query.id[] | string | Each item | |
query.limit | integer | Optional | Format: int32 |
query.objectId | integer | Optional | Format: int64 |
query.objectProperty.{propname} | object | Optional | |
query.objectType | string | Optional | |
query.occurredAfter | string | Optional | Format: date-time |
query.occurredBefore | string | Optional | Format: date-time |
query.properties | array | Optional | |
query.properties[] | string | Each item | |
query.property.{propname} | object | Optional | |
query.sort | array | Optional | |
query.sort[] | string | Each item |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Retrieve events — response body |
Referenced models: Retrieve events — response body
Schemas
Section titled “Schemas”Retrieve events — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
paging | Model | Optional | Expand Retrieve events — response body — paging |
results | array | Required within parent | An array of ExternalUnifiedEvent objects, each representing an individual event with its associated details. |
results[] | Model | Each item | Expand Retrieve events — response body — results item |
Referenced models: Retrieve events — response body — paging, Retrieve events — response body — results item
Retrieve events — response body — paging
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the pagination information for navigating through a list of results in the API. It provides details on how to access the previous or next set of results. |
next | Model | Optional | Expand Retrieve events — response body — paging next |
prev | Model | Optional | Expand Retrieve events — response body — paging prev |
Referenced models: Retrieve events — response body — paging next, Retrieve events — response body — paging prev
Retrieve events — response body — results item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
eventType | string | Required within parent | The format of the `eventType` string is `ae{appId}_{eventTypeLabel}`, `pe{portalId}_{eventTypeLabel}`, or just `e_{eventTypeLabel}` for HubSpot events. |
id | string | Required within parent | A unique identifier for the event. |
objectId | string | Required within parent | The objectId of the object which did the event. |
objectType | string | Required within parent | The objectType for the object which did the event. |
occurredAt | string | Required within parent | An ISO 8601 timestamp when the event occurred. Format: date-time |
properties | object | Required within parent | A key-value map of event-specific properties. The available properties depend on the event type definition. Additional keys: see wildcard field |
properties.* | string | Additional keys |
Retrieve events — response body — paging next
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Specifies the paging information needed to retrieve the next set of results in a paginated API response |
after | string | Required within parent | The cursor token to pass as the after query parameter to retrieve the next page of results. |
link | string | Optional | The full URL of the next page of results, with the after cursor token included as a query parameter. |
Retrieve events — response body — paging prev
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | specifies the paging information needed to retrieve the previous set of results in a paginated API response |
before | string | Required within parent | The cursor token to pass as the before query parameter to retrieve the previous page of results. |
link | string | Optional | The full URL of the previous page of results, with the before cursor token included as a query parameter. |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: hubspot.events_get_events. Catalog operation: events_get_events. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Required provider scopes: ["business-intelligence"]