---
title: "Event delivery | Docs | eLearning by R&D Copilot"
description: "Inspect event delivery, register an endpoint and replay parked events."
canonical: "https://elearning.rdcopilot.com/docs/api-reference/events/"
language: en
updated: 2026-11-22
---

# Event delivery

Inspect event delivery, register an endpoint and replay parked events.

## Register a webhook

POST `/elearning/v1/subscriptions`

### Request body

| Field | Type | Required | Meaning |
| --- | --- | --- | --- |
| `operationId` | `string (uuid)` | Yesrequired | UUID you choose for the change. |
| `expectedRevision` | `integer` | Yesrequired | Revision you read, or zero for a new record or batch. |
| `url` | `string (uri)` | Yesrequired | HTTPS delivery endpoint. |
| `types` | `string[]` | Yesrequired | Events delivered to this endpoint. |

### Responses

| Status | Meaning | Body |
| --- | --- | --- |
| `202` | Operation recorded. | `SecretOperationResult` |
| `400` | Request refused. Codes: invalid\_request. | `Error` |
| `401` | Request refused. Codes: unauthorized. | `Error` |
| `403` | Request refused. Codes: forbidden. | `Error` |
| `409` | Request refused. Codes: operation\_reused, revision\_conflict. | `Error` |
| `429` | Request refused. Codes: rate\_limited. | `Error` |
| `503` | Request refused. Codes: unavailable. | `Error` |

### Request

curl

```bash
curl -X POST "$RDC_BASE_URL/elearning/v1/subscriptions" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "4e08713a-ec34-4a5a-92d3-81fd42564008",
  "expectedRevision": 0,
  "url": "https://learning.example/events",
  "types": [
    "com.rdcopilot.elearning.assignment.created.v1",
    "com.rdcopilot.elearning.assignment.completed.v1",
    "com.rdcopilot.elearning.certificate.issued.v1",
    "com.rdcopilot.elearning.certificate.expired.v1"
  ]
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/elearning/v1/subscriptions`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "4e08713a-ec34-4a5a-92d3-81fd42564008",
    "expectedRevision": 0,
    "url": "https://learning.example/events",
    "types": [
      "com.rdcopilot.elearning.assignment.created.v1",
      "com.rdcopilot.elearning.assignment.completed.v1",
      "com.rdcopilot.elearning.certificate.issued.v1",
      "com.rdcopilot.elearning.certificate.expired.v1"
    ]
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/elearning/v1/subscriptions',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': '4e08713a-ec34-4a5a-92d3-81fd42564008',
        'expectedRevision': 0,
        'url': 'https://learning.example/events',
        'types': [
            'com.rdcopilot.elearning.assignment.created.v1',
            'com.rdcopilot.elearning.assignment.completed.v1',
            'com.rdcopilot.elearning.certificate.issued.v1',
            'com.rdcopilot.elearning.certificate.expired.v1',
        ],
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "4e08713a-ec34-4a5a-92d3-81fd42564008",
  "expectedRevision": 0,
  "url": "https://learning.example/events",
  "types": [
    "com.rdcopilot.elearning.assignment.created.v1",
    "com.rdcopilot.elearning.assignment.completed.v1",
    "com.rdcopilot.elearning.certificate.issued.v1",
    "com.rdcopilot.elearning.certificate.expired.v1"
  ]
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/elearning/v1/subscriptions');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl);
```

C#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/elearning/v1/subscriptions");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "4e08713a-ec34-4a5a-92d3-81fd42564008",
  "expectedRevision": 0,
  "url": "https://learning.example/events",
  "types": [
    "com.rdcopilot.elearning.assignment.created.v1",
    "com.rdcopilot.elearning.assignment.completed.v1",
    "com.rdcopilot.elearning.certificate.issued.v1",
    "com.rdcopilot.elearning.certificate.expired.v1"
  ]
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

### Response `202`

JSON

```json
{
  "operationId": "4e08713a-ec34-4a5a-92d3-81fd42564008",
  "status": "accepted",
  "aggregateRevision": null,
  "subscriptionId": "subscription-training",
  "secret": "whsec_dHJhaW5pbmctc3Vic2NyaXB0aW9uLXNpZ25pbmcta2V5"
}
```

## Rotate the signing secret

POST `/elearning/v1/subscriptions/{subscriptionId}/secret`

### Parameters

| Name | In | Type | Required | Meaning |
| --- | --- | --- | --- | --- |
| `subscriptionId` | path | `string` | Yesrequired |  |

### Request body

| Field | Type | Required | Meaning |
| --- | --- | --- | --- |
| `operationId` | `string (uuid)` | Yesrequired | UUID you choose for the change. |
| `expectedRevision` | `integer` | Yesrequired | Revision you read, or zero for a new record or batch. |

### Responses

| Status | Meaning | Body |
| --- | --- | --- |
| `202` | Operation recorded. | `SecretOperationResult` |
| `400` | Request refused. Codes: invalid\_request. | `Error` |
| `401` | Request refused. Codes: unauthorized. | `Error` |
| `403` | Request refused. Codes: forbidden. | `Error` |
| `404` | Request refused. Codes: subscription\_not\_found. | `Error` |
| `409` | Request refused. Codes: operation\_reused, revision\_conflict. | `Error` |
| `429` | Request refused. Codes: rate\_limited. | `Error` |
| `503` | Request refused. Codes: unavailable. | `Error` |

### Request

curl

```bash
curl -X POST "$RDC_BASE_URL/elearning/v1/subscriptions/subscription-training/secret" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "4e08713a-ec34-4a5a-92d3-81fd42564010",
  "expectedRevision": 1
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/elearning/v1/subscriptions/subscription-training/secret`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "4e08713a-ec34-4a5a-92d3-81fd42564010",
    "expectedRevision": 1
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/elearning/v1/subscriptions/subscription-training/secret',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': '4e08713a-ec34-4a5a-92d3-81fd42564010',
        'expectedRevision': 1,
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "4e08713a-ec34-4a5a-92d3-81fd42564010",
  "expectedRevision": 1
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/elearning/v1/subscriptions/subscription-training/secret');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl);
```

