---
title: "Events"
description: "<p>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.</p>"
url: "https://www.contentstack.com/docs/developers/apis/personalize-management-api/events"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-04-24"
---

# 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

### Create an Event

**POST** `/events`

The 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.

#### Headers

- **authorization** (optional)
  Enter your OAuth token here. Read more: https://www.contentstack.com/docs/developers/developer-hub/contentstack-oauth
- **authtoken** (optional)
  Enter your authtoken here. Read more: https://www.contentstack.com/docs/developers/create-tokens/types-of-tokens#authentication-tokens-authtokens
- **x-project-uid** (required)

#### Sample Response

```json
{
  "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

### Get all Events

**GET** `/events`

The 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.

#### Headers

- **authorization** (optional)
  Enter your OAuth token here. Read more: https://www.contentstack.com/docs/developers/developer-hub/contentstack-oauth
- **authtoken** (optional)
  Enter your authtoken here. Read more: https://www.contentstack.com/docs/developers/create-tokens/types-of-tokens#authentication-tokens-authtokens
- **x-project-uid** (required)

#### Sample Response

```json
[
  {
    "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

### Update an Event

**PUT** `/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.

#### URL Parameters

- **uid** (required)
  Enter the Event UID to be updated.

#### Headers

- **authorization** (optional)
  Enter your OAuth token here. Read more: https://www.contentstack.com/docs/developers/developer-hub/contentstack-oauth
- **authtoken** (optional)
  Enter your authtoken here. Read more: https://www.contentstack.com/docs/developers/create-tokens/types-of-tokens#authentication-tokens-authtokens
- **x-project-uid** (required)

#### Sample Response

```json
{
  "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

### Delete an Event

**DELETE** `/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.

#### URL Parameters

- **uid** (required)
  Enter the Event UID to be deleted.

#### Headers

- **authorization** (optional)
  Enter your OAuth token here. Read more: https://www.contentstack.com/docs/developers/developer-hub/contentstack-oauth
- **authtoken** (optional)
  Enter your authtoken here. Read more: https://www.contentstack.com/docs/developers/create-tokens/types-of-tokens#authentication-tokens-authtokens
- **x-project-uid** (required)

#### Sample Response

```json
The event was deleted successfully
```