HubSpot: Batch insert events
HubSpot timeline.batch: arguments, response, policy and SDK examples.
← Timeline operations · Get started
Operation hubspot.timeline_batch
Provider route: POST /integrators/timeline/2026-09/events/batch. 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["timeline"]["batch"]>[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.timeline.batch(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.timeline.batch(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
body | Model | Required within parent | Expand Batch insert events — request body — body |
Referenced models: Batch insert events — request body — body
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 Batch insert events — response body |
Referenced models: Batch insert events — response body
Schemas
Section titled “Schemas”Batch insert events — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
inputs | array | Required within parent | An array of AppEventOccurrence objects, each representing an individual app event occurrence to be included in the batch. This property is required. |
inputs[] | Model | Each item | Expand Send event data (single) — request body — body |
Referenced models: Send event data (single) — request body — body
Batch insert events — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
completedAt | string | Required within parent | The date and time when the batch operation was completed, in ISO 8601 format. Format: date-time |
errors | array | Optional | An array of StandardError objects detailing any errors that occurred during the batch operation. |
errors[] | Model | Each item | Expand Batch insert events — response body — errors item |
links | object | Optional | A map of link names to associated URIs that provide additional information about the batch operation. Additional keys: see wildcard field |
links.* | string | Additional keys | |
numErrors | JSON | Optional | |
numErrors (anyOf 1) | integer | Alternative | The number of errors encountered during the batch operation. Format: int32 |
numErrors (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
requestedAt | string | Optional | The date and time when the batch operation was requested, in ISO 8601 format. Format: date-time |
results | array | Required within parent | An array of AppEventOccurrence objects representing the results of the batch operation. |
results[] | Model | Each item | Expand Send event data (single) — response body |
startedAt | string | Required within parent | The date and time when the batch operation started, in ISO 8601 format. Format: date-time |
status | string | Required within parent | The current status of the batch operation. Valid values include 'PENDING', 'PROCESSING', 'CANCELED', and 'COMPLETE'. Known values: CANCELED, COMPLETE, PENDING, PROCESSING |
Referenced models: Send event data (single) — response body, Batch insert events — response body — errors item
Send event data (single) — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
domain | string | Optional | The domain associated with the event occurrence, represented as a string. |
email | string | Optional | The email address associated with the event occurrence, represented as a string. |
eventTypeName | string | Required within parent | The name of the event type, represented as a string. |
extraData | object | Optional | An object containing additional data related to the event occurrence. |
id | string | Required within parent | The unique identifier for this event occurrence, represented as a string. |
objectId | string | Optional | The unique identifier of the object related to the event, represented as a string. |
objectTypeFullyQualifiedName | string | Optional | The fully qualified name of the object type associated with the event, represented as a string. |
properties | object | Required within parent | A map of custom property names to their values, represented as an object with string values. Additional keys: see wildcard field |
properties.* | string | Additional keys | |
timelineIFrame | Model | Optional | Expand Send event data (single) — request body — body timeline I Frame |
timestamp | string | Optional | The date and time when the event occurred, represented in ISO 8601 format. Format: date-time |
utk | string | Optional | The user token key (utk) associated with the event, represented as a string. |
Referenced models: Send event data (single) — request body — body timeline I Frame
Send event data (single) — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
domain | string | Optional | The domain associated with the event occurrence, represented as a string. |
email | string | Optional | The email address associated with the event occurrence, represented as a string. |
eventTypeName | string | Required within parent | The name of the event type, represented as a string. |
extraData | object | Optional | An object containing additional data related to the event occurrence. |
id | string | Required within parent | The unique identifier for this event occurrence, represented as a string. |
objectId | string | Optional | The unique identifier of the object related to the event, represented as a string. |
objectTypeFullyQualifiedName | string | Optional | The fully qualified name of the object type associated with the event, represented as a string. |
properties | object | Required within parent | A map of custom property names to their values, represented as an object with string values. Additional keys: see wildcard field |
properties.* | string | Additional keys | |
timelineIFrame | Model | Optional | Expand Send event data (single) — response body — timeline I Frame |
timestamp | string | Optional | The date and time when the event occurred, represented in ISO 8601 format. Format: date-time |
utk | string | Optional | The user token key (utk) associated with the event, represented as a string. |
Referenced models: Send event data (single) — response body — timeline I Frame
Batch insert events — response body — errors item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Ye olde error |
category | string | Required within parent | The category of the error. |
context | object | Required within parent | The context of the error, potentially including occurrence information. Additional keys: see wildcard field |
context.* | array | Additional keys | |
context.*[] | string | Each item | |
errors | array | Required within parent | An array of ErrorDetail objects providing further information about the error. |
errors[] | Model | Each item | Expand Batch insert events — response body — errors item errors item |
id | string | Optional | The error ID, if any. |
links | object | Required within parent | Links to any helpful documentation. Additional keys: see wildcard field |
links.* | string | Additional keys | |
message | string | Required within parent | The error message, if any. |
status | string | Required within parent | The resulting status of the batch operation. |
subCategory | object | Optional | Sub category of the error, if any. |
Referenced models: Batch insert events — response body — errors item errors item
Send event data (single) — request body — body timeline I Frame
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
headerLabel | string | Required within parent | The label of the modal window that displays the iframe contents. |
height | integer | Required within parent | The height of the modal window in pixels. Format: int32 |
linkLabel | string | Required within parent | The text displaying the link that will display the iframe. |
url | string | Required within parent | The URI of the iframe contents. |
width | integer | Required within parent | The width of the modal window in pixels. Format: int32 |
Send event data (single) — response body — timeline I Frame
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
headerLabel | string | Required within parent | The label of the modal window that displays the iframe contents. |
height | JSON | Required within parent | |
height (anyOf 1) | integer | Alternative | The height of the modal window in pixels. Format: int32 |
height (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
linkLabel | string | Required within parent | The text displaying the link that will display the iframe. |
url | string | Required within parent | The URI of the iframe contents. |
width | JSON | Required within parent | |
width (anyOf 1) | integer | Alternative | The width of the modal window in pixels. Format: int32 |
width (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Batch insert events — response body — errors item errors item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents detailed information about an error that occurred in the API. This component is used to provide additional context and specifics about errors, typically as part of an error response. |
code | string | Optional | The status code associated with the error detail |
context | object | Optional | Context about the error condition Additional keys: see wildcard field |
context.* | array | Additional keys | |
context.*[] | string | Each item | |
in | string | Optional | The name of the field or parameter in which the error was found. |
message | string | Required within parent | A human readable message describing the error along with remediation steps where appropriate |
subCategory | string | Optional | A specific category that contains more specific detail about the error |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: hubspot.timeline_batch. Catalog operation: timeline_batch. 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: ["crm.objects.companies.highly_sensitive.write.v2", "crm.objects.companies.sensitive.write.v2", "crm.objects.companies.write", "crm.objects.contacts.highly_sensitive.write.v2", "crm.objects.contacts.sensitive.write.v2", "crm.objects.contacts.write", "crm.objects.deals.highly_sensitive.write.v2", "crm.objects.deals.sensitive.write.v2", "crm.objects.deals.write", "crm.objects.tickets.highly_sensitive.write", "crm.objects.tickets.sensitive.write", "crm.schemas.companies.write", "crm.schemas.contacts.write", "crm.schemas.deals.write", "tickets.highly_sensitive.v2", "tickets.sensitive.v2"]