POST
/
marketing
/
v3
/
marketing-events
/
events
/
{externalEventId}
/
{subscriberState}
/
email-upsert
Record a subscriber state by contact email
curl --request POST \
  --url https://api.hubapi.com/marketing/v3/marketing-events/events/{externalEventId}/{subscriberState}/email-upsert \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "inputs": [
    {
      "contactProperties": {},
      "properties": {},
      "email": "<string>",
      "interactionDateTime": 123
    }
  ]
}'
{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
Supported products
Requires one of the following products or higher.
Marketing HubMarketing HubFree
Sales HubSales HubFree
Service HubService HubFree
Content HubContent HubStarter

Required Scopes

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.

Path Parameters

externalEventId
string
required

The id of the marketing event in the external event application

subscriberState
string
required

The new subscriber state for the HubSpot contacts and the specified marketing event. For example: 'register', 'attend' or 'cancel'.

Query Parameters

externalAccountId
string
required

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

Body

application/json

Response

default - */*

An error occurred.

The response is of type object.