hubspot.marketing.events
Module hubspot.marketing.events
API
Definitions
ballerinax/hubspot.marketing.events Ballerina library
Overview
HubSpot is an AI-powered customer relationship management (CRM) platform.
The ballerinax/hubspot.marketing.events connector offers APIs to connect and interact with the HubSpot Marketing Events API endpoints, specifically based on the HubSpot Marketing Events REST API.
Setup guide
To use the HubSpot Marketing Events connector, you must have access to the HubSpot API through a HubSpot developer account and a HubSpot App under it. Therefore, you need to register for a developer account at HubSpot if you don't have one already.
Step 1: Create/Login to a HubSpot Developer Account
If you have an account already, go to the HubSpot developer portal
If you don't have a HubSpot Developer Account, you can sign up for a free account here
Step 2 (Optional): Create a Developer Test Account under your account
Within app developer accounts, you can create a developer test account to test apps and integrations without affecting any real HubSpot data.
Note: These accounts are only for development and testing purposes. Developer Test Accounts must not be used in production environments.
-
Go to the Test Account section from the left sidebar.

-
Click Create developer test account.

-
In the dialog box, give a name to your test account and click create.

Step 3: Create a HubSpot App under your account
-
In your developer account, navigate to the "Apps" section. Click on "Create App"

-
Provide the necessary details, including the app name and description.
Step 4: Configure the Authentication Flow
-
Move to the Auth Tab.

-
In the Scopes section, add the following scopes for your app using the "Add new scope" button.
crm.objects.marketing_events.readcrm.objects.marketing_events.write

-
Add your Redirect URI in the relevant section. You can also use localhost addresses for local development purposes. Click "Create App".

Step 5: Get your Client ID and Client Secret
-
Navigate to the "Auth" section of your app. Make sure to save the provided Client ID and Client Secret.

Step 6: Setup Authentication Flow
Before proceeding with the Quickstart, ensure you have obtained the Access Token using the following steps:
-
Create an authorization URL using the following format
https://app.hubspot.com/oauth/authorize?client_id=<YOUR_CLIENT_ID>&scope=<YOUR_SCOPES>&redirect_uri=<YOUR_REDIRECT_URI>Replace the
<YOUR_CLIENT_ID>,<YOUR_REDIRECT_URI>and<YOUR_SCOPES>with your specific value. -
Paste it in the browser and select your developer test account to install the app when prompted.

-
A code will be displayed in the browser. Copy the code.
-
Run the following curl command. Replace the
<YOUR_CLIENT_ID>,<YOUR_REDIRECT_URI> and<YOUR_CLIENT_SECRET>with your specific value. Use the code you received in the above step 3 as the<CODE>.-
Linux/macOS
curl --request POST \ --url https://api.hubapi.com/oauth/v1/token \ --header 'content-type: application/x-www-form-urlencoded' \ --data 'grant_type=authorization_code&code=<CODE>&redirect_uri=<YOUR_REDIRECT_URI>&client_id=<YOUR_CLIENT_ID>&client_secret=<YOUR_CLIENT_SECRET>' -
Windows
curl --request POST ^ --url https://api.hubapi.com/oauth/v1/token ^ --header 'content-type: application/x-www-form-urlencoded' ^ --data 'grant_type=authorization_code&code=<CODE>&redirect_uri=<YOUR_REDIRECT_URI>&client_id=<YOUR_CLIENT_ID>&client_secret=<YOUR_CLIENT_SECRET>'
This command will return the access token necessary for API calls.
{ "token_type": "bearer", "refresh_token": "<Refresh Token>", "access_token": "<Access Token>", "expires_in": 1800 } -
-
Store the access token securely for use in your application.
Step 7 (Optional): Generate a Developer API Key to retrieve and change Application Settings
Note: This step is optional and only required if you want to retrieve and change application settings via the client.
-
Go to the Developer API Key section in the HubSpot Developer Portal.

-
Click on "Create Key".

-
Copy the API Key.

