Skip to main content
PATCH
/
profile
/
history
/
{mediaId}
TypeScript
import { DiscovrClient } from "discovr";
import type { PatchHistoryPayload, SuccessMessage } from "discovr";

const discovr = new DiscovrClient("your-client-id", {
  basePath: "https://api.discovr.media",
});

// After sign-in and profile selection …
const response: SuccessMessage = await discovr.patchHistoryItem("TV_1396", 0, { season: 1, episode: 5 });
console.log(response);
{
  "message": "History item updated or created successfully"
}

Documentation Index

Fetch the complete documentation index at: https://docs.discovr.media/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer token authentication.

  • Identity-tier endpoints (/profiles, /auth/session-token, /auth/session) accept a long-lived refresh token (rt_<hex>).
  • Session-tier endpoints (/pages/*, /profile/*) accept a short-lived session JWT.

SDK clients use two typed API accessors (identityApi() with the refresh token vs sessionApi() with the session JWT) — see the SDK DiscovrAuth helper.

Format: Authorization: Bearer {token}

Path Parameters

mediaId
string
required

The media ID of the title. Format: MV_<tmdbId> for movies, TV_<tmdbId> for TV shows.

Query Parameters

season
integer

Season number. Required for TV shows (TV_ mediaId); ignored for movies.

Required range: x >= 1
episode
integer

Episode number. Optional — omit to update the season-level entry; include to target a specific episode.

Required range: x >= 1

Body

application/json
progress
number
required

Playback progress percentage (0-100).

Values >= 80% are considered completed, values < 80% are not completed. Use progress: 0 to unmark an episode that was completed via season default.

Required range: 0 <= x <= 100
Example:

0

Response

History item updated or created successfully

Confirmation response with the action taken. For exclusive lists (liked/disliked/super_liked), also includes added (which list the item was added to) and optionally removed (which list it was removed from).

message
string
required

Success message

Example:

"Item added successfully"

added
string

The list type the item was added to (for exclusive lists)

Example:

"liked"

removed
string | null

The list type the item was removed from, if any (for exclusive lists)

Example:

"disliked"