HubSpot: Send a single send transactional email asynchronously
HubSpot transactionalEmail.createTransactionalEmail: arguments, response, policy and SDK examples.
← Transactional email operations · Get started
Operation hubspot.transactional_email_create_transactional_email
Provider route: POST /marketing/transactional/2026-09/single-email/send. 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["transactionalEmail"]["createTransactionalEmail"]>[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.transactionalEmail.createTransactionalEmail(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.transactional_email.create_transactional_email(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 Send a single send transactional email asynchronously — request body — body |
Referenced models: Send a single send transactional email asynchronously — 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 Send an email — response body |
Referenced models: Send an email — response body
Schemas
Section titled “Schemas”Send an email — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
completedAt | string | Optional | Time when the send was completed. Format: date-time |
eventId | Model | Optional | Expand Send an email — response body — event Id |
message | string | Optional | A human readable message describing the error along with remediation steps where appropriate |
requestedAt | string | Optional | Time when the send was requested. Format: date-time |
sendResult | string | Optional | Result of the send. Known values: ADDRESS_LIST_BOMBED, ADDRESS_ONLY_ACCEPTED_ON_PROD, ADDRESS_OPTED_OUT, ATTACHMENT_DOWNLOAD_QUEUE_FULL, BLOCKED_ADDRESS, BLOCKED_DOMAIN, BRAND_RECIPIENT_FATIGUE_SUPPRESSED, CAMPAIGN_CANCELLED, CANCELLED_ABUSE, CONTACT_VIEW_PERMISSION, CORRUPT_INPUT, EMAIL_DISABLED, EMAIL_UNCONFIRMED, GDPR_DOI_ENABLED, GRAYMAIL_SUPPRESSED, HUBL_LIMIT_EXCEEDED, IDEMPOTENT_FAIL, IDEMPOTENT_IGNORE, INVALID_APP_ID_ATTRIBUTION, INVALID_FROM_ADDRESS, INVALID_TO_ADDRESS, LOW_CONTACT_QUALITY_SCORE, MARKETING_ACTIVATION_DISALLOWED, MISSING_CONTENT, MISSING_REQUIRED_PARAMETER, MISSING_TEMPLATE_PROPERTIES, MTA_IGNORE, NON_MARKETABLE_CONTACT, PORTAL_AUTHENTICATION_FAILURE, PORTAL_EXPIRED, PORTAL_MISSING_MARKETING_SCOPE, PORTAL_NOT_AUTHORIZED_FOR_APPLICATION, PORTAL_OVER_LIMIT, PORTAL_SUSPENDED, PREVIOUS_SPAM, PREVIOUSLY_BOUNCED, PREVIOUSLY_UNSUBSCRIBED_BRAND, PREVIOUSLY_UNSUBSCRIBED_BUSINESS_UNIT, PREVIOUSLY_UNSUBSCRIBED_MESSAGE, PREVIOUSLY_UNSUBSCRIBED_PORTAL, QUARANTINED_ADDRESS, QUEUED, RECIPIENT_FATIGUE_SUPPRESSED, SENT, TEMPLATE_RENDER_EXCEPTION, THROTTLED, TOO_MANY_RECIPIENTS, UBB_GOVERNANCE_MISSING, UNCONFIGURED_SENDING_DOMAIN, UNDELIVERABLE, VALIDATION_FAILED |
startedAt | string | Optional | Time when the send began processing. Format: date-time |
status | string | Required within parent | Status of the send request. Known values: CANCELED, COMPLETE, PENDING, PROCESSING |
statusId | string | Required within parent | Identifier used to query the status of the send. |
Referenced models: Send an email — response body — event Id
Send a single send transactional email asynchronously — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
contactProperties | object | Required within parent | The contactProperties field is a map of contact property values. Each contact property value contains a name and value property. Each property will get set on the contact record and will be visible in the template under {{ contact.NAME }}. Use these properties when you want to set a contact property while you’re sending the email. For example, when sending a reciept you may want to set a last_paid_date property, as the sending of the receipt will have information about the last payment. Additional keys: see wildcard field |
contactProperties.* | string | Additional keys | |
customProperties | object | Required within parent | The customProperties field is a map of property values. Each property value contains a name and value property. Each property will be visible in the template under {{ custom.NAME }}. Note: Custom properties do not currently support arrays. To provide a listing in an email, one workaround is to build an HTML list (either with tables or ul) and specify it as a custom property. Additional keys: see wildcard field |
customProperties.* | object | Additional keys | |
emailId | integer | Required within parent | The content ID for the transactional email, which can be found in email tool UI. Format: int64 |
message | Model | Required within parent | Expand Send an email — request body — body message |
Referenced models: Send an email — request body — body message
Send an email — response body — event Id
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
created | string | Required within parent | Time of event creation. Format: date-time |
id | string | Required within parent | Identifier of event. Format: uuid |
Send an email — request body — body message
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
bcc | array | Required within parent | List of email addresses to send as Bcc. |
bcc[] | string | Each item | |
cc | array | Required within parent | List of email addresses to send as Cc. |
cc[] | string | Each item | |
from | string | Optional | The From header for the email. |
replyTo | array | Required within parent | List of Reply-To header values for the email. |
replyTo[] | string | Each item | |
sendId | string | Optional | ID for a particular send. No more than one email will be sent per sendId. |
to | string | Optional | The recipient of the email. |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: hubspot.transactional_email_create_transactional_email. Catalog operation: transactional_email_create_transactional_email. 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: ["transactional-email"]