Spectatr.ai

Content Delivery · Webhooks

Events

Every `event` you can receive, and what its `data` holds.


Overview

EventSent when
match.liveA match starts streaming. Once per match.
clip.createdA clip is verified, or made by hand. Always the first event for a clip.
clip.updatedA clip is renamed, or its start or end changes.
clip.deletedA clip is deleted.
compilation.createdA compilation finishes its first render.
compilation.deletedA compilation is deleted.
render.availableOne rendered file is ready.
metadata.updatedA clip's or compilation's metadata changed. Edits close together are merged into one call.

match.live

id is the match.

FieldTypePresenceDescription
externalIdstringOPTIONALYour id for the match, when it came from your schedule.
namestringALWAYSMatch name.
tournamentstringOPTIONALTournament name.
teamsarrayALWAYSHome team first. Each { id, name }, where id is your team id when known.
match.live
{
  "event": "match.live",
  "id": "6afec974ecae7c5bc20c1dc2",
  "occurredAt": "2026-11-20T05:58:00.000Z",
  "data": {
    "externalId": "g-88213",
    "name": "Home FC vs Away FC",
    "tournament": "Example League 2026",
    "teams": [
      { "id": "t-101", "name": "Home FC" },
      { "id": "t-102", "name": "Away FC" }
    ]
  }
}

clip.created

id is the clip.

FieldTypePresenceDescription
matchIdstringALWAYSOur match id.
externalMatchIdstringOPTIONALYour match id, when known.
namestringALWAYSClip title.
typestringALWAYSKind of moment, for example goals, saveschances or fouls.
sourcestringALWAYSai for a detected and verified clip, manual for one made by an operator.
hlsUrlstringALWAYSHLS stream the clip was cut from.
startnumberALWAYSStart on the stream, in seconds.
endnumberALWAYSEnd on the stream, in seconds.
fpsnumberOPTIONALFrame rate of the stream.
replaybooleanALWAYStrue when the clip is a replay.
playIdstringOPTIONALShared by a moment and its replays. Not sent for manual clips.
clip.created
{
  "event": "clip.created",
  "id": "6affe2a85766a74cf78586d5",
  "occurredAt": "2026-11-20T06:03:20.522Z",
  "data": {
    "matchId": "6afec974ecae7c5bc20c1dc2",
    "name": "Goal",
    "type": "goals",
    "source": "ai",
    "hlsUrl": "https://cdn.example.com/hls/match/segments.m3u8",
    "start": 3841.51,
    "end": 3866.5,
    "fps": 59.94,
    "replay": false,
    "playId": "2"
  }
}

clip.updated

The clip's current name, start and end, all three every time.

FieldTypePresenceDescription
namestringALWAYSCurrent title.
startnumberALWAYSCurrent start, in seconds.
endnumberALWAYSCurrent end, in seconds.

clip.deleted and compilation.deleted

data is {}. Remove the item and its files. Always sent, even if you never received a render for it.

compilation.created

id is the compilation.

FieldTypePresenceDescription
namestringALWAYSCompilation title.
matchIdstringOPTIONALOnly for a single-match compilation.
externalMatchIdstringOPTIONALYour match id, when known.

render.available

One per file. A clip can produce several: each aspect ratio, language, overlay and replay version. Every render is 1080p.

FieldTypePresenceDescription
itemTypestringALWAYSclip or compilation.
aspectRatiostringALWAYS16:9, 9:16, 4:5 or 1:1.
languagestringALWAYSAudio language, ISO 639-1, for example en.
overlaybooleanALWAYStrue when the scoreboard overlay is burned in.
replaybooleanALWAYStrue for the version with its replay attached. Sent on the parent clip.
urlstringOPTIONALWhere the file is. With cloud storage, the object in your bucket.
render.available
{
  "event": "render.available",
  "id": "6affe2a85766a74cf78586d5",
  "occurredAt": "2026-11-20T06:04:00.243Z",
  "data": {
    "itemType": "clip",
    "aspectRatio": "16:9",
    "language": "en",
    "overlay": false,
    "replay": false,
    "url": "https://storage.googleapis.com/your-bucket/spectatr/segment/.../16_9_en.mp4"
  }
}

metadata.updated

The full current metadata. Replace what you stored.

FieldTypePresenceDescription
itemTypestringALWAYSclip or compilation.
descriptionstringOPTIONALShort text description of the moment.
ratingnumberOPTIONALHow strong a highlight it is, from 0 to 10.
playersarrayOPTIONALEach { role, name, jerseyNumber }. role is the part played, for example goalBy, assistBy or saveBy.
eventobjectOPTIONALSport-specific details, for example goalType, bodyPart, score, timeMin or half. Keys depend on the type of moment.
matchobjectOPTIONAL{ name, tournament, series, start, matchday }.
videoobjectOPTIONAL{ frameRate, bitrate, fileSize, duration, codec } of the main render.
metadata.updated
{
  "event": "metadata.updated",
  "id": "6affe2a85766a74cf78586d5",
  "occurredAt": "2026-11-20T06:22:43.512Z",
  "data": {
    "itemType": "clip",
    "description": "A scissor-kick goal at 13:43 in the first half levels the score at 2-2.",
    "rating": 9.85,
    "players": [
      { "role": "goalBy", "name": "Player One", "jerseyNumber": 4 },
      { "role": "assistBy", "name": "Player Two", "jerseyNumber": 50 }
    ],
    "event": { "goalType": "scissor-kick", "score": "2-2", "timeMin": 13, "timeSec": 43, "half": "first-half" },
    "match": { "name": "Home FC vs Away FC", "tournament": "Example League 2026" },
    "video": { "frameRate": 59.94, "bitrate": "11.28 Mbps", "fileSize": 58134153, "duration": 24.99, "codec": "h264" }
  }
}