-
Store the API Key securely for use in your application.
Quickstart
To use the HubSpot Marketing Events connector in your Ballerina application, update the .bal file as follows:
Step 1: Import the module
Import the hubspot.marketing.events module and oauth2 module.
import ballerina/oauth2; import ballerinax/hubspot.marketing.events as hsmevents;
Step 2: Instantiate a new connector
-
Create a
Config.tomlfile in the root directory of the Ballerina project and configure the obtained credentials in the above steps as follows:clientId = "<Client Id>" clientSecret = "<Client Secret>" refreshToken = "<Refresh Token>"Note (Optional): If you want to use Set and Get Application Settings operations, you need to provide the Developer API Key in the
Config.tomlfile as well.clientId = "<Client Id>" clientSecret = "<Client Secret>" refreshToken = "<Refresh Token>" apiKey = "<API Key>" -
Instantiate a
hsmevents:ConnectionConfigwith the obtained credentials and initialize the connector with it.configurable string clientId = ?; configurable string clientSecret = ?; configurable string refreshToken = ?; final hsmevents:ConnectionConfig config = { auth : { clientId, clientSecret, refreshToken, credentialBearer: oauth2:POST_BODY_BEARER } }; final hsmevents:Client hsmevents = check new (config);Note (Optional): To use the Set and Get Application Settings operations, you need to instantiate a separate client object with the API Key as the auth token. This client can be used only for these operations.
configurable string clientId = ?; configurable string clientSecret = ?; configurable string refreshToken = ?; configurable string apiKey = ?; final hsmevents:ConnectionConfig config = { auth : { clientId, clientSecret, refreshToken, credentialBearer: oauth2:POST_BODY_BEARER }, }; final hsmevents:Client hsmevents = check new (config); // Create a separate client object for Set and Get Application Settings operations final hsmevents:ConnectionConfig configWithApiKey = { auth : { hapikey: apiKey, private\-app\-legacy: "" } }; final hsmevents:Client hsmevents2 = check new (configWithApiKey);
Step 3: Invoke the connector operation
Now, utilize the available connector operations. A sample use case is shown below.
Create a Marketing Event
MarketingEventCreateRequestParams payload = { externalAccountId: 11111, externalEventId: 10000, eventName: "Winter webinar", eventOrganizer: "Snowman Fellowship", eventCancelled: false, eventUrl: "https://example.com/holiday-jam", eventDescription: "Let's plan for the holidays", eventCompleted: false, startDateTime: "2024-08-07T12:36:59.286Z", endDateTime: "2024-08-07T12:36:59.286Z", customProperties: [] }; public function main() returns error? { hsmevents:MarketingEventDefaultResponse createEvent = check hsmevents->postEvents_create(payload); }
(Optional) Get Application Settings
int:Signed32 appId = 12345; // Your App ID EventDetailSettings response = check hsmevents2->getAppidSettings_getall(appId); // Need to use the Client with API Key Authentication
Examples
The HubSpot Marketing Events connector provides practical examples illustrating usage in various scenarios. Explore these examples, covering the following use cases:
- Event Participation Management - Use Marketing Event API to Manage and Update Participants seamlessly.
- Marketing Event Management - Create, update and manage multiple Marketing Events and automate event management.
Clients
hubspot.marketing.events: Client
Constructor
Gets invoked to initialize the connector.
init (ConnectionConfig config, string serviceUrl)- config ConnectionConfig - The configurations to be used when initializing the
connector
- serviceUrl string "https://api.hubapi.com/marketing/v3/marketing-events" - URL of the target service
postAttendanceExternalEventIdSubscriberStateCreateRecordByContactIds
function postAttendanceExternalEventIdSubscriberStateCreateRecordByContactIds(string externalEventId, string subscriberState, BatchInputMarketingEventSubscriber payload, map<string|string[]> headers, *PostAttendanceExternalEventIdSubscriberStateCreateRecordByContactIdsQueries queries) returns BatchResponseSubscriberVidResponse|errorRecord Participants by ContactId with Marketing Event External Ids
Parameters
- externalEventId string - The id of the marketing event in the external event application
- subscriberState string - The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'
- payload BatchInputMarketingEventSubscriber -
- queries *PostAttendanceExternalEventIdSubscriberStateCreateRecordByContactIdsQueries - Queries to be sent with the request
Return Type
- BatchResponseSubscriberVidResponse|error - successful operation
getParticipationsMarketingEventIdBreakdownGetParticipationsBreakdownByMarketingEventId
function getParticipationsMarketingEventIdBreakdownGetParticipationsBreakdownByMarketingEventId(int marketingEventId, map<string|string[]> headers, *GetParticipationsMarketingEventIdBreakdownGetParticipationsBreakdownByMarketingEventIdQueries queries) returns CollectionResponseWithTotalParticipationBreakdownForwardPaging|errorRead participations breakdown by Marketing Event internal identifier
Parameters
- marketingEventId int - The internal id of the marketing event in HubSpot
- queries *GetParticipationsMarketingEventIdBreakdownGetParticipationsBreakdownByMarketingEventIdQueries - Queries to be sent with the request
Return Type
- CollectionResponseWithTotalParticipationBreakdownForwardPaging|error - successful operation
postEventsExternalEventIdSubscriberStateUpsertUpsertByContactId
function postEventsExternalEventIdSubscriberStateUpsertUpsertByContactId(string externalEventId, string subscriberState, BatchInputMarketingEventSubscriber payload, map<string|string[]> headers, *PostEventsExternalEventIdSubscriberStateUpsertUpsertByContactIdQueries queries) returns Response|errorRecord a subscriber state by contact ID
Parameters
- externalEventId string - The id of the marketing event in the external event application
- subscriberState string - The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'
- payload BatchInputMarketingEventSubscriber -
- queries *PostEventsExternalEventIdSubscriberStateUpsertUpsertByContactIdQueries - Queries to be sent with the request
getEventsExternalEventIdGetDetails
function getEventsExternalEventIdGetDetails(string externalEventId, map<string|string[]> headers, *GetEventsExternalEventIdGetDetailsQueries queries) returns MarketingEventPublicReadResponse|errorGet Marketing Event by External IDs
Parameters
- externalEventId string - The id of the marketing event in the external event application
- queries *GetEventsExternalEventIdGetDetailsQueries - Queries to be sent with the request
Return Type
- MarketingEventPublicReadResponse|error - successful operation
putEventsExternalEventIdUpsert
function putEventsExternalEventIdUpsert(string externalEventId, MarketingEventCreateRequestParams payload, map<string|string[]> headers) returns MarketingEventPublicDefaultResponse|errorCreate or update a marketing event
Parameters
- externalEventId string - The id of the marketing event in the external event application
- payload MarketingEventCreateRequestParams -
Return Type
- MarketingEventPublicDefaultResponse|error - successful operation
deleteEventsExternalEventIdArchive
function deleteEventsExternalEventIdArchive(string externalEventId, map<string|string[]> headers, *DeleteEventsExternalEventIdArchiveQueries queries) returns error?Delete Marketing Event by External Ids
Parameters
- externalEventId string - The id of the marketing event in the external event application
- queries *DeleteEventsExternalEventIdArchiveQueries - Queries to be sent with the request
Return Type
- error? - No content
patchEventsExternalEventIdUpdate
function patchEventsExternalEventIdUpdate(string externalEventId, MarketingEventUpdateRequestParams payload, map<string|string[]> headers, *PatchEventsExternalEventIdUpdateQueries queries) returns MarketingEventPublicDefaultResponse|errorUpdate Marketing Event by External IDs
Parameters
- externalEventId string - The id of the marketing event in the external event application
- payload MarketingEventUpdateRequestParams -
- queries *PatchEventsExternalEventIdUpdateQueries - Queries to be sent with the request
Return Type
- MarketingEventPublicDefaultResponse|error - successful operation
postEventsUpsertBatchUpsert
function postEventsUpsertBatchUpsert(BatchInputMarketingEventCreateRequestParams payload, map<string|string[]> headers) returns BatchResponseMarketingEventPublicDefaultResponse|errorCreate or Update Multiple Marketing Events
Parameters
Return Type
- BatchResponseMarketingEventPublicDefaultResponse|error - successful operation
postAttendanceExternalEventIdSubscriberStateEmailCreateRecordByContactEmails
function postAttendanceExternalEventIdSubscriberStateEmailCreateRecordByContactEmails(string externalEventId, string subscriberState, BatchInputMarketingEventEmailSubscriber payload, map<string|string[]> headers, *PostAttendanceExternalEventIdSubscriberStateEmailCreateRecordByContactEmailsQueries queries) returns BatchResponseSubscriberEmailResponse|errorRecord Participants by Email with Marketing Event External Ids
Parameters
- externalEventId string - The id of the marketing event in the external event application
- subscriberState string - The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'
- payload BatchInputMarketingEventEmailSubscriber -
- queries *PostAttendanceExternalEventIdSubscriberStateEmailCreateRecordByContactEmailsQueries - Queries to be sent with the request
Return Type
- BatchResponseSubscriberEmailResponse|error - successful operation
getParticipationsExternalAccountIdExternalEventIdBreakdownGetParticipationsBreakdownByExternalEventId
function getParticipationsExternalAccountIdExternalEventIdBreakdownGetParticipationsBreakdownByExternalEventId(string externalAccountId, string externalEventId, map<string|string[]> headers, *GetParticipationsExternalAccountIdExternalEventIdBreakdownGetParticipationsBreakdownByExternalEventIdQueries queries) returns CollectionResponseWithTotalParticipationBreakdownForwardPaging|errorRead participations breakdown by Marketing Event external identifier
Parameters
- externalAccountId string - The accountId that is associated with this marketing event in the external event application
- externalEventId string - The id of the marketing event in the external event application
- queries *GetParticipationsExternalAccountIdExternalEventIdBreakdownGetParticipationsBreakdownByExternalEventIdQueries - Queries to be sent with the request
Return Type
- CollectionResponseWithTotalParticipationBreakdownForwardPaging|error - successful operation
getObjectId
function getObjectId(string objectId, map<string|string[]> headers) returns MarketingEventPublicReadResponseV2|errorGet Marketing Event by objectId
Parameters
- objectId string - The internal ID of the marketing event in HubSpot
Return Type
- MarketingEventPublicReadResponseV2|error - successful operation
deleteObjectId
Delete Marketing Event by objectId
Parameters
- objectId string - The internal ID of the marketing event in HubSpot
Return Type
- error? - No content
patchObjectId
function patchObjectId(string objectId, MarketingEventPublicUpdateRequestV2 payload, map<string|string[]> headers) returns MarketingEventPublicDefaultResponseV2|errorUpdate Marketing Event by objectId
Parameters
- objectId string - The internal ID of the marketing event in HubSpot
- payload MarketingEventPublicUpdateRequestV2 -
Return Type
- MarketingEventPublicDefaultResponseV2|error - successful operation
getAssociationsExternalAccountIdExternalEventIdListsGetAllByExternalAccountAndEventIds
function getAssociationsExternalAccountIdExternalEventIdListsGetAllByExternalAccountAndEventIds(string externalAccountId, string externalEventId, map<string|string[]> headers) returns CollectionResponseWithTotalPublicListNoPaging|errorGet lists associated with a marketing event
Parameters
- externalAccountId string - The accountId that is associated with this marketing event in the external event application
- externalEventId string - The id of the marketing event in the external event application
Return Type
- CollectionResponseWithTotalPublicListNoPaging|error - successful operation
getAssociationsMarketingEventIdListsGetAllByMarketingEventId
function getAssociationsMarketingEventIdListsGetAllByMarketingEventId(string marketingEventId, map<string|string[]> headers) returns CollectionResponseWithTotalPublicListNoPaging|errorGet lists associated with a marketing event
Parameters
- marketingEventId string - The internal id of the marketing event in HubSpot
Return Type
- CollectionResponseWithTotalPublicListNoPaging|error - successful operation
postObjectIdAttendanceSubscriberStateEmailCreate
function postObjectIdAttendanceSubscriberStateEmailCreate(string objectId, string subscriberState, BatchInputMarketingEventEmailSubscriber payload, map<string|string[]> headers) returns BatchResponseSubscriberEmailResponse|errorRecord Participants by Email with Marketing Event Object Id
Parameters
- objectId string - The internal ID of the marketing event in HubSpot
- subscriberState string - The attendance state value. It may be 'register', 'attend' or 'cancel'
- payload BatchInputMarketingEventEmailSubscriber -
Return Type
- BatchResponseSubscriberEmailResponse|error - successful operation
get
function get(map<string|string[]> headers, *GetQueries queries) returns CollectionResponseMarketingEventPublicReadResponseV2ForwardPaging|errorGet all marketing event
Parameters
- queries *GetQueries - Queries to be sent with the request
Return Type
- CollectionResponseMarketingEventPublicReadResponseV2ForwardPaging|error - successful operation
postBatchUpdate
function postBatchUpdate(BatchInputMarketingEventPublicUpdateRequestFullV2 payload, map<string|string[]> headers) returns BatchResponseMarketingEventPublicDefaultResponseV2|BatchResponseMarketingEventPublicDefaultResponseV2WithErrors|errorUpdate Multiple Marketing Events by ObjectId
Parameters
Return Type
postObjectIdAttendanceSubscriberStateCreate
function postObjectIdAttendanceSubscriberStateCreate(string objectId, string subscriberState, BatchInputMarketingEventSubscriber payload, map<string|string[]> headers) returns BatchResponseSubscriberVidResponse|errorRecord Participants by ContactId with Marketing Event Object Id
Parameters
- objectId string - The internal id of the marketing event in HubSpot
- subscriberState string - The attendance state value. It may be 'register', 'attend' or 'cancel'
- payload BatchInputMarketingEventSubscriber -
Return Type
- BatchResponseSubscriberVidResponse|error - successful operation
postBatchArchive
function postBatchArchive(BatchInputMarketingEventPublicObjectIdDeleteRequest payload, map<string|string[]> headers) returns error?Delete Multiple Marketing Events by ObjectId
Parameters
Return Type
- error? - No content
getParticipationsExternalAccountIdExternalEventIdGetParticipationsCountersByEventExternalId
function getParticipationsExternalAccountIdExternalEventIdGetParticipationsCountersByEventExternalId(string externalAccountId, string externalEventId, map<string|string[]> headers) returns AttendanceCounters|errorRead participations counters by Marketing Event external identifier
Parameters
- externalAccountId string - The accountId that is associated with this marketing event in the external event application
- externalEventId string - The id of the marketing event in the external event application
Return Type
- AttendanceCounters|error - successful operation
getExternalEventIdIdentifiers
function getExternalEventIdIdentifiers(string externalEventId, map<string|string[]> headers) returns CollectionResponseWithTotalMarketingEventIdentifiersResponseNoPaging|errorFind Marketing Events by externalEventId
Parameters
- externalEventId string - The id of the marketing event in the external event application
Return Type
- CollectionResponseWithTotalMarketingEventIdentifiersResponseNoPaging|error - successful operation
getParticipationsMarketingEventIdGetParticipationsCountersByMarketingEventId
function getParticipationsMarketingEventIdGetParticipationsCountersByMarketingEventId(int marketingEventId, map<string|string[]> headers) returns AttendanceCounters|errorRead participations counters by Marketing Event internal identifier
Parameters
- marketingEventId int - The internal id of the marketing event in HubSpot
Return Type
- AttendanceCounters|error - successful operation
postEventsDeleteBatchArchive
function postEventsDeleteBatchArchive(BatchInputMarketingEventExternalUniqueIdentifier payload, map<string|string[]> headers) returns Response|errorDelete Multiple Marketing Events by External Ids
Parameters
postEventsExternalEventIdCancelCancel
function postEventsExternalEventIdCancelCancel(string externalEventId, map<string|string[]> headers, *PostEventsExternalEventIdCancelCancelQueries queries) returns MarketingEventDefaultResponse|errorMark a marketing event as cancelled
Parameters
- externalEventId string - The id of the marketing event in the external event application
- queries *PostEventsExternalEventIdCancelCancelQueries - Queries to be sent with the request
Return Type
- MarketingEventDefaultResponse|error - successful operation
putAssociationsMarketingEventIdListsListIdAssociateByMarketingEventId
function putAssociationsMarketingEventIdListsListIdAssociateByMarketingEventId(string marketingEventId, string listId, map<string|string[]> headers) returns error?Associate a list with a marketing event
Parameters
- marketingEventId string - The internal id of the marketing event in HubSpot
- listId string - The ILS ID of the list
Return Type
- error? - No content
deleteAssociationsMarketingEventIdListsListIdDisassociateByMarketingEventId
function deleteAssociationsMarketingEventIdListsListIdDisassociateByMarketingEventId(string marketingEventId, string listId, map<string|string[]> headers) returns error?Disassociate a list from a marketing event
Parameters
- marketingEventId string - The internal id of the marketing event in HubSpot
- listId string - The ILS ID of the list
Return Type
- error? - No content
postEventsExternalEventIdSubscriberStateEmailUpsertUpsertByContactEmail
function postEventsExternalEventIdSubscriberStateEmailUpsertUpsertByContactEmail(string externalEventId, string subscriberState, BatchInputMarketingEventEmailSubscriber payload, map<string|string[]> headers, *PostEventsExternalEventIdSubscriberStateEmailUpsertUpsertByContactEmailQueries queries) returns Response|errorRecord a subscriber state by contact email
Parameters
- externalEventId string - The id of the marketing event in the external event application
- subscriberState string - The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'
- payload BatchInputMarketingEventEmailSubscriber -
- queries *PostEventsExternalEventIdSubscriberStateEmailUpsertUpsertByContactEmailQueries - Queries to be sent with the request
putAssociationsExternalAccountIdExternalEventIdListsListIdAssociateByExternalAccountAndEventIds
function putAssociationsExternalAccountIdExternalEventIdListsListIdAssociateByExternalAccountAndEventIds(string externalAccountId, string externalEventId, string listId, map<string|string[]> headers) returns error?Associate a list with a marketing event
Parameters
- externalAccountId string - The accountId that is associated with this marketing event in the external event application
- externalEventId string - The id of the marketing event in the external event application
- listId string - The ILS ID of the list
Return Type
- error? - No content
deleteAssociationsExternalAccountIdExternalEventIdListsListIdDisassociateByExternalAccountAndEventIds
function deleteAssociationsExternalAccountIdExternalEventIdListsListIdDisassociateByExternalAccountAndEventIds(string externalAccountId, string externalEventId, string listId, map<string|string[]> headers) returns error?Disassociate a list from a marketing event
Parameters
- externalAccountId string - The accountId that is associated with this marketing event in the external event application
- externalEventId string - The id of the marketing event in the external event application
- listId string - The ILS ID of the list
Return Type
- error? - No content
postEventsExternalEventIdCompleteComplete
function postEventsExternalEventIdCompleteComplete(string externalEventId, MarketingEventCompleteRequestParams payload, map<string|string[]> headers, *PostEventsExternalEventIdCompleteCompleteQueries queries) returns MarketingEventDefaultResponse|errorMark a marketing event as completed
Parameters
- externalEventId string - The id of the marketing event in the external event application
- payload MarketingEventCompleteRequestParams -
- queries *PostEventsExternalEventIdCompleteCompleteQueries - Queries to be sent with the request
Return Type
- MarketingEventDefaultResponse|error - successful operation
postEventsCreate
function postEventsCreate(MarketingEventCreateRequestParams payload, map<string|string[]> headers) returns MarketingEventDefaultResponse|errorCreate a marketing event
Parameters
- payload MarketingEventCreateRequestParams -
Return Type
- MarketingEventDefaultResponse|error - successful operation
getParticipationsContactsContactIdentifierBreakdownGetParticipationsBreakdownByContactId
function getParticipationsContactsContactIdentifierBreakdownGetParticipationsBreakdownByContactId(string contactIdentifier, map<string|string[]> headers, *GetParticipationsContactsContactIdentifierBreakdownGetParticipationsBreakdownByContactIdQueries queries) returns CollectionResponseWithTotalParticipationBreakdownForwardPaging|errorRead participations breakdown by Contact identifier
Parameters
- contactIdentifier string - The identifier of the Contact. It may be email or internal id
- queries *GetParticipationsContactsContactIdentifierBreakdownGetParticipationsBreakdownByContactIdQueries - Queries to be sent with the request
Return Type
- CollectionResponseWithTotalParticipationBreakdownForwardPaging|error - successful operation
getAppIdSettingsGetAll
function getAppIdSettingsGetAll(Signed32 appId, map<string|string[]> headers) returns EventDetailSettings|errorRetrieve the application settings
Parameters
- appId Signed32 - The id of the application to retrieve the settings for
Return Type
- EventDetailSettings|error - successful operation
postAppIdSettingsUpdate
function postAppIdSettingsUpdate(Signed32 appId, EventDetailSettingsUrl payload, map<string|string[]> headers) returns EventDetailSettings|errorUpdate the application settings
Parameters
- appId Signed32 - The id of the application to update the settings for
- payload EventDetailSettingsUrl -
Return Type
- EventDetailSettings|error - successful operation
getEventsSearchDoSearch
function getEventsSearchDoSearch(map<string|string[]> headers, *GetEventsSearchDoSearchQueries queries) returns CollectionResponseSearchPublicResponseWrapperNoPaging|errorFind App-Specific Marketing Events by External Event Id
Parameters
- queries *GetEventsSearchDoSearchQueries - Queries to be sent with the request
Return Type
- CollectionResponseSearchPublicResponseWrapperNoPaging|error - successful operation
Records
hubspot.marketing.events: ApiKeysConfig
Provides API key configurations needed when communicating with a remote HTTP endpoint.
Fields
- hapikey string -
- privateAppLegacy string -
hubspot.marketing.events: AppInfo
Fields
- name string -
- id string -
hubspot.marketing.events: AttendanceCounters
Fields
- attended Signed32 -
- registered Signed32 -
- cancelled Signed32 -
- noShows Signed32 -
hubspot.marketing.events: BatchInputMarketingEventCreateRequestParams
Fields
- inputs MarketingEventCreateRequestParams[] -
hubspot.marketing.events: BatchInputMarketingEventEmailSubscriber
Fields
- inputs MarketingEventEmailSubscriber[] - List of marketing event details to create or update
hubspot.marketing.events: BatchInputMarketingEventExternalUniqueIdentifier
Fields
- inputs MarketingEventExternalUniqueIdentifier[] -
hubspot.marketing.events: BatchInputMarketingEventPublicObjectIdDeleteRequest
Fields
- inputs MarketingEventPublicObjectIdDeleteRequest[] -
hubspot.marketing.events: BatchInputMarketingEventPublicUpdateRequestFullV2
Fields
- inputs MarketingEventPublicUpdateRequestFullV2[] -
hubspot.marketing.events: BatchInputMarketingEventSubscriber
Fields
- inputs MarketingEventSubscriber[] - List of HubSpot contacts to subscribe to the marketing event
hubspot.marketing.events: BatchResponseMarketingEventPublicDefaultResponse
Fields
- completedAt string -
- numErrors? Signed32 -
- requestedAt? string -
- startedAt string -
- links? record { string... } -
- results MarketingEventPublicDefaultResponse[] -
- errors? StandardError[] -
- status "PENDING"|"PROCESSING"|"CANCELED"|"COMPLETE" -
hubspot.marketing.events: BatchResponseMarketingEventPublicDefaultResponseV2
Fields
- completedAt string -
- requestedAt? string -
- startedAt string -
- links? record { string... } -
- results MarketingEventPublicDefaultResponseV2[] -
- status "PENDING"|"PROCESSING"|"CANCELED"|"COMPLETE" -
hubspot.marketing.events: BatchResponseMarketingEventPublicDefaultResponseV2WithErrors
Fields
- completedAt string -
- numErrors? Signed32 -
- requestedAt? string -
- startedAt string -
- links? record { string... } -
- results MarketingEventPublicDefaultResponseV2[] -
- errors? StandardError[] -
- status "PENDING"|"PROCESSING"|"CANCELED"|"COMPLETE" -
hubspot.marketing.events: BatchResponseSubscriberEmailResponse
Fields
- completedAt string -
- numErrors? Signed32 -
- requestedAt? string -
- startedAt string -
- links? record { string... } -
- results SubscriberEmailResponse[] -
- errors? StandardError[] -
- status "PENDING"|"PROCESSING"|"CANCELED"|"COMPLETE" -
hubspot.marketing.events: BatchResponseSubscriberVidResponse
Fields
- completedAt string -
- numErrors? Signed32 -
- requestedAt? string -
- startedAt string -
- links? record { string... } -
- results SubscriberVidResponse[] -
- errors? StandardError[] -
- status "PENDING"|"PROCESSING"|"CANCELED"|"COMPLETE" -
hubspot.marketing.events: CollectionResponseMarketingEventPublicReadResponseV2ForwardPaging
Fields
- paging? ForwardPaging -
- results MarketingEventPublicReadResponseV2[] -
hubspot.marketing.events: CollectionResponseSearchPublicResponseWrapperNoPaging
Fields
- results SearchPublicResponseWrapper[] -
hubspot.marketing.events: CollectionResponseWithTotalMarketingEventIdentifiersResponseNoPaging
Fields
- total Signed32 -
- results MarketingEventIdentifiersResponse[] -
hubspot.marketing.events: CollectionResponseWithTotalParticipationBreakdownForwardPaging
Fields
- total Signed32 -
- paging? ForwardPaging -
- results ParticipationBreakdown[] -
hubspot.marketing.events: CollectionResponseWithTotalPublicListNoPaging
Fields
- total Signed32 -
- results PublicList[] -
hubspot.marketing.events: ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth BearerTokenConfig|OAuth2RefreshTokenGrantConfig|ApiKeysConfig - Provides Auth configurations needed when communicating with a remote HTTP endpoint.
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings ClientHttp1Settings(default {}) - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings(default {}) - Configurations related to HTTP/2 protocol
- timeout decimal(default 30) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded/x-forwardedheader
- followRedirects? FollowRedirects - Configurations associated with Redirection
- poolConfig? PoolConfiguration - Configurations associated with request pooling
- cache CacheConfig(default {}) - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding) header
- circuitBreaker? CircuitBreakerConfig - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig? RetryConfig - Configurations associated with retrying
- cookieConfig? CookieConfig - Configurations associated with cookies
- responseLimits ResponseLimitConfigs(default {}) - Configurations associated with inbound response size limits
- secureSocket? ClientSecureSocket - SSL/TLS-related options
- proxy? ProxyConfig - Proxy server related options
- socketConfig ClientSocketConfig(default {}) - Provides settings related to client socket configuration
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
- laxDataBinding boolean(default true) - Enables relaxed data binding on the client side. When enabled,
nilvalues are treated as optional, and absent fields are handled asnilabletypes. Enabled by default.
hubspot.marketing.events: ContactAssociation
Fields
- firstname? string -
- contactId string -
- email string -
- lastname? string -
hubspot.marketing.events: CrmPropertyWrapper
Fields
- name string -
- value string -
hubspot.marketing.events: DeleteEventsExternalEventIdArchiveQueries
Represents the Queries record for the operation: deleteEventsExternalEventIdArchive
Fields
- externalAccountId string - The accountId that is associated with this marketing event in the external event application
hubspot.marketing.events: ErrorDetail
Fields
- subCategory? string - A specific category that contains more specific detail about the error
- code? string - The status code associated with the error detail
- 'in? string - The name of the field or parameter in which the error was found
- context? record { string[]... } - Context about the error condition
- message string - A human readable message describing the error along with remediation steps where appropriate
hubspot.marketing.events: EventDetailSettings
Fields
- appId Signed32 - The id of the application the settings are for
- eventDetailsUrl string - The url that will be used to fetch marketing event details by id
hubspot.marketing.events: EventDetailSettingsUrl
Fields
- eventDetailsUrl string - The url that will be used to fetch marketing event details by id. Must contain a
%scharacter sequence that will be substituted with the event id. For example:https://my.event.app/events/%s
hubspot.marketing.events: ForwardPaging
Fields
- next? NextPage -
hubspot.marketing.events: GetEventsExternalEventIdGetDetailsQueries
Represents the Queries record for the operation: getEventsExternalEventIdGetDetails
Fields
- externalAccountId string - The accountId that is associated with this marketing event in the external event application
hubspot.marketing.events: GetEventsSearchDoSearchQueries
Represents the Queries record for the operation: getEventsSearchDoSearch
Fields
- q string - The id of the marketing event in the external event application (externalEventId)
hubspot.marketing.events: GetParticipationsContactsContactIdentifierBreakdownGetParticipationsBreakdownByContactIdQueries
Represents the Queries record for the operation: getParticipationsContactsContactIdentifierBreakdownGetParticipationsBreakdownByContactId
Fields
- 'limit Signed32(default 10) - The limit for response size. The default value is 10, the max number is 100
- state? string - The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW
- after? string - The cursor indicating the position of the last retrieved item
hubspot.marketing.events: GetParticipationsExternalAccountIdExternalEventIdBreakdownGetParticipationsBreakdownByExternalEventIdQueries
Represents the Queries record for the operation: getParticipationsExternalAccountIdExternalEventIdBreakdownGetParticipationsBreakdownByExternalEventId
Fields
- contactIdentifier? string - The identifier of the Contact. It may be email or internal id
- 'limit Signed32(default 10) - The limit for response size. The default value is 10, the max number is 100
- state? string - The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW
- after? string - The cursor indicating the position of the last retrieved item
hubspot.marketing.events: GetParticipationsMarketingEventIdBreakdownGetParticipationsBreakdownByMarketingEventIdQueries
Represents the Queries record for the operation: getParticipationsMarketingEventIdBreakdownGetParticipationsBreakdownByMarketingEventId
Fields
- contactIdentifier? string - The identifier of the Contact. It may be email or internal id
- 'limit Signed32(default 10) - The limit for response size. The default value is 10, the max number is 100
- state? string - The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW
- after? string - The cursor indicating the position of the last retrieved item
hubspot.marketing.events: GetQueries
Represents the Queries record for the operation: get
Fields
- 'limit Signed32(default 10) - The limit for response size. The default value is 10, the max number is 100
- after? string - The cursor indicating the position of the last retrieved item
hubspot.marketing.events: MarketingEventAssociation
Fields
- externalAccountId? string -
- marketingEventId string -
- externalEventId? string -
- name string -
hubspot.marketing.events: MarketingEventCompleteRequestParams
Fields
- startDateTime string -
- endDateTime string -
hubspot.marketing.events: MarketingEventCreateRequestParams
Fields
- startDateTime? string - The start date and time of the marketing event
- customProperties? CrmPropertyWrapper[] - A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set. In order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts
- externalAccountId string - The accountId that is associated with this marketing event in the external event application
- eventCancelled? boolean - Indicates if the marketing event has been cancelled. Defaults to
false
- eventOrganizer string - The name of the organizer of the marketing event
- eventUrl? string - A URL in the external event application where the marketing event can be managed
- externalEventId string - The id of the marketing event in the external event application
- eventDescription? string - The description of the marketing event
- eventName string - The name of the marketing event
- eventType? string - Describes what type of event this is. For example:
WEBINAR,CONFERENCE,WORKSHOP
- eventCompleted? boolean -
- endDateTime? string - The end date and time of the marketing event
hubspot.marketing.events: MarketingEventDefaultResponse
Fields
- startDateTime? string - The start date and time of the marketing event
- customProperties? CrmPropertyWrapper[] - A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set. In order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts
- eventCancelled? boolean - Indicates if the marketing event has been cancelled
- eventOrganizer string - The name of the organizer of the marketing event
- eventUrl? string - The URL in the external event application where the marketing event can be managed
- eventDescription? string - The description of the marketing event
- eventName string - The name of the marketing event
- eventType? string - The type of the marketing event
- eventCompleted? boolean -
- endDateTime? string - The end date and time of the marketing event
- objectId? string -
hubspot.marketing.events: MarketingEventEmailSubscriber
Fields
- contactProperties? record { string... } -
- properties? record { string... } -
- email string - The email address of the contact in HubSpot to associate with the event
- interactionDateTime int - Timestamp in milliseconds at which the contact subscribed to the event
hubspot.marketing.events: MarketingEventExternalUniqueIdentifier
Fields
- externalAccountId string - The accountId that is associated with this marketing event in the external event application
- externalEventId string - The id of the marketing event in the external event application
- appId Signed32 - The id of the application that created the marketing event in HubSpot
hubspot.marketing.events: MarketingEventIdentifiersResponse
Fields
- externalAccountId? string -
- externalEventId string -
- appInfo? AppInfo -
- objectId string -
- marketingEventName string -
hubspot.marketing.events: MarketingEventPublicDefaultResponse
Fields
- eventOrganizer string - The name of the organizer of the marketing event
- eventUrl? string - A URL in the external event application where the marketing event can be managed
- eventType? string - The type of the marketing event
- eventCompleted? boolean -
- endDateTime? string - The end date and time of the marketing event
- createdAt string -
- startDateTime? string - The start date and time of the marketing event
- customProperties? CrmPropertyWrapper[] - A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set. In order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts
- eventCancelled? boolean - Indicates if the marketing event has been cancelled
- eventDescription? string - The description of the marketing event
- eventName string - The name of the marketing event
- id string -
- objectId? string -
- updatedAt string -
hubspot.marketing.events: MarketingEventPublicDefaultResponseV2
Fields
- eventOrganizer? string -
- eventUrl? string -
- appInfo? AppInfo -
- eventType? string -
- eventCompleted? boolean -
- endDateTime? string -
- createdAt string -
- startDateTime? string -
- customProperties CrmPropertyWrapper[] -
- eventCancelled? boolean -
- eventDescription? string -
- eventName string -
- objectId string -
- updatedAt string -
hubspot.marketing.events: MarketingEventPublicObjectIdDeleteRequest
Fields
- objectId string -
hubspot.marketing.events: MarketingEventPublicReadResponse
Fields
- registrants Signed32 - The number of HubSpot contacts that registered for this marketing event
- eventOrganizer string - The name of the organizer of the marketing event
- eventUrl? string - A URL in the external event application where the marketing event can be managed
- attendees Signed32 - The number of HubSpot contacts that attended this marketing event
- eventType? string - The type of the marketing event
- eventCompleted? boolean -
- endDateTime? string - The end date and time of the marketing event
- noShows Signed32 - The number of HubSpot contacts that registered for this marketing event, but did not attend. This field only had a value when the event is over
- cancellations Signed32 - The number of HubSpot contacts that registered for this marketing event, but later cancelled their registration
- createdAt string -
- startDateTime? string - The start date and time of the marketing event
- customProperties? CrmPropertyWrapper[] - A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set. In order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts
- eventCancelled? boolean - Indicates if the marketing event has been cancelled
- externalEventId string - The id of the marketing event in the external event application
- eventDescription? string - The description of the marketing event
- eventName string - The name of the marketing event
- id string -
- objectId? string -
- updatedAt string -
hubspot.marketing.events: MarketingEventPublicReadResponseV2
Fields
- registrants? Signed32 -
- eventOrganizer? string -
- eventUrl? string -
- attendees? Signed32 -
- appInfo? AppInfo -
- eventType? string -
- eventCompleted? boolean -
- endDateTime? string -
- noShows? Signed32 -
- cancellations? Signed32 -
- createdAt string -
- startDateTime? string -
- customProperties CrmPropertyWrapper[] -
- eventCancelled? boolean -
- externalEventId? string -
- eventStatus? string -
- eventDescription? string -
- eventName string -
- objectId string -
- updatedAt string -
hubspot.marketing.events: MarketingEventPublicUpdateRequestFullV2
Fields
- startDateTime? string -
- customProperties CrmPropertyWrapper[] -
- eventCancelled? boolean -
- eventOrganizer? string -
- eventUrl? string -
- eventDescription? string -
- eventName? string -
- eventType? string -
- endDateTime? string -
- objectId string -
hubspot.marketing.events: MarketingEventPublicUpdateRequestV2
Fields
- startDateTime? string -
- customProperties CrmPropertyWrapper[] -
- eventCancelled? boolean -
- eventOrganizer? string -
- eventUrl? string -
- eventDescription? string -
- eventName? string -
- eventType? string -
- endDateTime? string -
hubspot.marketing.events: MarketingEventSubscriber
Fields
- vid int -
- properties? record { string... } -
- interactionDateTime int - Timestamp in milliseconds at which the contact subscribed to the event
hubspot.marketing.events: MarketingEventUpdateRequestParams
Fields
- startDateTime? string - The start date and time of the marketing event
- customProperties? CrmPropertyWrapper[] - A list of PropertyValues. These can be whatever kind of property names and values you want. However, they must already exist on the HubSpot account's definition of the MarketingEvent Object. If they don't they will be filtered out and not set. In order to do this you'll need to create a new PropertyGroup on the HubSpot account's MarketingEvent object for your specific app and create the Custom Property you want to track on that HubSpot account. Do not create any new default properties on the MarketingEvent object as that will apply to all HubSpot accounts
- eventCancelled? boolean - Indicates if the marketing event has been cancelled. Defaults to
false
- eventOrganizer? string - The name of the organizer of the marketing event
- eventUrl? string - A URL in the external event application where the marketing event can be managed
- eventDescription? string - The description of the marketing event
- eventName? string - The name of the marketing event
- eventType? string - Describes what type of event this is. For example:
WEBINAR,CONFERENCE,WORKSHOP
- eventCompleted? boolean -
- endDateTime? string - The end date and time of the marketing event
hubspot.marketing.events: NextPage
Fields
- link? string -
- after string -
hubspot.marketing.events: OAuth2RefreshTokenGrantConfig
OAuth2 Refresh Token Grant Configs
Fields
- Fields Included from *OAuth2RefreshTokenGrantConfig
- refreshUrl string(default "https://api.hubapi.com/oauth/v1/token") - Refresh URL
hubspot.marketing.events: ParticipationAssociations
Fields
- marketingEvent MarketingEventAssociation -
- contact ContactAssociation -
hubspot.marketing.events: ParticipationBreakdown
Fields
- associations ParticipationAssociations -
- createdAt string -
- id string -
- properties ParticipationProperties -
hubspot.marketing.events: ParticipationProperties
Fields
- occurredAt int -
- attendancePercentage? string -
- attendanceState "REGISTERED"|"ATTENDED"|"CANCELLED"|"EMPTY"|"NO_SHOW" -
- attendanceDurationSeconds? Signed32 -
hubspot.marketing.events: PatchEventsExternalEventIdUpdateQueries
Represents the Queries record for the operation: patchEventsExternalEventIdUpdate
Fields
- externalAccountId string - The accountId that is associated with this marketing event in the external event application
hubspot.marketing.events: PostAttendanceExternalEventIdSubscriberStateCreateRecordByContactIdsQueries
Represents the Queries record for the operation: postAttendanceExternalEventIdSubscriberStateCreateRecordByContactIds
Fields
- externalAccountId? string - The accountId that is associated with this marketing event in the external event application
hubspot.marketing.events: PostAttendanceExternalEventIdSubscriberStateEmailCreateRecordByContactEmailsQueries
Represents the Queries record for the operation: postAttendanceExternalEventIdSubscriberStateEmailCreateRecordByContactEmails
Fields
- externalAccountId? string - The accountId that is associated with this marketing event in the external event application
hubspot.marketing.events: PostEventsExternalEventIdCancelCancelQueries
Represents the Queries record for the operation: postEventsExternalEventIdCancelCancel
Fields
- externalAccountId string - The accountId that is associated with this marketing event in the external event application
hubspot.marketing.events: PostEventsExternalEventIdCompleteCompleteQueries
Represents the Queries record for the operation: postEventsExternalEventIdCompleteComplete
Fields
- externalAccountId string - The accountId that is associated with this marketing event in the external event application
hubspot.marketing.events: PostEventsExternalEventIdSubscriberStateEmailUpsertUpsertByContactEmailQueries
Represents the Queries record for the operation: postEventsExternalEventIdSubscriberStateEmailUpsertUpsertByContactEmail
Fields
- externalAccountId string - The accountId that is associated with this marketing event in the external event application
hubspot.marketing.events: PostEventsExternalEventIdSubscriberStateUpsertUpsertByContactIdQueries
Represents the Queries record for the operation: postEventsExternalEventIdSubscriberStateUpsertUpsertByContactId
Fields
- externalAccountId string - The accountId that is associated with this marketing event in the external event application
hubspot.marketing.events: PublicList
Fields
- processingType string -
- objectTypeId string -
- updatedById? string -
- filtersUpdatedAt? string -
- listId string -
- createdAt? string -
- processingStatus string -
- deletedAt? string -
- listVersion Signed32 -
- size? int -
- name string -
- createdById? string -
- updatedAt? string -
hubspot.marketing.events: SearchPublicResponseWrapper
Fields
- externalAccountId string -
- externalEventId string -
- appId Signed32 -
- objectId string -
hubspot.marketing.events: StandardError
Fields
- subCategory? record {} -
- context record { string[]... } -
- links record { string... } -
- id? string -
- category string -
- message string -
- errors ErrorDetail[] -
- status string -
hubspot.marketing.events: SubscriberEmailResponse
Fields
- vid int -
- email string -
hubspot.marketing.events: SubscriberVidResponse
Fields
- vid int -
Import
import ballerinax/hubspot.marketing.events;Other versions
1.0.0
0.1.0Metadata
Released date: 14 days ago
Version: 1.0.0
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.12.2
GraalVM compatible: Yes
Pull count
Total: 8
Current verison: 0
Weekly downloads
Keywords
TODO: Add keywords
Vendor/HubSpot
Area/Social Media Marketing
Type/Connector
Contributors