HubSpot: Create sequence
HubSpot sequences.createSequence: arguments, response, policy and SDK examples.
← Sequences operations · Get started
Operation hubspot.sequences_create_sequence
Provider route: POST /automation/sequences/2026-09/serviceaccounts/sequences. 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["sequences"]["createSequence"]>[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.sequences.createSequence(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.sequences.create_sequence(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 Create sequence — request body — body |
Referenced models: Create sequence — 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 Create sequence — response body |
Referenced models: Create sequence — response body
Schemas
Section titled “Schemas”11 more schemas are linked from the tables above, on the schema pages.
Create sequence — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
sequence | Model | Required within parent | Expand Update sequence — response body |
userView | Model | Optional | Expand Create sequence — response body — user View |
Referenced models: Create sequence — response body — user View, Update sequence — response body
Create sequence — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
dependencies | array | Required within parent | An array of dependencies between sequence steps, each defined by the PublicSequenceStepDependencyRequest schema. |
dependencies[] | Model | Each item | Expand Create sequence — request body — body dependencies item |
dynamic | boolean | Required within parent | A boolean indicating whether the sequence is dynamic. |
engagementTriggers | Model | Optional | Expand Create sequence — request body — body engagement Triggers |
folderId | string | Optional | The identifier of the folder where the sequence is stored. It is a string. |
name | string | Required within parent | The name of the sequence. It is a string. |
settings | Model | Required within parent | Expand Create sequence — request body — body settings |
steps | array | Required within parent | An array of steps in the sequence, each defined by the PublicSequenceStepRequest schema. |
steps[] | Model | Each item | Expand Create sequence — request body — body steps item |
Referenced models: Create sequence — request body — body engagement Triggers, Create sequence — request body — body settings, Create sequence — request body — body dependencies item, Create sequence — request body — body steps item
Create sequence — response body — user View
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
email | string | Optional | The email address of the user. It is a string. |
firstName | string | Optional | The first name of the user. It is a string. |
lastName | string | Optional | The last name of the user. It is a string. |
Update sequence — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
createdAt | string | Required within parent | The date and time when the sequence was created, in ISO 8601 format. Format: date-time |
dependencies | array | Required within parent | An array of dependencies between steps in the sequence, each represented by a PublicSequenceStepDependencyResponse object. |
dependencies[] | Model | Each item | Expand Update sequence — response body — dependencies item |
folderId | string | Optional | The identifier for the folder containing the sequence. |
id | string | Required within parent | The unique identifier for the sequence. |
name | string | Required within parent | The name of the sequence. |
settings | Model | Optional | Expand Update sequence — response body — settings |
steps | array | Required within parent | An array of steps included in the sequence, each represented by a PublicSequenceStepResponseV2 object. |
steps[] | Model | Each item | Expand Update sequence — response body — steps item |
updatedAt | string | Required within parent | The date and time when the sequence was last updated, in ISO 8601 format. Format: date-time |
userId | string | Required within parent | The unique identifier of the user who owns the sequence. |
Referenced models: Update sequence — response body — settings, Update sequence — response body — dependencies item, Update sequence — response body — steps item
Create sequence — request body — body engagement Triggers
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
numberOfClicks | integer | Optional | An integer representing the number of times links within an email must be clicked to trigger an engagement action. Format: int32 |
numberOfOpens | integer | Optional | An integer representing the number of times an email must be opened to trigger an engagement action. Format: int32 |
Create sequence — request body — body settings
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
eligibleFollowUpDays | string | Required within parent | Specifies the days on which follow-ups are eligible to be sent. Valid values include 'EVERYDAY', 'BUSINESS_DAYS', and 'WEEKDAYS_ONLY'. One of: BUSINESS_DAYS, EVERYDAY, WEEKDAYS_ONLY |
individualTaskRemindersEnabled | boolean | Required within parent | A boolean indicating whether individual task reminders are enabled. |
sellingStrategy | string | Required within parent | Defines the selling strategy to be used. Valid values include 'LEAD_BASED' and 'ACCOUNT_BASED'. One of: ACCOUNT_BASED, LEAD_BASED |
sendWindowEndMinute | integer | Required within parent | An integer representing the end minute of the window during which emails can be sent. Format: int32 |
sendWindowStartMinute | integer | Required within parent | An integer representing the start minute of the window during which emails can be sent. Format: int32 |
taskCreationMinute | integer | Required within parent | An integer indicating the minute at which tasks should be created. Format: int32 |
taskReminderMinute | integer | Required within parent | An integer indicating the minute at which task reminders should be sent. Format: int32 |
unenrollmentSettings | Model | Required within parent | Expand Create sequence — request body — body settings unenrollment Settings |
useThreadedFollowUps | boolean | Required within parent | A boolean indicating whether follow-ups should be threaded. |
Referenced models: Create sequence — request body — body settings unenrollment Settings
Create sequence — request body — body dependencies item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
branchNumber | integer | Required within parent | An integer indicating the branch number associated with the dependency. Format: int32 |
dependencyType | string | Required within parent | A string indicating the type of dependency. Valid values include 'TASK_COMPLETION' and 'MANUAL_PAUSE'. One of: ADAPTIVE_COMPLETION, MANUAL_PAUSE, TASK_COMPLETION |
reliesOnStepOrder | integer | Required within parent | An integer representing the order of the step that is relied upon by another step. Format: int32 |
requiredByStepOrder | integer | Required within parent | An integer representing the order of the step that requires the dependency. Format: int32 |
Create sequence — request body — body steps item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
actionType | string | Required within parent | A string indicating the type of action to be performed in this step. Valid values include 'EMAIL', 'TASK', and 'FINISH_ENROLLMENT'. One of: ADAPTIVE_CONTAINER, EMAIL, FINISH_ENROLLMENT, TASK |
branchNumber | integer | Required within parent | An integer representing the branch number of this step, used for branching logic in sequences. Format: int32 |
delayMillis | integer | Required within parent | An integer representing the delay in milliseconds before this step is executed. Format: int64 |
delayMillisMax | integer | Optional | An integer specifying the maximum delay in milliseconds for this step. Format: int64 |
delayMillisMin | integer | Optional | An integer specifying the minimum delay in milliseconds for this step. Format: int64 |
dynamic | boolean | Required within parent | A boolean indicating whether the step is dynamic, allowing for conditional execution based on certain criteria. |
emailPattern | Model | Optional | Expand Create sequence — request body — body steps item email Pattern |
stepOrder | integer | Required within parent | An integer indicating the order of the step within the sequence. Format: int32 |
taskPattern | Model | Optional | Expand Create sequence — request body — body steps item task Pattern |
variants | array | Required within parent | An array of PublicSequenceStepVariantRequest objects, each representing a variant of this step. |
variants[] | Model | Each item | Expand Create sequence — request body — body steps item variants item |
Referenced models: Create sequence — request body — body steps item email Pattern, Create sequence — request body — body steps item variants item, Create sequence — request body — body steps item task Pattern
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: hubspot.sequences_create_sequence. Catalog operation: sequences_create_sequence. 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: ["automation.sequences.create", "automation.sequences.edit", "automation.sequences.read"]