> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://fastpix.com/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://fastpix.com/docs/_mcp/server.

# Get a playlist by ID

GET https://api.fastpix.com/v1/on-demand/playlists/{playlistId}

This endpoint retrieves detailed information about a specific playlist using its unique `playlistId`. It provides comprehensive metadata about the playlist, including its title, creation mode (manual or smart), media items along with the metadata of each media in the playlist.


#### Example
An e-learning platform requests details for the playlist "Beginner Python Series" by providing its unique `playlistId`. The response includes the playlist"s title, creation mode, and the ordered list of video tutorials contained within, enabling the platform to present the full learning path to users.

Reference: https://fastpix.com/docs/video-on-demand-api/playlist/get-playlist-by-id

## Authentication

- `Authorization` header (basic auth, required) — FastPix APIs are secured with Basic Authentication. Use your Access Token ID as the username and Secret Key as the password in the Authorization header of each API request. * Username: Access Token ID * Password: Secret Key Activate your FastPix account to generate your API credentials. See the guide here

## Request

### Path parameters

- `playlistId` (string, required) — The unique id of the playlist you want to retrieve.

## Response

### 200

Successfully retrieved all playlists

- `success` (boolean, required) — Shows the request status. Returns true for success and false for failure.
- `data` (PlaylistByIdResponseData, required)

## Types

### PlaylistByIdResponseData

- `type`: `manual` (manual)
  - `createdAt` (datetime, optional) — Timestamp of playlist creation.
  - `description` (string, optional) — Description of the playlist set by the user.
  - `id` (string, optional) — The unique id of the playlist
  - `mediaCount` (integer, optional) — No. of media present in the playlist
  - `mediaList` (list of PlaylistByIdResponseMediaListItem, optional)
  - `name` (string, optional) — The name of the playlist set by the user
  - `referenceId` (string, optional) — Unique string value assigned by user to the playlist.
  - `updatedAt` (datetime, optional) — Playlist's most recent update timestamp.
  - `workspaceId` (string, optional) — The unique id of the workspace in which the playlist is present.
- `type`: `smart` (smart)
  - `metadata` (PlaylistByIdResponseMetadata, required) — Required when the playlist type is `smart`. Media created between `startDate` and `endDate` of `createdDate` is added. Optionally, you can include media based on `updatedDate`.
  - `playOrder` (enum, required) — Determines the insertion order of media into playlist.
    - Allowed values: `createdDate ASC`, `createdDate DESC`
  - `createdAt` (datetime, optional) — Timestamp of playlist creation.
  - `description` (string, optional) — Description of the playlist set by the user.
  - `id` (string, optional) — The unique id of the playlist
  - `mediaCount` (integer, optional) — No. of media present in the playlist
  - `mediaList` (list of PlaylistByIdResponseMediaListItem, optional)
  - `name` (string, optional) — The name of the playlist set by the user
  - `referenceId` (string, optional) — Unique string value assigned by user to the playlist.
  - `updatedAt` (datetime, optional) — Playlist's most recent update timestamp.
  - `workspaceId` (string, optional) — The unique id of the workspace in which the playlist is present.

### PlaylistByIdResponseMediaListItem

- `createdAt` (datetime, optional) — Timestamp of media creation in the workspace.
- `creatorId` (string, optional, nullable) — Creator ID of the media.
- `duration` (double, optional) — Duration of the media in seconds.
- `id` (string, optional) — unique id of the particular media.
- `sourceResolution` (string, optional) — source resolution of the media.
- `status` (string, optional) — status of the media, only media with ready status is added to playlist.
- `thumbnail` (string, optional) — thumbnail for the particular media.
- `title` (string, optional, nullable) — Title of the media.

### PlaylistByIdResponseMetadata

Required when the playlist type is `smart`. Media created between `startDate` and `endDate` of `createdDate` is added. Optionally, you can include media based on `updatedDate`.

- `createdDate` (DateRange, optional) — Date range with start and end dates.
- `updatedDate` (DateRange, optional) — Date range with start and end dates.

### DateRange

Date range with start and end dates.

- `startDate` (string, optional)
- `endDate` (string, optional)

## Examples

### Manual playlist (no playOrder)

**Response**

