---
title: Profile CRUD
url: https://docs.kaltura.com/docs/rich-media-cms-apis/content-management/access-control-profile-crud
---

## Profile CRUD


### Create a Profile


```bash
curl -X POST "$KALTURA_SERVICE_URL/service/accessControlProfile/action/add" \
  -d "ks=$KALTURA_KS" \
  -d "format=1" \
  -d "accessControlProfile[objectType]=KalturaAccessControlProfile" \
  -d "accessControlProfile[name]=Geo Restricted" \
  -d "accessControlProfile[description]=Block playback outside US"
```


**Parameters for `accessControlProfile[...]`:**

| Parameter | Required | Description |
|-----------|----------|-------------|
| `objectType` | Yes | Always `KalturaAccessControlProfile` |
| `name` | Yes | Display name for the profile |
| `description` | No | Human-readable description |
| `systemName` | No | System-level name for programmatic lookup |
| `isDefault` | No | Set to `1` to make this the default profile |
| `rules` | No | Array of `KalturaRule` objects (see section 7) |

**Response:** Full `KalturaAccessControlProfile` object with generated `id`.

### Create a Profile with Rules


```bash
curl -X POST "$KALTURA_SERVICE_URL/service/accessControlProfile/action/add" \
  -d "ks=$KALTURA_KS" \
  -d "format=1" \
  -d "accessControlProfile[objectType]=KalturaAccessControlProfile" \
  -d "accessControlProfile[name]=US Only Playback" \
  -d "accessControlProfile[description]=Block playback outside United States" \
  -d "accessControlProfile[rules][0][objectType]=KalturaRule" \
  -d "accessControlProfile[rules][0][actions][0][objectType]=KalturaAccessControlBlockAction" \
  -d "accessControlProfile[rules][0][conditions][0][objectType]=KalturaCountryCondition" \
  -d "accessControlProfile[rules][0][conditions][0][not]=true" \
  -d "accessControlProfile[rules][0][conditions][0][values][0][objectType]=KalturaStringValue" \
  -d "accessControlProfile[rules][0][conditions][0][values][0][value]=US" \
  -d "accessControlProfile[rules][0][contexts][0][objectType]=KalturaAccessControlContextTypeHolder" \
  -d "accessControlProfile[rules][0][contexts][0][type]=1" \
  -d "accessControlProfile[rules][0][message]=Content not available in your region"
```


### Get a Profile


```bash
curl -X POST "$KALTURA_SERVICE_URL/service/accessControlProfile/action/get" \
  -d "ks=$KALTURA_KS" \
  -d "format=1" \
  -d "id=$ACCESS_CONTROL_ID"
```


### List Profiles


```bash
curl -X POST "$KALTURA_SERVICE_URL/service/accessControlProfile/action/list" \
  -d "ks=$KALTURA_KS" \
  -d "format=1" \
  -d "filter[objectType]=KalturaAccessControlProfileFilter" \
  -d "pager[pageSize]=50"
```


**Filter fields (`KalturaAccessControlProfileFilter`):**

| Field | Description |
|-------|-------------|
| `idEqual` | Exact profile ID |
| `idIn` | Comma-separated profile IDs |
| `systemNameEqual` | Exact system name match |
| `createdAtGreaterThanOrEqual` | Unix timestamp lower bound |
| `createdAtLessThanOrEqual` | Unix timestamp upper bound |
| `orderBy` | `+createdAt` or `-createdAt` |

### Update a Profile


```bash
curl -X POST "$KALTURA_SERVICE_URL/service/accessControlProfile/action/update" \
  -d "ks=$KALTURA_KS" \
  -d "format=1" \
  -d "id=$ACCESS_CONTROL_ID" \
  -d "accessControlProfile[objectType]=KalturaAccessControlProfile" \
  -d "accessControlProfile[description]=Updated restrictions"
```


### Delete a Profile


```bash
curl -X POST "$KALTURA_SERVICE_URL/service/accessControlProfile/action/delete" \
  -d "ks=$KALTURA_KS" \
  -d "format=1" \
  -d "id=$ACCESS_CONTROL_ID"
```


Entries assigned to the deleted profile revert to the partner's default access control.
