Playly

Playly Partner Docs

How to show Playly videos on your site: get a key, find videos, embed the player, and get notified when new videos go live.

Bahasa Indonesia

Quickstart

Three steps from nothing to a video playing on your site.

Playly hosts the PLAYER, not the file. What you place on your site is an iframe; the video file stays with Playly and you never hold its address. That is deliberate: raw file addresses spread and cannot be revoked.

  1. 1. Ask for an API key. Keys are issued by the Playly team and look like plyk_…. One key can reach several creator accounts at once: useful when your site pulls videos from more than one uploader.
  2. 2. Find the video. Call /api/videos with an IMDb id (most precise) or a title. The response contains embedUrlFull: an address ready to paste.
  3. 3. Embed the player. Drop that address into an <iframe>. Done: there is no SDK to install.
Step 2: find a video (curl)
curl "https://playly-hosting-video.up.railway.app/api/videos?imdbId=tt1375666" \
  -H "X-Playly-Key: plyk_your_key"
Step 3: embed the player (HTML)
<iframe
  src="https://playly-hosting-video.up.railway.app/id/1787642113102/embed"
  width="640" height="360"
  style="width:100%;height:auto;aspect-ratio:16/9;border:0"
  frameborder="0"
  allow="autoplay; fullscreen; picture-in-picture"
  allowfullscreen></iframe>
How to send the key

Use the X-Playly-Key: plyk_… header. A ?key=plyk_… query parameter also works, but only for quick trials: addresses land in server logs and browser history, and your key goes with them. For a real site, always call from your own server: a key placed in a page is readable by anyone.

Embed the player

One iframe, plus options to match your design.

The player address is /id/<video-id>/embed. Every customisation happens through parameters on that address: nothing needs to be installed on your side.

ParameterExampleWhat it does
accent?accent=F0C878Player accent colour: applies to buttons and the progress bar. Playly controls are the default since 20 Sep 2026, so no extra parameter is needed. Hex, 3 or 6 digits, no hash. Without it, on a partner key registered domain the colour set on the partner management page (management link) is used.
bg?bg=101010Colour around the video, so it blends with your page when it is not black.
logo?logo=https://yoursite.com/logo.pngShows your logo on the player. Must be https.
brand?brand=1The small Powered by Playly label in the player corner is hidden automatically for videos owned by Premium creators and on the registered partner site of that video (also while loading); ?brand=1 shows it again. For Free-plan creators the label always shows. This is not a watermark over the picture.
usia?usia=semua · 18 · 21Age limit of the age-confirmation gate, only on the registered partner site of that video (checked by the server). semua = no gate, 18/21 = gate with that limit. Without the parameter (or on other sites) = the video's Playly rating. The partner is responsible for the age it picks.
autoplay?autoplay=1Start on its own, muted (browser rules). By default the video does not start on its own (since 11 Nov 2026): the viewer presses play and gets sound immediately. ?autoplay=0 still means no autoplay.
loop?loop=1Repeat the video continuously.
ctrl?ctrl=nativeFall back to the browser default controls. Playly controls are the default: they add ±10s skip, subtitles, playback speed and quality picking. Use this only if you specifically want the old look.
chapters?chapters=0:00 Intro|1:30 Part 2Chapter list in ONE line: time title, separated by | (file addresses are not supported). When empty, the creator's own chapters are used.
lewati?lewati=intro:0:05-1:30|kredit:42:10-44:00Shows a Skip intro / recap / credits button while that range plays. Format type:start-end, separated by |; type = intro, recap, kredit. When empty, the creator's own ranges are used. Skipping kredit to the end of the video fires the ended event: handy for auto-playing the next episode.
tampilan?tampilan=tegakVertical player in the style of short-drama apps: Like · Save · Share · Comments on the side, an episode badge, swipe up/down to change episode. The data stays yours: see Vertical player.
Example with options
<iframe
  src="https://playly-hosting-video.up.railway.app/id/1787642113102/embed?accent=F0C878&bg=101010&autoplay=0"
  width="640" height="360"
  style="width:100%;height:auto;aspect-ratio:16/9;border:0"
  frameborder="0"
  allow="autoplay; fullscreen; picture-in-picture"
  allowfullscreen></iframe>
No code needed to try it

In the Playly dashboard: Library → ⋮ menu on a video card → Embed, and the iframe code is copied for you. To try the API without writing anything, open /mitra/contoh: paste your key, search for a video, then copy the generated code.

A second form: code that moves itself to another address

The iframe above names ONE address. If that address cannot be reached from your viewer's network, blocked, or simply down, the player is empty, and only you can fix it by editing the code on your own page. So there is a second form: a snippet that tries several Playly addresses in order and uses the first one that answers. The script is pasted into your page in full and is not loaded from us: a script loaded from our address dies in exactly the situation it is meant to handle. Grab it at /mitra/contoh via the Salin kode tahan-blokir button. If you build your own player, the backup addresses ship in the embedUrlAlternatif field on /api/videos and /api/public-video. The plain iframe stays fully supported: some CMSes strip <script> from embed fields.

The picture stays clean

Videos playing on your site carry no any watermark: no logo over the picture, no viewer stamp. The small Powered by Playly label in the player corner is hidden automatically for videos owned by Premium creators. Videos owned by Free-plan creators show sponsor ads in the player: that is what pays for the free plan.

Your domain may need registering

