Skip to main content

Writing Data

To write data, send a POST request to the <base_URI>/monitors/<monitor_id>/events/<collection_id> endpoint. The request body should be a JSON object.

JSON event example:

{
"user_id": "12345",
"name": "Adam",
"age": 30,
"product": "iPhone",
"price": 1000,
"premium": true,
"tags": ["tag1", "tag2"],
"address": {
"country": "USA",
"city": "New York",
"state": "NY",
"street": "123 Main St",
"zip": "12345"
}
}
note
  • If you don't want to store duplicate events, send a unique _id in the request body, if you didn't, a hash of the body with be used as an ID.
  • Every JSON object must have a user_id field.
  • You can only have 100 unique fields per collection.
  • You can send a timestamp field in the format YYYY-MM-DDTHH:mm:ss.sssZ or YYYY-MM-DDTHH:mm:ssZ to set the timestamp of the event. If no timestamp is provided, the current time is used.