Reseller API

Automate device activation, renewal and playlist management from your own backend.

Overview

Base URL:

https://stremo.tv/api/v1/reseller

Every endpoint here mirrors an action available in the Reseller Panel (device claim/activate/renew, playlist management, credit balance) — anything you can click, you can call. Credits are deducted the same way, from the same balance.

Authentication

Generate a key from Reseller Panel → Settings → API Access. Send it as a Bearer token on every request:

Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

The raw key is shown once, at creation time. Store it securely — if lost, revoke it and generate a new one. A key acts on your reseller account only; it can never see or touch another reseller's devices or balance.

Errors

Errors return a JSON body with an error message and, where useful, a machine-readable code:

{ "error": "Invalid or revoked API key.", "code": "INVALID_API_KEY" }
HTTPMeaning
401Missing / invalid / revoked API key, or account suspended
403Trying to act on a device that isn't yours
404Device / resource not found
400Validation error (bad short_code, insufficient credits, etc.)
429Rate limited
503Temporary outage — safe to retry with backoff

Idempotency

Credit-touching endpoints (claim, activate, renew, block/unblock, playlist add) accept an X-Idempotency-Key header. Send a unique value per logical operation (e.g. your own order ID) — if a request is retried with the same key, you get back the original result instead of a duplicate charge.

X-Idempotency-Key: order-48213

Rate Limits

120 requests / minute per IP. Build in retry-with-backoff for 429/503 responses.

Devices

GET /devices

List all your devices.

curl https://stremo.tv/api/v1/reseller/devices \
  -H "Authorization: Bearer sk_live_..."

GET /devices/check/:short_code

Look up a device by its short code (e.g. ST-AB12-CD34) — shown to the customer inside the app on first launch.

GET /devices/:id/details

Full status, expiry and playlist details for one device.

POST /devices/claim

Attach an unclaimed device to your account using the customer-shared claim code.

FieldTypeNotes
short_codestringrequired
otpstring6-digit code the customer gives you
name, type, portal_url / url, username, passwordthe playlist to attach

POST /devices/activate

Activate a plan on a device you own. Deducts plan_months credits from your balance.

curl -X POST https://stremo.tv/api/v1/reseller/devices/activate \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -H "X-Idempotency-Key: order-48213" \
  -d '{"short_code":"ST-AB12-CD34","plan_months":1,"customer_name":"Jawad"}'

POST /devices/renew

Extend an already-active device. Same body shape as /devices/activate.

POST /devices/block  /  /devices/unblock

Body: {"device_id": 123}. Suspend or restore access without changing the expiry date.

POST /devices/:id/kick

Force the device to log out and re-check its status on next launch.

POST /devices/change-device

Move a customer's active plan from an old device to a new one (device replacement/upgrade).

Playlists

GET /devices/:deviceId/playlists

List every playlist attached to a device (yours and, read-only, other resellers' if shared).

POST /devices/:deviceId/playlists

Add a playlist slot to a device.

FieldType
namestring
type"xtream" or "m3u"
portal_url / url, username, passwordstring

PUT /devices/:deviceId/playlists/:playlistId

Update a playlist's credentials/URL.

DELETE /devices/:deviceId/playlists/:playlistId

Remove a playlist slot.

Account

GET /profile

Your reseller profile, including current credits balance.

GET /credits/history

Paginated ledger of every credit debit/credit on your account.

Questions or need a higher rate limit? Contact support.