---
title: "Personalization"
description: "<p>Entity API, ie Personalization or Profile API.</p><p>Retrieve attributes and segments an entity (most likely a user) is a member of.</p><p>The *Entity* is a *User* most likely, but since Lytics is organized as a Graph Database,</p><p>other types of entities may be modeled such as Accounts, or Company, Content, or custom.</p><p>``<span data-type=\"inlineCode\" class=\"code\"></p><p># read a single user</p><p>curl -s -H \"Authorization: $LIOKEY\" \\</p><p>  -XGET \"https://api.lytics.io/api/entity/user/user_id/user123\" | jq '.'</p><p></span>``</p>"
url: "https://www.contentstack.com/docs/developers/apis/lytics-api/v1/personalization"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-11-05"
---

# Personalization

Entity API, ie Personalization or Profile API.

Retrieve attributes and segments an entity (most likely a user) is a member of.

The \*Entity\* is a \*User\* most likely, but since Lytics is organized as a Graph Database,

other types of entities may be modeled such as Accounts, or Company, Content, or custom.

\`\`

\# read a single user

curl -s -H "Authorization: $LIOKEY" \\

\-XGET "https://api.lytics.io/api/entity/user/user\_id/user123" | jq '.'

\`\`

## User Me

### User Me

**GET** `/api/me/{fieldname}/{fieldval}`

Get single User Entity. This is an alias for /api/entity/user.

#### URL Parameters

- **fieldname** (required)
  Field name of identity to use as lookup
- **fieldval** (required)
  Field value of identity

#### Query Parameters

- **account_id** (optional)
  Your Lytics account ID.
- **fields** (optional)
  comma delimited field list to be returned
- **fieldBlocklist** (optional)
  comma delimited list of fields to exclude
- **include_fields** (optional)
  if true include all the whitelisted fields
- **segments** (optional)
  Should segments this user is member of be included?
- **meta** (optional)
  Should Meta Fields be included?
- **download** (optional)
  Should the content-disposition header set to attachment to download the user as a file?

#### Headers

- **Authorization** (optional)

#### Sample Response

```json
{
  "data": {
    "segments": [
      "email_us_based",
      "web_users",
      "all"
    ]
  },
  "message": "success",
  "meta": {
    "by_fields": [
      "user_id",
      "email",
      "fbuid",
      "_uids"
    ],
    "format": "json",
    "name": "user"
  },
  "status": 200
}
```

## Personalization

### Personalization

**GET** `/api/entity/{table}/{fieldname}/{fieldval}`

Get single User Entity.

\`\`

\# get user whose user\_id = user123

curl -s -H "Authorization: $LIOKEY" \\

\-XGET "https://api.lytics.io/api/entity/user/user\_id/user123" | jq '.'

\# get user whose email = aaron@aaron.com

curl -s -H "Authorization: $LIOKEY" \\

\-XGET "https://api.lytics.io/api/entity/user/email/aaron@aaron.com" | jq '.'

\`\`

#### URL Parameters

- **table** (required)
- **fieldname** (required)
- **fieldval** (required)
  Field value of identity

#### Query Parameters

- **account_id** (optional)
  Your Lytics account ID.
- **fields** (optional)
  comma delimited field list to be returned
- **fieldBlocklist** (optional)
  comma delimited list of fields to exclude
- **include_fields** (optional)
  if true include all the whitelisted fields
- **segments** (optional)
  Should segments this user is member of be included?
- **meta** (optional)
  Should Meta Fields be included?
- **download** (optional)
  Should the content-disposition header set to attachment to download the user as a file?

#### Headers

- **Authorization** (optional)

#### Sample Response

```json
{
  "data": {
    "segments": [
      "email_us_based",
      "web_users",
      "all"
    ]
  },
  "message": "success",
  "meta": {
    "by_fields": [
      "user_id",
      "email",
      "fbuid",
      "_uids"
    ],
    "format": "json",
    "name": "user"
  },
  "status": 200
}
```

## Profile Delete Request

### Profile Delete Request

**DELETE** `/api/entity/{table}/{fieldname}/{fieldval}`

Deletes a single Entity (normally a user).

This API persists a deletion event for the particular profile provided. This operation is asynchronous; it will take

some time for the profile to be removed from downstream databases and indexes. This request returns a "request\_id"

which may be used to determine the status of that deletion. While the profile may become unavailable quickly, it may

take a while for the full process to complete since it includes all archived historic data.

\`\`

\# Delete user whose "user\_id" = "userdeleteme12"

\# user\_id can be any by-field

curl -s -H "Authorization: $LIOKEY" \\

\-XDELETE "https://api.lytics.io/api/entity/user/user\_id/userdeleteme12" | jq '.'

\`\`

\*\*Use Cases\*\*

\* \*GDPR\* right to be forgotten, a user asks for profile to be deleted.

#### URL Parameters

- **table** (required)
- **fieldname** (required)
  Field name of identity to use as lookup (could be email, user\_id, etc)
- **fieldval** (required)
  Field value of identity

#### Query Parameters

- **account_id** (optional)
  Your Lytics account ID.

#### Headers

- **Authorization** (optional)

#### Sample Response

```json
{
  "status": 200,
  "message": "delete request received",
  "data": {
    "request_id": "e9d5f2d3d2c7a7d0e801-1526083200",
    "complete": false
  }
}
```

## Web Personalization

### Web Personalization

**GET** `/api/entity/{table}/{fieldval}`

Get single User Entity using cookie id. This is same as entity api

but you don't specify a fieldname (user\_id, email, etc) and instead it only uses the cookie identifier.

#### URL Parameters

- **table** (required)
  Field value of data table
- **fieldval** (required)
  Field value of identity

#### Query Parameters

- **account_id** (optional)
  Your Lytics account ID.
- **fields** (optional)
  comma delimited field list to be returned
- **fieldBlocklist** (optional)
  comma delimited list of fields to exclude
- **include_fields** (optional)
  if true include all the whitelisted fields
- **segments** (optional)
  Should segments this user is member of be included?
- **meta** (optional)
  Should Meta Fields be included?
- **download** (optional)
  Should the content-disposition header set to attachment to download the user as a file?

#### Headers

- **Authorization** (optional)

#### Sample Response

```json
{
  "data": {
    "segments": [
      "email_us_based",
      "web_users",
      "all"
    ]
  },
  "message": "success",
  "meta": {
    "by_fields": [
      "user_id",
      "email",
      "fbuid",
      "_uids"
    ],
    "format": "json",
    "name": "user"
  },
  "status": 200
}
```

## ProfileDeletion Status

### ProfileDeletion Status

**GET** `/api/entity/deletestatus/{request_id}`

Retrieves the status of a submitted deletion event.

#### URL Parameters

- **request_id** (required)
  RequestID of previously submitted deletion event

#### Query Parameters

- **account_id** (optional)
  Your Lytics account ID.

#### Headers

- **Authorization** (optional)

#### Sample Response

```json
{
  "status": 200,
  "message": "delete request received",
  "data": {
    "request_id": "e9d5f2d3d2c7a7d0e801-1526083200",
    "complete": false
  }
}
```