Hubspotmarketingconnector v1.0

Version 1.0

Connector Overview: This page documents all 73 actions for the Hubspotmarketingconnector v1.0.

Asset (3)

PUT Add asset association

/marketing/v3/campaigns/{campaignGuid}/assets/{assetType}/{assetId}

Associate a specified asset with a campaign.
Important: Currently, only the following asset types can be associated and disassociated via the API: Forms, Static lists, External website pages

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Campaignguid

(Required) Unique identifier for the campaign, formatted as a UUID

Assettype

(Required) The type of asset
Important: Currently, only the following asset types are available for association via the API: FORM, OBJECT_LIST, EXTERNAL_WEB_URL

Assetid

(Required) Id of the asset

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

GET List assets

/marketing/v3/campaigns/{campaignGuid}/assets/{assetType}

This endpoint lists all assets of the campaign by asset type. The assetType parameter is required, and each request can only fetch assets of a single type.
Asset metrics can also be fetched along with the assets; they are available only if start and end dates are provided.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

After

A cursor for pagination. If provided, the results will start after the given cursor.
Example: NTI1Cg%3D%3D

Limit

The maximum number of results to return.
Default: 10

Startdate

Start date to fetch asset metrics, formatted as YYYY-MM-DD. This date is used to fetch the metrics associated with the assets for a specified period.
If not provided, no asset metrics will be fetched.

Enddate

End date to fetch asset metrics, formatted as YYYY-MM-DD. This date is used to fetch the metrics associated with the assets for a specified period.
If not provided, no asset metrics will be fetched.

Campaignguid

(Required) Unique identifier for the campaign, formatted as a UUID.

Assettype

(Required) The type of asset to fetch.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

DELETE Remove asset association

/marketing/v3/campaigns/{campaignGuid}/assets/{assetType}/{assetId}

Disassociate a specified asset from a campaign.
Important: Currently, only the following asset types can be associated and disassociated via the API: Forms, Static lists, External website pages

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Campaignguid

(Required) Unique identifier for the campaign, formatted as a UUID.

Assettype

(Required) The type of asset
Important: Currently, only the following asset types are available for disassociation via the API: FORM, OBJECT_LIST, EXTERNAL_WEB_URL

Assetid

(Required) Id of the asset

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Attendance Subscriber State Changes (2)

POST Record a subscriber state by contact email

/marketing/v3/marketing-events/attendance/{externalEventId}/{subscriberState}/email-create

Record a subscription state between multiple HubSpot contacts and a marketing event, using contact email addresses. If contact is not present it will be automatically created.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Externalaccountid

The account id associated with the marketing event

Externaleventid

(Required) The id of the marketing event

Subscriberstate

(Required) The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'.

Content-type

Specifies the media type of the request body.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

POST Record a subscriber state by contact ids

/marketing/v3/marketing-events/attendance/{externalEventId}/{subscriberState}/create

Record a subscription state between multiple HubSpot contacts and a marketing event, using HubSpot contact ids.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Externalaccountid

The account id associated with the marketing event

Externaleventid

(Required) The id of the marketing event

Subscriberstate

(Required) The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'.

Content-type

Specifies the media type of the request body.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Basic (10)

POST Create a campaign

/marketing/v3/campaigns

Create a campaign with the given properties and return the campaign object, including the campaignGuid and created properties.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

POST Create a marketing event

/marketing/v3/marketing-events/events

Creates a new marketing event in HubSpot

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Options (10)

Option Name

Description

Eventname

The name of the marketing event.

Eventorganizer

The organizer of the marketing event.

Externalaccountid

An external account identifier for the event.

Externaleventid

An external event identifier for the event.

Startdatetime

The start date and time of the event.

Eventcancelled

Indicates whether the event is cancelled.

Eventurl

The URL for the event.

Eventdescription

A description of the event.

Eventtype

The type of the event.

Enddatetime

The end date and time of the event.

PUT Create or update a marketing event

/marketing/v3/marketing-events/events/{externalEventId}

Upsets a Marketing Event. If there is an existing Marketing event with the specified id, it will be updated; otherwise a new event will be created.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Externaleventid

(Required) The id of the marketing event to upsert

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Options (10)

Option Name

Description

Eventname

The name of the marketing event.

Eventorganizer

The organizer of the marketing event.

Externalaccountid

An external account identifier for the event.

