Skip to content

Goal event format

The goals channel carries the following event.

A Donatty goal was created, edited or closed, or a donation to it was paid (then it follows donation.created of that donation). data is the whole goal as GET /v1/goals returns it.

Channel: goals (scope goals:read)

Field Type Description
id string, evt_… Event identifier. It stays the same when the event is delivered again from the channel history: drop an event whose id you have already handled.
type string, always goal.updated
subject string Goal identifier, goal_….
dataschema string (URI), always the Goal schema address
data Goal
{
"specversion": "1.0",
"id": "evt_42b9d8a1-7c06-4e53-b1f9-5a6c0d3e8b97",
"type": "goal.updated",
"source": "https://api.donatty.com/v1/streamer",
"subject": "goal_7e3a9c10-4b2d-4f8e-a1c6-0d9b8e7f6a52",
"time": "2026-11-09T10:15:30.123456Z",
"datacontenttype": "application/json",
"dataschema": "https://api.donatty.com/v1/asyncapi.yaml#/components/schemas/Goal",
"data": {
"id": "goal_7e3a9c10-4b2d-4f8e-a1c6-0d9b8e7f6a52",
"title": "New microphone",
"target": {
"value": "15000.00",
"currency": "RUB"
},
"raised": {
"value": "6920.50",
"currency": "RUB"
},
"status": "ACTIVE",
"endsAt": "2026-12-31T21:00:00Z",
"createdAt": "2026-10-01T12:00:00Z"
}
}