The Playly team can lock a creator's embeds to a list of domains: the lock applies to every key that reaches that creator's account, not per key. If yours is locked and your domain is not on the list, the player refuses to load. The domain is recognised from the embedding page address (the Referer header); embeds that deliberately hide the Referer cannot be recognised, so this is a usage limit, not an absolute safeguard. Subdomains are included automatically: yoursite.com covers watch.yoursite.com. Send your domain when your key is created.

Videos that may not be embedded

A creator can forbid their video from appearing on other sites. When that happens the player refuses to load: except on the partner sites the creator selected for that video. You can check beforehand via allowEmbed on /api/public-video.

Password-protected or email-gated videos

A creator can lock a video with a password, and/or ask viewers for their email (with consent to share it with the creator) before watching. Your embedded player shows the field inside the iframe: you do not need to build anything. A viewer who has passed it is not asked again in the same tab for 12 hours. On /api/public-video: bersandi / gerbangEmail = which gate is on; perluSandi / perluEmail = that request did not carry a permit, so videoUrl, variants, subtitles and chapters are not sent. Only the creator knows the password, and only the creator can read the collected emails: Playly cannot give you either.

In a mobile app (WebView): still use an iframe

The embedUrl only plays inside an iframe. If your app opens that URL directly in a WebView, the browser treats it as a regular page and the player asks the viewer to sign in to Playly first. Load the iframe code inside your own HTML instead, e.g. Android loadDataWithBaseURL("https://yoursite.com/", html, "text/html", "utf-8", null) or iOS loadHTMLString(html, baseURL: URL(string: "https://yoursite.com/")). That base URL becomes the embedding origin, so use a registered domain if the video's embedding is locked to specific domains.

Control the player

Your page and the player can exchange messages: this is what powers auto-next-episode.

The embedded player talks both ways. The two common uses: moving to the next episode when a video ends, and saving watch position so viewers can resume later. Every message carries the marker source: "playly-embed"; anything without it is ignored. Each message also carries videoId.

Message from the playerExtra fieldsWhen it is sent
readycurrentTime, durationVideo details are loaded.
play / pausecurrentTime, durationThe viewer played or paused.
timeupdatecurrentTime, durationWhile playing, at most once per second.
endedcurrentTime, durationThe video finished: this is the one to use for next-episode.
errorpesanThe video failed to load.
Command to the playerExtra fieldsEffect
play / pauseNonePlay or pause.
seekdetik (number)Jump to a position; clamped between 0 and the video duration.
volumenilai 0–1Set the volume.
mutenilai true/falseMute or unmute.
Listening to and commanding the player
const PLAYLY_ORIGIN = "https://playly-hosting-video.up.railway.app";

// Listen to the player
window.addEventListener("message", (ev) => {
  if (ev.origin !== PLAYLY_ORIGIN) return;      // REQUIRED: see the note below
  const d = ev.data;
  if (!d || d.source !== "playly-embed") return;
  if (d.type === "timeupdate") savePosition(d.videoId, d.currentTime);
  if (d.type === "ended") playNextEpisode();
});

// Command the player
const frame = document.getElementById("playly");
function seekTo(detik) {
  frame.contentWindow.postMessage(
    { source: "playly-embed", type: "seek", detik },
    PLAYLY_ORIGIN
  );
}
Check where the message came from, not just its marker

Any other frame on your page can send a message marked playly-embed. Always compare ev.origin against the Playly address first: otherwise a third-party site can tell your page to "go to the next episode" whenever it likes.

Commands must come from the page that embeds the iframe

The player applies the same rule in the other direction: commands are only accepted from the page that directly contains the iframe, and from that page's origin. Messages from any other frame, ads, third-party widgets, or an iframe inside an iframe, are ignored without a reply. Always send through iframe.contentWindow.postMessage(…) from your main page.

An honest limit

If a viewer disables the Referer header in their browser, Playly cannot know your page address and has to send messages to any origin. That is why the message contents are deliberately non-sensitive: position and duration only: no viewer identity, no video file address.

Vertical player (short drama)

A portrait layout in the style of drama apps: its buttons talk to your site, the data stays yours.

Add ?tampilan=tegak to the embed address. The player switches to a vertical layout: top: a Back button and an Ep. 5 / 60 badge; side: Like, Save, Share, Comments; bottom: title, description, timeline, |◀ ▶|, volume and a gear button (Subtitles, Speed, Sound). Tap to play/pause, swipe up for the next episode and down for the previous one; on a keyboard, ↓ is next and ↑ is previous.

Playly does not store your site's episodes, likes, saves or comments. Each button only sends a message to your page, and what the player shows (episode number, like count, title) is what you send in an info message. So the vertical layout is only useful if your page listens and answers: see the example below.

