Passer au contenu principal
POST
/
integrators
/
timeline
/
v3
/
events
/
batch
/
create
Créer plusieurs événements
curl --request POST \
  --url https://api.hubapi.com/integrators/timeline/v3/events/batch/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "inputs": [
    {
      "eventTemplateId": "1001298",
      "email": "[email protected]",
      "tokens": {
        "petName": "Art3mis",
        "petAge": 3,
        "petColor": "black"
      },
      "extraData": {
        "questions": [
          {
            "question": "Who's a good girl?",
            "answer": "Bark!"
          },
          {
            "question": "Do you wanna go on a walk?",
            "answer": "Woof!"
          }
        ]
      },
      "timelineIFrame": {
        "linkLabel": "View Art3mis",
        "headerLabel": "Art3mis dog",
        "url": "https://my.petspot.com/pets/Art3mis",
        "width": 600,
        "height": 400
      }
    },
    {
      "eventTemplateId": "1001298",
      "email": "[email protected]",
      "tokens": {
        "petName": "Pocket",
        "petAge": 3,
        "petColor": "yellow"
      },
      "extraData": {
        "questions": [
          {
            "question": "Who's a good kitty?",
            "answer": "Purr..."
          },
          {
            "question": "Will you stop playing with that?",
            "answer": "Meow!"
          }
        ]
      },
      "timelineIFrame": {
        "linkLabel": "View Pocket",
        "headerLabel": "Pocket Tiger",
        "url": "https://my.petspot.com/pets/Pocket",
        "width": 600,
        "height": 400
      }
    }
  ]
}
EOF
{
  "results": [
    {
      "objectType": "contacts",
      "id": "petspot:1001298:[email protected]",
      "eventTemplateId": "1001298",
      "email": "[email protected]",
      "objectId": "28001",
      "timestamp": "2020-01-30T18:10:17.057Z",
      "tokens": {
        "petName": "Art3mis",
        "petColor": "black",
        "petAge": "3"
      },
      "extraData": {
        "questions": [
          {
            "question": "Who's a good girl?",
            "answer": "Bark!"
          },
          {
            "question": "Do you wanna go on a walk?",
            "answer": "Woof!"
          }
        ]
      },
      "timelineIFrame": {
        "linkLabel": "View Art3mis",
        "headerLabel": "Art3mis dog",
        "url": "https://my.petspot.com/pets/Art3mis",
        "width": 600,
        "height": 400
      }
    },
    {
      "objectType": "contacts",
      "id": "petspot:1001298:[email protected]",
      "eventTemplateId": "1001298",
      "email": "[email protected]",
      "objectId": "28651",
      "timestamp": "2020-01-30T18:10:17.057Z",
      "tokens": {
        "petName": "Pocket",
        "petColor": "yellow",
        "petAge": "3"
      },
      "extraData": {
        "questions": [
          {
            "question": "Who's a good kitty?",
            "answer": "Purr..."
          },
          {
            "question": "Will you stop playing with that?",
            "answer": "Meow!"
          }
        ]
      },
      "timelineIFrame": {
        "linkLabel": "View Pocket",
        "headerLabel": "Pocket Tiger",
        "url": "https://my.petspot.com/pets/Pocket",
        "width": 600,
        "height": 400
      }
    }
  ],
  "status": "COMPLETE",
  "startedAt": "2020-01-30T18:10:16.478734Z",
  "completedAt": "2020-01-30T18:10:17.793206Z"
}

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 -Gratuit

Authorizations

Authorization
string
header
required

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

Body

application/json

The timeline event definition.

Used to create timeline events in batches.

inputs
object[]
required

Une collection d'événements de la chronologie que nous voulons créer.

Response

Last modified on December 8, 2025