Event envelope
Every HR event has the same envelope; only data changes with the type of the event.
On this page
The type has the form com.rdcopilot.hr.<event>.v1. The last part is the version of data.
Fields
| Field | Meaning |
|---|---|
specversion | Version of the envelope format. |
id | Identifier of this event. A repeated delivery of the same event has the same id. |
type | What happened, in the form above. |
source | The product that sent the event. |
time | When the event happened, as a date and time with a time zone. |
customerOrgId | Your organisation. |
legalCompanyId | The legal company that the event belongs to, test or live. |
aggregateType | The kind of record that changed. |
aggregateId | The record that changed. |
aggregateRevision | The revision of the record after the change. |
correlationId | Ties together everything that came from one request or one flow. |
causationId | The document or operation that caused this event. |
actor | Who or what made the change. |
data | The content of the event. Its shape depends on type. |
Example
{
"specversion": "1.0",
"id": "5e2b9c47-8d13-4a6f-b0e5-71c4a2d93f68",
"type": "com.rdcopilot.hr.leave.approved.v1",
"source": "/hr/v1",
"time": "2026-11-23T09:41:07Z",
"customerOrgId": "a3f1d7c2-64be-4b09-9d58-2c0e7f1a8b34",
"legalCompanyId": "c8b25e90-1d47-4f3a-a6d2-93e0b51f7c68",
"aggregateType": "leave_request",
"aggregateId": "bd9ccb68-cdef-4ec9-b852-dfa82203a948",
"aggregateRevision": 2,
"correlationId": "f06a3b8d-9e21-47c5-8b14-d5a7e2c10963",
"causationId": "b45282b0-0827-4191-ba70-a0d39dc182c6",
"actor": {
"serviceId": "hr-api"
},
"data": {
"number": "LR-2026-1044",
"employeeId": "5f6223ec-cd16-4dcc-bf30-2409b9672912",
"kind": "annual",
"from": "2026-11-30",
"to": "2026-12-04",
"days": 3,
"approvedById": "21bd8239-2794-4320-adba-9128b6a6219b"
}
} Deliveries can repeat. Use id to skip an event you already handled. Delivery and retries says when an event is sent again.
The full rule: Developer guide