Skip to content

Events API

You can use the events API to insert events into Almeta ML from any source. Events are used to train machine learning models and to make predictions.

Insert an Event

  • Method: POST
  • Path: /ml/events
  • Description: Inserts an event into the system.
  • Request Body:
PropertyTypeDescription
customer_idStringThe ID of the customer associated with the event
nameStringThe name of the event
dataStringThe data of the event as an object (optional)
metadataStringThe metadata of the event (optional)
user_agentStringThe user agent of the customer (optional)
contextStringThe context of the event (optional)
is_botBooleanWhether the customer likely is a bot (optional)
geoObjectThe geolocation of the customer (optional)

The data property needs to have a correct event format for the corresponding event name. Refer to the event documentation for more information.

The metadata property is an object that can contain any additional information about the event.

The geo object has the following properties:

PropertyTypeDescription
timezoneStringThe timezone of the customer (optional)
continentStringThe continent of the customer (optional)
countryStringThe country of the customer (optional)
postal_codeStringThe postal code of the customer (optional)
regionStringThe region of the customer (optional)
region_codeStringThe region code of the customer (optional)
cityStringThe city of the customer (optional)
latitudeStringThe latitude of the customer (optional)
longtitudeStringThe longtitude of the customer (optional)
is_in_euBooleanWhether the customer is in the EU (optional)