Skip to content

Requests and errors ​

Requests ​

  • GET reads, POST adds or runs an action (/devices/{id}/renew), PATCH changes, DELETE deletes. Another method on a path answers 405.
  • Send JSON with Content-Type: application/json. Answers are JSON.
  • Times are UTC in ISO 8601: 2026-11-17T19:00:00Z. Filters also accept a date: 2026-11-17.
  • PATCH changes only the fields you send.
  • Adding answers 201 with the new record, deleting 204 with no body.

Lists and paging ​

A list answers:

json
{ "data": [ { "id": 41 }, { "id": 40 } ], "next_cursor": "NDA" }

Newest first. ?limit= sets how many (50 by default, at most 100). For the next page, send the answer's next_cursor as ?cursor=, until it is null:

sh
curl "https://panel.example.com/api/rest/v1/devices?limit=100" -H "Authorization: Bearer mtx_your_key"
curl "https://panel.example.com/api/rest/v1/devices?limit=100&cursor=NDA" -H "Authorization: Bearer mtx_your_key"

Records added while you page do not shift the pages.

Errors ​

Every refusal has the same shape:

json
{
  "error": "insufficient_credit",
  "message": "Berlin TV does not have enough credits (balance 10)."
}

error is for your program; message is for people and logs and may change. Invalid input (422) also lists the fields:

json
{
  "error": "invalid",
  "message": "The input is not valid.",
  "fields": { "email": ["The email field must be a valid email address."] }
}
StatuserrorMeaningWhat to do
401invalid_keyNo key, or unknown, revoked or expired, or its account is switched offCheck the key
403ip_not_allowedThe key may not be used from this addressAdd the address to the key
403read_onlyA read key sent something other than GETUse a key with write access
403forbiddenThe key's account may not do thisAsk an administrator
404not_foundNo such path, or no such record this key may reachCheck the id
405method_not_allowedWrong method for the path
409insufficient_creditThe reseller has too few credits for the planTop up, then retry
409device_limitThe reseller's device limit is reached
409license_limitThe Mintrix license's device limit is reached
409already_existsA device with this MAC or login existsLook it up with ?mac=
409has_devicesThe subscriber still has devicesDelete or move them first
409idempotency_mismatchThe Idempotency-Key was used for another requestUse a new key
409idempotency_in_progressThe first request with this Idempotency-Key is still runningRetry shortly
422invalidInvalid input; see fieldsFix the input
429too_many_requestsMore than 120 requests this minuteWait the Retry-After seconds
500server_errorA fault in Mintrix; it is loggedRetry later
502ministra_failedMinistra refused the change; nothing changed in MintrixRetry later, or see message
503unavailableMintrix cannot serve now (license or maintenance)Retry later

Retrying safely ​

Adding a device and renewing one cost credit. Networks fail: your system may not get the answer and send the request again. To make that safe, send an Idempotency-Key header with a value unique to the order, e.g. your invoice number:

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"

Within 24 hours, the same key with the same request returns the first answer again, with the header Idempotent-Replayed: true, and charges nothing more. The same key with a different request answers 409 idempotency_mismatch.

A request that failed with 5xx is not remembered: retry it with the same key.

Always send one

Send an Idempotency-Key with every POST /devices and POST /devices/{id}/renew. It costs nothing and protects your customers from double charges.

Rate ​

Each key may make 120 requests a minute. Beyond that, Mintrix answers 429 with a Retry-After header in seconds. Page with ?limit=100 to read many records in few requests.

Integrated media software