Externaleventid

An external event identifier for the event.

Startdatetime

The start date and time of the event.

Eventcancelled

Indicates whether the event is cancelled.

Eventurl

The URL for the event.

Eventdescription

A description of the event.

Eventtype

The type of the event.

Enddatetime

The end date and time of the event.

DELETE Delete a marketing event

/marketing/v3/marketing-events/events/{externalEventId}

Deletes an existing Marketing Event with the specified id, if one exists.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Externalaccountid

(Required) The account id associated with the marketing event

Externaleventid

(Required) The id of the marketing event to delete

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

DELETE Delete campaign

/marketing/v3/campaigns/{campaignGuid}

Delete a specified campaign from the system.
This call will return a 204 No Content response regardless of whether the campaignGuid provided corresponds to an existing campaign or not.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Campaignguid

(Required) Unique identifier for the campaign, formatted as a UUID.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

GET Get a marketing event

/marketing/v3/marketing-events/events/{externalEventId}

Returns the details of the Marketing Event with the specified id, if one exists.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Externalaccountid

(Required) The account id associated with the marketing event

Externaleventid

(Required) The id of the marketing event to return

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

POST Mark a marketing event as cancelled

/marketing/v3/marketing-events/events/{externalEventId}/cancel

Mark a marketing event as cancelled.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Externalaccountid

(Required) The account id associated with the marketing event

Externaleventid

(Required) The id of the marketing event to mark as cancelled

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

GET Read a campaign

/marketing/v3/campaigns/{campaignGuid}

Get a campaign identified by a specific campaignGuid with the given properties. Along with the campaign information, it also returns information about assets. Depending on the query parameters used, this can also be used to return information about the corresponding assets' metrics. Metrics are available only if startDate and endDate are provided.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Startdate

Start date to fetch asset metrics, formatted as YYYY-MM-DD. This date is used to fetch the metrics associated with the assets for a specified period.
If not provided, no asset metrics will be fetched.

Enddate

End date to fetch asset metrics, formatted as YYYY-MM-DD. This date is used to fetch the metrics associated with the assets for a specified period.
If not provided, no asset metrics will be fetched.

Properties

A comma-separated list of the properties to be returned in the response. If any of the specified properties has empty value on the requested object, they will be ignored and not returned in response. If this parameter is empty, the response will include an empty properties map.

Campaignguid

(Required) Unique identifier for the campaign, formatted as a UUID.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

PATCH Update a marketing event

/marketing/v3/marketing-events/events/{externalEventId}

Updates an existing Marketing Event with the specified id, if one exists.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Externalaccountid

(Required) The account id associated with the marketing event

Externaleventid

(Required) The id of the marketing event to update

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Options (8)

Option Name

Description

Startdatetime

The start date and time of the event.

Eventcancelled

Indicates whether the event is cancelled.

Eventorganizer

The organizer of the marketing event.

Eventurl

The URL for the event.

Eventdescription

A description of the event.

Eventname

The name of the marketing event.

Eventtype

The type of the event.

Enddatetime

The end date and time of the event.

PATCH Update campaign

/marketing/v3/campaigns/{campaignGuid}

Perform a partial update of a campaign identified by the specified campaignGuid. Provided property values will be overwritten. Read-only and non-existent properties will cause 400 error.
If an empty string is passed for any property in the Batch Update, it will reset that property's value.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Campaignguid

(Required) Unique identifier for the campaign, formatted as a UUID.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Batch (6)

POST Create a batch of campaigns

/marketing/v3/campaigns/batch/create

This endpoint creates a batch of campaigns. The maximum number of items in a batch request is 50.
The campaigns in the response are not guaranteed to be in the same order as they were provided in the request.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

POST Create or update multiple marketing events

/marketing/v3/marketing-events/events/upsert

Upset multiple Marketing Event. If there is an existing Marketing event with the specified id, it will be updated; otherwise a new event will be created.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

POST Delete a batch of campaigns

/marketing/v3/campaigns/batch/archive

This endpoint deletes a batch of campaigns.
The maximum number of items in a batch request is 50.
The response will always be 204 No Content, regardless of whether the campaigns exist or not, whether they were successfully deleted or not, or if only some of the campaigns in the batch were deleted.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

POST Delete multiple marketing events

/marketing/v3/marketing-events/events/delete

Bulk delete a number of marketing events in HubSpot

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

