Define event
Defines an event before it is sent, with the types its data has to carry. An event that is sent without being defined defines itself, with no types.
View as
POST
/v1/eventsNeeds the scopeevents:write
Body parameters
namestringRequiredA name for the event, such as
order.paid: letters, digits, dots, dashes, colons and underscores.schemaRecord<string, string>The type of each value its data has to carry, by name:
string,number,booleanordate. Without it the event takes any data.
Returns
object"event"Always
event.idstringThe id of the event.
namestringThe name of the event, such as
order.paid.schemaRecord<string, string> | nullThe type of each value its data has to carry:
string,number,booleanordate.nulltakes any data.receivedintegerHow many times it has been sent.
lastReceivedAtstring | nullWhen it was last sent, or
null.createdAtstringWhen the event was first defined or sent.