Skip to main content
PUT
/
api
/
series
/
{showId}
Update Series
curl --request PUT \
  --url https://api.example.com/api/series/{showId} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Token: <x-api-token>' \
  --data '
{
  "title": "<string>",
  "type": "<string>",
  "description": "<string>",
  "images": [
    {}
  ],
  "metadata": {}
}
'
{
  "200": {},
  "400": {},
  "401": {},
  "404": {},
  "422": {},
  "500": {},
  "_id": "<string>",
  "title": "<string>",
  "type": "<string>",
  "description": "<string>",
  "images": [
    {}
  ],
  "updated_at": "<string>"
}

Overview

This endpoint updates an existing series with new information. You can update the title, description, type, images, and other metadata associated with the series.

Authentication

This endpoint requires MediaStream API authentication using the X-API-Token header.
X-API-Token
string
required
Your MediaStream API authentication token
Accept
string
default:"application/json"
Content type for the response
Content-Type
string
default:"application/json"
Content type of the request body

Path Parameters

showId
string
required
The unique identifier of the series to update

Request Body

All fields are optional. Only include the fields you want to update.
title
string
The updated title of the series
type
string
The type of content (e.g., “tvshow”)
description
string
Updated description of the series
images
array
Updated array of image objects to associate with the series
metadata
object
Additional metadata for the series (structure depends on MediaStream platform)

Response

The response structure depends on the MediaStream platform API. Typically returns the updated series object.
_id
string
Unique identifier for the series
title
string
The updated title of the series
type
string
Type of content
description
string
Updated description of the series
images
array
Updated array of image objects
updated_at
string
Timestamp when the series was last updated

Example Request

curl -X PUT "https://your-domain.com/api/series/507f1f77bcf86cd799439011" \
  -H "X-API-Token: your_api_token" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "title": "Breaking Bad - Updated",
    "description": "An updated description of the series"
  }'

Example Response

{
  "_id": "507f1f77bcf86cd799439011",
  "title": "Breaking Bad - Updated",
  "type": "tvshow",
  "description": "An updated description of the series",
  "images": [
    {
      "_id": "507f1f77bcf86cd799439012",
      "path": "/images/breaking-bad-poster.jpg",
      "basePath": "/platform-static/images/breaking-bad-poster.jpg"
    }
  ],
  "seasons": [
    {
      "_id": "507f1f77bcf86cd799439014",
      "title": "Season 1"
    }
  ],
  "created_at": "2024-01-15T08:30:00Z",
  "updated_at": "2024-03-05T14:45:00Z"
}

Response Status Codes

200
Success
Series successfully updated
400
Bad Request
Invalid request data
401
Unauthorized
Invalid or missing API token
404
Not Found
Series with the specified ID does not exist
422
Unprocessable Entity
Validation error - the request data doesn’t meet requirements
500
Internal Server Error
An error occurred while updating the series in MediaStream

Implementation Notes

  • The endpoint uses PUT method in Laravel routes but sends a POST request to MediaStream API
  • This is because the MediaStream platform uses POST for updates
  • All request data is forwarded to the MediaStream platform at /show/{showId}
  • The update is partial - you only need to send the fields you want to change
  • Series are internally referred to as “shows” in the route parameters and backend code

Best Practices

  • Only send the fields you want to update to minimize payload size
  • Validate data on the client side before sending to reduce failed requests
  • Handle 404 errors gracefully in case the series was deleted
  • Consider versioning or conflict resolution if multiple clients might update the same series

Build docs developers (and LLMs) love