POST Read a batch of campaigns

/marketing/v3/campaigns/batch/read

This endpoint reads a batch of campaigns based on the provided input data and returns the campaigns along with their associated assets.
The maximum number of items in a batch request is 50.
The campaigns in the response are not guaranteed to be in the same order as they were provided in the request.
If duplicate campaign IDs are provided in the request, duplicates will be ignored. The response will include only unique IDs and will be returned without duplicates.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Startdate

Start date to fetch asset metrics, formatted as YYYY-MM-DD. This date is used to fetch the metrics associated with the assets for a specified period. If not provided, no asset metrics will be fetched.

Enddate

End date to fetch asset metrics, formatted as YYYY-MM-DD. This date is used to fetch the metrics associated with the assets for a specified period. If not provided, no asset metrics will be fetched.

Properties

A comma-separated list of the properties to be returned in the response. If any of the specified properties has empty value on the requested object(s), they will be ignored and not returned in response. If this parameter is empty, the response will include an empty properties map.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

POST Update a batch of campaigns

/marketing/v3/campaigns/batch/update

This endpoint updates a batch of campaigns based on the provided input data.
The maximum number of items in a batch request is 50.
If an empty string ("") is passed for any property in the Batch Update, it will reset that property's value.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Budget

GET Read budget

/marketing/v3/campaigns/{campaignGuid}/budget/totals

Retrieve detailed information about the budget and spend items for a specified campaign, including the total budget, total spend, and remaining budget.
Budget and Spend items may be returned in any order, but the order field specifies their sequence based on the creation date. The item with order 0 is the oldest, and items with higher order values are newer

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Campaignguid

(Required) Unique identifier for the campaign, formatted as a UUID.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Definition

GET Get subscription definitions

/communication-preferences/v3/definitions

Get a list of all subscription definitions for the portal

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Marketing Emails API (4)

POST Clone a marketing email.

/marketing/v3/emails/clone

This will create a duplicate email with the same properties as the original, with the exception of a unique ID.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Options (2)

Option Name

Description

Id

The ID of the marketing email to clone.

Clonename

The name to assign to the cloned email.

POST Create an A/B test variation of a marketing email.

/marketing/v3/emails/ab-test/create-variation

Create a variation of a marketing email for an A/B test. The new variation will be created as a draft. If an active variation already exists, a new one won't be created.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Options (2)

Option Name

Description

Contentid

The ID of the marketing email to create an A/B test variation for.

Variationname

The name to assign to the A/B test variation.

POST Publish or send a marketing email.

/marketing/v3/emails/{emailId}/publish

If you have a Marketing Hub Enterprise account or the transactional email add-on, you can use this endpoint to publish an automated email or send/schedule a regular email.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Emailid

(Required)

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

POST Unpublish or cancel a marketing email.

/marketing/v3/emails/{emailId}/unpublish

If you have a Marketing Hub Enterprise account or the transactional email add-on, you can use this endpoint to unpublish an automated email or cancel a regular email. If the email is already in the process of being sent, canceling might not be possible.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Emailid

(Required)

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Marketing Emails (13)

POST Create a new marketing email.

/marketing/v3/emails

Use this endpoint to create a new marketing email.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Options (23)

Option Name

Description

Id

The ID of the marketing email to clone.

Name

The internal name used to identify the email in the system.

Sendonpublish

Whether the email should be sent immediately upon publication; expected values like "true" or "false".

State

The current processing state of the email, such as "draft" or "published".

Subcategory

The subcategory of the email template, e.g., "marketing" or "transactional".

Subject

The subject line that will appear in the email header.

Createdbyid

The unique identifier of the HubSpot user who created the email.

Type

The type of email, such as "regular" or "automated".

Activedomain

The domain that is currently active for sending this email.

Archived

Whether the email is archived; expected values like "true" or "false".

Folderid

The identifier of the folder in which to organize the email.

Feedbacksurveyid

The identifier of a feedback survey associated with the email, if any.

Updatedbyid

The unique identifier of the user who last updated the email.

Publishedbyid

The unique identifier of the user who published the email.

Language

The language code for the email content, e.g., "en" or "de".

Campaign

The campaign name or identifier that groups this email.

Istransactional

Whether the email is transactional (one-to-one) rather than bulk marketing.

Ispublished

Whether the email has been published and is live.

Publishdate

