Create an Event

This is a common endpoint used to create a new event.

Summary

  • Endpoint: /event_create
  • Method: POST
  • Required User Type: None, this works for all users

Body

  • device_id - string of user you want to create event for
    • Required
    • Type: string
    • Allowed users:
      • Any devices linked to current tenant
      • Tenant basic user
      • User basic user
      • If super admin/user: any user
  • stream - stream to send data to
    • Required
    • Type: string
  • event_data - data to send
    • Required
    • Type: dictionary
  • observed_at - event timestamp
    • Default: Now
    • Type: Date object or ISO-8601 date string

Response

A successful response will return an array containing the event's event_id in the "data" tag of the response.

Example

Request Body:

{
device_id: 'accounts',
stream: 'licensee_accounts',
event_data: {"test": "test1234", "test2": 1}
}

Response Data:

["12345678"]