Skip to main content
POST
/
marketing
/
v3
/
marketing-events
/
events
Create a marketing event
curl --request POST \
  --url https://api.hubapi.com/marketing/v3/marketing-events/events \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "customProperties": [
    {
      "dataSensitivity": "high",
      "isEncrypted": true,
      "isLargeValue": true,
      "name": "<string>",
      "persistenceTimestamp": 123,
      "requestId": "<string>",
      "selectedByUser": true,
      "selectedByUserTimestamp": 123,
      "source": "ACADEMY",
      "sourceId": "<string>",
      "sourceLabel": "<string>",
      "sourceMetadata": "<string>",
      "sourceUpstreamDeployable": "<string>",
      "sourceVid": [
        123
      ],
      "timestamp": 123,
      "unit": "<string>",
      "updatedByUserId": 123,
      "useTimestampAsPersistenceTimestamp": true,
      "value": "<string>"
    }
  ],
  "endDateTime": "2023-11-07T05:31:56Z",
  "eventCancelled": true,
  "eventCompleted": true,
  "eventDescription": "<string>",
  "eventName": "<string>",
  "eventOrganizer": "<string>",
  "eventType": "<string>",
  "eventUrl": "<string>",
  "externalAccountId": "<string>",
  "externalEventId": "<string>",
  "startDateTime": "2023-11-07T05:31:56Z"
}'
{
  "customProperties": [
    {
      "dataSensitivity": "high",
      "isEncrypted": true,
      "isLargeValue": true,
      "name": "<string>",
      "persistenceTimestamp": 123,
      "requestId": "<string>",
      "selectedByUser": true,
      "selectedByUserTimestamp": 123,
      "source": "ACADEMY",
      "sourceId": "<string>",
      "sourceLabel": "<string>",
      "sourceMetadata": "<string>",
      "sourceUpstreamDeployable": "<string>",
      "sourceVid": [
        123
      ],
      "timestamp": 123,
      "unit": "<string>",
      "updatedByUserId": 123,
      "useTimestampAsPersistenceTimestamp": true,
      "value": "<string>"
    }
  ],
  "endDateTime": "2023-11-07T05:31:56Z",
  "eventCancelled": true,
  "eventCompleted": true,
  "eventDescription": "<string>",
  "eventName": "<string>",
  "eventOrganizer": "<string>",
  "eventType": "<string>",
  "eventUrl": "<string>",
  "objectId": "<string>",
  "startDateTime": "2023-11-07T05:31:56Z"
}

Supported products

Requires one of the following products or higher.
Marketing HubMarketing Hub -Free
Sales HubSales Hub -Free
Service HubService Hub -Free
Content HubContent Hub -Starter
This API requires one of the following scopes:
crm.objects.marketing_events.write

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json
customProperties
object[]
required

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.

eventName
string
required

The name of the marketing event.

eventOrganizer
string
required

The name of the organizer of the marketing event.

externalAccountId
string
required

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

externalEventId
string
required

The id of the marketing event in the external event application.

endDateTime
string<date-time>

The end date and time of the marketing event.

eventCancelled
boolean

Indicates if the marketing event has been cancelled. Defaults to false

eventCompleted
boolean
eventDescription
string

The description of the marketing event.

eventType
string

Describes what type of event this is. For example: WEBINAR, CONFERENCE, WORKSHOP

eventUrl
string

A URL in the external event application where the marketing event can be managed.

startDateTime
string<date-time>

The start date and time of the marketing event.

Response

successful operation

customProperties
object[]
required

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.

eventName
string
required

The name of the marketing event.

eventOrganizer
string
required

The name of the organizer of the marketing event.

endDateTime
string<date-time>

The end date and time of the marketing event.

eventCancelled
boolean

Indicates if the marketing event has been cancelled.

eventCompleted
boolean
eventDescription
string

The description of the marketing event.

eventType
string

The type of the marketing event.

eventUrl
string

The URL in the external event application where the marketing event can be managed.

objectId
string
startDateTime
string<date-time>

The start date and time of the marketing event.