Message from the playerExtra fieldsWhen it is sent
next / prevcurrentTime, durationThe |◀ ▶| buttons, a swipe up/down, or ↓/↑. Not sent when you have disabled that direction with adaBerikutnya / adaSebelumnya.
suka / simpannilai (true/false), currentTime, durationThe viewer taps Like or Save. nilai = the new state. The button changes immediately so it feels alive; you hold the real count.
bagikancurrentTime, durationThe Share button.
komentarcurrentTime, durationThe Comments button: open your comment panel.
daftarEpisodecurrentTime, durationThe viewer taps the Ep. 5 / 60 badge: show your episode list.
kembalicurrentTime, durationThe ← button in the top left.
info message fieldTypeEffect
episodeinteger 1–100000Shows the episode badge. Without it the badge stays hidden.
totalEpisodeinteger 1–100000The number after the slash. Send it together with episode in the same message: otherwise the badge shows no total.
judultext, cut to 120 charactersReplaces the title at the bottom.
deskripsitext, cut to 300 charactersThe line under the title. Empty text hides it.
jumlahSuka / jumlahKomentarinteger, 0 or moreThe count under the button, shortened Indonesian-style (12400 → 12,4rb).
disukai / disimpantrue / falseWhether this viewer has liked or saved the episode.
adaSebelumnya / adaBerikutnyatrue / falsefalse disables the button and swipe in that direction, e.g. on the first or last episode.
Answering the buttons & filling the layout
const PLAYLY_ORIGIN = "https://playly-hosting-video.up.railway.app";
const frame = document.getElementById("playly");

function sendInfo(info) {
  frame.contentWindow.postMessage(
    { source: "playly-embed", type: "info", ...info },
    PLAYLY_ORIGIN
  );
}

// Fill the layout once the player is ready
window.addEventListener("message", (ev) => {
  if (ev.origin !== PLAYLY_ORIGIN) return;
  const d = ev.data;
  if (!d || d.source !== "playly-embed") return;

  if (d.type === "ready") {
    sendInfo({
      episode: 5, totalEpisode: 60,
      judul: "Love in Lies", deskripsi: "Episode 5",
      jumlahSuka: 12400, disukai: false, disimpan: false,
      adaSebelumnya: true, adaBerikutnya: true,
    });
  }
  if (d.type === "next") openEpisode(6);            // point the iframe src at episode 6
  if (d.type === "suka") saveLike(d.nilai);         // store it on your server
  if (d.type === "daftarEpisode") showEpisodeList();
});
When the vertical layout does NOT appear

Only inside an iframe: opened directly in a browser tab the player stays horizontal, because without your page nothing answers its buttons. It also does not apply together with ?ctrl=native. The Powered by Playly label stays visible, moved below the episode badge.

info messages are filtered

Numbers out of range, non-text values for text fields, and anything other than true/false for yes/no fields are dropped, not guessed: the field is treated as not sent. Text is inserted as plain text: HTML tags are shown as-is, never run.

Upload via API

Two steps: reserve, upload, then confirm.

Got hundreds of videos in your CMS? You do not have to add them one by one through the dashboard. A PARTNER key is required: created by the Playly operator in the API Mitra panel, not the per-account key from Integrasi & API → Kunci API & sematan. The per-account key is read-only; used for uploading it is answered with 403 kunci_kreator: or 403 kunci_model_lama if it is an older key not yet migrated into the table.

Why two steps, not one

The file is uploaded directly to storage through a signed address, so it never passes through our server and is not bound by request size limits. That also means the server never sees your file: it only records the video after you call step 2, and after checking for itself that the file really arrived.

POST /api/v1/unggah: reserve a video id and an upload address.

ParameterRequiredNotes
judulyesVideo name. Empty is rejected.
usernamesometimesTarget Playly account. Can be omitted if your key covers exactly one account. If it covers several, it is required: we do not guess.
visibilitynopublic, unlisted, or private. Omitted means unlisted: embeddable on your site, but not published in the Playly public catalogue. An unrecognised value becomes private.
ukuranBytesnoFile size. Providing it lets your file and quota limits be checked up front, before you spend bandwidth uploading. The REAL size is still checked in step 3.
tipenoE.g. video/mp4. Defaults to video/mp4. In step 3 and DELETE it may be omitted: the file is looked up across every known type.
deskripsinoVideo description.
Full example
# 1. Reserve
curl -X POST https://playly-hosting-video.up.railway.app/api/v1/unggah \
  -H "X-Playly-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"judul":"Episode 1","username":"raden","visibility":"unlisted"}'

# → 201 { "ok": true, "videoId": "1787642113102",
#         "uploadUrl": "https://…", "kedaluwarsaDetik": 300, … }

# 2. Upload the file DIRECTLY to uploadUrl (not to Playly)
curl -X PUT "<uploadUrl>" \
  -H "Content-Type: video/mp4" \
  --data-binary @episode-1.mp4

# 3. Confirm: this is where the video actually lands
curl -X POST https://playly-hosting-video.up.railway.app/api/v1/unggah/selesai \
  -H "X-Playly-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"videoId":"1787642113102","serial":"Cinta dalam Dusta","episode":1,"unduh":{"aktif":true}}'

# → 200 { "ok": true, "video": {…}, "transcode": "antre" }

POST /api/v1/unggah/selesai: step 3. Episodic drama? Name the series and episode number here; the catalogue and /api/public-video group them straight away.

ParameterRequiredNotes
videoIdyesId from step 1.
serialnoDrama name, identical on every episode (e.g. Love in Lies). Extra spaces are tidied; max 120 characters.
episodenoEpisode number, a whole number 1–9999 (1 or "1"). Anything else (e.g. "Episode 1") is rejected with episode_tak_sah and the video is not recorded yet: resend with the right number.
unduhnoViewer download permission (Playly download button + the unduh link in the webhook & /api/videos). {"aktif":true,"resolusi":["1080p","720p"]}; leave resolusi out or send [] = every available one (asli = original, 1080p, 720p, 480p, 360p). Plain true / false also work. Not sent = the account default (Pengaturan › Pemutar › Unduhan video baru), then the Playly default. Any other shape or an unknown resolution is rejected with unduh_tak_sah.
Three things that commonly go wrong

