> For the complete documentation index, see [llms.txt](https://docs.sportradar.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sportradar.com/live-data/live-data-golf-api-design/ld-golf-api-documentation/live-events/delete-update-approach.md). Agents can also search and read this documentation through its [MCP server](https://docs.sportradar.com/~gitbook/mcp).

# DELETE/UPDATE approach

### Overview

Live event changes are expressed through the `action` field.

The possible values are `ADD`, `UPDATE`, and `DELETE`.

This page explains how `UPDATE` and `DELETE` messages are shaped.

### Update behavior

Updates use the `UPDATE` action.

Updates follow a full payload pattern.

That means the message includes the changed fields and the unchanged fields in the same payload.

Consumers should replace the previously stored version of the event with the new one.

### UPDATE message example

{% code title="UPDATE message" overflow="wrap" expandable="true" %}

```json
{
  "specversion": "1.0",
  "id": "0da2b5ba-b92f-42bd-b9d2-0fcd978fec85",
  "source": "/tournaments/1971",
  "type": "Event.Sport.Golf",
  "time": "2026-05-04T14:23:01.123Z",
  "tournamentid": 1971,
  "datacontenttype": "application/json",
  "data": {
    "id": "0da2b5ba-b92f-42bd-b9d2-0fcd978fec85",
    "action": "UPDATE",
    "type": "Event.Sport.Golf.BallHoled",
    "created_at": "2026-04-24T11:09:15.267Z",
    "sport_event": {
      "id": "sr:match:67607764"
    },
    "payload": {
      "event_time": "2026-04-24T11:09:15.267Z"
      ......... // event specific data
    }
  }
}
```

{% endcode %}

### Delete behavior

Deletes use the `DELETE` action.

The message identifies an event that was previously sent and should now be removed.

For `DELETE`, only `id`, `action`, `created_at`, and `sport_event` are included inside `data`.

The `payload` field is omitted.

`data.id` refers to the previously sent event that is being deleted.

### DELETE message example

{% code title="DELETE message" overflow="wrap" expandable="true" %}

```json
{
  "specversion": "1.0",
  "id": "0da2b5ba-b92f-42bd-b9d2-0fcd978fec85",
  "source": "/tournaments/1971",
  "type": "Event.Sport.Golf",
  "time": "2026-05-04T14:23:01.123Z",
  "tournamentid": 1971,
  "datacontenttype": "application/json",
  "data": {
    "id": "0da2b5ba-b92f-42bd-b9d2-0fcd978fec85",
    "action": "DELETE",
    "created_at": "2026-04-24T11:09:15.267Z",
    "sport_event": {
      "id": "sr:match:67607764"
    }
  }
}
```

{% endcode %}

### What to do in your consumer

* Treat `UPDATE` as a replacement of the previous event version.
* Treat `DELETE` as removal of the referenced event.
* Use `data.id` as the stable event identifier across versions.

{% hint style="info" %}
The outer WebSocket envelope stays the same. Only the `data.action` and `data` content differ.
{% endhint %}

### Related pages

* [Live Events](https://docs.sportradar.com/live-data/live-data-golf-api-design/ld-golf-api-documentation/live-events/live-events.md)
* [Round Events](https://docs.sportradar.com/live-data/live-data-golf-api-design/ld-golf-api-documentation/live-event-types/round-events-sportevent.md)
* [Hole Events](https://docs.sportradar.com/live-data/live-data-golf-api-design/ld-golf-api-documentation/live-event-types/hole-events.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sportradar.com/live-data/live-data-golf-api-design/ld-golf-api-documentation/live-events/delete-update-approach.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
