Skip to content

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.

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 os
from alter_sdk import App
from 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()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
bodyModelRequired within parentExpand Batch insert events — request body — body

Referenced models: Batch insert events — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Batch insert events — response body

Referenced models: Batch insert events — response body

Batch insert events — request body — body
FieldTypePresenceDescription and constraints
$objectRoot
inputsarrayRequired within parentAn array of AppEventOccurrence objects, each representing an individual app event occurrence to be included in the batch. This property is required.
inputs[]ModelEach itemExpand Send event data (single) — request body — body

Referenced models: Send event data (single) — request body — body

Batch insert events — response body
FieldTypePresenceDescription and constraints
$objectRoot
completedAtstringRequired within parentThe date and time when the batch operation was completed, in ISO 8601 format.
Format: date-time
errorsarrayOptionalAn array of StandardError objects detailing any errors that occurred during the batch operation.
errors[]ModelEach itemExpand Batch insert events — response body — errors item
linksobjectOptionalA map of link names to associated URIs that provide additional information about the batch operation.
Additional keys: see wildcard field
links.*stringAdditional keys
numErrorsJSONOptional
numErrors (anyOf 1)integerAlternativeThe number of errors encountered during the batch operation.
Format: int32
numErrors (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
requestedAtstringOptionalThe date and time when the batch operation was requested, in ISO 8601 format.
Format: date-time
resultsarrayRequired within parentAn array of AppEventOccurrence objects representing the results of the batch operation.
results[]ModelEach itemExpand Send event data (single) — response body
startedAtstringRequired within parentThe date and time when the batch operation started, in ISO 8601 format.
Format: date-time
statusstringRequired within parentThe 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
FieldTypePresenceDescription and constraints
$objectRoot
domainstringOptionalThe domain associated with the event occurrence, represented as a string.
emailstringOptionalThe email address associated with the event occurrence, represented as a string.
eventTypeNamestringRequired within parentThe name of the event type, represented as a string.
extraDataobjectOptionalAn object containing additional data related to the event occurrence.
idstringRequired within parentThe unique identifier for this event occurrence, represented as a string.
objectIdstringOptionalThe unique identifier of the object related to the event, represented as a string.
objectTypeFullyQualifiedNamestringOptionalThe fully qualified name of the object type associated with the event, represented as a string.
propertiesobjectRequired within parentA map of custom property names to their values, represented as an object with string values.
Additional keys: see wildcard field
properties.*stringAdditional keys
timelineIFrameModelOptionalExpand Send event data (single) — request body — body timeline I Frame
timestampstringOptionalThe date and time when the event occurred, represented in ISO 8601 format.
Format: date-time
utkstringOptionalThe 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
FieldTypePresenceDescription and constraints
$objectRoot
domainstringOptionalThe domain associated with the event occurrence, represented as a string.
emailstringOptionalThe email address associated with the event occurrence, represented as a string.
eventTypeNamestringRequired within parentThe name of the event type, represented as a string.
extraDataobjectOptionalAn object containing additional data related to the event occurrence.
idstringRequired within parentThe unique identifier for this event occurrence, represented as a string.
objectIdstringOptionalThe unique identifier of the object related to the event, represented as a string.
objectTypeFullyQualifiedNamestringOptionalThe fully qualified name of the object type associated with the event, represented as a string.
propertiesobjectRequired within parentA map of custom property names to their values, represented as an object with string values.
Additional keys: see wildcard field
properties.*stringAdditional keys
timelineIFrameModelOptionalExpand Send event data (single) — response body — timeline I Frame
timestampstringOptionalThe date and time when the event occurred, represented in ISO 8601 format.
Format: date-time
utkstringOptionalThe 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
FieldTypePresenceDescription and constraints
$objectRootYe olde error
categorystringRequired within parentThe category of the error.
contextobjectRequired within parentThe context of the error, potentially including occurrence information.
Additional keys: see wildcard field
context.*arrayAdditional keys
context.*[]stringEach item
errorsarrayRequired within parentAn array of ErrorDetail objects providing further information about the error.
errors[]ModelEach itemExpand Batch insert events — response body — errors item errors item
idstringOptionalThe error ID, if any.
linksobjectRequired within parentLinks to any helpful documentation.
Additional keys: see wildcard field
links.*stringAdditional keys
messagestringRequired within parentThe error message, if any.
statusstringRequired within parentThe resulting status of the batch operation.
subCategoryobjectOptionalSub 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
FieldTypePresenceDescription and constraints
$objectRoot
headerLabelstringRequired within parentThe label of the modal window that displays the iframe contents.
heightintegerRequired within parentThe height of the modal window in pixels.
Format: int32
linkLabelstringRequired within parentThe text displaying the link that will display the iframe.
urlstringRequired within parentThe URI of the iframe contents.
widthintegerRequired within parentThe width of the modal window in pixels.
Format: int32
Send event data (single) — response body — timeline I Frame
FieldTypePresenceDescription and constraints
$objectRoot
headerLabelstringRequired within parentThe label of the modal window that displays the iframe contents.
heightJSONRequired within parent
height (anyOf 1)integerAlternativeThe height of the modal window in pixels.
Format: int32
height (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
linkLabelstringRequired within parentThe text displaying the link that will display the iframe.
urlstringRequired within parentThe URI of the iframe contents.
widthJSONRequired within parent
width (anyOf 1)integerAlternativeThe width of the modal window in pixels.
Format: int32
width (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
Batch insert events — response body — errors item errors item
FieldTypePresenceDescription and constraints
$objectRootRepresents 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.
codestringOptionalThe status code associated with the error detail
contextobjectOptionalContext about the error condition
Additional keys: see wildcard field
context.*arrayAdditional keys
context.*[]stringEach item
instringOptionalThe name of the field or parameter in which the error was found.
messagestringRequired within parentA human readable message describing the error along with remediation steps where appropriate
subCategorystringOptionalA specific category that contains more specific detail about the error

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"]

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.