---
title: "Record a subscriber state by contact ID"
method: POST
path: "/marketing/v3/marketing-events/events/{externalEventId}/{subscriberState}/upsert"
tags: ["Subscriber State Changes"]
---

# Record a subscriber state by contact ID

`POST /marketing/v3/marketing-events/events/{externalEventId}/{subscriberState}/upsert`

## Request

- Base URL: `https://api.hubapi.com`
- URL: `https://api.hubapi.com/marketing/v3/marketing-events/events/{externalEventId}/{subscriberState}/upsert`
- Auth: OAuth 2
  - Authorization code: `https://app.hubspot.com/oauth/authorize`
  - Token URL: `https://api.hubapi.com/oauth/v1/token` scopes: `crm.objects.marketing_events.write`

Record a subscriber state between multiple HubSpot contacts and a marketing event, using HubSpot contact IDs. Note that the contact must already exist in HubSpot; a contact will not be created.

## Path parameters

- `externalEventId` string, required
- `subscriberState` string, required

## Query parameters

- `externalAccountId` string, required

## Request body

- BatchInputMarketingEventSubscriber
  - `inputs` MarketingEventSubscriber[], required: List of HubSpot contacts to subscribe to the marketing event
    - `interactionDateTime` integer, required: Timestamp in milliseconds at which the contact subscribed to the event.
    - `properties` object, required: The key-value set of the properties of the contact
    - `vid` integer, required: The ID of the contact in HubSpot

## Response `default`

An error occurred.

- Error: Represents an error response returned by the API when an operation fails. This component is used in various endpoints to provide detailed information about the error encountered.
  - `category` string, required: The error category
  - `context` object: Context about the error condition
  - `correlationId` string, uuid, required: A unique identifier for the request. Include this value with any error reports or support tickets
  - `errors` ErrorDetail[]: further information about the error
    - `code` string: The status code associated with the error detail
    - `context` object: Context about the error condition
    - `in` string: The name of the field or parameter in which the error was found.
    - `message` string, required: A human readable message describing the error along with remediation steps where appropriate
    - `subCategory` string: A specific category that contains more specific detail about the error
  - `links` object: A map of link names to associated URIs containing documentation about the error or recommended remediation steps
  - `message` string, required: A human readable message describing the error along with remediation steps where appropriate
  - `subCategory` string: A specific category that contains more specific detail about the error

## Changes

- **2026-08-17** (v3) `e1f0e463c8c3`: 1 info
  - endpoint added
- **2026-07-13** (v3) `7b132ea7ce5b`: 1 breaking
  - api path removed without deprecation
- **2026-05-22** (v3) `19bd139b8e75`: 2 info
  - the security scope `crm.objects.marketing_events.write` was added to the endpoint's security scheme `oauth2`
  - the security scope `marketing-events-write` was removed from the endpoint's security scheme `oauth2`
- **2026-04-21** (v3) `8260db4d2846`: 1 info
  - the `inputs/items/vid` request property format was generalized from `int32` to `int64`
- **2026-04-09** (v3) `f80533b4a1e0`: 4 info
  - api operation id `post-/marketing/v3/marketing-events/events/{externalEventId}/{subscriberState}/upsert` removed and replaced with `post-/marketing/v3/marketing-events/events/{externalEventId}/{subscriberState}/upsert_upsertByContactId`
  - the endpoint scheme security `private_apps` was removed from the API
  - the security scope `marketing-events-write` was added to the endpoint's security scheme `oauth2`
  - the security scope `crm.objects.marketing_events.write` was removed from the endpoint's security scheme `oauth2`

[Operation history](https://skmtc.dev/hubspot/apis/marketing-marketing-events/changes/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert/post.md)

---

[API](https://skmtc.dev/hubspot/apis/marketing-marketing-events.md) - [All operations](https://skmtc.dev/hubspot/apis/marketing-marketing-events/llms.txt) - [OpenAPI document](https://skmtc.dev/hubspot/apis/marketing-marketing-events/revisions/165e6b352bc2?raw)