The date and time when the email was or should be published.

Updatedat

The timestamp of the last update to the email.

Createdat

The timestamp when the email was first created.

Deletedat

The timestamp when the email was deleted, if applicable.

Publishedat

The timestamp when the email was published.

PATCH Create or update draft version

/marketing/v3/emails/{emailId}/draft

Create or update the draft version of a marketing email. If no draft exists, the system creates a draft from the current “live” email then applies the request body to that draft. The draft version only lives on the buffer—the email is not cloned.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Emailid

The unique identifier of the email whose draft is being created or updated.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Options (23)

Option Name

Description

Id

The ID of the marketing email to clone.

Name

The internal name used to identify the email in the system.

Sendonpublish

Whether the email should be sent immediately upon publication; expected values like "true" or "false".

State

The current processing state of the email, such as "draft" or "published".

Subcategory

The subcategory of the email template, e.g., "marketing" or "transactional".

Subject

The subject line that will appear in the email header.

Createdbyid

The unique identifier of the HubSpot user who created the email.

Type

The type of email, such as "regular" or "automated".

Activedomain

The domain that is currently active for sending this email.

Archived

Whether the email is archived; expected values like "true" or "false".

Folderid

The identifier of the folder in which to organize the email.

Feedbacksurveyid

The identifier of a feedback survey associated with the email, if any.

Updatedbyid

The unique identifier of the user who last updated the email.

Publishedbyid

The unique identifier of the user who published the email.

Language

The language code for the email content, e.g., "en" or "de".

Campaign

The campaign name or identifier that groups this email.

Istransactional

Whether the email is transactional (one-to-one) rather than bulk marketing.

Ispublished

Whether the email has been published and is live.

Publishdate

The date and time when the email was or should be published.

Updatedat

The timestamp of the last update to the email.

Createdat

The timestamp when the email was first created.

Deletedat

The timestamp when the email was deleted, if applicable.

Publishedat

The timestamp when the email was published.

DELETE Delete a marketing email.

/marketing/v3/emails/{emailId}

Permanently delete a marketing email by its identifier. Use this action to remove an email from the system entirely.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Archived

Whether to return only results that have been archived.

Emailid

The unique identifier of the email to delete.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

GET Get a revision of a marketing email.

/marketing/v3/emails/{emailId}/revisions/{revisionId}

Get a specific revision of a marketing email.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Emailid

The unique identifier of the email whose revision is being fetched.

Revisionid

The unique identifier of the revision to retrieve.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

GET Get all marketing emails for a HubSpot account.

/marketing/v3/emails

The results can be filtered, allowing you to find a specific set of emails. See the table below for a full list of filtering options.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Createdat

Only return emails created at exactly the specified time.

Createdafter

Only return emails created after the specified time.

Createdbefore

Only return emails created before the specified time.

Updatedat

Only return emails last updated at exactly the specified time.

Updatedafter

Only return emails last updated after the specified time.

Updatedbefore

Only return emails last updated before the specified time.

Sort

Specifies which fields to use for sorting results. Valid fields are name, createdAt, updatedAt, createdBy, updatedBy. createdAt will be used by default.

After

The cursor token value to get the next set of results. You can get this from the paging.next.after JSON property of a paged response containing more results.

Limit

The maximum number of results to return. Default is 100.

Includestats

Include statistics with emails.

Type

Email types to be filtered by. Multiple types can be included. All emails will be returned if not present.

Ispublished

Filter by published/draft emails. All emails will be returned if not present.

Includedproperties

Specify additional properties to include in the response for each email, such as statistics or metadata.

Archived

Specifies whether to return archived emails. Defaults to false.

Marketingcampaignnames

Filter emails by the names of marketing campaigns they belong to; provide a comma-separated list.

Workflownames

Filter emails by the names of workflows they are part of; provide a comma-separated list.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

GET Get draft version of a marketing email

/marketing/v3/emails/{emailId}/draft

Get the draft version of an email (if it exists). If no draft version exists, the published email is returned.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Emailid

The unique identifier of the email whose revision is being fetched.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

GET Get revisions of a marketing email

/marketing/v3/emails/{emailId}/revisions

Get a list of all versions of a marketing email, with each entry including the full state of that particular version. The current revision has the ID -1.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

After

The cursor token value to get the next set of results. You can get this from the paging.next.after JSON property of a paged response containing more results.

