Sending Past Events

If you have migrated from another service or just created a Reteno account, and you have a history of

  • user activity,
  • subscriptions,
  • or other events you want to use for advanced segmentation.

You can transfer the available event data from your CRM or other data store to the Reteno system via the API resource Generate past events.

šŸ“˜

Important

Before importing events, enable segmentation for the types of events you want to download.

If your tariff plan does not include segmentation by events, please submit a request to [email protected].

How to set up segmentation by events >

To assign events to users, pre-import the contact list to your Reteno account.

For example, you have a certain number of course subscriptions over the past year, and you want to build a segment with users interested in a certain type of courses, get statistics on the number of subscriptions, or segment users by geodata (if applicable).

Convert these subscriptions info into a JSON format supported for API according to the specification, and send them to the Reteno system. You can send an array of up to 500 such events within one request. Specify the time of each event in the field occurred. Format of date: YYYY-MM-DD; format of date with the time: YYYY-MM-DDTHH:mm.

For example, you send the information on two course subscriptions:

{
    "events": [
        {
            "eventTypeKey": "orderCreated",
            "keyValue": "test_v3_event_1",
            "params": [
                {
                "phone":"380501234789",
                "externalOrderId":"12345679102",
                "externalCustomerId":"AA1100",
                "totalCost":"258.0",
                "status":"INITIALIZED",
                "date":"2025-01-05T13:00:00",
                "currency":"UAH",
                "items":[
                    {
                    "externalItemId": "200600",
                    "name": "Super Device",
                    "category": "devices",
                    "quantity": 2,
                    "cost": 999,
                    "url": "http://example.com/item/200600",
                    "imageUrl": "http://example.com/item/200600/image.png",
                    "description": "High quality"
                    }
                    ]                    
                }
            ],
            "occurred":"2025-02-04T12:00"
        },
        {
            "eventTypeKey": "orderCreated",
            "keyValue": "test_v3_event_1",
            "params": [
                {
                "phone":"380500000001",
                "externalOrderId":"12345679103",
                "externalCustomerId":"AA1111",
                "totalCost":"258.0",
                "status":"INITIALIZED",
                "date":"2025-01-07T13:00:00",
                "currency":"UAH",
                "items":[
                    {
                    "externalItemId": "200600",
                    "name": "Super Device",
                    "category": "devices",
                    "quantity": 2,
                    "cost": 999,
                    "url": "http://example.com/item/200600",
                    "imageUrl": "http://example.com/item/200600/image.png",
                    "description": "High quality"
                    }
                    ]                    
                }
            ],
            "occurred":"2025-02-07T16:00"
        }
    ]
}

Apart from basic fields with the name, cost and link to the course, you can send any related data that will be available to build segments. For example, you can send the country and city of the subscriber.

{
ā€ƒ   "city": "Los Angeles",
    "country": "USA"
}

And then use these parameters for segmentation by geolocation.

Dynamic segment condition setup showing the CourseSubscription event's city field with contains, equals, and does not equal options

For deleting old or irrelevant events, send a request to the resource Remove events, using the method type DELETE. Specify the time range to remove in the request body:

{
ā€ƒ   "from" : "2019-06-04T10:47",
ā€ƒ   "to" : "2020-01-04T13:33"
}

The method DELETE is inactive by default. To activate it, please contact our support at [email protected].

šŸ“˜

Note

This method removes only the historical events that were previously uploaded through past events. Regular v2/v3 events and orders aren't removed by it.

Both bounds of the from/to range are inclusive. Since the 2026 update, the endpoint accepts an exact time in UTC, not just a date.

The published rate limit for this endpoint is 5 requests per second. If the feature is not enabled for your organisation, the request returns 403 with a message stating that the organisation is not enabled for events removing. Processing is asynchronous and has no fixed SLA — the underlying cleanup can start several hours after the request, so deletion is not reflected immediately.

There is no maximum date range or maximum number of events per request. To reduce processing load, delete a continuous period with one request covering the whole range rather than many small per-day requests.
If some data has already aged out of the main storage under its TTL, this method doesn't remove it from segmented history.


Did this page help you?