org.mule.module

mule-module-hubspot

config

Namespacehttp://www.mulesoft.org/schema/mule/hubspot
Schema Locationhttp://www.mulesoft.org/schema/mule/hubspot/current/mule-hubspot.xsd  (View Schema)
Schema Version2.6.9
Minimum Mule Version3.3.0

Module Overview

HubSpot all-in-one marketing software helps more than 8,000 companies in 56 countries attract leads and convert them into customers. A pioneer in inbound marketing, HubSpot aims to help its customers make marketing that people actually love.

The connector is using the version "v1" of the HubSpot API.

The documentation of the API can be found in this link

The main flow of the connector is "authentication" ---> HubSpot Login Page ----> "authenticationResponse" ----> Any other process of the connector

Summary

Configuration
<hubspot:config>
Configure an instance of this module
Message Processors
<hubspot:add-existing-contact-in-a-list>
Add a contact record that has already been created in the system to a contact list.
<hubspot:authenticate>
/** This process generates the URL required to authenticate against the service.
<hubspot:authenticate-response>
This process is the one that handles the response of the authentication process.
<hubspot:create-contact>
Create a new contact in HubSpot with a simple HTTP POST to the Contacts API.
<hubspot:create-contact-list>
Create a new list in a given HubSpot portal to populate with contacts.
<hubspot:create-custom-property>
Create a new property in HubSpot.
<hubspot:create-custom-property-group>
For a given portal, create a new contact proprerty group.
<hubspot:delete-contact>
Archive an existing contact from a particular HubSpot portal.
<hubspot:delete-custom-property>
Delete an existing property in HubSpot.
<hubspot:delete-custom-property-group>
For a given portal, delete a contact property group based on the name of the group.
<hubspot:get-all-contacts>
For a given portal, return all contacts that have been created in the portal.
<hubspot:get-all-custom-properties>
Properties in HubSpot are fields that have been created.
<hubspot:get-contact-by-email>
For a given portal, return information about a single contact by its email address.
<hubspot:get-contact-by-id>
For a given portal, return information about a single contact by its ID.
<hubspot:get-contact-by-user-token>
For a given portal, return information about a single contact by its User Token (hubspotutk)

API link: http://developers.hubspot.com/docs/methods/contacts/get_contact_by_utk

<hubspot:get-contact-list-by-id>
For a given portal, return a contact list by its unique ID.
<hubspot:get-contact-statistics>
For a given portal, return statistics about that portal's contacts.
<hubspot:get-contacts-by-query>
For a given portal, return contacts and some data associated with those contacts by the contact's email address or name.
<hubspot:get-contacts-in-a-list>
For a given portal and a given list, identified by its unique ID, return a list of contacts that are in that list.
<hubspot:get-contacts-lists>
For a given portal, return a set of contact lists that you specify with the count parameter.
<hubspot:get-custom-property-group>
For a given portal, return all contact property groups that have been created in the portal.
<hubspot:get-dynamic-contact-lists>
For a given portal, return a set of dynamic contact lists that you specify with the count parameter.
<hubspot:get-email-subscription-status>
For a given portal, return all email subscription information for the given email address and portal.
<hubspot:get-email-subscriptions>
For a given portal, return all email subscription types that have been created in the portal.
<hubspot:get-recent-contacts>
For a given portal, return all contacts that have been recently updated or created.
<hubspot:has-user-access-token>
Check if the User has an Access Token.
<hubspot:update-contact>
Update an existing contact in HubSpot.
<hubspot:update-custom-property>
Update an existing property in HubSpot.
<hubspot:update-custom-property-group>
For a given portal, update a contact property group.
<hubspot:update-email-subscription-status>
For a given email address and portal, update the email type subscription status.
<hubspot:update-email-subscription-status-unsubscribe-from-all>
For a given email address and portal, update the email type subscription unsuscribing from all emails NOTE: it is only possible to opt email addresses OUT of subscription and there is NO UNDO for this operation.

Configuration

To use the this module within a flow the namespace to the module must be included. The resulting flow will look similar to the following:

<mule xmlns="http://www.mulesoft.org/schema/mule/core"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:hubspot="http://www.mulesoft.org/schema/mule/hubspot"
      xsi:schemaLocation="
               http://www.mulesoft.org/schema/mule/core
               http://www.mulesoft.org/schema/mule/core/current/mule.xsd
               http://www.mulesoft.org/schema/mule/hubspot
               http://www.mulesoft.org/schema/mule/hubspot/current/mule-hubspot.xsd">

      <!-- here goes your flows and configuration elements -->

</mule>

This module is configured using the config element. This element must be placed outside of your flows and at the root of your Mule application. You can create as many configurations as you deem necessary as long as each carries its own name.

Each message processor, message source or transformer carries a config-ref attribute that allows the invoker to specify which configuration to use.

Attributes
TypeNameDefault ValueDescriptionJava TypeMIME TypeEncoding
xs:string name Optional. Give a name to this configuration so it can be later referenced.
xs:string callbackUrl Optional. The callbackUrl is the endpoint that is registered in the iApp to handle the response of the authorization call.
xs:string clientId Optional. Your Client ID (OAuth Client ID), which identifies who you are.
xs:string hubId Optional. The HubSpot portal ID of the customer that you're re-directing.
objectStore _defaultUserObjectStore Optional. The object store to store the user credentials
xs:string scope Optional. The scopes (or permissions) you want.

Message Processors

<hubspot:add-existing-contact-in-a-list>

Add a contact record that has already been created in the system to a contact list.

Please note that you cannot manually add (via this API call) contacts to dynamic lists - they can only be updated by the contacts app.

API link: http://developers.hubspot.com/docs/methods/lists/add_contact_to_list

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
listId You need to include the ID for the list you're adding the lead to. You can search for lists using the get lists method. String */* UTF-8
contactId The contact ID of the contact that you're adding to the list. String */* UTF-8
Returns
Return Type Description
HubSpotListAddContactToListResponse A HubSpotListAddContactToListResponse In the "updated" attribute, you'll also get the contact ID of the contact that you've just added to the list
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:authenticate>

