Skip to content

Devices ​

A device is one set-top box: an account in Ministra, known by its MAC address or a login. It belongs to a subscriber, runs on a tariff plan and is on until its expiry date.

json
{
  "id": 41,
  "subscriber_id": 7,
  "reseller_id": 3,
  "mac": "00:1A:79:12:34:56",
  "login": null,
  "name": "Living room",
  "enabled": true,
  "tariff_plan": { "id": 2, "name": "Premium 12 months", "months": 12 },
  "expires_at": "2027-10-01T09:12:00Z",
  "expired": false,
  "type": "mag",
  "model": "MAG254",
  "last_active_at": "2026-10-20T18:44:00Z",
  "created_at": "2026-10-01T09:12:00Z"
}
Field
enabledSwitched on. A switched-off box cannot play anything.
expires_at, expiredWhen the subscription ends, and whether it has. Mintrix switches an expired device off by itself.
type, modelSet when the box first signs in; null until then
last_active_atWhen the box was last seen

List ​

GET /devices
Filter
macA MAC address, in any case, with :, - or nothing between: 00-1a-79-12-34-56
loginA login
subscriber_idOne subscriber's devices
enabled1 switched on, 0 off
expires_beforeExpiring before this time or date, e.g. 2026-11-01

Paged: see Lists and paging.

sh
# Devices expiring this month, to remind their customers
curl "https://panel.example.com/api/rest/v1/devices?expires_before=2026-11-01&enabled=1" \
  -H "Authorization: Bearer mtx_your_key"

Read ​

GET /devices/{id}

Add ​

POST /devices
Field
subscriber_idRequiredThe subscriber it belongs to; it must be one the key may reach
macmac or loginThe box's MAC address, e.g. 00:1A:79:12:34:56
loginmac or loginFor boxes and apps that sign in with a login: letters, digits, _ . @ -
passwordWith a login, 4 to 64 characters
tariff_plan_idRequiredAn active plan: see Tariff plans
nameA label, e.g. Living room

The device runs for the plan's months from now, and the plan's price is charged to the subscriber's account. Send an Idempotency-Key.

sh
curl -X POST https://panel.example.com/api/rest/v1/devices \
  -H "Authorization: Bearer mtx_your_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: invoice-10041" \
  -d '{"subscriber_id": 7, "mac": "00:1A:79:12:34:56", "tariff_plan_id": 2, "name": "Living room"}'

Answers 201 with the device. Refusals: 409 insufficient_credit, device_limit, license_limit, already_exists, 502 ministra_failed. In each case nothing is charged.

Renew ​

POST /devices/{id}/renew
Field
tariff_plan_idAnother active plan to move the device to. Without it, its current plan.

Adds the plan's months to the expiry date, or to today when it has already passed, and charges the plan's price. Renewing early loses nothing. Send an Idempotency-Key.

sh
curl -X POST https://panel.example.com/api/rest/v1/devices/41/renew \
  -H "Authorization: Bearer mtx_your_key" \
  -H "Idempotency-Key: invoice-10042"

Answers 200 with the device and its new expires_at.

Change ​

PATCH /devices/{id}
Field
nameA label
enabledfalse switches the box off at once, true on again
passwordA new password for a login device

The plan and the expiry change only through a renewal.

sh
# The customer stopped paying: switch the box off
curl -X PATCH https://panel.example.com/api/rest/v1/devices/41 \
  -H "Authorization: Bearer mtx_your_key" \
  -H "Content-Type: application/json" \
  -d '{"enabled": false}'

Switching a device on counts against the license's device limit (409 license_limit). An expired device switched on is switched off again within minutes: renew it instead.

Delete ​

DELETE /devices/{id}

Deletes the device here and in Ministra. Answers 204. Credit already charged is not refunded.

Integrated media software