Videos

Submit a video from your backend using x-api-key and the League header (glory-league for Glory League). Keep the API key on your server. The JWT used to open Stats Breakdown is not a substitute for these API headers.

Choose a submission flow

  • One-shot (Glory League): include home_team_name, away_team_name, home_team_color, and away_team_color together. For a new video with an available credit, the API copies the source into Mux, charges one video credit, and starts processing. The response is HTTP 200 with status: "processing"; Stats Breakdown skips the Video Info form. No separate call to POST /api/v1/videos/{video_uuid}/info is required.
  • Two-phase (Glory League): submit the video before all four game-info fields are available. For a new video with an available credit, the API copies the source into Mux, reserves one credit without spending it, and returns HTTP 200 with status: "pending". Later, provide all four fields through POST /api/v1/videos/{video_uuid}/info, either from your backend with the required endpoint permission or through the Stats Breakdown form. That step charges the reserved credit and starts processing. Cancelling before info is submitted releases the reservation; cancellation after processing starts does not refund the credit.

Quota and retries

  • No available video quota: HTTP 200, status: "payment_required". No submission is created and no source URL check or Mux ingest is performed. For Glory League, the request is saved so Preciser can resume it after payment within the valid session (up to 15 minutes). Expired or legacy attempts require a fresh POST /api/v1/videos with the same video_uuid. Other leagues retain their existing retry flow. /info cannot create the missing submission.
  • Existing video_uuid: HTTP 200 with the existing status. This is a read-only retry: it does not check the source URL, reserve/charge another credit, create another Mux asset, or overwrite game info or return_url. Repeating this POST with additional fields does not complete a pending submission; use /api/v1/videos/{video_uuid}/info instead.
  • Malformed input, authentication/authorization failures, inaccessible video sources, and service errors still return the appropriate non-200 status. HTTP 200 means a recognized routing outcome, not that processing has finished.

Follow progress

For Glory League, Stats Breakdown shows an acceptance message with the expected 2–6 hour processing time and a return button to GL. Integrations can call GET /api/v1/videos/{video_uuid}/status. The status response reports info_required: true while a pending submission still needs game info. This flag is returned by /status, not by this submit response. Register video.processing to receive PROCESSING when a video is accepted for processing, including after payment automatically resumes a saved submission. No processing event is sent while payment or game info is still required. Completion and failure use separately registered video.completed and video.failed webhooks. Refresh /status when the user returns to your game page, and never replace a terminal state with a late PROCESSING delivery.

When VIDEO_ENDPOINTS_LIVE is false, this endpoint returns a preview response without creating a submission or starting processing.

post/api/v1/videos

Request

  • Base URL
    https://developer.preciser.io
  • URL
    https://developer.preciser.io/api/v1/videos
  • Auth
    none declared. Required headers: x-api-key, League

Headers

x-api-keystring required

Required API key issued by Preciser.

Leaguestring required

Required tenant/database selector, for example pitchbio-master.

Request body

OR

Response

Successful Response

successboolean required

Whether the submission was successful

video_uuidstring required

Stable video identifier for status/results calls. Echoes the caller's video_uuid, or contains the server-generated UUID when it was omitted.

messagestring required

Status message

statusstring required

Current processing/routing status. payment_required means no submission was created and Stats Breakdown should show checkout.

created_atstring date-time required

Timestamp of submission

Changes

    • info

      added the new optional request property

    • breaking

      the header request parameter League became required

    • breaking

      the header request parameter x-api-key became required

    • breaking

      header request parameter League list-of-types was narrowed by removing types null

    • breaking

      header request parameter x-api-key list-of-types was narrowed by removing types null

    • info

      for the header request parameter League, the type was generalized from no type to string

    • info

      for the header request parameter x-api-key, the type was generalized from no type to string