Event envelope: CloudEvents
Every live stream event is a CloudEvents 1.0 object with the same set of fields. The data field contains the event data, which varies by event type.
Fields
Section titled “Fields”CloudEvents 1.0 envelope, JSON format.
| Field | Type | Description |
|---|---|---|
specversion |
string, always 1.0 |
|
id |
string, evt_… |
differs by event: see Events |
type |
string | differs by event: see Events |
source |
string (URI), always https://api.donatty.com/v1/streamer |
|
subject |
string | differs by event: see Events |
time |
string (date-time) | When the event was recorded, RFC 3339 in UTC. |
datacontenttype |
string, always application/json |
|
dataschema |
string (URI) | differs by event: see Events |
data |
object | differs by event: see Events |
Example
Section titled “Example”{ "specversion": "1.0", "id": "evt_1f0b7c52-3a9e-4d16-8c41-6e5d2a9b7f03", "type": "donation.created", "source": "https://api.donatty.com/v1/streamer", "subject": "don_0f6e2a4c-91b3-4d7a-8c5e-3b2a1f0e9d84", "time": "2026-11-09T10:15:30.123456Z", "datacontenttype": "application/json", "dataschema": "https://api.donatty.com/v1/asyncapi.yaml#/components/schemas/DonationEventData", "data": { "id": "don_0f6e2a4c-91b3-4d7a-8c5e-3b2a1f0e9d84", "createdAt": "2026-11-09T10:15:30.123456Z", "source": "DONATTY", "donorName": "Alex", "message": "Thanks for the stream!", "amount": { "value": "500.00", "currency": "RUB" }, "feeCompensation": null, "paymentMethod": "SBP", "goal": { "id": "goal_7e3a9c10-4b2d-4f8e-a1c6-0d9b8e7f6a52", "title": "New microphone" }, "moderation": { "status": "PENDING", "deadline": "2026-11-09T10:16:30Z" }, "media": { "title": "Song of the day", "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "provider": "YOUTUBE", "durationSeconds": 212, "moderation": { "status": "PENDING", "deadline": "2026-11-09T10:16:30Z" } }, "isTest": false }}