Apps

The API

Everything you do to a playlist in the editor, a script can do too: list channels, rename, move, hide, delete and restore, refresh a playlist and undo. The same rules apply as in the editor, with the same Undo and the same bin. Follow these steps to make an API key and your first call.

Step 1: Make a key

  1. Open Account: Click Account at the bottom of the bar on the left of the editor.
  2. Find API keys: Scroll down to API keys and click New key.
  3. Name it: Type a Name, for example "Price list script", so you can tell your keys apart later.
  4. Choose what it may do: Under What it may do, choose Read only or Read and write.
  5. Choose playlists (optional): Under Playlists, tick the playlists the key may reach. Leave all unticked for every playlist.
  6. Choose when it stops (optional): Under Stops working, pick Never, 30 days, 90 days, 1 year or Pick a date.
  7. Create it: Click Create key.
the New API key window with a name, Read and write and one playlist
  1. Copy the key: Copy it and keep it somewhere safe. To see it again later, click Show next to the key under API keys.

The options:

Note: An M3UTool Gateway key with an end date stops your self-hosted M3UTool from syncing on that day. Give it a new date before then.

Important: M3UTool keeps your keys locked, so a copy of M3UTool's database alone does not open them. Only you see them, with Show. Keys made before 6 October 2026 cannot be shown again: if you lose one, make a new key and revoke the old one.

Step 2: Make a call

Send the key with every call, as a bearer token. The address is https://editor.dontv.shop/api/v1.

curl https://editor.dontv.shop/api/v1/playlists -H "Authorization: Bearer dontv_ab12cd34_..."

On Windows, type curl.exe instead of curl. Every answer is JSON with an ok field:

{ "ok": true, "playlists": [ ... ] }
{ "ok": false, "error": "Missing API key. Send it as: Authorization: Bearer <key>" }

GET /api/v1 needs no key and lists every call the API offers.

Step 3: Try calls in the API docs

  1. Open the docs: Under API keys, click API docs. They open at https://editor.dontv.shop/api/v1/docs.
  2. Add your key: Click Authorize, paste your key under bearerKey, and click Authorize again.
  3. Try a call: Open a call, click Try it out, then Execute. The answer shows below it.

Important: Try it out on a call that changes something really changes your playlist. The page forgets your key when you close the tab.

Tools that read OpenAPI can load the full list from https://editor.dontv.shop/api/v1/openapi.json.

What you can call

Playlists

CallWhat it does
GET /api/v1/playlistsYour playlists.
POST /api/v1/playlistsMake a playlist: {name}, plus source_url for a provider link.
GET /api/v1/playlists/{id}One playlist.
PATCH /api/v1/playlists/{id}Rename or change it.
DELETE /api/v1/playlists/{id}Delete it for good. This one has no bin.
POST /api/v1/playlists/{id}/syncRefresh it from its provider. Answers with a job_id.

Groups

CallWhat it does
GET /api/v1/playlists/{id}/groupsThe groups. Add ?type=live, vod or series.
POST /api/v1/playlists/{id}/groupsMake a group: {name, type}.
PATCH /api/v1/playlists/{id}/groups/{gid}Rename or hide it.
DELETE /api/v1/playlists/{id}/groups/{gid}Move it to the bin.

Channels, movies and series

CallWhat it does
GET /api/v1/playlists/{id}/streamsThe list. Filter with group_id, type, status and q, page with limit and after.
POST /api/v1/playlists/{id}/streamsAdd one: {name, stream_url, group_id}.
POST /api/v1/playlists/{id}/streams/bulkChange many at once: move, hide, show, logo, delete or restore, with ids.
GET /api/v1/streams/{id}One channel, movie or series.
PATCH /api/v1/streams/{id}Change it.
DELETE /api/v1/streams/{id}Move it to the bin.
POST /api/v1/streams/{id}/restoreTake it out of the bin.

A list answer carries next when there is more. Pass it back as after for the next page. Use q to search instead of paging through everything:

curl "https://editor.dontv.shop/api/v1/playlists/42/streams?q=matchday&limit=20" -H "Authorization: Bearer $DONTV_KEY"

Fallbacks

CallWhat it does
GET /api/v1/playlists/{id}/failoverChannels that have fallbacks.
POST /api/v1/playlists/{id}/failover/autoGroup live channels that share a TV guide id.
POST /api/v1/playlists/{id}/failover/groupGroup {ids} as one channel with fallbacks.
POST /api/v1/playlists/{id}/failover/ungroupTake {ids} out again, or a whole group with {primary_id}.

When the same channel comes from several providers, group the copies instead of hiding or deleting them. Hiding or deleting throws the fallbacks away. More in Fallbacks.

Bin, Undo and jobs

CallWhat it does
GET /api/v1/playlists/{id}/trashWhat is in the bin.
GET /api/v1/playlists/{id}/undoWhat the last change was.
POST /api/v1/playlists/{id}/undoTake the last change back.
GET /api/v1/jobs/{id}How a refresh is going.

Note: Undo is one step, and it is shared with the editor. A change a script made can be taken back in the editor, and the other way round.

Limits and errors

Good to know

Pictures show made-up demo channels and Blender open movies (© Blender Foundation, CC BY).