HubSpot: Record Participants by Email with Marketing Event Object Id
HubSpot marketingEvents.attendanceEmailCreate: arguments, response, policy and SDK examples.
← Marketing events operations · Get started
Operation hubspot.marketing_events_attendance_email_create
Provider route: POST /marketing/marketing-events/2026-09/{objectId}/attendance/{subscriberState}/email-create. 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["marketingEvents"]["attendanceEmailCreate"]>[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.marketingEvents.attendanceEmailCreate(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.marketing_events.attendance_email_create(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.objectId | string | Required within parent | |
path.subscriberState | string | Required within parent | |
body | Model | Required within parent | Expand Record a subscriber state by contact email — request body — body |
Referenced models: Record a subscriber state by contact email — 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 Record Participants by Email with Marketing Event Object Id — response body |
Referenced models: Record Participants by Email with Marketing Event Object Id — response body
Schemas
Section titled “Schemas”Record a subscriber state by contact email — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
inputs | array | Required within parent | List of marketing event details to create or update |
inputs[] | Model | Each item | Expand Record a subscriber state by contact email — request body — body inputs item |
Referenced models: Record a subscriber state by contact email — request body — body inputs item
Record Participants by Email with Marketing Event Object Id — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
completedAt | string | Required within parent | Timestamp that represents when the request finished processing Format: date-time |
errors | array | Optional | An array of errors encountered during the batch operation, each providing details about the error. |
errors[] | Model | Each item | Expand Create or Update Multiple Marketing Events — response body — errors item |
links | object | Optional | Result of the request Additional keys: see wildcard field |
links.* | string | Additional keys | |
numErrors | JSON | Optional | |
numErrors (anyOf 1) | integer | Alternative | The number of errors that occurred during the processing Format: int32 |
numErrors (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
requestedAt | string | Optional | Timestamp that represents when the request was made Format: date-time |
results | array | Required within parent | An array of results from the batch operation, each containing details about a subscriber email response. |
results[] | Model | Each item | Expand Record Participants by Email with Marketing Event Object Id — response body — results item |
startedAt | string | Required within parent | Timestamp that represents when the request started processing Format: date-time |
status | string | Required within parent | The status of the request processing Known values: CANCELED, COMPLETE, PENDING, PROCESSING |
Referenced models: Create or Update Multiple Marketing Events — response body — errors item, Record Participants by Email with Marketing Event Object Id — response body — results item
Record a subscriber state by contact email — request body — body inputs item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
contactProperties | object | Required within parent | The key-value set that contains properties of the contact. Additional keys: see wildcard field |
contactProperties.* | string | Additional keys | |
email | string | Required within parent | The email address of the contact in HubSpot to associate with the event. |
interactionDateTime | integer | Required within parent | Timestamp in milliseconds at which the contact subscribed to the event. Format: int64 |
properties | object | Required within parent | The key-value set that contains properties of the marketing event. Additional keys: see wildcard field |
properties.* | string | Additional keys |
Create or Update Multiple Marketing 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 object that contains details of the errors 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 ID of the request |
links | object | Required within parent | Results of the request Additional keys: see wildcard field |
links.* | string | Additional keys | |
message | string | Required within parent | A human readable message describing the error along with remediation steps where appropriate |
status | string | Required within parent | Status of the response |
subCategory | object | Optional | The Sub-category of the error |
Referenced models: Batch insert events — response body — errors item errors item
Record Participants by Email with Marketing Event Object Id — response body — results item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
email | string | Required within parent | The email of the contact |
vid | JSON | Required within parent | |
vid (anyOf 1) | integer | Alternative | The internal ID of the contact Format: int64 |
vid (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.marketing_events_attendance_email_create. Catalog operation: marketing_events_attendance_email_create. 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.marketing_events.write"]