Skip to main content

TV shows and episodes

Endpoints for managing TV shows, seasons, and episodes in the Cinephage library.

Authentication​

All TV endpoints require authentication via session cookie or API key.

EndpointAuth Level
Series endpointsrequireAuth
Season endpointsrequireAuth
Episode endpointsrequireAuth

Series endpoints​

List series​

Returns a paginated list of TV shows.

GET /api/library/series

Request parameters​

ParameterTypeRequiredDescription
pageintegerNoPage number (default: 1)
limitintegerNoItems per page (default: 20, max: 100)
sortstringNoSort field and direction
monitoredbooleanNoFilter by monitored status
downloadedbooleanNoFilter by download status
searchstringNoSearch query for title
networkstringNoFilter by network

Sort options​

FieldDescription
titleSeries title
yearFirst air year
createdAtDate added to library
updatedAtLast update date
tmdbRatingTMDB rating score
nextAiringNext episode air date

Response codes​

CodeDescription
200Success
401Authentication required
429Rate limit exceeded

Response schema​

{
"series": [
{
"id": "string",
"title": "string",
"originalTitle": "string",
"year": "integer",
"tmdbId": "integer",
"tvdbId": "integer",
"imdbId": "string",
"overview": "string",
"network": "string",
"status": "string",
"runtime": "integer",
"genres": ["string"],
"certification": "string",
"tmdbRating": "number",
"tmdbVoteCount": "integer",
"posterUrl": "string",
"backdropUrl": "string",
"monitored": "boolean",
"seasonFolder": "boolean",
"path": "string",
"seasonCount": "integer",
"episodeCount": "integer",
"episodeFileCount": "integer",
"totalEpisodeCount": "integer",
"percentOfEpisodes": "number",
"nextAiring": "string",
"previousAiring": "string",
"createdAt": "string",
"updatedAt": "string",
"addedAt": "string",
"rootFolderPath": "string",
"searchOnAdd": "boolean",
"lastSearchTime": "string"
}
],
"pagination": {
"page": "integer",
"limit": "integer",
"total": "integer",
"totalPages": "integer"
}
}

Example request​

curl -H "x-api-key: cinephage_your_key_here" \
"http://localhost:3000/api/library/series?page=1&limit=10&sort=title:asc"

Create series​

Adds a new TV shows to the library by TMDB ID.

POST /api/library/series

Request body schema​

FieldTypeRequiredDescription
tmdbIdintegerYesTMDB series ID
rootFolderPathstringYesPath to root folder
monitoredbooleanNoWhether to monitor (default: true)
seasonFolderbooleanNoOrganize by season folders (default: true)
qualityProfileIdstringNoQuality profile ID
seasonOptionsarrayNoPer-season monitoring settings

Season options schema​

{
"seasonOptions": [
{
"seasonNumber": "integer",
"monitored": "boolean"
}
]
}

Response codes​

CodeDescription
201Created successfully
400Invalid request body
401Authentication required
404TMDB series not found
409Series already in library

Response schema​

{
"success": "boolean",
"id": "string",
"message": "string"
}

Example request​

curl -X POST \
-H "Content-Type: application/json" \
-H "x-api-key: cinephage_your_key_here" \
-d '{
"tmdbId": 1399,
"rootFolderPath": "/tv",
"monitored": true,
"seasonFolder": true,
"seasonOptions": [
{"seasonNumber": 1, "monitored": true},
{"seasonNumber": 2, "monitored": true}
]
}' \
http://localhost:3000/api/library/series

Get series​

Returns detailed information for a specific series.

GET /api/library/series/:id

Path parameters​

ParameterTypeDescription
idstringSeries UUID

Response codes​

CodeDescription
200Success
401Authentication required
404Series not found

Response schema​

{
"id": "string",
"title": "string",
"originalTitle": "string",
"year": "integer",
"tmdbId": "integer",
"tvdbId": "integer",
"imdbId": "string",
"overview": "string",
"network": "string",
"status": "string",
"type": "string",
"runtime": "integer",
"genres": ["string"],
"certification": "string",
"tmdbRating": "number",
"tmdbVoteCount": "integer",
"posterUrl": "string",
"backdropUrl": "string",
"monitored": "boolean",
"seasonFolder": "boolean",
"path": "string",
"createdAt": "string",
"updatedAt": "string",
"addedAt": "string",
"rootFolderPath": "string",
"searchOnAdd": "boolean",
"lastSearchTime": "string",
"seasons": [
{
"id": "string",
"seriesId": "string",
"seasonNumber": "integer",
"monitored": "boolean",
"statistics": {
"episodeCount": "integer",
"episodeFileCount": "integer",
"percentOfEpisodes": "number",
"totalEpisodeCount": "integer"
},
"images": [
{
"url": "string",
"type": "string"
}
]
}
],
"alternativeTitles": ["string"],
"actors": [
{
"name": "string",
"character": "string",
"tmdbId": "integer"
}
]
}

Example request​

curl -H "x-api-key: cinephage_your_key_here" \
http://localhost:3000/api/library/series/770e8400-e29b-41d4-a716-446655440002

Update series​

Updates series settings.

PUT /api/library/series/:id

Request body schema​

FieldTypeRequiredDescription
monitoredbooleanNoMonitoring status
seasonFolderbooleanNoSeason folder organization
rootFolderPathstringNoRoot folder path
qualityProfileIdstringNoQuality profile ID
pathstringNoSeries path

