Events
Events refer to specific actions or behaviors that users perform. These actions can then be tracked and analyzed to better understand user's preferences and tailor experiences accordingly. The following Events requests allow you to manage the defined events within a project.
Create an Event
https://personalize-api.contentstack.com/eventsThe Create an Event request lets you create a new event in a project.
The key field is used to uniquely identify the event. You'll use it when triggering an event from the API or SDK.
To configure the permissions for your application via OAuth, include the personalize:manage scope.
{
"key": "ctaClick",
"description": "Click on the website CTA"
}{
"key": "ctaClick",
"description": "Click on the website CTA",
"project": "64c7787b333555469a861223",
"createdBy": "bxxxxxxxxxxxx3",
"updatedBy": "bxxxxxxxxxxxx6",
"createdAt": "2024-03-13T15:39:51.645Z",
"updatedAt": "2024-03-13T15:39:51.645Z",
"uid": "65f7caf2602dc4333ec201be",
"createdByUserName": "Jane Doe",
"updatedByUserName": "Jane Doe"
}Get all Events
https://personalize-api.contentstack.com/eventsThe Get all Events request fetches the list of all the events in a project.
To configure the permissions for your application via OAuth, include the personalize:read or personalize:manage scope.
[
{
"key": "ctaClick",
"description": "Click on the website CTA",
"project": "64c7787b333555469a861227",
"createdBy": "bxxxxxxxxxxxx3",
"updatedBy": "bxxxxxxxxxxxx6",
"createdAt": "2024-03-13T15:39:51.645Z",
"updatedAt": "2024-03-13T15:39:51.645Z",
"uid": "64c78966ca0d5bf5f7bcc5f5",
"createdByUserName": "Jane Doe",
"updatedByUserName": "Jane Doe"
}
]Update an Event
https://personalize-api.contentstack.com/events/{uid}The Update an Event request lets you update an existing event in a project.
The key field is used to uniquely identify the event. You'll use it when triggering an event from the API or SDK.
To configure the permissions for your application via OAuth, include the personalize:manage scope.
{
"key": "ctaClick",
"description": "Click on the website CTA"
}{
"key": "click",
"description": "Event description",
"project": "64c7787b333555469a861223",
"createdBy": "bxxxxxxxxxxxx3",
"updatedBy": "bxxxxxxxxxxxx6",
"createdAt": "2024-03-13T15:39:51.645Z",
"updatedAt": "2024-03-13T15:39:51.645Z",
"uid": "65f7caf2602dc4333ec201be",
"createdByUserName": "Jane Doe",
"updatedByUserName": "Jane Doe"
}Delete an Event
https://personalize-api.contentstack.com/events/{uid}The Delete an Event request lets you delete an existing event in a project.
To configure the permissions for your application via OAuth, include the personalize:manage scope.
The event was deleted successfully