Skip to main content
The playback API is the core of the PunchPlay platform. It accepts playback lifecycle events and turns them into now-playing state, in-progress items, playback sessions, and watch history. This surface requires the playback:write scope. A stop that resolves as watched and creates history also requires history:write.

Supported actions

Send these actions to:
Available actions:
  • start
  • pause
  • resume
  • stop
  • progress

Minimum payload shape

At a minimum, send enough identity to resolve the title reliably.

Supported payload fields

Movie example

Episode example

Event ordering behavior

PunchPlay applies session-aware event handling so clients can send real playback events without manually reconstructing user state. Important behaviors:
  • Duplicate event_id values are deduped.
  • A stop may create a completed watch or only save progress, depending on completion state.
  • Older events that arrive after a stop are ignored.
  • Newer progress after a stopped session can reopen the session.
  • pause updates state without creating a watch.

Best practices

  • Always send a stable playback_session_id.
  • Send event_created_at from the client, not the server, when possible.
  • Send tmdb_id whenever available.
  • Include position_seconds and duration_seconds for accurate progress.
  • Treat event_id as required if your client can generate one.

Completion rules

A stop event is treated as watched when one of these is true:
  • watched is explicitly true
  • progress or derived progress meets watched_threshold
If a stop does not qualify as watched, PunchPlay stores progress instead of creating a completed watch entry. When a stop does qualify as watched, the token must include history:write. Request that scope during authorization for clients that are allowed to create completed watch history.

Failure handling

Platform playback errors include:
  • request_id in the JSON body
  • X-PunchPlay-Request-Id in the response headers
Capture that value when reporting failed writes or invalid payloads.