Before

The cursor token value to get the previous set of results. You can get this from the paging.prev.before JSON property of a paged response containing more results.

Limit

The maximum number of results to return. Default is 100.

Emailid

The unique identifier of the email whose revision is being fetched.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

GET Get the details of a specified marketing email.

/marketing/v3/emails/{emailId}

Get the details for a marketing email.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Includestats

Include statistics with email

Includedproperties

Specify additional properties to include in the response for this email, such as statistics or metadata.

Archived

Whether to return only results that have been archived.

Marketingcampaignnames

Filter by the name of a marketing campaign the email belongs to; provide a comma-separated list.

Workflownames

Filter by the name of a workflow the email is part of; provide a comma-separated list.

Emailid

The unique identifier of the email whose revision is being fetched.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

GET Get the variation of a an A/B marketing email

/marketing/v3/emails/{emailId}/ab-test/get-variation

This endpoint lets you obtain the variation of an A/B marketing email. If the email is variation A (master) it will return variation B (variant) and vice versa.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Emailid

The unique identifier of the email whose revision is being fetched.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

POST Reset Draft

/marketing/v3/emails/{emailId}/draft/reset

Resets the draft back to a copy of the live object.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Emailid

The unique identifier of the email whose revision is being fetched.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

POST Restore a revision of a marketing email

/marketing/v3/emails/{emailId}/revisions/{revisionId}/restore

Restores a previous revision of a marketing email. The current revision becomes old, and the restored revision is given a new version number.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Emailid

The unique identifier of the email whose revision is being fetched.

Revisionid

The unique identifier of the revision to retrieve.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

POST Restore a revision of a marketing email to DRAFT state

/marketing/v3/emails/{emailId}/revisions/{revisionId}/restore-to-draft

Restores a previous revision of a marketing email to DRAFT state. If there is currently something in the draft for that object, it is overwritten.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Emailid

The unique identifier of the email whose revision is being fetched.

Revisionid

The unique identifier of the revision to retrieve.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

PATCH Update a marketing email.

/marketing/v3/emails/{emailId}

Change properties of a marketing email.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Archived

Whether to return only results that have been archived.

Emailid

The unique identifier of the email whose revision is being fetched.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Options (23)

Option Name

Description

Id

The ID of the marketing email to clone.

Name

The internal name used to identify the email in the system.

Sendonpublish

Whether the email should be sent immediately upon publication; expected values like "true" or "false".

State

The current processing state of the email, such as "draft" or "published".

Subcategory

The subcategory of the email template, e.g., "marketing" or "transactional".

Subject

The subject line that will appear in the email header.

Createdbyid

The unique identifier of the HubSpot user who created the email.

Type

The type of email, such as "regular" or "automated".

Activedomain

The domain that is currently active for sending this email.

Archived

Whether the email is archived; expected values like "true" or "false".

Folderid

The identifier of the folder in which to organize the email.

Feedbacksurveyid

The identifier of a feedback survey associated with the email, if any.

Updatedbyid

The unique identifier of the user who last updated the email.

Publishedbyid

The unique identifier of the user who published the email.

Language

The language code for the email content, e.g., "en" or "de".

Campaign

The campaign name or identifier that groups this email.

Istransactional

Whether the email is transactional (one-to-one) rather than bulk marketing.

Ispublished

Whether the email has been published and is live.

Publishdate

The date and time when the email was or should be published.

Updatedat

The timestamp of the last update to the email.

Createdat

The timestamp when the email was first created.

Deletedat

The timestamp when the email was deleted, if applicable.

Publishedat

The timestamp when the email was published.

Marketing Events API (11)

PUT Associate a list with a marketing event

/marketing/v3/marketing-events/associations/{marketingEventId}/lists/{listId}

Associates a list with a marketing event by marketing event id and ILS list id

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Marketingeventid

(Required) The internal id of the marketing event in HubSpot.

Listid

(Required) The ILS ID of the list.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

PUT Associate a list with a marketing event

/marketing/v3/marketing-events/associations/{externalAccountId}/{externalEventId}/lists/{listId}

Associates a list with a marketing event by external account id, external event id, and ILS list id

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Externalaccountid

(Required) The accountId that is associated with this marketing event in the external event application.

Externaleventid

(Required) The id of the marketing event in the external event application.

Listid

(Required) The ILS ID of the list.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

