Spectatr.ai

Scheduling & Ingestion · Schedule

Publish a schedule

Create or update a tournament with its teams, squads and fixtures in one call. Upserts on your externalId values.


POST/schedule

Request

Request
{
  "sport": "rugby",
  "tournament": {
    "externalId": "champ-rugby-2026",
    "name": "Championship Rugby"
  },
  "teams": [
    {
      "externalId": "cov",
      "name": "Coventry",
      "abbreviation": "COV",
      "iconUrl": "https://cdn.example.com/badges/cov.png",
      "squad": [
        {
          "externalId": "p-1024",
          "name": "Evan Mitchell",
          "nationality": "GB",
          "jerseyNumber": 10,
          "position": "Fly-half",
          "iconUrl": "https://cdn.example.com/players/1024.png"
        }
      ]
    },
    {
      "externalId": "osp",
      "name": "Ospreys",
      "iconUrl": "https://cdn.example.com/badges/osp.png",
      "squad": []
    }
  ],
  "matches": [
    {
      "externalId": "g-88213",
      "name": "Coventry v Ospreys",
      "startTime": 1757010600000,
      "homeTeamExternalId": "cov",
      "awayTeamExternalId": "osp",
      "roster": {
        "cov": ["p-1024", "p-1031"],
        "osp": ["p-2201"]
      }
    }
  ]
}

Response, 200

200 OK
{
  "tournamentId": "68b9c1f04a2e7d3c91aa01",
  "matches": [
    {
      "externalId": "g-88213",
      "matchId": "68b9c1f04a2e7d3c91aa02",
      "result": "CREATED"
    },
    {
      "externalId": "g-88214",
      "matchId": "68b9c1f04a2e7d3c91aa03",
      "result": "UPDATED"
    }
  ],
  "rejected": [
    {
      "externalId": "g-88215",
      "reason": "unknown awayTeamExternalId 'car'"
    }
  ]
}

A fixture in rejected[] was not written; every other fixture in the same call still was. Fix the named problem and re-send, because the call is an upsert, so re-sending the whole schedule is safe.

Field notes

FieldRequiredNotes
sportyesThe abbreviation: rugby, football, hurling, gaelic-football, camogie. Must be licensed on your account, else 403.
tournament.externalIdyesGroups fixtures. Reuse it across publishes to add fixtures to the same competition.
teams[].abbreviationrecommended1 to 8 characters, e.g. COV. This is what our operator tools display; a team without one shows as TBA even though the full name is stored.
teams[].squadnoFull squad. Players are upserted; omitting a player does not remove them. Without it a fixture still publishes, but clips from it cannot be attributed to players or teams.
squad[].jerseyNumberno0 to 999. Shown beside the player's name in our tagging tools; for codes where the number is the position, send it.
squad[].positionnoFree text, up to 64 characters.
matches[].nameyesFree text, e.g. "Coventry v Ospreys". Shown to operators working the match.
matches[].startTimeyesKickoff, epoch ms UTC. Clip timings are measured from it. It does not schedule the connect, ingestStartTime does.
matches[].rosternoMatch-day squad, as team to player IDs. A player ID not in that team's squad is skipped silently here; send the squad in the same call, or use PUT /roster, which rejects unknown IDs instead.