Response codes​

CodeDescription
200Success
400Invalid request body
401Authentication required
404Series not found

Example request​

curl -X PUT \
-H "Content-Type: application/json" \
-H "x-api-key: cinephage_your_key_here" \
-d '{"monitored": false}' \
http://localhost:3000/api/library/series/770e8400-e29b-41d4-a716-446655440002

Delete series​

Removes a series from the library.

DELETE /api/library/series/:id

Query parameters​

ParameterTypeRequiredDescription
deleteFilesbooleanNoAlso delete episode files (default: false)
deleteAddImportListExclusionbooleanNoAdd to import list exclusion (default: false)

Response codes​

CodeDescription
204Deleted successfully
401Authentication required
404Series not found

Example request​

curl -X DELETE \
-H "x-api-key: cinephage_your_key_here" \
"http://localhost:3000/api/library/series/770e8400-e29b-41d4-a716-446655440002?deleteFiles=true"

Refresh series metadata​

Refreshes series metadata from TMDB/TVDB.

POST /api/library/series/:id/refresh

Response codes​

CodeDescription
202Refresh queued
401Authentication required
404Series not found

Example request​

curl -X POST \
-H "x-api-key: cinephage_your_key_here" \
http://localhost:3000/api/library/series/770e8400-e29b-41d4-a716-446655440002/refresh

Season endpoints​

Get season​

Returns details for a specific season including all episodes.

GET /api/library/series/:seriesId/seasons/:seasonNumber

Path parameters​

ParameterTypeDescription
seriesIdstringSeries UUID
seasonNumberintegerSeason number

Response codes​

CodeDescription
200Success
401Authentication required
404Season not found

Response schema​

{
"id": "string",
"seriesId": "string",
"seasonNumber": "integer",
"monitored": "boolean",
"overview": "string",
"airDate": "string",
"statistics": {
"episodeCount": "integer",
"episodeFileCount": "integer",
"percentOfEpisodes": "number",
"totalEpisodeCount": "integer"
},
"images": [
{
"url": "string",
"type": "string"
}
],
"episodes": [
{
"id": "string",
"seriesId": "string",
"seasonNumber": "integer",
"episodeNumber": "integer",
"title": "string",
"overview": "string",
"airDate": "string",
"runtime": "integer",
"monitored": "boolean",
"hasFile": "boolean",
"downloaded": "boolean",
"fileId": "string",
"file": {
"id": "string",
"path": "string",
"size": "integer",
"quality": "string",
"qualityScore": "integer",
"dateAdded": "string"
}
}
]
}

Update season monitoring​

Updates monitoring status for a season.

PUT /api/library/series/:seriesId/seasons/:seasonNumber

Request body schema​

FieldTypeRequiredDescription
monitoredbooleanYesMonitoring status

Response codes​

CodeDescription
200Success
400Invalid request body
401Authentication required
404Season not found

Example request​

curl -X PUT \
-H "Content-Type: application/json" \
-H "x-api-key: cinephage_your_key_here" \
-d '{"monitored": false}' \
http://localhost:3000/api/library/series/770e8400-e29b-41d4-a716-446655440002/seasons/1

Episode endpoints​

Get episode​

Returns detailed information for a specific episode.

GET /api/library/episodes/:id

Path parameters​

ParameterTypeDescription
idstringEpisode UUID

Response codes​

CodeDescription
200Success
401Authentication required
404Episode not found

Response schema​

{
"id": "string",
"seriesId": "string",
"seasonNumber": "integer",
"episodeNumber": "integer",
"absoluteEpisodeNumber": "integer",
"title": "string",
"overview": "string",
"airDate": "string",
"airDateUtc": "string",
"runtime": "integer",
"monitored": "boolean",
"unverifiedSceneNumbering": "boolean",
"hasFile": "boolean",
"downloaded": "boolean",
"fileId": "string",
"file": {
"id": "string",
"path": "string",
"size": "integer",
"quality": "string",
"qualityScore": "integer",
"releaseTitle": "string",
"releaseGroup": "string",
"languages": ["string"],
"mediaInfo": {
"videoCodec": "string",
"audioCodec": "string",
"audioChannels": "number",
"resolution": "string"
},
"dateAdded": "string"
},
"images": [
{
"url": "string",
"type": "string"
}
]
}

Example request​

curl -H "x-api-key: cinephage_your_key_here" \
http://localhost:3000/api/library/episodes/880e8400-e29b-41d4-a716-446655440003

Update episode​

Updates episode monitoring status.

PUT /api/library/episodes/:id

Request body schema​

FieldTypeRequiredDescription
monitoredbooleanYesMonitoring status

Response codes​

CodeDescription
200Success
400Invalid request body
401Authentication required
404Episode not found

Example request​

curl -X PUT \
-H "Content-Type: application/json" \
-H "x-api-key: cinephage_your_key_here" \
-d '{"monitored": false}' \
http://localhost:3000/api/library/episodes/880e8400-e29b-41d4-a716-446655440003

Series status values​

StatusDescription
continuingSeries is still airing
endedSeries has concluded
upcomingSeries has not yet premiered

Series types​

TypeDescription
standardStandard weekly series
dailyDaily series
animeAnime series with absolute numbering

See Also​

  • Movies - Movie endpoints
  • Search - Search and download endpoints