DELETE Disassociate a list from a marketing event

/marketing/v3/marketing-events/associations/{marketingEventId}/lists/{listId}

Disassociates a list from a marketing event by marketing event id and ILS list id

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Marketingeventid

(Required) The internal id of the marketing event in HubSpot.

Listid

(Required) The ILS ID of the list.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

DELETE Disassociate a list from a marketing event

/marketing/v3/marketing-events/associations/{externalAccountId}/{externalEventId}/lists/{listId}

Disassociates a list from a marketing event by external account id, external event id, and ILS list id

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Externalaccountid

(Required) The accountId that is associated with this marketing event in the external event application.

Externaleventid

(Required) The id of the marketing event in the external event application.

Listid

(Required) The ILS ID of the list.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

GET Get lists associated with a marketing event

/marketing/v3/marketing-events/associations/{externalAccountId}/{externalEventId}/lists

Gets lists associated with a marketing event by external account id and external event id

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Externalaccountid

(Required) The accountId that is associated with this marketing event in the external event application.

Externaleventid

(Required) The id of the marketing event in the external event application.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

GET Get lists associated with a marketing event

/marketing/v3/marketing-events/associations/{marketingEventId}/lists

Gets lists associated with a marketing event by marketing event id

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Marketingeventid

(Required) The internal id of the marketing event in HubSpot.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

GET Read participations breakdown by Contact identifier

/marketing/v3/marketing-events/participations/contacts/{contactIdentifier}/breakdown

Read Contact's participations by identifier - email or internal id.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

State

The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW

Limit

The limit for response size. The default value is 10, the max number is 100

After

The cursor indicating the position of the last retrieved item.

Contactidentifier

(Required) The identifier of the Contact. It may be email or internal id.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

GET Read participations breakdown by Marketing Event external identifier

/marketing/v3/marketing-events/participations/{externalAccountId}/{externalEventId}/breakdown

Read Marketing event's participations breakdown with optional filters by externalAccountId and externalEventId pair.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Contactidentifier

The identifier of the Contact. It may be email or internal id.

State

The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW

Limit

The limit for response size. The default value is 10, the max number is 100

After

The cursor indicating the position of the last retrieved item.

Externalaccountid

(Required) The accountId that is associated with this marketing event in the external event application.

Externaleventid

(Required) The id of the marketing event in the external event application.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

GET Read participations breakdown by Marketing Event internal identifier

/marketing/v3/marketing-events/participations/{marketingEventId}/breakdown

Read Marketing event's participations breakdown with optional filters by internal identifier marketingEventId.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Contactidentifier

The identifier of the Contact. It may be email or internal id.

State

The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW

Limit

The limit for response size. The default value is 10, the max number is 100

After

The cursor indicating the position of the last retrieved item.

Marketingeventid

(Required) The internal id of the marketing event in HubSpot.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

GET Read participations counters by Marketing Event external identifier

/marketing/v3/marketing-events/participations/{externalAccountId}/{externalEventId}

Read Marketing event's participations counters by externalAccountId and externalEventId pair.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Externalaccountid

(Required) The accountId that is associated with this marketing event in the external event application.

Externaleventid

(Required) The id of the marketing event in the external event application.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

GET Read participations counters by Marketing Event internal identifier

/marketing/v3/marketing-events/participations/{marketingEventId}

Read Marketing event's participations counters by internal identifier marketingEventId.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Marketingeventid

(Required) The internal id of the marketing event in HubSpot.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Marketing_Events_External

POST Mark a marketing event as completed

/marketing/v3/marketing-events/events/{externalEventId}/complete

Mark a marketing event as completed using its external event ID. Use this when you need to finalize an event's status in HubSpot.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Externalaccountid

(Required)

Externaleventid

(Required)

Content-type

Specifies the media type of the request body.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Public_Smtp_Tokens (5)

POST Create a SMTP API token.

/marketing/v3/transactional/smtp-tokens

Create a SMTP API token.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Options (2)

Option Name

Description

Campaignname

The name of the campaign to associate with the token.

Createcontact

Whether to automatically create a contact when sending to an unknown email address.

DELETE Delete a single token by ID.

/marketing/v3/transactional/smtp-tokens/{tokenId}

Delete a single token by ID.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Tokenid

The unique identifier of the SMTP token to delete.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

