---
updatedAt: 2026-06-05T14:52:30.000Z
agentTools:
  projectIndex: https://docs.esputnik.com/llms.txt
---

# Generate events v1

The method is used for generating events in the account to be used for starting a workflow or being taken into account for segmentation.<br/>Max. size of content for events sent in the request body is 20 kB.<br/>To learn more, read <a href="https://docs.esputnik.com/docs/sending-orders-via-api">Order management via events.</a>

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "esputnik.com",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://esputnik.com"
    }
  ],
  "security": [
    {
      "basicAuth": []
    }
  ],
  "tags": [
    {
      "name": "Deprecated"
    }
  ],
  "paths": {
    "/api/v1/event": {
      "post": {
        "tags": [
          "Deprecated"
        ],
        "summary": "Generate events v1",
        "description": "The method is used for generating events in the account to be used for starting a workflow or being taken into account for segmentation.<br/>Max. size of content for events sent in the request body is 20 kB.<br/>To learn more, read <a href=\"https://docs.esputnik.com/docs/sending-orders-via-api\">Order management via events.</a>",
        "operationId": "registerEvent",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EventDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": ""
          }
        },
        "deprecated": true
      }
    }
  },
  "components": {
    "schemas": {
      "EventDto": {
        "required": [
          "eventTypeKey"
        ],
        "type": "object",
        "properties": {
          "eventTypeKey": {
            "type": "string",
            "description": "Event type ID key. If no event type exists with this key, a new event is created.<br>\nAll characters are allowed except < ; ’ \\ / | \" ` ' ^ ? ! , > <br/>Max length: 100 symbols",
            "example": "abandonedCart"
          },
          "keyValue": {
            "type": "string",
            "description": "Event key. Determines event uniqueness.<br>\nThe key must contain a unique value for each contact (for example, email, phone number, external contact id, etc.)<br>\nIf this parameter is not set, params must contain one of the following contact identifiers:<br/>- contactId <br/>- externalCustomerId <br/>- email <br/>- phone <br/>- pushToken: web or mobile <br/>All characters are allowed except the following ones < ; ’ \\ / | \" ` ' ^ ? ! , > <br/>Max length: 300 symbols",
            "example": "contact@mail.com"
          },
          "params": {
            "type": "array",
            "description": "List of event parameters represented as an array of \"key\" - \"value\" pairs. The parameter keys are arbitrary. <br>\nUsed in campaigns and for creating dynamic content in messages.</div>",
            "example": [
              "discount",
              "12%"
            ],
            "items": {
              "$ref": "#/components/schemas/Parameter"
            }
          }
        }
      },
      "Parameter": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        },
        "description": "The list of event parameters represented as an array of \"key\" - \"value\" pairs. The parameter keys are arbitrary. <br>\n\tUsed in campaigns and for creating dynamic content in messages."
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  }
}
```