MediaFilez
DocumentationMEDIAFILEZ

Saved playlists

Store source links with private, unlisted, or public visibility.

Saved playlists belong to an API account. They hold source links rather than stored copies of the media. Each account can create 5 playlists with 50 items per playlist.

Playlist routes

All writes require the owner. GET /playlists lists the caller's playlists. Reads of a specific public or unlisted playlist do not require authentication; private reads require the owner.

MethodRouteBodySuccess
GET/playlistsNone200 with { playlists }
POST/playlistsSee create example below201 with { playlist }
GET/playlists/:idNone200 with { playlist }, including items
PATCH/playlists/:idAny of name, description, visibility200 with { playlist }
DELETE/playlists/:idNone204, no body

name is trimmed and must contain 1 to 100 characters. description is at most 1000 characters. An update must contain at least one allowed field. Unknown fields are rejected.

Visibility

ValueReading behavior
privateOwner only
unlistedAnyone with its ID/link; excluded from the public listing
publicAnyone; eligible for the public listing

Sharing does not grant editing rights or permission to download as the owner. Use GET /playlists/public?limit=20 for the public listing. limit is 1 to 50; pass the returned nextCursor as cursor for the next page when present.

Item routes

MethodRouteBodySuccess
POST/playlists/:id/itemsSee add-links example below200 with { items, added }
PATCH/playlists/:id/items/:itemIdtitle, mediaType, or both200 with { item }
DELETE/playlists/:id/items/:itemIdNone204, no body

An add request contains 1 to 50 item objects and must fit the playlist's remaining capacity. Each URL is HTTP(S), up to 4096 characters, without embedded credentials. title is optional, up to 200 characters. mediaType is auto (default), video, audio, or image.

POST /playlists/:id/download requires the owner. Use the actual item IDs returned by the playlist, not media URLs or file IDs.

JSON
{
    "itemIds": [
        "pli_example"
    ],
    "output": {
        "type": "auto",
        "format": "original",
        "quality": "best"
    }
}

Select 1 to 10 unique item IDs. output is optional. The response is 202 with a batch; follow batch status. This does not download files immediately or create a ZIP.

If you use a single partner key for your bot, these are your partner account's playlists. They are not automatically separated by Discord member.

Request examples

Choose a language. JavaScript and Node.js examples use a server environment, not a public browser key. Replace illustrative IDs with your own.

Create a playlist

POST /playlists

Shell
curl --fail-with-body -X POST 'https://api.mediafilez.online/api/v1/playlists' \
    -H "Authorization: ApiKey $MEDIAFILEZ_API_KEY" \
    -H 'Content-Type: application/json' \
    --data '{
    "name": "Saved",
    "visibility": "private"
}'

Update a playlist

PATCH /playlists/pl_example

Shell
curl --fail-with-body -X PATCH 'https://api.mediafilez.online/api/v1/playlists/pl_example' \
    -H "Authorization: ApiKey $MEDIAFILEZ_API_KEY" \
    -H 'Content-Type: application/json' \
    --data '{
    "name": "Updated name",
    "visibility": "unlisted"
}'

POST /playlists/pl_example/items

Shell
curl --fail-with-body -X POST 'https://api.mediafilez.online/api/v1/playlists/pl_example/items' \
    -H "Authorization: ApiKey $MEDIAFILEZ_API_KEY" \
    -H 'Content-Type: application/json' \
    --data '{
    "items": [
        {
            "url": "https://example.com/video.mp4",
            "mediaType": "video"
        }
    ]
}'

Delete a playlist

DELETE /playlists/pl_example

Shell
curl --fail-with-body -X DELETE 'https://api.mediafilez.online/api/v1/playlists/pl_example' \
    -H "Authorization: ApiKey $MEDIAFILEZ_API_KEY"