/** This process generates the URL required to authenticate against the service.

Important: in order for the full authentication to work, the callbackUrl in the configuration must be pointing to another flow that has the authenticateResponse process to handle the reception of the token

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId This user identifier it is the one that will we used from now on to the successive calls to the process of this connector for this user String */* UTF-8
callbackUrl Optional. Use this callback instead the one in the configuration String */* UTF-8
clientId Optional. Use this clientId instead the one in the configuration String */* UTF-8
hubId Optional. Use this hubId instead the one in the configuration String */* UTF-8
scope Optional. Use this scope instead the one in the configuration String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<hubspot:headers> This are added implicitly by Studio. The headers of the HTTP inbound, so it can establish a redirect code (302) Map<String, Object>
Returns
Return Type Description
String The URL where the user will be redirected
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If occur some error trying to generate the URL or the userId is empty it will throw this exception.
HubSpotConnectorNoAccessTokenException If there is not an access_token in the response it will throw this exception.

<hubspot:authenticate-response>

This process is the one that handles the response of the authentication process. It should be inside an HTTP inbound which url must be the same that the one pointed by the callbackUrl in the configuration in order to get the access_token provided by the service.

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
inputRequest The input parameters that came with the response to the authenticate process String */* UTF-8
Returns
Return Type Description
String The UserID that you provided in the call to the authenticate process and that is the one that the user is going to provide in order than the connector use their credentials
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If any one of the required parameters is empty it will throw this exception.
HubSpotConnectorNoAccessTokenException If there is not an access_token in the response it will throw this exception.

<hubspot:create-contact>

Create a new contact in HubSpot with a simple HTTP POST to the Contacts API.

API link: http://developers.hubspot.com/docs/methods/contacts/create_contact

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
contactProperties The properties that want to modify of an existing contact ContactProperties */*
Returns
Return Type Description
Contact The Contact newly created
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:create-contact-list>

Create a new list in a given HubSpot portal to populate with contacts.

API link: http://developers.hubspot.com/docs/methods/lists/create_list

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
list The new HubSpotNewList to be created. Required fields:name, portalId. HubSpotNewList */*
Child Elements
NameDefault ValueDescriptionJava Type
<hubspot:filters> Optional. The list of HubSpotListFilters that the list can have List<HubSpotListFilters>
Returns
Return Type Description
HubSpotList The newly created instance of HubSpotList
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:create-custom-property>

