> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cimento.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Training events

> Every training webhook event: campaigns, assignments, policy acknowledgments and exemptions, with each event's fields and an example.

Every event arrives in the same [envelope](https://docs.cimento.ai/webhooks/receiving-events.md#the-envelope). This page describes `data` for each `type`. The examples are spread over several lines to make them readable.

The [Cimento SDKs](https://docs.cimento.ai/webhooks/verifying-signatures.md#verify-with-a-cimento-sdk) have a type for each event's `data`: see the payload types in the [Go reference](https://pkg.go.dev/github.com/cimento-ai/cimento-sdk/go/webhooks#pkg-types), or narrow on `event.type` in [TypeScript](https://www.npmjs.com/package/@cimento/webhooks).

## Campaigns

All three campaign events share the same `data`.

| Field | Type | Description |
| - | - | - |
| `campaignId` | string | The campaign. |
| `name` | string | The campaign's name. |
| `courseId` | string or `null` | The course the campaign assigns. `null` when the campaign has no course. |
| `actorId` | string or `null` | The admin who made the change. `null` when Cimento launched the campaign itself. |

Campaigns that Cimento creates to give training after a failed phishing simulation don't send campaign events. Their assignments still send [assignment events](#assignments).

### `training.campaign.launched`

An admin launched a training campaign. Each employee it assigns also sends a `training.assignment.created` event.

```json theme={null}
{
  "id": "d283f3e4-cf01-4a14-9b2e-39f4a5b6c73d",
  "type": "training.campaign.launched",
  "occurredAt": "2026-11-09T09:00:12.640Z",
  "data": {
    "campaignId": "8a1f2e3d-4c5b-4a69-8877-665544332211",
    "name": "Q4 security refresher",
    "courseId": "5f4e3d2c-1b0a-4f9e-8d7c-6b5a49382716",
    "actorId": "3c2b1a0f-9e8d-4766-8554-433c2b1a0f0e"
  }
}
```

### `training.campaign.cancelled`

An admin cancelled a training campaign that had been launched.

```json theme={null}
{
  "id": "e394a4f5-d012-4b25-8c3f-4a05b6c7d84e",
  "type": "training.campaign.cancelled",
  "occurredAt": "2026-11-12T11:20:45.103Z",
  "data": {
    "campaignId": "8a1f2e3d-4c5b-4a69-8877-665544332211",
    "name": "Q4 security refresher",
    "courseId": "5f4e3d2c-1b0a-4f9e-8d7c-6b5a49382716",
    "actorId": "3c2b1a0f-9e8d-4766-8554-433c2b1a0f0e"
  }
}
```

### `training.campaign.deleted`

An admin deleted a training campaign that had been launched, along with its assignments. Deleting a draft sends nothing.

> [!NOTE]
>
> Deleting a campaign sends this one event. It does not send a `training.assignment.removed` event for each person, so treat every assignment with this `campaignId` as gone.

```json theme={null}
{
  "id": "f4a5b506-e123-4c36-9d40-5b16c7d8e95f",
  "type": "training.campaign.deleted",
  "occurredAt": "2026-11-12T11:31:02.877Z",
  "data": {
    "campaignId": "8a1f2e3d-4c5b-4a69-8877-665544332211",
    "name": "Q4 security refresher",
    "courseId": "5f4e3d2c-1b0a-4f9e-8d7c-6b5a49382716",
    "actorId": "3c2b1a0f-9e8d-4766-8554-433c2b1a0f0e"
  }
}
```

## Assignments

An assignment is one employee's training in one campaign.

### `training.assignment.created`

An employee was assigned training.

| Field | Type | Description |
| - | - | - |
| `assignmentId` | string | The assignment. |
| `campaignId` | string | The campaign it belongs to. |
| `user.id` | string | The employee's Cimento id. |
| `user.email` | string or `null` | Their email address. |
| `dueDate` | string or `null` | When the training is due. `null` when it has no due date. |

```json theme={null}
{
  "id": "a5b6c617-f234-4d47-8e51-6c27d8e9fa60",
  "type": "training.assignment.created",
  "occurredAt": "2026-11-09T09:00:14.215Z",
  "data": {
    "assignmentId": "b2d7c1a4-3f5e-4a8b-9c6d-1e2f3a4b5c6d",
    "campaignId": "8a1f2e3d-4c5b-4a69-8877-665544332211",
    "user": {
      "id": "0f9e8d7c-6b5a-4433-9221-100f0e0d0c0b",
      "email": "ada.lovelace@example.com"
    },
    "dueDate": "2026-11-23T00:00:00.000Z"
  }
}
```

A due date that changes later sends no event.

### `training.assignment.removed`

An employee's training assignment was removed or replaced.

| Field | Type | Description |
| - | - | - |
| `assignmentId` | string | The assignment. |
| `campaignId` | string | The campaign it belonged to. |
| `user.id` | string | The employee's Cimento id. |
| `user.email` | string or `null` | Their email address. |
| `reason` | string | `removed` or `superseded`. |

| `reason` | Meaning |
| - | - |
| `removed` | The assignment was deleted: an admin removed it, or the campaign's audience was changed. |
| `superseded` | A newer assignment in the same campaign replaced it. The newer one sends its own `training.assignment.created`. |

```json theme={null}
{
  "id": "b6c7d728-0345-4e58-9f62-7d38e9fa0b71",
  "type": "training.assignment.removed",
  "occurredAt": "2026-11-11T15:47:33.490Z",
  "data": {
    "assignmentId": "b2d7c1a4-3f5e-4a8b-9c6d-1e2f3a4b5c6d",
    "campaignId": "8a1f2e3d-4c5b-4a69-8877-665544332211",
    "user": {
      "id": "0f9e8d7c-6b5a-4433-9221-100f0e0d0c0b",
      "email": "ada.lovelace@example.com"
    },
    "reason": "removed"
  }
}
```

### `training.assignment.completed`

An employee's training assignment was completed, by them or by an admin on their behalf.

| Field | Type | Description |
| - | - | - |
| `assignmentId` | string | The assignment. |
| `campaignId` | string | The campaign it belongs to. |
| `user.id` | string | The employee's Cimento id. |
| `user.email` | string or `null` | Their email address. |
| `completedAt` | string | When it was completed. |
| `completedBy` | string | `learner` when the employee finished the training. `admin` when an admin marked it complete. |

```json theme={null}
{
  "id": "5e0c8f0e-6a39-4f3c-9d0b-2a7c1b9d4e11",
  "type": "training.assignment.completed",
  "occurredAt": "2026-11-12T16:42:07.318Z",
  "data": {
    "assignmentId": "b2d7c1a4-3f5e-4a8b-9c6d-1e2f3a4b5c6d",
    "campaignId": "8a1f2e3d-4c5b-4a69-8877-665544332211",
    "user": {
      "id": "0f9e8d7c-6b5a-4433-9221-100f0e0d0c0b",
      "email": "ada.lovelace@example.com"
    },
    "completedAt": "2026-11-12T16:42:07.318Z",
    "completedBy": "learner"
  }
}
```

## Policies

### `training.policy.acknowledged`

An employee acknowledged a policy.

| Field | Type | Description |
| - | - | - |
| `acknowledgmentId` | string | This acknowledgment. |
| `policyId` | string or `null` | The policy that was acknowledged. |
| `user.id` | string | The employee's Cimento id. |
| `user.email` | string or `null` | Their email address. |

```json theme={null}
{
  "id": "c7d8e839-1456-4f69-8a73-8e49fa0b1c82",
  "type": "training.policy.acknowledged",
  "occurredAt": "2026-11-10T08:31:54.006Z",
  "data": {
    "acknowledgmentId": "6a5b4c3d-2e1f-4a0b-9c8d-7e6f5a4b3c2d",
    "policyId": "7b6c5d4e-3f2a-4b1c-8d9e-0f1a2b3c4d5e",
    "user": {
      "id": "1a0f9e8d-7c6b-4544-8332-211a0f0e0d0c",
      "email": "grace.hopper@example.com"
    }
  }
}
```

## Exemptions

An exempt employee is left out of campaigns. All three exemption events share the same `data`.

| Field | Type | Description |
| - | - | - |
| `user.id` | string | The employee's Cimento id. |
| `user.email` | string or `null` | Their email address. |
| `endsAt` | string or `null` | When the exemption ends. `null` for an exemption with no end date. |
| `actorId` | string or `null` | The admin who made the change. |

> [!NOTE]
>
> An exemption that simply reaches its end date sends no event. Use `endsAt` to know when it runs out. `training.exemption.ended` is sent only when an admin ends an exemption early.

The note an admin writes on an exemption is never included.

### `training.exemption.created`

An employee was exempted from campaigns. Exempting several employees at once sends one event for each.

```json theme={null}
{
  "id": "d8e9f94a-2567-4a7a-9b84-9f5a0b1c2d93",
  "type": "training.exemption.created",
  "occurredAt": "2026-11-10T12:05:40.731Z",
  "data": {
    "user": {
      "id": "2b1a0f9e-8d7c-4655-9443-322b1a0f0e0d",
      "email": "alan.turing@example.com"
    },
    "endsAt": "2027-01-31T00:00:00Z",
    "actorId": "3c2b1a0f-9e8d-4766-8554-433c2b1a0f0e"
  }
}
```

### `training.exemption.updated`

An employee's exemption was changed: its end date, its note, or both. A change to the note alone sends this event with the same `data` as before.

```json theme={null}
{
  "id": "e9fa0a5b-3678-4b8b-8c95-a06b1c2d3ea4",
  "type": "training.exemption.updated",
  "occurredAt": "2026-11-11T09:18:22.954Z",
  "data": {
    "user": {
      "id": "2b1a0f9e-8d7c-4655-9443-322b1a0f0e0d",
      "email": "alan.turing@example.com"
    },
    "endsAt": null,
    "actorId": "3c2b1a0f-9e8d-4766-8554-433c2b1a0f0e"
  }
}
```

### `training.exemption.ended`

An admin ended an employee's exemption. `endsAt` is the time it was ended.

```json theme={null}
{
  "id": "fa0b1b6c-4789-4c9c-9da6-b17c2d3e4fb5",
  "type": "training.exemption.ended",
  "occurredAt": "2026-11-12T14:02:09.388Z",
  "data": {
    "user": {
      "id": "2b1a0f9e-8d7c-4655-9443-322b1a0f0e0d",
      "email": "alan.turing@example.com"
    },
    "endsAt": "2026-11-12T14:02:09.388Z",
    "actorId": "3c2b1a0f-9e8d-4766-8554-433c2b1a0f0e"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.