An overview of the Marketing Events object in HubSpot.
crm.objects.marketing_events.read
: grants permission to retrieve marketing event and attendance data.crm.objects.marketing_events.write
: grants permission to create, delete, or make changes to marketing event information.externalEventId
and externalAccountId
parameters will only work in the same app that originally created the event. For example, if you created two public apps, called App A and App B, and you created a marketing event via the authentication and IDs associated with App A, only App A can read, update, or add new participants to the event. If you attempt to access the same event with App B using the same externalEventId and externalAccountId, a 404 error will result.objectId
can be used to access an event by any app with the associated scopes listed in the section above, regardless of the app that originally created the event. If App A created a marketing event, App B can still read, update, or add participants through objectId
-based endpoints.Parameter | Type | Description |
---|---|---|
eventName | String | The title of your event. |
eventType | String | The type of the event (e.g., webinar, tradeshow, etc.). |
eventOrganizer | String | The individual or organization that’s hosting the event. |
eventDescription | String | A description for your event. |
eventUrl | String | A URL that users can navigate to where they can learn more details and/or register for your event. |
eventCancelled | Boolean | Whether or not the event is cancelled. |
eventStartTime | String | An ISO 8601 formatted timestamp of the event’s start time. |
eventEndTime | String | An ISO 8601 formatted timestamp of the event’s end time. |
POST
request to /marketing/v3/marketing-events/events
and provide the eventName
, externalEventId
, externalAccountId
, and eventOrganizer
in the body of your request. You can optionally provide any additional properties listed in the table above in your request.
For example, if the externalAccountId
of your app is "12345"
, and the externalEventId
of your event in your app is "67890"
, you could create a new event called "Winter webinar"
with a request that would resemble the following:
POST
request to /marketing/v3/marketing-events/events/upsert
endpoint. You can include any customProperties
along with any other details of your event (including its name, start time, and description).
If a marketing event already exists with the specified ID in your request, it will be updated. Otherwise, a new event will be created.
For example, the following request would create an event with an ID of 4
named “Virtual cooking class”:
PATCH
request to /marketing/v3/marketing-events/{objectId}
.
objectId
for a specific marketing event, follow the instructions in this knowledge base article to view the details for an event in your HubSpot account, then locate the ID under the Record ID field. The objectId
will also be returned in the response when you successfully create an event.GET
request to the /marketing/v3/marketing-events
endpoint described in the next section.externalEventId
of an event, you can include it as a path when making a GET
request to /marketing/v3/marketing-events/{externalEventId}/identifiers
. The response will include all marketing events along with the relevant identifiers for each event (i.e., the event’s objectId
, its appInfo
, the marketingEventName
, and the externalAccountId
).GET
request to /marketing/v3/marketing-events
.
If you need to retrieve the details for a specific marketing event by its Record ID in HubSpot, you can provide the ID as the objectId in a GET
request to /marketing/v3/marketing-events/{objectId}
.
DELETE
request to /marketing/v3/marketing-events/{objectId}
with the event’s associated objectId
.
If successful, you’ll receive a 204 No Content
response.
POST
request to /marketing-events/v3/marketing-events/batch/update
and provide the properties you want to update for each event within the inputs array of the request body.
For example, if you wanted to update several properties of two marketing events with object IDs of 58237132332 and 54073507364 in a single request, the body of your request would resemble the following:
objectId
of a marketing event, you can either use the contact ID of the contact you want to record participation state for, or you can use their email address.
/marketing/v3/marketing-events/{objectId}/attendance/{subscribeState}/create
then provide the ID of the contact using the vid
field within the inputs
array of your request body. For example, the request body below provides an example of updating the attendance data for a contact with an ID of 47733471576
and specifying when the attendee joined and left the event via the joinedAt
and leftAt
properties:/marketing/v3/marketing-events/{objectId}/attendance/{subscribeState}/email-create
then provide the email of the contact using the email
field within the inputs
array of your request body.
contactProperties
field within the inputs
array of your request body to set any associated properties on the newly created contact. Otherwise, if the contact already exists, contactProperties
provided in the request will not be updated.john@example.com
and specifying when the attendee joined and left the event via the joinedAt
and leftAt
fields within the properties
object of your inputs
array:objectId
: the Record ID of the marketing event in your HubSpot account. Check out the section above for more details on using the objectId of an event versus using its external IDs.subscriberState
: an enumeration that matches the new attendance status of the contact:REGISTERED
: indicates that the HubSpot contact has registered for the event.ATTENDED
: indicates that the HubSpot contact has attended the event. If you’re updating a contact’s status to ATTENDED, you can also include the joinedAt
and leftAt
timestamps as parameters in the request body, specified in the ISO8601 Instant format.CANCELLED
: indicates that the HubSpot contact, who had previously registered for the event, has cancelled their registration./upsert
or /email-upsert
endpoints to update an attendee’s status, you can instead use the alternate endpoints listed below. However, compared to the event attendance endpoints above, using these endpoints will not provide support for the following:joinedAt
or leftAt
properties.externalEventId
from your app, you can either use the contact IDs or email address of existing contacts:
POST
request to /marketing/v3/marketing-events/attendance/{externalEventId}/{subscriberState}/create
, using the ID of the event from your external application as the externalEventId
.inputs
object that includes the following fields:
interactionDateTime
: the date and time at which the contact subscribed to the event.vid
: the contact ID of an existing contact.POST
request to /marketing/v3/marketing-events/attendance/{externalEventId}/{subscriberState}/email-create
.inputs
object that includes the following fields:
interactionDateTime
: the date and time at which the contact subscribed to the event.email
: the email address of the attendee as the value of the email field within an inputsexternalEventId
: the ID of the marketing event. Check out the section above for more details on using the objectId of an event versus using its external IDs.subscriberState
: an enumeration that matches the new attendance status of the contact:
REGISTERED
: indicates that the HubSpot contact has registered for the event.ATTENDED
: indicates that the HubSpot contact has attended the event. If you’re updating a contact’s status to ATTENDED, you can also include the joinedAt
and leftAt
timestamps as parameters in the request body, specified in the ISO8601 Instant format.CANCELLED
: indicates that the HubSpot contact, who had previously registered for the event, has cancelled their registration.interactionDateTime
value in the event has not changed. This enables you to safely set attendance state multiple times without HubSpot creating duplicate events in the marketing events properties.attended
, registered
, cancelled
, or noShows
).GET
request to /marketing/v3/marketing-events/participations/contacts/{contactIdentifier}/breakdown
, using’s the contact’s ID or email address as the contactIdentifier
path parameter.
The response will include a summary of the contact’s event participation in the properties
field:
externalAccountId
and the externalEventId
of your event to make a GET
request to /marketing/v3/marketing-events/participations/{externalAccountId}/{externalEventId}/breakdown
.
externalAccountId
and the externalEventId
of your event to make a GET
request to /marketing/v3/marketing-events/participations/{externalAccountId}/{externalEventId}
.
The response will include the total attendance counts:
Query parameter | Type | Description |
---|---|---|
contactIdentifier | string | The email address or ID of a specific contact |
state | Enumeration | The participation state for the event. The possible participation states are:
|
limit | Number | Limit the results returned. By default, the limit is set to 10. The valid range is 1-100. |
after | Number | Used for paging between results in the response. Consult the provided offset in the previous page of response data to determine the next index of results to return. |
listId
as a path parameter, which you can find on the list details page in your HubSpot account:
PUT
request to /marketing/v3/marketing-events/associations/{marketingEventId}/lists/{listId}
.
If successful, you’ll receive a 204 No content
response.
PUT
request to /marketing/v3/marketing-events/associations/{externalAccountId}/{externalEventId}/lists/{listId}
.
If successful, you’ll receive a 204 No content
response.
GET
request to /marketing/v3/marketing-events/associations/{marketingEventId}/lists
.
The response will resemble the following:
GET
request to /marketing/v3/marketing-events/associations/{externalAccountId}/{externalEventId}/lists
.
DELETE
request to /marketing/v3/marketing-events/associations/{marketingEventId}/lists/{listId}
.
If successful, you’ll receive a 204 No content
response.
DELETE
request to /marketing/v3/marketing-events/associations/{externalAccountId}/{externalEventId}/lists/{listId}
.
If successful, you’ll receive a 204 No content
response.
POST
endpoint reference), and don’t rely on this functionality to create your marketing events in HubSpot.
externalAccountId
: a query parameter that specifies the accountId of the customer in the external app.appId
: a query parameter that specifies the ID of the HubSpot application that is requesting the event details. This will be the ID of your app.externalEventId
: a path parameter in the URL of the request that specifies the ID of the event in the external app that HubSpot requires details about.Field Name | Required | Type | Field Description |
---|---|---|---|
eventName | true | string | The name of the marketing event |
eventOrganizer | true | string | The name of the organizer of the marketing event. |
eventType | false | string | Describes what type of event this is. For example: WEBINAR , CONFERENCE , WORKSHOP |
startDateTime | false | string($date-time) | The start date and time of the marketing event. |
endDateTime | false | string($date-time) | The end date and time of the marketing event. |
eventDescription | false | string | The description of the marketing event. |
eventUrl | false | string | A URL in the external event application where the marketing event. |
eventCancelled | false | bool | Indicates if the marketing event has been cancelled. Defaults to false |
X-HubSpot-Signature-v3
header that you can use to verify that the request came from HubSpot. Read more about request signatures for additional details on the signature and how to validate it.
POST
request to /marketing/v3/marketing-events/{appId}/settings
. This will allow HubSpot to determine how to make requests to your app to get the details of a marketing event.
In the body of your POST
request, specify your URL using the eventDetailsURL
field. The eventDetailsURL
must adhere to the following two requirements:
%s
character sequence, which HubSpot will use to substitute in the ID of the event (externalEventId
) as a path parameter.https://
prefix and the domain name (e.g., my.event.app
).eventDetailsURL
of https://my.event.app/events/%s
, and you need to make a request to fetch details of an event with id 1234-event-XYZ
, for the HubSpot app with id app-101
and account with id ABC-account-789
, HubSpot will make a GET
request to:
https://my.event.app/events/1234-event-XYZ?appId=app-101&externalAccountId=ABC-account-789