Create a new property in HubSpot. Properties in HubSpot are fields that have been created. By default, there are many fields that come "out of the box" in a HubSpot portal, but users can also create new, custom properties as they please.

This method enables you to create a new property. If you try to create a property whose name already exists in the system, you'll get an HTTP 409 exception thrown from the API.

Currently, there is a 1,000 property limit that you can have in any given portal.

API link: https://developers.hubspot.com/docs/methods/contacts/create_property

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
contactProperty The CustomContactProperty to be created CustomContactProperty */*
Returns
Return Type Description
CustomContactProperty The CustomContactProperty created
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:create-custom-property-group>

For a given portal, create a new contact proprerty group.

Property groups allow you to more easily manage properties in a given portal. They also let you organize the user interface of the contacts web application in a more flexible way.

There are certain propery groups that are in place for each portal by default: 'Contact Information', 'Social Media Information', 'Company Information' and 'Email Inforamtion' are examples. This method lets you create your own custom property group in a portal.

API link: https://developers.hubspot.com/docs/methods/contacts/create_group

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
customContactPropertyGroup A CustomContactPropertyGroup to be created CustomContactPropertyGroup */*
Returns
Return Type Description
CustomContactPropertyGroup The CustomContactPropertyGroup recently created
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:delete-contact>

Archive an existing contact from a particular HubSpot portal. Archiving will not hard delete a contact from a portal, but will remove that contact from the HubSpot user interface.

API link: http://developers.hubspot.com/docs/methods/contacts/delete_contact

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
contactId You must pass the Contact's ID that you're archiving in the request URL. String */* UTF-8
Returns
Return Type Description
ContactDeleted A ContactDeleted representing the data when the contact is deleted
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:delete-custom-property>

Delete an existing property in HubSpot. This method lets you delete one of many properties of a contact in HubSpot.

To delete a contact property, you should make an HTTP DELETE call to this endpoint with the name of the property you're deleting in the request URL.

API link: https://developers.hubspot.com/docs/methods/contacts/delete_property

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
contactPropertyName The name of the custom property to be deleted String */* UTF-8
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:delete-custom-property-group>

For a given portal, delete a contact property group based on the name of the group.

Property groups allow you to more easily manage properties in a given portal. They also let you organize the user interface of the contacts web application in a more flexible way.

There are certain property groups that are in place for each portal by default: 'Contact Information', 'Social Media Information', 'Company Information' and 'Email Inforamtion' are examples. This method lets you delete your own custom property group in a portal. You can also create new groups, update existing groups, or just get group and the properties in each group.

API link: https://developers.hubspot.com/docs/methods/contacts/delete_group

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
groupName The name of the group to be deleted String */* UTF-8
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:get-all-contacts>

For a given portal, return all contacts that have been created in the portal. A paginated list of contacts will be returned to you, with a maximum of 100 contacts per page.

API Link: http://developers.hubspot.com/docs/methods/contacts/get_contacts

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
count Optional. This parameter lets you specify the amount of contacts to return in your API call. The default for this parameter (if it isn't specified) is 20 contacts. The maximum amount of contacts you can have returned to you via this parameter is 100. String */* UTF-8
contactOffset Optional. This parameter will offset the contacts returned to you, based on the unique ID of the contacts in a given portal. Contact unique IDs are assigned by the order that they are created in the system. This means for instance, if you specify a vidOffset offset of 5, and you have 20 contacts in the portal you're working in, the contacts with IDs 6-20 will be returned to you. String */* UTF-8
Returns
Return Type Description
ContactList A ContactList containing all the contacts
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:get-all-custom-properties>

Properties in HubSpot are fields that have been created. By default, there are many fields that come "out of the box" in a HubSpot portal, but users can also create new, custom properties as they please. This method returns all of those properties to you.

API link: https://developers.hubspot.com/docs/methods/contacts/get_properties

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
Returns
Return Type Description
List<CustomContactProperty> A List of CustomContactProperty
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:get-contact-by-email>

For a given portal, return information about a single contact by its email address.

