---
title: Certificates
url: https://docs.kaltura.com/docs/events-collaboration/gamification-api/gamification-certificates
---

## Certificates

Certificates issue PDF credentials to users who complete required activities. They use the same rules engine as badges, with added PDF generation configuration.

### 8.1 Certificate Entity

| Field | Type | Description |
|-------|------|-------------|
| `name` | string | Certificate name |
| `description` | string | Description (supports HTML) |
| `status` | string | `enabled` or `disabled` |
| `externalId` | string | External reference (e.g., NASBA program ID) |
| `certificateEligibility` | string | `once` (one per user) or `perEntry` (one per user per entry) |
| `certifiedCreditsThreshold` | number | Credits required to earn the certificate |
| `host` | string | Events site URL for certificate page links |
| `outputFileConfiguration` | object | PDF template configuration (see below) |
| `creditsMapping` | string | Maps rules to credit values |
| `participationPolicy` | object | Controls user visibility |

### 8.2 PDF Template (outputFileConfiguration)

The first element is a background image URL. Subsequent elements are text overlays with positioning.

**Text element types:** `entryName`, `userFullName`, `credits`, `certificationDate`

```bash
curl -X POST "$KALTURA_SCM_URL/certificate/create" \
  -H "Authorization: Bearer $KALTURA_KS" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "CPE Certificate",
    "description": "Continuing Professional Education",
    "status": "disabled",
    "participationPolicy": {"userDefaultPolicy": "display", "policies": []},
    "externalId": "PROGRAM-12345",
    "certificateEligibility": "once",
    "certifiedCreditsThreshold": 3,
    "host": "https://mysite.events.kaltura.com",
    "outputFileConfiguration": {
      "outputFileElements": [
        {"url": "https://cfvod.kaltura.com/p/'$PARTNER_ID'/thumbnail/entry_id/'$BG_ENTRY_ID'/width/1397/height/1080"},
        {"textElementType": "userFullName", "fontSize": 30, "y": 440},
        {"textElementType": "entryName", "fontSize": 30, "y": 570},
        {"textElementType": "credits", "fontSize": 23, "x": 1060, "y": 699},
        {"textElementType": "certificationDate", "fontSize": 18, "x": 695, "y": 636}
      ]
    }
  }'
```

### 8.3 Credits Mapping

Maps rules to credit values using a newline-delimited format:

```
credits,<ruleId>
<credits_value>,<threshold>
<credits_value>,<threshold>
```

```bash
curl -X POST "$KALTURA_SCM_URL/certificate/update" \
  -H "Authorization: Bearer $KALTURA_KS" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "'$CERT_ID'",
    "status": "enabled",
    "creditsMapping": "credits,'$RULE_ID'\n10.0,1\n11.5,2"
  }'
```

### 8.4 Certificate Rules

Create rules for certificates via the standard `rule/create` endpoint with `gameObjectType: "certificate"`:

```bash
curl -X POST "$KALTURA_SCM_URL/rule/create" \
  -H "Authorization: Bearer $KALTURA_KS" \
  -H "Content-Type: application/json" \
  -d '{
    "gameObjectType": "certificate",
    "gameObjectId": "'$CERT_ID'",
    "name": "Watch session",
    "conditions": [{"fact": "eventType", "operator": "equal", "value": "viewPeriod"}],
    "type": "sum",
    "mode": "distribute_points",
    "metric": "playTime",
    "groupBy": "kuserId,entryId",
    "goal": "60",
    "points": "1",
    "maxPoints": "unlimited",
    "reportFormat": "default"
  }'
```

### 8.5 User Certificate Progress

```bash
curl -X POST "$KALTURA_SCM_URL/userCertificateReport/list" \
  -H "Authorization: Bearer $KALTURA_KS" \
  -H "Content-Type: application/json" \
  -d '{"gameObjectId": "'$CERT_ID'", "pager": {"pageSize": 100, "pageIndex": 1}}'
```
