Common tasks

The calls most integrations need: find, create and extend lines, restart a stream, see who is watching, give credits.

Every example reads the key from MINIMUS_API_KEY and calls panel.example.com: use your own panel's address. Each call's full list of fields is in the API reference.

Lines

Find a line

curl 'https://panel.example.com/auth/line-users/?search=alice' \
  -H "Authorization: Bearer $MINIMUS_API_KEY"

search matches the username. Add status= to narrow it: active, expired, trial, online, disabled, banned or restreamer.

Lines that expire next

Active lines, the soonest to expire first:

curl 'https://panel.example.com/auth/line-users/?status=active&ordering=expire_date&page_size=50' \
  -H "Authorization: Bearer $MINIMUS_API_KEY"

Create a line with a package

First find the package's id:

curl 'https://panel.example.com/management/packages/' -H "Authorization: Bearer $MINIMUS_API_KEY"

Then create the line. The package sets its length, connections and bouquets. A reseller pays the package's price from their credits; the answer's charge says how much was taken.

cURL
curl -X POST 'https://panel.example.com/auth/line-users/' \
  -H "Authorization: Bearer $MINIMUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "alice",
    "password": "a-long-random-password",
    "password_confirm": "a-long-random-password",
    "package": "9b1e5c2a-…"
  }'
Python
import os
import uuid
import requests

response = requests.post(
    "https://panel.example.com/auth/line-users/",
    headers={
        "Authorization": f"Bearer {os.environ['MINIMUS_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "username": "alice",
        "password": "a-long-random-password",
        "password_confirm": "a-long-random-password",
        "package": "9b1e5c2a-…",
    },
)
response.raise_for_status()
print(response.json())

Keep the Idempotency-Key you sent if you may retry: a retry with the same key never makes or charges a second line. See Retrying safely.

Extend a line

The package's length is added to the time the line has left (an expired line starts again from now). Its own settings stay unless you send "reset_settings": true; its bouquets stay unless you send "reset_bouquets": true.

curl -X POST 'https://panel.example.com/auth/line-users/7d0c…/extend/' \
  -H "Authorization: Bearer $MINIMUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"package": "9b1e5c2a-…"}'

Disable or enable a line

curl -X PATCH 'https://panel.example.com/auth/line-users/7d0c…/' \
  -H "Authorization: Bearer $MINIMUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"is_active": false}'

Send "is_active": true to enable it again. The line keeps its expiry date and settings while it is disabled.

Streams

Restart a stream

Find it, then restart it:

curl 'https://panel.example.com/streams/?search=Channel%20A' -H "Authorization: Bearer $MINIMUS_API_KEY"

curl -X POST 'https://panel.example.com/streams/5c1f…/restart/' -H "Authorization: Bearer $MINIMUS_API_KEY"

/start/ and /stop/ work the same way.

Streams that are down

curl 'https://panel.example.com/streams/?status=error' -H "Authorization: Bearer $MINIMUS_API_KEY"

Who is watching

curl 'https://panel.example.com/streams/connections/' -H "Authorization: Bearer $MINIMUS_API_KEY"

Each row is one open connection: the line, the stream or title, the server, the viewer's address and since when.

Credits

Your balance

curl 'https://panel.example.com/credits/me/' -H "Authorization: Bearer $MINIMUS_API_KEY"

Give credits to a reseller

Needs the manage scope. A positive amount gives, a negative one takes back; it comes from your own balance.

curl -X POST 'https://panel.example.com/credits/accounts/2a7e…/give/' \
  -H "Authorization: Bearer $MINIMUS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"amount": "50.00", "reason": "November top-up"}'