API link: http://developers.hubspot.com/docs/methods/contacts/get_contact_by_email

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
contactEmail The email address for the contact that you're searching for. String */* UTF-8
Returns
Return Type Description
Contact The Contact representation
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:get-contact-by-id>

For a given portal, return information about a single contact by its ID. The contact's unique ID's is stored in a field called 'vid' which stands for 'visitor ID'. This method will also return you much of the HubSpot lead "intelligence" that you may be accustomed to getting from the leads API, as properties in this new API. More of this intelligence will be available as time passes, but this call is where you can expect to find it.

API link: http://developers.hubspot.com/docs/methods/contacts/get_contact

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
contactId Unique identifier for a particular contact. In HubSpot's contact system, contact ID's are called "vid". String */* UTF-8
Returns
Return Type Description
Contact The Contact representation
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:get-contact-by-user-token>

For a given portal, return information about a single contact by its User Token (hubspotutk)

API link: http://developers.hubspot.com/docs/methods/contacts/get_contact_by_utk

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
contactUserToken The user token (HubSpot cookie) for the contact that you're searching for. String */* UTF-8
Returns
Return Type Description
Contact The Contact representation
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:get-contact-list-by-id>

For a given portal, return a contact list by its unique ID.

API link: http://developers.hubspot.com/docs/methods/lists/get_list

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
listId Unique identifier for the list that you're looking for. String */* UTF-8
Returns
Return Type Description
HubSpotList A HubSpotList with the list
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:get-contact-statistics>

For a given portal, return statistics about that portal's contacts.

API link: http://developers.hubspot.com/docs/methods/contacts/get_contact_statistics

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
Returns
Return Type Description
ContactStatistics A ContactStatistics representation of the response of statistics
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:get-contacts-by-query>

For a given portal, return contacts and some data associated with those contacts by the contact's email address or name. Please note that you should expect this method to only return a small subset of data about the contact. One piece of data that the method will return is the contact ID (vid) that you can then use to look up much more data about that particular contact by its ID.

API link: http://developers.hubspot.com/docs/methods/contacts/search_contacts

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
query The search term for what you're searching for. You can use all of a word or just parts of a word as well. For example, if you we're searching for contacts with "hubspot" in their name or email, searching for "hub" would also return contacts with "hubspot" in their email address. String */* UTF-8
count Optional. This parameter lets you specify the amount of contacts to return in your API call. The default for this parameter (if it isn't specified) is 20 contacts. The maximum amount of contacts you can have returned to you via this parameter is 100. String */* UTF-8
Returns
Return Type Description
ContactQuery A ContactQuery with the contacts
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:get-contacts-in-a-list>

For a given portal and a given list, identified by its unique ID, return a list of contacts that are in that list.