1. The upload address expires in 5 minutes: request a new one if you miss it. 2. Stopping after step 1 means the video is not registered; step 3 is what records it. 3. Repeating step 3 is safe: the video is not duplicated, so automatic retries are fine.

CodeHTTPWhat it means & what to do
username_wajib400Your key covers more than one account. Name the target username.
bukan_anggota_kunci403That account is not covered by your key. Check the spelling, or contact Playly.
kuota_habis507Monthly limit reached. The response says which field, how much is used, and the limit.
file_too_large413File exceeds the per-file limit of the account owner's plan: at most 5 GB through the API (single-request upload); maxBytes in the response states your limit. Checked again against the REAL size in step 3, and rejected files are deleted. Larger files: upload through the dashboard.
berkas_belum_ada404Step 3 was called but the file has not arrived. Make sure the PUT to uploadUrl returned 200.
bukan_pemilik_video403That id belongs to an account outside your key. Start again from step 1.

Update & delete via API

Fix a title, hide a video, or take it down: without opening the dashboard.

PATCH /api/v1/video: update one video. Key required. Send only the fields you want changed; the rest are left alone.

ParameterRequiredNotes
videoIdyesId of the video to update.
judulnoNew title. Cannot be empty: an empty title is rejected, not accepted as a blank name.
deskripsinoNew description. May be emptied.
visibilitynopublic, unlisted, or private.
lewatinoSkip-button ranges: [{"jenis":"intro","mulai":5,"selesai":90}] (seconds; type intro/recap/kredit, one per type, at least 3 seconds). null clears them all. If any single segment is invalid the whole request is rejected (lewati_tak_sah): never saved partially.
serialnoDrama name. Use it to tag videos that are already uploaded without re-uploading. "" or null = detach from the series.
episodenoEpisode number 1–9999. null clears it. Not a whole number → rejected (episode_tak_sah).
unduhnoViewer download permission (Playly download button + the unduh link in the webhook & /api/videos). {"aktif":true,"resolusi":["1080p","720p"]}; leave resolusi out or send [] = every available one (asli = original, 1080p, 720p, 480p, 360p). Plain true / false also work. false = turn downloads off for that video. Any other shape or an unknown resolution is rejected with unduh_tak_sah.
Here a wrong value is REJECTED, not quietly corrected

On upload, an unrecognised visibility becomes private: there is a sensible default there, and rejecting would waste a file you already uploaded. On update, you named something deliberately. Accepting it and then using a different value would mean answering "success" for a change that never happened: so we reject and name the valid options.

DELETE /api/v1/video: take a video down. The video goes to its owner's Trash for 30 days: it stops playing everywhere immediately, and the owner can restore it from the dashboard. After 30 days it is deleted permanently, automatically.

Examples
# Change only the title: description & visibility untouched
curl -X PATCH https://playly-hosting-video.up.railway.app/api/v1/video   -H "X-Playly-Key: YOUR_KEY" -H "Content-Type: application/json"   -d '{"videoId":"1787642113102","judul":"Episode 1 (revised)"}'

# Hide from the public catalogue
curl -X PATCH https://playly-hosting-video.up.railway.app/api/v1/video   -H "X-Playly-Key: YOUR_KEY" -H "Content-Type: application/json"   -d '{"videoId":"1787642113102","visibility":"unlisted"}'

# Take it down (goes to the owner's Trash for 30 days)
curl -X DELETE https://playly-hosting-video.up.railway.app/api/v1/video   -H "X-Playly-Key: YOUR_KEY" -H "Content-Type: application/json"   -d '{"videoId":"1787642113102"}'

# → 200 { "ok": true, "keSampah": true, "dihapusDariDaftar": true,
#         "hapusPermanenPada": "2026-11-14T03:00:00.000Z", "berkasTerhapus": [] }
Goes to Trash, not gone at once

