Constructors

Methods

  • Get the details for a marketing email. Get the details of a specified marketing email.

    Parameters

    • emailId: string

      The marketing email ID.

    • OptionalincludeStats: boolean

      Include statistics with email

    • OptionalmarketingCampaignNames: boolean
    • OptionalworkflowNames: boolean
    • OptionalincludedProperties: string[]
    • Optionalarchived: boolean

      Whether to return only results that have been archived.

    • Optional_options: PromiseConfigurationOptions

    Returns Promise<PublicEmail>

  • Get the details for a marketing email. Get the details of a specified marketing email.

    Parameters

    • emailId: string

      The marketing email ID.

    • OptionalincludeStats: boolean

      Include statistics with email

    • OptionalmarketingCampaignNames: boolean
    • OptionalworkflowNames: boolean
    • OptionalincludedProperties: string[]
    • Optionalarchived: boolean

      Whether to return only results that have been archived.

    • Optional_options: PromiseConfigurationOptions

    Returns Promise<HttpInfo<PublicEmail>>

  • 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. Get all marketing emails for a HubSpot account.

    Parameters

    • OptionalcreatedAt: Date

      Only return emails created at exactly the specified time.

    • OptionalcreatedAfter: Date

      Only return emails created after the specified time.

    • OptionalcreatedBefore: Date

      Only return emails created before the specified time.

    • OptionalupdatedAt: Date

      Only return emails last updated at exactly the specified time.

    • OptionalupdatedAfter: Date

      Only return emails last updated after the specified time.

    • OptionalupdatedBefore: Date

      Only return emails last updated before the specified time.

    • Optionalsort: string[]

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

    • Optionalafter: string

      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.

    • Optionallimit: number

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

    • OptionalincludeStats: boolean

      Include statistics with emails.

    • OptionalmarketingCampaignNames: boolean
    • OptionalworkflowNames: boolean
    • Optionaltype:
          | "AB_EMAIL"
          | "BATCH_EMAIL"
          | "LOCALTIME_EMAIL"
          | "AUTOMATED_AB_EMAIL"
          | "BLOG_EMAIL"
          | "BLOG_EMAIL_CHILD"
          | "RSS_EMAIL"
          | "RSS_EMAIL_CHILD"
          | "RESUBSCRIBE_EMAIL"
          | "OPTIN_EMAIL"
          | "OPTIN_FOLLOWUP_EMAIL"
          | "AUTOMATED_EMAIL"
          | "FEEDBACK_CES_EMAIL"
          | "FEEDBACK_CUSTOM_EMAIL"
          | "FEEDBACK_CUSTOM_SURVEY_EMAIL"
          | "FEEDBACK_NPS_EMAIL"
          | "FOLLOWUP_EMAIL"
          | "LEADFLOW_EMAIL"
          | "SINGLE_SEND_API"
          | "MARKETING_SINGLE_SEND_API"
          | "SMTP_TOKEN"
          | "TICKET_EMAIL"
          | "MEMBERSHIP_REGISTRATION_EMAIL"
          | "MEMBERSHIP_PASSWORD_SAVED_EMAIL"
          | "MEMBERSHIP_PASSWORD_RESET_EMAIL"
          | "MEMBERSHIP_EMAIL_VERIFICATION_EMAIL"
          | "MEMBERSHIP_PASSWORDLESS_AUTH_EMAIL"
          | "MEMBERSHIP_REGISTRATION_FOLLOW_UP_EMAIL"
          | "MEMBERSHIP_OTP_LOGIN_EMAIL"
          | "MEMBERSHIP_FOLLOW_UP_EMAIL"
          | "MEMBERSHIP_VERIFICATION_EMAIL"

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

    • OptionalisPublished: boolean

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

    • OptionalincludedProperties: string[]
    • Optionalcampaign: string

      Filter by campaign GUID. All emails will be returned if not present.

    • Optionalarchived: boolean

      Specifies whether to return archived emails. Defaults to `false`.

    • Optional_options: PromiseConfigurationOptions

    Returns Promise<CollectionResponseWithTotalPublicEmailForwardPaging>

  • 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. Get all marketing emails for a HubSpot account.

    Parameters

    • OptionalcreatedAt: Date

      Only return emails created at exactly the specified time.

    • OptionalcreatedAfter: Date

      Only return emails created after the specified time.

    • OptionalcreatedBefore: Date

      Only return emails created before the specified time.

    • OptionalupdatedAt: Date

      Only return emails last updated at exactly the specified time.

    • OptionalupdatedAfter: Date

      Only return emails last updated after the specified time.

    • OptionalupdatedBefore: Date

      Only return emails last updated before the specified time.

    • Optionalsort: string[]

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

    • Optionalafter: string

      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.

    • Optionallimit: number

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

    • OptionalincludeStats: boolean

      Include statistics with emails.

    • OptionalmarketingCampaignNames: boolean
    • OptionalworkflowNames: boolean
    • Optionaltype:
          | "AB_EMAIL"
          | "BATCH_EMAIL"
          | "LOCALTIME_EMAIL"
          | "AUTOMATED_AB_EMAIL"
          | "BLOG_EMAIL"
          | "BLOG_EMAIL_CHILD"
          | "RSS_EMAIL"
          | "RSS_EMAIL_CHILD"
          | "RESUBSCRIBE_EMAIL"
          | "OPTIN_EMAIL"
          | "OPTIN_FOLLOWUP_EMAIL"
          | "AUTOMATED_EMAIL"
          | "FEEDBACK_CES_EMAIL"
          | "FEEDBACK_CUSTOM_EMAIL"
          | "FEEDBACK_CUSTOM_SURVEY_EMAIL"
          | "FEEDBACK_NPS_EMAIL"
          | "FOLLOWUP_EMAIL"
          | "LEADFLOW_EMAIL"
          | "SINGLE_SEND_API"
          | "MARKETING_SINGLE_SEND_API"
          | "SMTP_TOKEN"
          | "TICKET_EMAIL"
          | "MEMBERSHIP_REGISTRATION_EMAIL"
          | "MEMBERSHIP_PASSWORD_SAVED_EMAIL"
          | "MEMBERSHIP_PASSWORD_RESET_EMAIL"
          | "MEMBERSHIP_EMAIL_VERIFICATION_EMAIL"
          | "MEMBERSHIP_PASSWORDLESS_AUTH_EMAIL"
          | "MEMBERSHIP_REGISTRATION_FOLLOW_UP_EMAIL"
          | "MEMBERSHIP_OTP_LOGIN_EMAIL"
          | "MEMBERSHIP_FOLLOW_UP_EMAIL"
          | "MEMBERSHIP_VERIFICATION_EMAIL"

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

    • OptionalisPublished: boolean

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

    • OptionalincludedProperties: string[]
    • Optionalcampaign: string

      Filter by campaign GUID. All emails will be returned if not present.

    • Optionalarchived: boolean

      Specifies whether to return archived emails. Defaults to `false`.

    • Optional_options: PromiseConfigurationOptions

    Returns Promise<HttpInfo<CollectionResponseWithTotalPublicEmailForwardPaging>>

  • 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. Get revisions of a marketing email

    Parameters

    • emailId: string

      The marketing email ID.

    • Optionalafter: string

      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.

    • Optionalbefore: string

      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.

    • Optionallimit: number

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

    • Optional_options: PromiseConfigurationOptions

    Returns Promise<CollectionResponseWithTotalVersionPublicEmail>

  • 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. Get revisions of a marketing email

    Parameters

    • emailId: string

      The marketing email ID.

    • Optionalafter: string

      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.

    • Optionalbefore: string

      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.

    • Optionallimit: number

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

    • Optional_options: PromiseConfigurationOptions

    Returns Promise<HttpInfo<CollectionResponseWithTotalVersionPublicEmail>>

  • 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. Publish or send a marketing email.

    Parameters

    Returns Promise<void>

  • 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. Restore a revision of a marketing email to DRAFT state

    Parameters

    Returns Promise<PublicEmail>

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

    Parameters

    Returns Promise<void>

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

    Parameters

    Returns Promise<HttpInfo<void>>

  • 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. Unpublish or cancel a marketing email.

    Parameters

    Returns Promise<void>

  • 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. Unpublish or cancel a marketing email.

    Parameters

    Returns Promise<HttpInfo<void>>

  • Change properties of a marketing email. Update a marketing email.

    Parameters

    • emailId: string

      The ID of the marketing email that should get updated

    • emailUpdateRequest: EmailUpdateRequest

      A marketing email object with properties that should overwrite the corresponding properties of the marketing email.

    • Optionalarchived: boolean

      Whether to return only results that have been archived.

    • Optional_options: PromiseConfigurationOptions

    Returns Promise<PublicEmail>

  • 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. Create or update draft version

    Parameters

    • emailId: string

      The marketing email ID.

    • emailUpdateRequest: EmailUpdateRequest

      A marketing email object with properties that should overwrite the corresponding properties in the email&#39;s current draft.

    • Optional_options: PromiseConfigurationOptions

    Returns Promise<PublicEmail>

  • 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. Create or update draft version

    Parameters

    • emailId: string

      The marketing email ID.

    • emailUpdateRequest: EmailUpdateRequest

      A marketing email object with properties that should overwrite the corresponding properties in the email&#39;s current draft.

    • Optional_options: PromiseConfigurationOptions

    Returns Promise<HttpInfo<PublicEmail>>