Pixlbit Docs Log in

REST API

Drive your panels from a script, a cron job, or your own app. JSON in and out.

Authentication

Create a key under Activity & automation → API on the dashboard. The raw key is shown once — only its hash is stored. Send it on every request:

X-API-Key: pk_your_key_here

Base URL: https://pixlbit.dev  ·  Rate limit: 30 requests/minute per IP (429 over that). You can hold several named keys and delete any of them; deleting one revokes it immediately.

Endpoints

GET/api/v1/panels

All panels you own or that are shared with you.

GET/api/v1/panels/{serial}

One panel's status.

POST/api/v1/panels/{serial}/send

Queue a message or animation. Body fields below. Picked up within ~10s.

POST/api/v1/panels/{serial}/reboot

Queue a reboot. Owner only — shared users get 403.

GET/api/v1/presets

Your saved presets.

POST/api/v1/presets/{id}/send

Fire a preset at a panel. Body: {"serial":"MGW-..."}.

Message fields (/send)

FieldTypeDefaultNotes
modestringscrollscroll, clock, btc, pacman, stickman, rain, eyes, eyes2
textstringRequired when mode is scroll.
speedint50ms per step, 10–200. Lower is faster.
brightnessint30–15.
effectstringleftleft, right, up, down, wipe, fade, blinds

Errors

StatusMeaning
400Bad request (e.g. missing text for scroll mode).
401Missing or invalid API key.
403Not allowed (e.g. rebooting a shared panel).
404Panel or preset not found / not accessible.
429Rate limit exceeded.

Errors return {"error":"..."}.

Code examples

Set your key and a panel serial once, then reuse. Replace pk_your_key_here and MGW-XXXXXXXX.

Send a message

curl -X POST https://pixlbit.dev/api/v1/panels/MGW-XXXXXXXX/send \
  -H "X-API-Key: pk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"mode":"scroll","text":"SALE TODAY","effect":"wipe","speed":30}'

Trigger an animation

curl -X POST https://pixlbit.dev/api/v1/panels/MGW-XXXXXXXX/send \
  -H "X-API-Key: pk_your_key_here" -H "Content-Type: application/json" \
  -d '{"mode":"pacman"}'

List panels · fire a preset · reboot

curl https://pixlbit.dev/api/v1/panels -H "X-API-Key: pk_your_key_here"

curl -X POST https://pixlbit.dev/api/v1/presets/1/send \
  -H "X-API-Key: pk_your_key_here" -H "Content-Type: application/json" \
  -d '{"serial":"MGW-XXXXXXXX"}'

curl -X POST https://pixlbit.dev/api/v1/panels/MGW-XXXXXXXX/reboot -H "X-API-Key: pk_your_key_here"

Setup

$apiKey  = "pk_your_key_here"
$serial  = "MGW-XXXXXXXX"
$base    = "https://pixlbit.dev"
$headers = @{ "X-API-Key" = $apiKey }

Send a message

$body = @{ mode = "scroll"; text = "Hello from PowerShell"; effect = "wipe"; speed = 30 } | ConvertTo-Json
Invoke-RestMethod -Uri "$base/api/v1/panels/$serial/send" -Method Post -Headers $headers -ContentType "application/json" -Body $body

Broadcast to every online panel

$panels = Invoke-RestMethod -Uri "$base/api/v1/panels" -Headers $headers
foreach ($p in $panels) {
  if ($p.online) {
    $body = @{ mode = "scroll"; text = "Broadcast"; speed = 50 } | ConvertTo-Json
    Invoke-RestMethod -Uri "$base/api/v1/panels/$($p.serial)/send" -Method Post -Headers $headers -ContentType "application/json" -Body $body
    Write-Host "Sent to $($p.name)"
  }
}

Scheduled task — save as send_open.ps1

$headers = @{ "X-API-Key" = "pk_your_key_here" }
$body = @{ mode = "scroll"; text = "WE ARE OPEN"; speed = 45; brightness = 10 } | ConvertTo-Json
Invoke-RestMethod -Uri "https://pixlbit.dev/api/v1/panels/MGW-XXXXXXXX/send" -Method Post -Headers $headers -ContentType "application/json" -Body $body

Setup

import requests

BASE   = "https://pixlbit.dev"
SERIAL = "MGW-XXXXXXXX"
H = {"X-API-Key": "pk_your_key_here"}

Send a message

requests.post(
    f"{BASE}/api/v1/panels/{SERIAL}/send",
    headers=H,
    json={"mode": "scroll", "text": "Hello from Python", "effect": "wipe", "speed": 30},
).raise_for_status()

Broadcast to every online panel

panels = requests.get(f"{BASE}/api/v1/panels", headers=H).json()
for p in panels:
    if p["online"]:
        requests.post(
            f"{BASE}/api/v1/panels/{p['serial']}/send",
            headers=H,
            json={"mode": "scroll", "text": "Broadcast", "speed": 50},
        )
        print("sent to", p["name"])

Fire a preset by name

presets = requests.get(f"{BASE}/api/v1/presets", headers=H).json()
pid = next(p["id"] for p in presets if p["name"] == "Happy Hour")
requests.post(f"{BASE}/api/v1/presets/{pid}/send", headers=H, json={"serial": SERIAL})

Setup (Node 18+, built-in fetch)

const BASE = "https://pixlbit.dev";
const SERIAL = "MGW-XXXXXXXX";
const H = { "X-API-Key": "pk_your_key_here", "Content-Type": "application/json" };

Send a message

await fetch(BASE + "/api/v1/panels/" + SERIAL + "/send", {
  method: "POST",
  headers: H,
  body: JSON.stringify({ mode: "scroll", text: "Hello from Node", effect: "wipe", speed: 30 }),
});

Broadcast to every online panel

const panels = await (await fetch(BASE + "/api/v1/panels", { headers: H })).json();
for (const p of panels) {
  if (!p.online) continue;
  await fetch(BASE + "/api/v1/panels/" + p.serial + "/send", {
    method: "POST", headers: H,
    body: JSON.stringify({ mode: "scroll", text: "Broadcast", speed: 50 }),
  });
  console.log("sent to", p.name);
}