Register a new Event Type so that Endu can use it.
When should I use this?
Endu will only accept events with an event_type
that is known to it. Each event_type
is assigned a unique ID and will return this ID in place of the human-readable event name in most APIs. Different Organizations may have overlapping human-readable event_type
, so this is a natural requirement.
Important Notes:
- You are not allowed to create a new
event_type
that is already defined globally. This includes:BEGIN_ENTITY
,LINK_TRACKING_CLICK
BLOCKCHAIN_ACCOUNT_SIGN_IN
BEGIN_EVENT
- You are limited to
100
newevent_type
definitions. This can be expanded on request. - The
event_type
must be uppercase, with underscores delimiting words. No symbols or numbers are allowed. A maximum length of 50 characters is permitted. - The
event_display_name
must be no longer than 50 characters.
Event Data Schema
We offer an earlier in-progress schema validator. You should not rely on this as a last check, as it is still in development. We do encourage you to predefine it for future ease. You should not use this method to change the event schema.
Request [POST]
Request Body
{
"event_type":"MY_NEW_EVENT",
"event_display_name":"My New Event",
"event_data_schema":{
"key_1":"string",
"key_2":"array",
"key_3":"number",
"key_4":{
"sub_key_1":"string"
}
},
"confirm_overwrite":false
}
Response (Accepted)
{
"success": true,
"data": {
"event_id":"905HFFkfjwuja8f89W2"
},
"error": "",
"error_text": ""
}
Response (Denied)
{
"success": false,
"data": {},
"error": "DUPLICATE_EVENT_TYPE",
"error_text": "A event_type of that name already exists. Overwriting it may have extreme negative consequences."
}
Response (Denied, issue with event_type/event_display_name formatting)
{
"success": false,
"data": {},
"error": "INVALID_FORMAT",
"error_text": "The format for event_type or event_displayname is invalid, or contains too many characters."
}
Response (Accepted, with overwriting)
{
"success": true,
"data": {
"event_id": "08TFGJwwakwjgGklw",
"event_id_previous": "905HFFkfjwuja8f89W2"
},
"error": "",
"error_text": ""
}