C#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/elearning/v1/subscriptions/subscription-training/secret");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "4e08713a-ec34-4a5a-92d3-81fd42564010",
  "expectedRevision": 1
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

### Response `202`

JSON

```json
{
  "operationId": "4e08713a-ec34-4a5a-92d3-81fd42564010",
  "status": "accepted",
  "aggregateRevision": null,
  "subscriptionId": "subscription-training",
  "secret": "whsec_bmV3LXRyYWluaW5nLXN1YnNjcmlwdGlvbi1zaWduaW5nLWtleQ=="
}
```

## List event deliveries

GET `/elearning/v1/events`

### Parameters

| Name | In | Type | Required | Meaning |
| --- | --- | --- | --- | --- |
| `state` | query | `string` | Nooptional | One of `delivered`, `retrying`, `parked`, `replayed` |
| `limit` | query | `integer` | Nooptional | Default `100` Range `1` – `500` |
| `cursor` | query | `string` | Nooptional |  |

### Responses

| Status | Meaning | Body |
| --- | --- | --- |
| `200` | Current records. | `object` |
| `400` | Request refused. Codes: invalid\_request. | `Error` |
| `401` | Request refused. Codes: unauthorized. | `Error` |
| `403` | Request refused. Codes: forbidden. | `Error` |
| `429` | Request refused. Codes: rate\_limited. | `Error` |
| `503` | Request refused. Codes: unavailable. | `Error` |

### Request

curl

```bash
curl "$RDC_BASE_URL/elearning/v1/events" \
  -H "Authorization: Bearer $RDC_TOKEN"
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/elearning/v1/events`, {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
  },
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'GET',
    f'{os.environ["RDC_BASE_URL"]}/elearning/v1/events',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
)
result = response.json()
```

PHP

```php
<?php