GET Query SMTP API tokens by campaign name or an emailCampaignId.

/marketing/v3/transactional/smtp-tokens

Query multiple SMTP API tokens by campaign name or a single token by emailCampaignId.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Campaignname

A name for the campaign tied to the SMTP API token.

Emailcampaignid

Identifier assigned to the campaign provided during the token creation.

After

Starting point to get the next set of results.

Limit

Maximum number of tokens to return.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

GET Query a single token by ID.

/marketing/v3/transactional/smtp-tokens/{tokenId}

Query a single token by ID.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Tokenid

The unique identifier of the SMTP token to query.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

POST Reset the password of an existing token.

/marketing/v3/transactional/smtp-tokens/{tokenId}/password-reset

Allows the creation of a replacement password for a given token. Once the password is successfully reset, the old password for the token will be invalid.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Tokenid

The unique identifier of the SMTP token whose password will be reset.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Reports (3)

GET Fetch contact IDs

/marketing/v3/campaigns/{campaignGuid}/reports/contacts/{contactType}

Fetch the list of contact IDs for the specified campaign and contact type

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Startdate

The start date for the report data, formatted as YYYY-MM-DD.
Default value: 2006-01-01

Enddate

End date for the report data, formatted as YYYY-MM-DD.
Default value: Current date

Limit

Limit for the number of contacts to fetch
Default: 100

After

A cursor for pagination. If provided, the results will start after the given cursor.
Example: NTI1Cg%3D%3D

Campaignguid

(Required) Unique identifier for the campaign, formatted as a UUID.

Contacttype

(Required) The type of metric to filter the influenced contacts. Allowed values: contactFirstTouch, contactLastTouch, influencedContacts

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

GET Fetch revenue

/marketing/v3/campaigns/{campaignGuid}/reports/revenue

Fetch revenue attribution report data for a specified campaign

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Attributionmodel

Allowed values: LINEAR, FIRST_INTERACTION, LAST_INTERACTION, FULL_PATH, U_SHAPED, W_SHAPED, TIME_DECAY, J_SHAPED, INVERSE_J_SHAPED
Default value: LINEAR

Startdate

The start date for the report data, formatted as YYYY-MM-DD.
Default value: 2006-01-01

Enddate

End date for the report data, formatted as YYYY-MM-DD.
Default value: Current date

Campaignguid

(Required) Unique identifier for the campaign, formatted as a UUID.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

GET Get Campaign Metrics

/marketing/v3/campaigns/{campaignGuid}/reports/metrics

This endpoint retrieves key attribution metrics for a specified campaign, such as sessions, new contacts, and influenced contacts.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Startdate

The start date for the report data, formatted as YYYY-MM-DD.
Default value: 2006-01-01

Enddate

End date for the report data, formatted as YYYY-MM-DD.
Default value: Current date

Campaignguid

(Required) Unique identifier for the campaign, formatted as a UUID.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Search (2)

GET Campaign search

/marketing/v3/campaigns

This endpoint allows users to search for and return a page of campaigns based on various query parameters. Users can filter by name, sort, and paginate through the campaigns, as well as control which properties are returned in the response.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Sort

The field by which to sort the results. Allowed values are hs_name, createdAt, updatedAt. An optional '-' before the property name can denote descending order
Default: hs_name

After

A cursor for pagination. If provided, the results will start after the given cursor.
Example: NTI1Cg%3D%3D

Limit

The maximum number of results to return. Allowed values range from 1 to 100
Default: 50

Name

A filter to return campaigns whose names contain the specified substring. This allows partial matching of campaign names, returning all campaigns that include the given substring in their name. If this parameter is not provided, the search will return all campaigns

Properties

A comma-separated list of the properties to be returned in the response. If any of the specified properties has empty value on the requested object(s), they will be ignored and not returned in response. If this parameter is empty, the response will include an empty properties map

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

GET Search for marketing events

/marketing/v3/marketing-events/events/search

Search for marketing events that have an event id that starts with the query string

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Q

(Required) The id of the marketing event in the external event application

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Settings (2)

GET Retrieve the application settings

/marketing/v3/marketing-events/{appId}/settings

Retrieve the current settings for the application.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Appid

(Required) The id of the application to retrieve the settings for.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

POST Update the application settings

/marketing/v3/marketing-events/{appId}/settings

Create or update the current settings for the application.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Appid

