LiveWing
CMS API

Productions

Create and manage broadcast productions — events bound to collection data.

Productions represent a specific broadcast event (e.g. "Lakers vs Celtics", "Sunday Service"). A production binds to collection items (homeTeam, awayTeam, venue) and carries its own live data (scores, clock, period).

List Productions

Returns productions in your workspace, optionally filtered by status or tag.

POST /api/cms/productions

Auth: read

Request:

curl -X POST https://ideal-heron-677.convex.site/api/cms/productions \
  -H "Authorization: Bearer lw_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "live",
    "tag": "football"
  }'
FieldTypeRequiredDescription
statusstringNoFilter by status: draft, scheduled, live, completed, archived
tagstringNoFilter to productions that include this tag

Pass an empty body {} to list all productions.

Response:

{
  "productions": [
    {
      "_id": "j572prod1...",
      "name": "Cowboys vs Eagles — Week 14",
      "status": "live",
      "date": 1711929600000,
      "tags": ["football", "nfc-east"],
      "updatedAt": 1711929600000,
      "_creationTime": 1711929000000
    }
  ]
}

Get Production Detail

Returns a single production with its resolved bindings.

POST /api/cms/productions/detail

Auth: read

Request:

curl -X POST https://ideal-heron-677.convex.site/api/cms/productions/detail \
  -H "Authorization: Bearer lw_your_key" \
  -H "Content-Type: application/json" \
  -d '{"productionId": "j572prod1..."}'

Response:

{
  "_id": "j572prod1...",
  "name": "Cowboys vs Eagles — Week 14",
  "status": "live",
  "date": 1711929600000,
  "tags": ["football", "nfc-east"],
  "liveData": {
    "homeScore": 21,
    "awayScore": 14,
    "period": "3rd",
    "clock": "8:42"
  },
  "liveDataSchema": [
    { "key": "homeScore", "label": "Home Score", "type": "number" },
    { "key": "awayScore", "label": "Away Score", "type": "number" },
    { "key": "period", "label": "Period", "type": "text" },
    { "key": "clock", "label": "Clock", "type": "text" }
  ],
  "bindings": [
    {
      "key": "homeTeam",
      "collectionId": "j572col1...",
      "collectionName": "Teams",
      "itemId": "j572item1...",
      "itemTitle": "Dallas Cowboys"
    },
    {
      "key": "awayTeam",
      "collectionId": "j572col1...",
      "collectionName": "Teams",
      "itemId": "j572item2...",
      "itemTitle": "Philadelphia Eagles"
    }
  ],
  "updatedAt": 1711929600000,
  "_creationTime": 1711929000000
}

Create Production

Create a new production in draft status.

POST /api/cms/productions/create

Auth: readwrite

Request:

curl -X POST https://ideal-heron-677.convex.site/api/cms/productions/create \
  -H "Authorization: Bearer lw_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Cowboys vs Eagles — Week 14",
    "date": 1711929600000,
    "tags": ["football", "nfc-east"],
    "liveDataSchema": [
      { "key": "homeScore", "label": "Home Score", "type": "number" },
      { "key": "awayScore", "label": "Away Score", "type": "number" },
      { "key": "period", "label": "Period", "type": "text" },
      { "key": "clock", "label": "Clock", "type": "text" }
    ]
  }'
FieldTypeRequiredDescription
namestringYesProduction name
datenumberNoUnix timestamp (ms) for the event date
tagsstring[]NoTags for filtering and organization
liveDataSchemaarrayNoField definitions for live data (same format as collection fields)

Response (201):

{
  "productionId": "j572newprod..."
}

Update Production Status

Transition a production through its lifecycle.

POST /api/cms/productions/status

Auth: readwrite

Request:

curl -X POST https://ideal-heron-677.convex.site/api/cms/productions/status \
  -H "Authorization: Bearer lw_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "productionId": "j572prod1...",
    "status": "live"
  }'
FieldTypeRequiredDescription
productionIdstringYesThe production ID
statusstringYesTarget status

Response:

{
  "ok": true
}

Status Transitions

Productions follow a strict state machine:

FromAllowed Targets
draftscheduled, live
scheduledlive, draft
livecompleted
completedarchived, draft
archived(none)

Invalid transitions return a 400 error.

Get Production Manifest

Returns the resolved snapshot and all playout manifests for a production. This is the fully resolved data that devices receive.

POST /api/cms/productions/manifest

Auth: read

Request:

curl -X POST https://ideal-heron-677.convex.site/api/cms/productions/manifest \
  -H "Authorization: Bearer lw_your_key" \
  -H "Content-Type: application/json" \
  -d '{"productionId": "j572prod1..."}'

Response:

{
  "production": {
    "_id": "j572prod1...",
    "name": "Cowboys vs Eagles — Week 14",
    "status": "live",
    "liveData": {
      "homeScore": 21,
      "awayScore": 14,
      "period": "3rd",
      "clock": "8:42"
    }
  },
  "snapshot": {
    "bindings": {
      "homeTeam": {
        "name": "Dallas Cowboys",
        "abbreviation": "DAL",
        "primaryColor": "#003594"
      },
      "awayTeam": {
        "name": "Philadelphia Eagles",
        "abbreviation": "PHI",
        "primaryColor": "#004C54"
      }
    },
    "liveData": {
      "homeScore": 21,
      "awayScore": 14,
      "period": "3rd",
      "clock": "8:42"
    },
    "resolvedAt": 1711930000000
  },
  "manifests": [
    {
      "_id": "j572manifest1...",
      "assignmentId": "j572assign1...",
      "graphicId": "j572graphic1...",
      "graphicName": "Scorebug",
      "resolvedFields": {
        "homeName": "Dallas Cowboys",
        "homeAbbr": "DAL",
        "homeScore": 21,
        "awayName": "Philadelphia Eagles",
        "awayScore": 14,
        "period": "3rd",
        "clock": "8:42"
      },
      "additionalAssets": [],
      "resolvedAt": 1711930000000
    }
  ]
}

The snapshot contains the raw resolved bindings and live data. The manifests array contains one entry per graphic assignment, with the graphic's field map applied to produce resolvedFields.

Program Graphic Control

Set Program Graphic

Set which graphic is currently "on program" (visible on air) for a production. The render URL will display this graphic with the production's data auto-mapped.

POST /api/productions/program

Auth: readwrite

Request:

curl -X POST https://ideal-heron-677.convex.site/api/productions/program \
  -H "Authorization: Bearer lw_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "productionId": "j572prod1...",
    "graphicId": "k57abc123def456"
  }'
FieldTypeRequiredDescription
productionIdstringYesThe production ID
graphicIdstring | nullYesGraphic to put on air, or null to clear

Response:

{
  "ok": true
}

Get Program State

Query which graphic is currently on program for a production.

GET /api/productions/program?productionId=j572prod1...

Auth: read

Request:

curl "https://ideal-heron-677.convex.site/api/productions/program?productionId=j572prod1..." \
  -H "Authorization: Bearer lw_your_key"

Response:

{
  "productionId": "j572prod1...",
  "productionName": "Cowboys vs Eagles — Week 14",
  "status": "live",
  "programGraphicId": "k57abc123def456",
  "programGraphic": {
    "_id": "k57abc123def456",
    "name": "Scorebug",
    "status": "published"
  }
}

When no graphic is on program, programGraphicId and programGraphic are null.

On this page