While in Trash the video cannot be played, embedded or listed in the catalogue: but its files still exist and keep counting against storage quota until deleted permanently (automatically after 30 days, or sooner if the owner deletes it from Trash). At that point not just the original file but every resolution variant is removed. Calling DELETE again for a video already in Trash is safe: same answer, with hapusPermanenPada = null. keSampah: false = Trash cannot be used for this video (e.g. it is not in the owner's library, only its files were left behind): the files are deleted permanently right away, and berkasTerhapus lists only what was actually removed. View, like and comment counts are not deleted, and the video id is not released for reuse: so old numbers can never get mixed with a different video.

Download the original file (creator key)

Fetch the original file of your own video: for backup or to move it into your own system.

GET /api/v1/unduh?videoId=…: a download link for the ORIGINAL video file (the file that was uploaded, not a compressed version). Creator keys only: the per-account key from Integrasi & API → Kunci API & sematan: and only for videos owned by the account holding that key. A partner key is answered with 403 kunci_mitra: partner sites show a creator's video through the player, they do not take the original file. An older key not yet migrated into the table is answered with 403 kunci_model_lama.

ResponseMeaning
200{ ok, url, nama, expiresIn }: open url to download; nama = file name taken from the video title; expiresIn = link lifetime in seconds (600).
401 missing_key / invalid_keyNo key sent, wrong key, or the key was revoked.
403 kunci_mitra / kunci_model_lamaA key type that may not download original files; message states why.
404 tak_adaThe video is not in the key holder's library, or its file is missing from storage. A video owned by another account gets exactly the same answer: deliberately indistinguishable.
422 bukan_berkasA video added from an outside link: its file is not stored at Playly. A non-numeric videoId is also answered with 422.
429 rate_limitedMore than 30 requests per minute for one key. Wait as told by the Retry-After header.
Example
curl "https://playly-hosting-video.up.railway.app/api/v1/unduh?videoId=1787642113102" \
  -H "X-Playly-Key: YOUR_CREATOR_KEY"

# → 200 { "ok": true, "url": "https://…", "nama": "Episode 1.mp4", "expiresIn": 600 }

# Then download the file from that url (straight from storage, not through Playly)
curl -L -o "Episode 1.mp4" "<url>"
Call it from a server, not from a browser

This endpoint deliberately has no CORS. A creator key opens the original files of all your videos; placed in a web page, visitors could read it. The url link only lasts 10 minutes: request a fresh one each time you download, do not store or share it.

API reference

Three endpoints. All answer JSON in the same shape.

Success is always { "ok": true, … }; failure is always { "ok": false, "error": "code" }. Check ok, not just the HTTP status.

Two addresses, one behaviour

Every endpoint answers on two addresses: /api/videos and /api/v1/videos (same for public-video and catalog). They run exactly the same code, so results are identical. The unversioned address will not be retired: sites already wired up need no change. Use the versioned one for new work: if a future change cannot fit the old shape, it arrives as /api/v2/ and your site keeps running on v1 until you are ready.

GET /api/videos: search videos in the accounts your key reaches. Key required.

ParameterRequiredNotes
imdbIdone ofIMDb id, e.g. tt1375666. The precise way: exact match.
titleone ofVideo title. Punctuation and year are ignored, word order may differ. Max 200 characters.
limitnoResults per page. Default 20, maximum 50.
offsetnoSkip this many results: used for the next page. Default 0.
Response
{
  "ok": true,
  "count": 1,
  "videos": [
    {
      "id": 1787642113102,
      "title": "Inception",
      "imdbId": "tt1375666",
      "creator": "raden",
      "kualitas": {
        "sesi": 412,
        "sesiMain": 405,
        "gagalPersen": 0.7,
        "keluarSebelumMulaiPersen": 1,
        "mulaiRataMs": 1240,
        "mulaiLambatPersen": 4.4,
        "tersendatPersen": 7.7,
        "sendatPersenWaktu": 0.3,
        "resolusi": { "360": 40, "480": 120, "720": 210, "1080": 35 },
        "penilaian": "baik"
      },
      "duration": "2:28:00",
      "createdAt": 1787642113102,
      "embedUrl": "/id/1787642113102/embed",
      "lewati": [{ "jenis": "intro", "mulai": 5, "selesai": 90 }],
      "embedUrlFull": "https://playly-hosting-video.up.railway.app/id/1787642113102/embed",
      "embedUrlAlternatif": [],
      "unduh": { "url": "/unduh/1787642113102", "urlFull": "https://playly-hosting-video.up.railway.app/unduh/1787642113102", "resolusi": [] },
      "views": 1243,
      "seo": {
        "duration": "PT2H28M",
        "uploadDate": "2026-08-25T07:15:13.102Z",
        "thumbnailUrl": "https://playly-hosting-video.up.railway.app/api/thumb?k=thumbs%2F1787642113102-9f2c41ab.jpg",
        "siapGoogle": true,
        "jsonLd": {
          "@context": "https://schema.org",
          "@type": "VideoObject",
          "name": "Inception",
          "thumbnailUrl": "https://playly-hosting-video.up.railway.app/api/thumb?k=thumbs%2F1787642113102-9f2c41ab.jpg",
          "uploadDate": "2026-08-25T07:15:13.102Z",
          "duration": "PT2H28M",
          "embedUrl": "https://playly-hosting-video.up.railway.app/id/1787642113102/embed"
        }
      }
    }
  ]
}
Playback quality (the kualitas field)

A summary of the last 30 days from the Playly player: including viewers on your site, because the embedded player reports too. sesi = playback attempts; gagalPersen = failed to load; keluarSebelumMulaiPersen = left before the video started; mulaiRataMs = average wait until the picture runs; tersendatPersen = plays that stalled at least once; sendatPersenWaktu = share of watch time spent waiting; resolusi = sessions per last-used resolution. penilaian: baik (good) · cukup (fair) · buruk (poor) · belum-cukup-data (under 5 sessions). null = no measured sessions yet, not “never had problems”. Waiting caused by the viewer seeking or switching quality is not counted.

Use embedUrlFull, not embedUrl

embedUrlFull is the complete, ready-to-paste address for an <iframe>. embedUrl is only the relative part (/id/…/embed); it is still sent so existing partners who assemble the address themselves keep working: but do not use it for new integrations. If the Playly address ever changes, a hand-assembled address breaks, while embedUrlFull follows along.

A "Playly" download button (the unduh field)

/api/public-video carries unduh: null = this video cannot be downloaded through Playly (the creator has not enabled it, or the video is password/email-gated). Otherwise it looks like { "url": "${ASAL}/unduh/<id>", "resolusi": ["asli","720p","360p"], "pilihan": [{ "res": "asli", "label": "1080p" }, { "res": "720p", "label": "720p" }, { "res": "360p", "label": "360p" }] } (asli = original file). Use pilihan[].label as the button text (the original file shows its resolution, e.g. 1080p, or Asli when it is not recorded yet) and pilihan[].res for ?res=. Show a Playly row in your download-provider list only when unduh is not null, and open url in a new tab: append ?res=720p to preselect a resolution. That page shows a countdown, the file size and Playly ads, then downloads the file; it cannot be placed inside an <iframe> on your site. File addresses are never sent through the API.

Subtitles. unduh.subtitle = the .srt subtitles offered with the download, e.g. [{ "kode": "k:id", "lang": "id", "label": "Indonesia" }, { "kode": "o:en", "lang": "en", "label": "Inggris (otomatis)" }] ([] = none, or the creator switched them off). Append &sub=<kode> to preselect a language, or &sub=tanpa for no subtitle. Without sub, viewers choose on the Playly page (starting from their browser language). Your choice is only the starting value: viewers can still change it. Use kode as given, do not build it yourself; label is in Indonesian, so for other languages build your text from lang. The subtitle downloads as a separate .srt file named after the video file, so VLC/MX Player load it automatically.

Download link straight from the webhook & /api/videos (13 Nov 2026)

video.published and GET /api/videos also carry unduh, so the Playly button can be added as soon as a new video arrives, without calling /api/public-video first. null = the creator does not allow downloads (or the video comes from an outside link, or an admin closed all downloads). It looks like { "url": "/unduh/<id>", "urlFull": "${ASAL}/unduh/<id>", "resolusi": [] }: resolusi = the creator's choice, [] = every available resolution. Creators can allow downloads for all their new videos at once (Pengaturan › Pemutar › Unduhan video baru), so a freshly uploaded video carries this link right away. Precedence: the unduh you send through the API → the account choice (the creator, or a Playly admin per account) → the Playly default for accounts that have not chosen. The exact resolution list with labels (pilihan) and subtitles are only final once the video has been processed: take them from /api/public-video when you need them. The download page still checks the video's password and gates when opened, so a password-protected video can refuse even when unduh is set.

Example: a Playly button in your download-provider list (HTML + JavaScript)
<!-- Example: a "Playly" row in your download-provider list -->
<ul id="daftarProvider">
  <!-- your own providers (Google Share, Telegram, Mega, ...) -->
</ul>

<script>
  // Playly video id: the same number as in the embed player address (/id/<id>/embed)
  var VIDEO_ID = '1787642113102';

  function tambahProviderPlayly(videoId, daftar) {
    fetch('https://playly-hosting-video.up.railway.app/api/public-video?id=' + encodeURIComponent(videoId))
      .then(function (r) { return r.ok ? r.json() : null; })   // 404 / 410 = video missing or not live: Playly is not shown
      .then(function (v) {
        if (!v || !v.unduh) return;                            // null = this video cannot be downloaded through Playly
        var li = document.createElement('li');
        var nama = document.createElement('span');
        nama.textContent = 'Playly';
        li.appendChild(nama);
        // (optional) subtitle menu: unduh.subtitle = [{ kode, lang, label }]; empty/missing = no menu
        var menuSub = null;
        if (v.unduh.subtitle && v.unduh.subtitle.length) {
          menuSub = document.createElement('select');
          menuSub.add(new Option('No subtitle', 'tanpa'));
          v.unduh.subtitle.forEach(function (s) { menuSub.add(new Option(s.label, s.kode)); });
          li.appendChild(menuSub);
        }
        // one button per available resolution the creator allows; label = "1080p", "720p", ... (pilihan.label)
        (v.unduh.pilihan || v.unduh.resolusi.map(function (res) { return { res: res, label: res }; })).forEach(function (p) {
          var a = document.createElement('a');
          a.href = v.unduh.url + '?res=' + encodeURIComponent(p.res);
          // the chosen subtitle language is carried on click (?sub=); viewers can still change it at Playly
          if (menuSub) a.addEventListener('click', function () { a.href = v.unduh.url + '?res=' + encodeURIComponent(p.res) + '&sub=' + encodeURIComponent(menuSub.value); });
          a.target = '_blank';                                  // new tab: the Playly download page cannot run inside an iframe
          a.rel = 'noopener';
          a.textContent = 'DOWNLOAD ' + p.label;
          li.appendChild(a);
        });
        daftar.appendChild(li);
      })
      .catch(function () { /* Playly unreachable: your other providers still show */ });
  }

  tambahProviderPlayly(VIDEO_ID, document.getElementById('daftarProvider'));
</script>
Why an IMDb id beats a title

A title is always a guess. "The Lion King" 1994 and 2019 produce the same match, so your site can show the wrong video without a single error. An IMDb id removes the guess. Use titles only for videos that carry no IMDb id yet.

GET /api/public-video?id=<id>: full details for one video. No key, and callable straight from a visitor's browser (cross-origin allowed). Includes title, imdbId, creator, duration, thumb, allowEmbed, viewsNum, likes, category, series, episode, and subtitles when present.

GET /api/catalog: public videos across all creators, for a browse page. Key required since 20 Sep 2026: send X-Playly-Key: <key> (or ?key=), the same key /api/videos uses. Without one it answers 401 missing_key. Why: this endpoint lists videos from EVERY creator, and until now anyone could take that list without identifying themselves. Parameters: genre, sort=terbaru|populer, limit (default 40, max 100), offset. Each video carries watchUrl, embedUrl dewasa (true = adult content: put your own age gate in front of it if you list it) and ratingUsia (0 all ages · 18 · 21). The rating already accounts for Playly’s automatic detection and admin decisions, not just the creator’s choice; /api/public-video returns the same two fields. Videos whose owner disallows embedding are not listed.

What is deliberately NOT sent

/api/videos does not send thumb, videoUrl, or ownerId. Display posters are not the search endpoint’s job: take them from /api/public-video or /api/catalog. (The one image included is seo.thumbnailUrl: a cover at a stable address, meant only for Google structured data: see Show up on Google.) The raw file address is withheld on purpose: what Playly sells is the player, not the file. And ownerId is an internal id that is of no use to you. If your site genuinely needs one of these, say so: do not infer it from another field.

Videos whose embedding the creator turned off

Creators can turn off embedding on other sites per video. That does not apply to the partner sites the creator SELECTED for that video: there it still appears and still plays. For every other site: the player you installed shows an embedding disabled message, AND the video does not appear in /api/videos results. Both are intentional. So if a video suddenly disappears from your search results while still existing on Playly, it is most likely not a fault: the creator closed embedding or did not select your site.

Poster shapes & expiring links

/api/catalog → thumb is a cover address on the Playly site (/api/thumb?k=…) that does not expire, or a base64 image for videos not indexed yet. /api/public-video → videoUrl is sent only for videos owned by Premium creators; for Free-plan creators it is null and the response carries pemutarWajib: true: play it through embedUrl (the Playly player). Videos whose owner disallows embedding or locks domains also carry no videoUrl for sites outside their list. Adult videos (dewasa: true) carry perluUsia: true without videoUrl/variants until the request includes the viewer’s age statement, the X-Playly-Usia header (18 or 21, matching ratingUsia); the Playly embed shows its own age gate, while registered partner domains using their own player still receive the address and must put up their own age gate. Partners that fetch the address from their own server send no Origin, so their domain cannot be recognised: send the partner key via the X-Playly-Key header (or ?key=) and adult videos actually shared with that partner still carry videoUrl. The key must have the read permission, must not be revoked, and the video must be selected for that partner under Send to partner. These limits are recognised from browser request headers: non-browser callers can forge them, so treat this as a usage policy, not an absolute safeguard. When it is sent, videoUrl is signed and expires too, while its thumb may be a file link or a base64 image embedded in the JSON: freshly uploaded videos that are not indexed yet still use base64. Do not assume either one. Finally: unlisted videos do not enter /api/catalog; they are reachable only by direct link or embed.

Portrait posters for catalog rows

/api/catalog → poster holds a portrait 2:3 image the creator picked specifically for catalog rows on your site's front page, at a Playly address (/api/thumb?k=…) that does not expire. It is null when the creator has not set one: use thumb instead. thumb is still sent as before: it is the player cover (how the video looks before it starts), shaped like the video.

CodeHTTPMeaning & what to do
missing_key401No key sent. Check the X-Playly-Key header.
invalid_key401Key unknown or revoked. Contact the Playly team.
izin_kurang403Your key is valid but not granted permission for this route (e.g. read-only). The missing permission is named in perlu. Ask the Playly team to add it.
validation422Bad format: e.g. an IMDb id not shaped like tt…. See details.
duplicate_key409The same key is registered to more than one account (legacy path). Contact the team.
rate_limited429Too many calls. Per-minute limits: /api/videos 60 (per IP), /api/catalog & /api/public-video 120 (per IP), upload 60, PATCH 60, DELETE 30 (per key). Wait as told by Retry-After.
not_found404No such video, or it is private/draft/scheduled.
missing_id400The id parameter was not sent to /api/public-video.
service_unavailable503The service is not ready on the Playly side (not your fault). Retry later; tell the team if it persists.
internal_error500An unexpected error on the Playly side. Tell the team if it repeats.

Show up on Google (SEO)

Mark the videos you embed so Google recognises them.

Google can show a video in search results, with its image and duration, when the page that contains it carries VideoObject structured data. What gets listed is your page; Playly’s own player pages are deliberately not indexed. So you do not have to assemble it yourself, every video in /api/videos carries seo with the pieces only Playly knows.

FieldContents
seo.durationDuration in standard ISO 8601 format, e.g. PT2H28M. null if the duration is not recorded yet.
seo.uploadDateUpload date in full ISO 8601 format with time zone.
seo.thumbnailUrlA cover address that does not expire: safe to store and paste. null if the cover is not recorded in the Playly index yet.
seo.siapGoogletrue when the three fields Google requires (name, thumbnailUrl, uploadDate) are all present.
seo.jsonLdA ready-to-use VideoObject. Empty fields are already removed.
On your video page (example assembled on the server)
// video = one result from /api/videos
const ld = {
  ...video.seo.jsonLd,
  name: officialTitle,       // the title from your catalogue (TMDB/IMDb)
  description: synopsis,     // Google recommends a description
};

// then write into the page HTML:
// <iframe src="${video.embedUrlFull}" allowfullscreen></iframe>
// <script type="application/ld+json">${JSON.stringify(ld)}</script>
Title & description come from you

Playly provides the player, not the catalogue. name holds the video’s title on Playly only as a fallback: replace it with the official title from your catalogue. description is deliberately left out; write your own synopsis.

When siapGoogle is false

Usually the video’s cover is not recorded in the Playly index yet: typically a video that was just uploaded. Call /api/videos again later. Do not paste jsonLd without thumbnailUrl: Google requires it, and incomplete data will not be used.

Honest limits

Structured data is a requirement, not a guarantee: Google decides whether and when a video is shown. Check your page with Google’s Rich Results Test (search.google.com/test/rich-results) after adding it. For Google use seo.thumbnailUrl, not thumb in /api/catalog: thumb may be a base64 image Google cannot use, while seo.thumbnailUrl is always an address: or null when there is none yet.

Webhooks

Playly tells your site when a new video goes live.

Instead of your site asking "anything new?" over and over, Playly sends word. Give the team your receiving address and you will get a shared secret to prove a delivery really came from Playly.

Deliveries arrive as a POST with JSON. There are three video events: video.published (a new video is available), video.updated (the download permission of a video you already received changed) and video.deleted (the video must no longer be shown). Always check event before acting: never treat every delivery as a new video.

Delivery body
{
  "event": "video.published",
  "site": "dramaku",
  "video": {
    "id": 1787642113102,
    "title": "Inception",
    "imdbId": "tt1375666",
    "creator": "raden",
    "duration": "2:28:00",
    "createdAt": 1787642113102,
    "embedUrl": "/id/1787642113102/embed",
    "unduh": { "url": "/unduh/1787642113102", "urlFull": "https://playly-hosting-video.up.railway.app/unduh/1787642113102", "resolusi": [] }
  }
}
video.updated body
{
  "event": "video.updated",
  "changed": ["unduh"],
  "site": "dramaku",
  "video": {
    "id": 1787642113102,
    "title": "Inception",
    "embedUrl": "/id/1787642113102/embed",
    "unduh": null
  }
}

video.updated (16 Nov 2026) is sent when the download permission of a video you already received changes: the creator turns downloads on or off, changes the resolutions, or Playly closes all downloads. It carries the same full body as video.published (shortened above) plus changed, which names the part that changed. Overwrite the video with the same id on your site: unduh: null means hide the download button. Do not add it as a new video.

video.deleted body
{
  "event": "video.deleted",
  "site": "dramaku",
  "video": { "id": 1787642113102 }
}

video.deleted is sent for a video you previously received through video.published that its creator then deleted, made private/draft, or stopped allowing to be embedded, or that an admin took down. Remove it from your site (its player can no longer play anyway). If the video is published again later, you will receive video.published again. Reply 2xx even for ids you do not know: deliveries without a 2xx reply are retried.

Two headers come along: X-Playly-Timestamp (seconds) and X-Playly-Signature shaped as sha256=<hex>. The signature is HMAC-SHA256 over the text <timestamp>.<raw body> using your shared secret.

Verifying the signature (Node.js)
import { createHmac, timingSafeEqual } from 'node:crypto';

const TOLERANCE_SECONDS = 300; // reject deliveries older than 5 minutes

function valid(rawBody, headers, secret) {
  const ts = Number(headers['x-playly-timestamp']);
  if (!Number.isFinite(ts)) return false;
  if (Math.abs(Date.now() / 1000 - ts) > TOLERANCE_SECONDS) return false;

  const expected =
    'sha256=' + createHmac('sha256', secret).update(`${ts}.${rawBody}`).digest('hex');
  const sent = String(headers['x-playly-signature'] || '');
  if (expected.length !== sent.length) return false;
  return timingSafeEqual(Buffer.from(expected), Buffer.from(sent));
}
Why the timestamp is checked too

Without it, anyone who once captured a valid delivery could replay it whenever they liked, and your site would believe it. Rejecting deliveries older than 5 minutes closes that. Compare signatures in constant time (timingSafeEqual), never with ===.

If your server is down for a while

Failed deliveries are retried by a daily pass, so videos still arrive: just not instantly. Answer with a 2xx status so Playly knows the delivery landed.

Limits & what does not exist yet

Written so you do not design your site around something we do not have.

All three endpoints allow cross-domain calls without cookies, so they can be called straight from a visitor's browser. Even so, for endpoints that need a key, call them from your server: a key placed in a page is readable by anyone.

What you might be looking forThe reality
Quality that adapts to the networkNot yet. Viewers can pick a resolution in the player, but it does not switch by itself when the connection weakens.
Pagination for long listsAvailable (26 Aug 2026): use offset together with limit. Responses carry total, offset, and hasMore so you never have to guess whether more remain.
Filter by genre or creator on /api/videosNot yet. Filter on your side.
API version in the path (/v1/)Available (26 Aug 2026): /api/v1/videos, /api/v1/public-video, /api/v1/catalog. The unversioned addresses stay alive permanently.
Webhook events other than video.publishedPartly (8 Oct 2026): video.deleted for videos that are deleted, made private/draft, have embedding turned off, or are taken down by an admin. Since 16 Nov 2026 also video.updated when the download permission changes. There is no notification for title or duration edits yet.
A delivery history page for webhooksNot yet. Only the Playly team can see the last delivery status: ask when you need it.
Why this list exists

Documentation that carries only good news lets partners design around things that were never promised, and they find out after building. Reading one table now is cheaper.