API link: http://developers.hubspot.com/docs/methods/lists/get_list_contacts

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
listId Unique identifier for the list that you're looking for. String */* UTF-8
count Optional. This parameter lets you specify the amount of contacts to return in your API call. The default for this parameter (if it isn't specified) is 20 contacts. The maximum amount of contacts you can have returned to you via this parameter is 100. String */* UTF-8
property Optional. If you include the "property" parameter, then the properties in the "contact" object in the returned data will only include the property or properties that you request. String */* UTF-8
offset Optional. This parameter will offset the contacts returned to you, based on the unique ID of the contacts in a given portal. Contact unique IDs are assigned by the order that they are created in the system. This means for instance, if you specify a vidOffset offset of 5, and you have 20 contacts in the portal you're working in, the contacts with IDs 6-20 will be returned to you. String */* UTF-8
Returns
Return Type Description
ContactList A ContactList whit the contact list
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:get-contacts-lists>

For a given portal, return a set of contact lists that you specify with the count parameter. By default, we will only return up to 20 lists to you at a time.

API link: http://developers.hubspot.com/docs/methods/lists/get_lists

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
count Optional. An integer that represents the number of lists that you want returned to your call. By default, this call will return 20 lists to you. If you want more or different list returned to you, you'll want to use the "offset" parameter. String */* UTF-8
offset Optional. An integer that represents where to start your list pull from. For instance, if you want to return numbered lists: 50-60, your offset should be "50" and your count parameter (seen above) should be 10. You should also note that the returned JSON (seen below) includes a "has-more" field, which lets you know if there are more lists that you can pull. If "has-more" is true, you can use this offset parameter to pull lists that weren't in your initial call. String */* UTF-8
Returns
Return Type Description
HubSpotListLists A HubSpotListLists with the lists
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:get-custom-property-group>

For a given portal, return all contact property groups that have been created in the portal.

Property groups allow you to more easily manage properties in a given portal. They also let you organize the user interface of the contacts web application in a more flexible way.

There are certain property groups that are in place for each portal by default: 'Contact Information', 'Social Media Information', 'Company Information' and 'Email Inforamtion' are examples.

API link: https://developers.hubspot.com/docs/methods/contacts/get_groups

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
groupName The name of the group to be retrieved String */* UTF-8
Returns
Return Type Description
CustomContactPropertyGroup A CustomContactPropertyGroup
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:get-dynamic-contact-lists>

For a given portal, return a set of dynamic contact lists that you specify with the count parameter.

Dynamic lists are lists that can only be edited by the contacts app - they are meant to update themselves when new contacts are created or are updated, meaning that you can't manually add contacts to dynamic lists.

By default, we will only return 20 lists to you via this API call.

API link: http://developers.hubspot.com/docs/methods/lists/get_dynamic_lists

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
count Optional. An integer that represents the number of lists that you want returned to your call. By default, this call will return 20 lists to you. If you want more or different list returned to you, you'll want to use the "offset" parameter. String */* UTF-8
offset Optional. An integer that represents where to start your list pull from. For instance, if you want to return numbered lists: 50-60, your offset should be "50" and your count parameter (seen above) should be 10. You should also note that the returned JSON (seen below) includes a "has-more" field, which lets you know if there are more lists that you can pull. If "has-more" is true, you can use this offset parameter to pull lists that weren't in your initial call. String */* UTF-8
Returns
Return Type Description
HubSpotListLists A HubSpotListLists with the lists
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:get-email-subscription-status>

For a given portal, return all email subscription information for the given email address and portal.

API link: http://developers.hubspot.com/docs/methods/email/get_status

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
hubId Optional. (portalId) The HubSpot Portal ID for the portal that you're making the call for. If left empty it will use the one stored in the credentials (authenticate operation) String */* UTF-8
email The email to check the current status subscription String */* UTF-8
Returns
Return Type Description
EmailSubscriptionStatus A EmailSubscriptionStatus with the status subscription
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:get-email-subscriptions>

For a given portal, return all email subscription types that have been created in the portal.

API link: http://developers.hubspot.com/docs/methods/email/get_subscriptions

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
hubId Optional. (portalId) The HubSpot Portal ID for the portal that you're making the call for. If left empty it will use the one stored in the credentials (authenticate operation) String */* UTF-8
Returns
Return Type Description
EmailSubscription A EmailSubscription with the subscriptions data
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:get-recent-contacts>

For a given portal, return all contacts that have been recently updated or created. A paginated list of contacts will be returned to you, with a maximum of 100 contacts per page, as specified by the "count" parameter.

API link: http://developers.hubspot.com/docs/methods/contacts/get_recently_updated_contacts

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
count Optional. This parameter lets you specify the amount of contacts to return in your API call. The default for this parameter (if it isn't specified) is 20 contacts. The maximum amount of contacts you can have returned to you via this parameter is 100. String */* UTF-8
timeOffset Optional. Used in conjunction with the vidOffset paramter to page through the recent contacts. Every call to this endpoint will return a time-offset value. This value is used in the timeOffset parameter of the next call to get the next page of contacts. String */* UTF-8
contactOffset Optional. Used in conjunction with the timeOffset paramter to page through the recent contacts. Every call to this endpoint will return a vid-offset value. This value is used in the vidOffset parameter of the next call to get the next page of contacts. String */* UTF-8
Returns
Return Type Description
ContactList A ContactList containing all the contacts
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:has-user-access-token>

Check if the User has an Access Token. This indicate that this User can start calling the process of the connector without any problems

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
Returns
Return Type Description
boolean A boolean that indicates if the user has an access token. Id does not check if the token is or not expired

<hubspot:update-contact>

Update an existing contact in HubSpot. This method lets you update one of many fields of a contact in HubSpot.

To update a contact, you should make an HTTP POST call to this endpoint with some JSON in the request payload. This JSON should contain properties from the contact that you want to add to or update. See the sample JSON below for an example of this snippet of JSON.

If you are trying to close a contact into a customer via the API, you should be updating the 'lifecyclestage' property and setting the value of this property to 'customer'.

Remember, if a property doesn't yet exist, you can create a new custom property through the API by using the 'Create Property' method.

API link: http://developers.hubspot.com/docs/methods/contacts/update_contact

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
contactId You must pass the Contact's ID that you're updating in the request URL String */* UTF-8
contactProperties The properties of the Contact that will have the one to be created ContactProperties */*
Returns
Return Type Description
ContactProperties The ContactProperties that was provided as input param
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:update-custom-property>

Update an existing property in HubSpot. This method lets you update one of many properties of a contact in HubSpot.T

To update a contact property, you should make an HTTP POST call to this endpoint with some JSON in the request payload. This JSON should contain property attributes that you want to add to or update. See the sample JSON below for an example of this snippet of JSON.

Remember, if a property doesn't yet exist, you can create a new custom property through the API by using the 'Create Property' method.

API link: https://developers.hubspot.com/docs/methods/contacts/update_property

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
propertyName The name of the Custom Property to be updated String */* UTF-8
contactProperty The contactProperty to be created CustomContactProperty */*
Returns
Return Type Description
CustomContactProperty The contactProperty recently created
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:update-custom-property-group>

For a given portal, update a contact property group.

Property groups allow you to more easily manage properties in a given portal. They also let you organize the user interface of the contacts web application in a more flexible way.

There are certain property groups that are in place for each portal by default: 'Contact Information', 'Social Media Information', 'Company Information' and 'Email Inforamtion' are examples. This method lets you update your own custom property group in a portal.

API link: https://developers.hubspot.com/docs/methods/contacts/update_group

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
groupName The name of the Custom Contact Property Group to be updated String */* UTF-8
customContactPropertyGroup A CustomContactPropertyGroup to be created CustomContactPropertyGroup */*
Returns
Return Type Description
CustomContactPropertyGroup The CustomContactPropertyGroup recently created
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:update-email-subscription-status>

For a given email address and portal, update the email type subscription status. NOTE: it is only possible to opt email addresses OUT of subscription and there is NO UNDO for this operation.

API link: http://developers.hubspot.com/docs/methods/email/update_status

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
hubId Optional. (portalId) The HubSpot Portal ID for the portal that you're making the call for. If left empty it will use the one stored in the credentials (authenticate operation) String */* UTF-8
email The email to update the current status subscription String */* UTF-8
Child Elements
NameDefault ValueDescriptionJava Type
<hubspot:statuses> A List of EmailSubscriptionStatusStatuses to be modified List<EmailSubscriptionStatusStatuses>
Returns
Return Type Description
EmailSubscriptionStatusResult The status of the operation EmailSubscriptionStatusResult
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be thrown

<hubspot:update-email-subscription-status-unsubscribe-from-all>

For a given email address and portal, update the email type subscription unsuscribing from all emails NOTE: it is only possible to opt email addresses OUT of subscription and there is NO UNDO for this operation.

API link: http://developers.hubspot.com/docs/methods/email/update_status

XML Sample
INCLUDE_ERROR

Attributes
NameDefault ValueDescriptionJava TypeMIME TypeEncoding
config-ref Optional. Specify which configuration to use.
userId The UserID of the user in the HubSpot service that was obtained from the authenticateResponse process String */* UTF-8
hubId Optional. (portalId) The HubSpot Portal ID for the portal that you're making the call for. If left empty it will use the one stored in the credentials (authenticate operation) String */* UTF-8
email The email to update the current status subscription String */* UTF-8
Returns
Return Type Description
EmailSubscriptionStatusResult The status of the operation EmailSubscriptionStatusResult
Exception Payloads
Payload ClassDescription
HubSpotConnectorException If the required parameters were not specified or occurs another type of error this exception will be thrown
HubSpotConnectorNoAccessTokenException If the user does not have an Access Token this exception will be thrown
HubSpotConnectorAccessTokenExpiredException If the user has his token already expired this exception will be throwns

Message Sources

Transformers