(Required) The id of the application to update the settings for.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Options (1)

Option Name

Description

Eventdetailsurl

The URL where event details should be sent for this application.

Single_Send (2)

POST Send a single transactional email asynchronously.

/marketing/v3/transactional/single-email/send

Asynchronously send a transactional email. Returns the status of the email send with a statusId that can be used to continuously query for the status using the Email Send Status API.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Options (1)

Option Name

Description

Emailid

The ID of the email template or content to send.

POST post-/marketing/v4/email/single-send

/marketing/v4/email/single-send

Send a single email using the v4 endpoint. Use this to send a one-off email to a recipient.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Options (1)

Option Name

Description

Emailid

The ID of the email to send.

Statistics (2)

GET Get aggregated statistic intervals.

/marketing/v3/emails/statistics/histogram

Get aggregated statistics in intervals for a specified time span. Each interval contains aggregated statistics of the emails that were sent in that time.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Interval

The interval to aggregate statistics for.

Starttimestamp

The start timestamp of the time span, in ISO8601 representation.

Endtimestamp

The end timestamp of the time span, in ISO8601 representation.

Emailids

Filter by email IDs. Only include statistics of emails with these IDs.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

GET Get aggregated statistics.

/marketing/v3/emails/statistics/list

Use this endpoint to get aggregated statistics of emails sent in a specified time span. It also returns the list of emails that were sent during the time span.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Starttimestamp

The start timestamp of the time span, in ISO8601 representation.

Endtimestamp

The end timestamp of the time span, in ISO8601 representation.

Emailids

Filter by email IDs. Only include statistics of emails with these IDs.

Property

Specifies which email properties should be returned. All properties will be returned by default.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Status (3)

GET Get subscription statuses for a contact

/communication-preferences/v3/status/email/{emailAddress}

Returns a list of subscriptions and their status for a given contact.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Emailaddress

The email address of the contact to look up.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

POST Subscribe a contact

/communication-preferences/v3/subscribe

Subscribes a contact to the given subscription type. This API is not valid to use for subscribing a contact at a brand or portal level and will return an error.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Options (4)

Option Name

Description

Emailaddress

The email address of the contact to subscribe.

Subscriptionid

The ID of the subscription to add the contact to.

Legalbasis

The legal basis for subscribing the contact (e.g., consent).

Legalbasisexplanation

An explanation of the legal basis for the subscription.

POST Unsubscribe a contact

/communication-preferences/v3/unsubscribe

Unsubscribes a contact from the given subscription type. This API is not valid to use for unsubscribing a contact at a brand or portal level and will return an error.

Parameters

Parameter Name

Description

Content Type

The content type of the request payload sent to the API (e.g. application/json).

headers

Additional HTTP header name/value pairs to include in the request.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

Options (4)

Option Name

Description

Emailaddress

The email address of the contact to unsubscribe.

Subscriptionid

The ID of the subscription to remove the contact from.

Legalbasis

The legal basis for unsubscribing the contact.

Legalbasisexplanation

An explanation of the legal basis for the unsubscription.

Subscriber State Changes (2)

POST Record a subscriber state by contact ID

/marketing/v3/marketing-events/events/{externalEventId}/{subscriberState}/upsert

Record a subscription state between multiple HubSpot contacts and a marketing event, using HubSpot contact ids. Note that the contact must already exist in HubSpot; a contact will not be create.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Externalaccountid

(Required) The account id associated with the marketing event

Externaleventid

(Required) The id of the marketing event

Subscriberstate

(Required) The new subscriber state for the HubSpot contacts and the specified marketing event

Content-type

Specifies the media type of the request body.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).

POST Record a subscriber state by contact email

/marketing/v3/marketing-events/events/{externalEventId}/{subscriberState}/email-upsert

Record a subscription state between multiple HubSpot contacts and a marketing event, using contact email addresses. Note that the contact must already exist in HubSpot; a contact will not be created.

Parameters

Parameter Name

Description

headers

Additional HTTP header name/value pairs to include in the request.

Externalaccountid

(Required) The account id associated with the marketing event

Externaleventid

(Required) The id of the marketing event

Subscriberstate

(Required) The new subscriber state for the HubSpot contacts and the specified marketing event

Content-type

Specifies the media type of the request body.

Accept

Specifies the media type the client expects in the response.

Response Type

The response format expected from the API (e.g. application/json).