$curl = curl_init(getenv('RDC_BASE_URL') . '/elearning/v1/events');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
    ],
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl);
```

C#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/elearning/v1/events");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

### Response `200`

JSON

```json
{
  "items": [
    {
      "event": {
        "specversion": "1.0",
        "id": "9d84cb4b-4032-4fd2-aa74-a9489ba68145",
        "type": "com.rdcopilot.elearning.certificate.issued.v1",
        "source": "/elearning/v1",
        "time": "2025-11-20T09:00:00Z",
        "customerOrgId": "brumar",
        "legalCompanyId": "brumar-distributie",
        "aggregateType": "assignment",
        "aggregateId": "ASG-2025-0214",
        "aggregateRevision": 5,
        "correlationId": "4e08713a-ec34-4a5a-92d3-81fd425640ad",
        "causationId": "4e08713a-ec34-4a5a-92d3-81fd425640ad",
        "actor": {
          "type": "user",
          "id": "radu-ionescu"
        },
        "data": {
          "id": "CRT-2025-0171",
          "issuedOn": "2025-11-20",
          "validUntil": "2026-11-20",
          "assignmentId": "ASG-2025-0214"
        }
      },
      "state": "parked"
    }
  ],
  "nextCursor": null
}
```

## Replay a parked event

POST `/elearning/v1/events/{eventId}/replay`

### Parameters

| Name | In | Type | Required | Meaning |
| --- | --- | --- | --- | --- |
| `eventId` | path | `string (uuid)` | Yesrequired |  |

### Request body

| Field | Type | Required | Meaning |
| --- | --- | --- | --- |
| `operationId` | `string (uuid)` | Yesrequired | UUID you choose for the change. |
| `expectedRevision` | `integer` | Yesrequired | Revision you read, or zero for a new record or batch. |

### Responses

| Status | Meaning | Body |
| --- | --- | --- |
| `202` | Operation recorded. | `OperationResult` |
| `400` | Request refused. Codes: invalid\_request. | `Error` |
| `401` | Request refused. Codes: unauthorized. | `Error` |
| `403` | Request refused. Codes: forbidden. | `Error` |
| `404` | Request refused. Codes: event\_not\_found. | `Error` |
| `409` | Request refused. Codes: operation\_reused, revision\_conflict. | `Error` |
| `429` | Request refused. Codes: rate\_limited. | `Error` |
| `503` | Request refused. Codes: unavailable. | `Error` |

### Request

curl

```bash
curl -X POST "$RDC_BASE_URL/elearning/v1/events/9d84cb4b-4032-4fd2-aa74-a9489ba68145/replay" \
  -H "Authorization: Bearer $RDC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "operationId": "4e08713a-ec34-4a5a-92d3-81fd42564009",
  "expectedRevision": 0
}'
```

JavaScript

```javascript
const response = await fetch(`${process.env.RDC_BASE_URL}/elearning/v1/events/9d84cb4b-4032-4fd2-aa74-a9489ba68145/replay`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.RDC_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "operationId": "4e08713a-ec34-4a5a-92d3-81fd42564009",
    "expectedRevision": 0
  }),
});
const result = await response.json();
```

Python

```python
import os
import requests

response = requests.request(
    'POST',
    f'{os.environ["RDC_BASE_URL"]}/elearning/v1/events/9d84cb4b-4032-4fd2-aa74-a9489ba68145/replay',
    headers={
        'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
    },
    json={
        'operationId': '4e08713a-ec34-4a5a-92d3-81fd42564009',
        'expectedRevision': 0,
    },
)
result = response.json()
```

PHP

```php
<?php

$body = <<<'JSON'
{
  "operationId": "4e08713a-ec34-4a5a-92d3-81fd42564009",
  "expectedRevision": 0
}
JSON;

$curl = curl_init(getenv('RDC_BASE_URL') . '/elearning/v1/events/9d84cb4b-4032-4fd2-aa74-a9489ba68145/replay');
curl_setopt_array($curl, [
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => $body,
]);
$result = json_decode(curl_exec($curl), true);
curl_close($curl);
```

C#

```csharp
using System.Net.Http.Headers;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/elearning/v1/events/9d84cb4b-4032-4fd2-aa74-a9489ba68145/replay");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
request.Content = new StringContent("""
{
  "operationId": "4e08713a-ec34-4a5a-92d3-81fd42564009",
  "expectedRevision": 0
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.SendAsync(request);
var result = await response.Content.ReadAsStringAsync();
```

### Response `202`

JSON

```json
{
  "operationId": "4e08713a-ec34-4a5a-92d3-81fd42564009",
  "status": "accepted",
  "aggregateRevision": null
}
```
