---
title: "Generate past events V2"
method: POST
path: "/api/v2/past_events"
tags: ["Events"]
---

# Generate past events V2

`POST /api/v2/past_events`

## Request

- Base URL: `https://yespo.io` (the document declares no server; this is the origin it was published from)
- URL: `https://yespo.io/api/v2/past_events`
- Auth: HTTP basic

The method is used for transferring the available event data from your CRM or other data store to our system.<br/>Workflows are not launched for these events. You can send up to 500 events per a request. <br/> <b>NOTE:</b> Version 2 API methods do not require escaping in nested JSON. <br/><a href="${v2past_events.post.link}">Learn more.</a>

## Request body

- BatchPastEventsV2
  - `events` PastEvent[]: The list of the past events
    - `eventTypeKey` string, required: Event type ID. If no such event type exists, a new one is created.<br> All characters are allowed, except < ; ’ \ / | " ` ' ^ ? ! , >
    - `keyValue` string, required: Event key. Determines event uniqueness.<br> The key must contain a unique value for each contact (for example, email, phone number, external contact id, etc.)<br> All characters are allowed, except < ; ’ \ / | " ` ' ^ ? ! , > <br> Max length: 300 symbols
    - `params` EventParameter[]: The list of event parameters represented as an array of "key" - "value" pairs. The parameter keys are arbitrary. <br> Used in campaigns and for dynamic content creation in messages.
      - `name` string
      - `value` object
    - `occurred` string: Event date and time.

## Response `200`

---

[API](https://skmtc.dev/yespo/apis/yespo-api.md) · [All operations](https://skmtc.dev/yespo/apis/yespo-api/llms.txt) · [OpenAPI document](https://skmtc.dev/yespo/apis/yespo-api/revisions/b662f92b6c40?raw)
