Requests, lists and pages

Where to send requests, how to sign them, and how lists, filters, pages and long tasks work.

The address

Every call goes to your panel's address over HTTPS, followed by the path from the API reference:

https://panel.example.com/streams/

There is no version number in the path: the API is the one your panel's release ships, and the reference on your dashboard's Docs page is always the one for the release you run.

Signing requests

Send your API key in the Authorization header:

Authorization: Bearer <your key>

Bodies are JSON (Content-Type: application/json), except file uploads, which are multipart/form-data. Answers are JSON.

Ids, dates and money

  • Ids are long text ids (UUIDs, such as 3f2b8c1e-5a4d-4e6f-9b7a-1c2d3e4f5a6b) for lines, users, streams, packages, bouquets, categories and servers. The reference gives the type of every id.
  • Dates and times are ISO 8601 in UTC: 2026-11-13T12:00:00Z. Send them the same way.
  • Credits and prices are strings with two decimals, such as "10.00", so nothing is lost to rounding.

Lists come a page at a time

Every list answers the same shape:

{
  "count": 1284,
  "next": "https://panel.example.com/streams/?page=2",
  "previous": null,
  "results": [ … ]
}
Query parameter What it does
page Which page, from 1.
page_size How many per page: 20 if you send nothing, at most 200.

To read everything, follow next until it is null:

import os
import requests

session = requests.Session()
session.headers["Authorization"] = f"Bearer {os.environ['MINIMUS_API_KEY']}"

url = "https://panel.example.com/auth/line-users/?page_size=200"
lines = []
while url:
    page = session.get(url).json()
    lines += page["results"]
    url = page["next"]
print(len(lines), "lines")

Filters, search and order

Lists take the filters the dashboard uses, as query parameters. They differ per list and each one is in the API reference. The usual ones:

  • search: matches names, usernames, addresses — what the dashboard's search box matches.
  • ordering: the field to sort by; a - in front sorts the other way (ordering=-created_at).
  • Filters by state, such as status=expired on lines or status=online on streams.
curl 'https://panel.example.com/auth/line-users/?status=expired&search=alice' \
  -H "Authorization: Bearer $MINIMUS_API_KEY"

Retrying safely: Idempotency-Key

Some calls spend or move credits: creating, extending and deleting a line, giving and adjusting credits, and switching a reseller to unlimited credits. If the network fails, you cannot tell whether the panel received your request. Send an Idempotency-Key header — any unique text up to 100 characters, such as a UUID — and repeat the request with the same key:

curl -X POST 'https://panel.example.com/auth/line-users/7d0c…/extend/' \
  -H "Authorization: Bearer $MINIMUS_API_KEY" \
  -H "Idempotency-Key: 6f1d2c0a-5b4e-4f7a-9c3b-2a1e0d9f8c7b" \
  -H "Content-Type: application/json" \
  -d '{"package": "9b1e…"}'
  • Same key, same request: the panel does it once and answers every repeat with the first answer, marked Idempotent-Replayed: true. Nobody is charged twice.
  • Same key, a different request: 409, and nothing is done.
  • A request that was refused (a 4xx) is not kept: fix the reason and retry with the same key.
  • Keys are remembered for 24 hours.

Make a new key for each new action, never one per script.

Long work runs in the background

Imports, syncs and changes to many streams at once can take minutes. Those calls answer at once with the task they started, and you follow it under Background tasks:

curl 'https://panel.example.com/jobs/?state=running' -H "Authorization: Bearer $MINIMUS_API_KEY"

The task's progress, result and any errors are the same ones the dashboard's Background Tasks page shows.