```json
{
  "success": true,
  "data": {
    "type": "manual",
    "createdAt": "2025-06-05T09:10:30.655275Z",
    "description": "This is a manual playlist.",
    "id": "46d5fce1-683a-457f-86d7-c048bb429505",
    "mediaCount": 0,
    "mediaList": [],
    "name": "My Manual Playlist",
    "referenceId": "122q",
    "updatedAt": "2025-06-05T12:23:47.096690Z",
    "workspaceId": "d760b903-86ef-44d6-9b73-334130e0cf2d"
  }
}
```

**SDK Code**

```python Manual playlist (no playOrder)
import requests

url = "https://api.fastpix.com/v1/on-demand/playlists/playlistId"

response = requests.get(url, auth=("<username>", "<password>"))

print(response.json())
```

```javascript Manual playlist (no playOrder)
const url = 'https://api.fastpix.com/v1/on-demand/playlists/playlistId';
const credentials = btoa("<username>:<password>");

const options = {method: 'GET', headers: {Authorization: `Basic ${credentials}`}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Manual playlist (no playOrder)
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.fastpix.com/v1/on-demand/playlists/playlistId"

	req, _ := http.NewRequest("GET", url, nil)

	req.SetBasicAuth("<username>", "<password>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Manual playlist (no playOrder)
require 'uri'
require 'net/http'

url = URI("https://api.fastpix.com/v1/on-demand/playlists/playlistId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request.basic_auth("<username>", "<password>")

response = http.request(request)
puts response.read_body
```

```java Manual playlist (no playOrder)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.fastpix.com/v1/on-demand/playlists/playlistId")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php Manual playlist (no playOrder)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.fastpix.com/v1/on-demand/playlists/playlistId', [
  'headers' => [
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp Manual playlist (no playOrder)
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://api.fastpix.com/v1/on-demand/playlists/playlistId");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.GET);

IRestResponse response = client.Execute(request);
```

```swift Manual playlist (no playOrder)
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.fastpix.com/v1/on-demand/playlists/playlistId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Smart playlist (playOrder required)

**Response**

```json
{
  "success": true,
  "data": {
    "type": "smart",
    "metadata": {
      "createdDate": {
        "startDate": "2024-12-11",
        "endDate": "2024-12-12"
      },
      "updatedDate": {
        "startDate": "2024-12-11",
        "endDate": "2024-12-12"
      }
    },
    "playOrder": "createdDate ASC",
    "createdAt": "2025-06-05T09:10:30.655275Z",
    "description": "This Playlist contains videos from December 2024.",
    "id": "46d5fce1-683a-457f-86d7-c048bb429505",
    "mediaCount": 0,
    "mediaList": [],
    "name": "My Smart Playlist",
    "referenceId": "122q",
    "updatedAt": "2025-06-05T12:23:47.096690Z",
    "workspaceId": "d760b903-86ef-44d6-9b73-334130e0cf2d"
  }
}
```

**SDK Code**

```python Smart playlist (playOrder required)
import requests

url = "https://api.fastpix.com/v1/on-demand/playlists/playlistId"

response = requests.get(url, auth=("<username>", "<password>"))

print(response.json())
```

```javascript Smart playlist (playOrder required)
const url = 'https://api.fastpix.com/v1/on-demand/playlists/playlistId';
const credentials = btoa("<username>:<password>");

const options = {method: 'GET', headers: {Authorization: `Basic ${credentials}`}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Smart playlist (playOrder required)
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.fastpix.com/v1/on-demand/playlists/playlistId"

	req, _ := http.NewRequest("GET", url, nil)

	req.SetBasicAuth("<username>", "<password>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Smart playlist (playOrder required)
require 'uri'
require 'net/http'

url = URI("https://api.fastpix.com/v1/on-demand/playlists/playlistId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request.basic_auth("<username>", "<password>")

response = http.request(request)
puts response.read_body
```

```java Smart playlist (playOrder required)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.fastpix.com/v1/on-demand/playlists/playlistId")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php Smart playlist (playOrder required)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.fastpix.com/v1/on-demand/playlists/playlistId', [
  'headers' => [
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp Smart playlist (playOrder required)
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://api.fastpix.com/v1/on-demand/playlists/playlistId");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.GET);

IRestResponse response = client.Execute(request);
```

```swift Smart playlist (playOrder required)
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.fastpix.com/v1/on-demand/playlists/playlistId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```