---
title: User CRUD
url: https://docs.kaltura.com/docs/rich-media-cms-apis/content-management/user-management-user-crud
---

## User CRUD


### Create a User


```
POST /service/user/action/add
```



```bash
curl -X POST "$KALTURA_SERVICE_URL/service/user/action/add" \
  -d "ks=$KALTURA_KS" \
  -d "format=1" \
  -d "user[objectType]=KalturaUser" \
  -d "user[id]=jane.doe@example.com" \
  -d "user[firstName]=Jane" \
  -d "user[lastName]=Doe" \
  -d "user[email]=jane.doe@example.com" \
  -d "user[type]=0"
```


| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `user[objectType]` | string | Yes | Always `KalturaUser` |
| `user[id]` | string | Yes | Unique user identifier |
| `user[firstName]` | string | No | First name |
| `user[lastName]` | string | No | Last name |
| `user[email]` | string | No | Email address |
| `user[type]` | integer | No | `0` = USER (default), `200` = GROUP |
| `user[isAdmin]` | boolean | No | Grant admin privileges |
| `user[roleIds]` | string | No | Comma-separated role IDs to assign |
| `user[tags]` | string | No | Comma-separated tags |

**Response:** Full `KalturaUser` object with `status=1` (ACTIVE):


```json
{
  "id": "jane.doe@example.com",
  "partnerId": 976461,
  "screenName": "Jane Doe",
  "fullName": "Jane Doe",
  "firstName": "Jane",
  "lastName": "Doe",
  "email": "jane.doe@example.com",
  "type": 0,
  "status": 1,
  "isAdmin": false,
  "roleIds": "",
  "roleNames": "",
  "loginEnabled": false,
  "tags": "",
  "createdAt": 1718467200,
  "updatedAt": 1718467200,
  "objectType": "KalturaUser"
}
```


### Get a User


```bash
curl -X POST "$KALTURA_SERVICE_URL/service/user/action/get" \
  -d "ks=$KALTURA_KS" \
  -d "format=1" \
  -d "userId=jane.doe@example.com"
```


| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `userId` | string | Yes | User ID to retrieve |

Returns the full `KalturaUser` object. Returns `INVALID_USER_ID` if the user does not exist.

### List Users


```bash
curl -X POST "$KALTURA_SERVICE_URL/service/user/action/list" \
  -d "ks=$KALTURA_KS" \
  -d "format=1" \
  -d "filter[objectType]=KalturaUserFilter" \
  -d "filter[statusEqual]=1" \
  -d "filter[orderBy]=-createdAt" \
  -d "pager[pageSize]=50" \
  -d "pager[pageIndex]=1"
```


**Filter fields (`KalturaUserFilter`):**

| Field | Description |
|-------|-------------|
| `idEqual` | Exact user ID match |
| `idIn` | Comma-separated list of user IDs |
| `statusEqual` | Filter by status (0, 1, 2) |
| `statusIn` | Comma-separated status values |
| `typeEqual` | Filter by type (0 = USER, 200 = GROUP) |
| `isAdminEqual` | Filter by admin flag |
| `firstNameStartsWith` | First name prefix match |
| `lastNameStartsWith` | Last name prefix match |
| `emailStartsWith` | Email prefix match |
| `tagsMultiLikeOr` | Tags (OR match) |
| `roleIdsEqual` | Filter by assigned role ID |
| `loginEnabledEqual` | Filter by login-enabled status |
| `createdAtGreaterThanOrEqual` | Unix timestamp minimum |
| `createdAtLessThanOrEqual` | Unix timestamp maximum |
| `orderBy` | `+createdAt`, `-createdAt`, `+updatedAt`, `-updatedAt` |

**Response:**


```json
{
  "totalCount": 42,
  "objects": [
    {
      "id": "jane.doe@example.com",
      "firstName": "Jane",
      "lastName": "Doe",
      "status": 1,
      "objectType": "KalturaUser"
    }
  ],
  "objectType": "KalturaUserListResponse"
}
```


### Update a User


```bash
curl -X POST "$KALTURA_SERVICE_URL/service/user/action/update" \
  -d "ks=$KALTURA_KS" \
  -d "format=1" \
  -d "userId=jane.doe@example.com" \
  -d "user[objectType]=KalturaUser" \
  -d "user[firstName]=Janet" \
  -d "user[title]=Engineering Lead" \
  -d "user[company]=Acme Corp"
```


| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `userId` | string | Yes | User to update |
| `user[objectType]` | string | Yes | Always `KalturaUser` |
| `user[firstName]` | string | No | Updated first name |
| `user[lastName]` | string | No | Updated last name |
| `user[email]` | string | No | Updated email |
| `user[roleIds]` | string | No | Updated role assignments |
| `user[isAdmin]` | boolean | No | Update admin status |
| `user[tags]` | string | No | Updated tags |

Fields not included remain unchanged. The `id` field cannot be changed after creation.

**Response:** Full updated `KalturaUser` object.

### Delete a User


```bash
curl -X POST "$KALTURA_SERVICE_URL/service/user/action/delete" \
  -d "ks=$KALTURA_KS" \
  -d "format=1" \
  -d "userId=jane.doe@example.com"
```


| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `userId` | string | Yes | User ID to delete |

Soft-deletes the user (`status` changes to `2`). The user object is returned with the updated status.

**Cascade behavior:** Deleting a KalturaUser soft-deletes all associated [User Profiles](/docs/events-collaboration/user-profile-api/user-profile-overview) across all app instances. Delete user profiles explicitly first if you need to control the order.
