Zum Hauptinhalt springen
POST
/
marketing
/
v3
/
marketing-events
/
events
/
upsert
Créer ou mettre à jour plusieurs événements marketing
curl --request POST \
  --url https://api.hubapi.com/marketing/v3/marketing-events/events/upsert \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "inputs": [
    {
      "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"
    }
  ]
}'
{
  "completedAt": "2023-11-07T05:31:56Z",
  "errors": [
    {
      "category": "<string>",
      "context": {},
      "errors": [
        {
          "code": "<string>",
          "context": "{missingScopes=[scope1, scope2]}",
          "in": "<string>",
          "message": "<string>",
          "subCategory": "<string>"
        }
      ],
      "id": "<string>",
      "links": {},
      "message": "<string>",
      "status": "<string>",
      "subCategory": {}
    }
  ],
  "links": {},
  "numErrors": 123,
  "requestedAt": "2023-11-07T05:31:56Z",
  "results": [
    {
      "createdAt": "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>",
      "id": "<string>",
      "objectId": "<string>",
      "startDateTime": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "startedAt": "2023-11-07T05:31:56Z",
  "status": "CANCELED"
}

Produits pris en charge

Exige l'un des produits suivants ou un produit supérieur.
Marketing HubMarketing Hub -Gratuit
Sales HubSales Hub -Gratuit
Service HubService Hub -Gratuit
Content HubContent Hub -Starter
Cette API requiert l'une des portées suivantes :
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
inputs
object[]
required

Response

successful operation

completedAt
string<date-time>
required
results
object[]
required
startedAt
string<date-time>
required
status
enum<string>
required
Verfügbare Optionen:
CANCELED,
COMPLETE,
PENDING,
PROCESSING
errors
object[]
numErrors
integer
requestedAt
string<date-time>