Skip to content
Castreon
Monitoring & server

API, documentation and API keys

Updated 14 Oct 2026

Everything the panel does can also be done from your own software through the server's REST API: channels (start, stop, restart, configuration), live statistics, events, audience, clips, scheduled recordings, monitoring wall, users. The panel itself uses the same API.

The documentation and API keys are in all plans. Scoped, IP-bound keys with a custom limit are in the Enterprise edition. Available from Castreon 1.6.0.

The API page

Administration → API (administrators only) has two tabs:

  • API keys — the keys for integrations (automation systems, NOC tools, scripts);
  • Documentation — the full API reference: every operation with its method, path, minimum role, scope, parameters, a request and response example and a ready-to-copy curl command.

Download openapi.json gives the OpenAPI 3.1 document — import it straight into Postman, Insomnia or Swagger UI, or into code generators (Python, TypeScript, Go, C#). It is generated from the same table the server uses to check every request, so it always matches the installed version. Its address: https://server:port/api/v1/openapi.json (with an API key or a panel session).

Authentication

Every request sends the key in a header:

curl -H 'Authorization: Bearer cst_…' https://server:33443/api/v1/channels

Example — restarting a channel (a key with the operator role or the “Channel control” scope):

curl -X POST -H 'Authorization: Bearer cst_…' https://server:33443/api/v1/channels/<id>/restart

Errors always look like {"error":{"code":"…","message":"…"}} — code is stable (for programs), message is for people.

API keys

New API key → name, access, expiry. The key is shown only once — copy it then; the server keeps only a fingerprint of it.

  • By role (all plans): the key has the rights of a whole role — Viewer, Operator or Administrator.
  • By scopes (Enterprise): the key can do only what its ticked scopes allow — Monitoring (live state), Read configuration, Channel control (start, stop, restart, playout commands), Change configuration, Administration. A key for a NOC screen gets only Monitoring; an automation system gets Channel control. Anything outside its scopes is refused with 403 and the code scope, naming the missing scope.
  • Allowed IPs (Enterprise): the key works only from the given addresses or networks (e.g. 10.20.0.0/24); from elsewhere — 403 key_ip.
  • Request limit: every key has a limit (600 per minute by default; in Enterprise you choose it). Above it the server answers 429 with Retry-After; every response carries X-RateLimit-Limit and X-RateLimit-Remaining.

The table shows each key's last use, IP address and request count.

A new key without stopping integrations

Rotate on an existing key creates another one with the same rights. Choose how long the old one keeps working — 24 hours, 7 days or not at all — so you can change the key in your integrations without interruption. Revoke stops a key immediately.

For support

Every response has an X-Request-ID header (you can send your own too, to tie requests to your logs). If a request fails, include it in your ticket.

Live events and webhooks

  • GET /api/v1/events is a Server-Sent Events stream with channel state, statistics and configuration changes.
  • Notifications (see Notifications) can send alerts to a signed webhook; its format is described in the OpenAPI document.

Tips

  • One key per integration, with as few rights as possible and, where you can, bound to the integration's IP.
  • Change keys regularly with Rotate (with overlap); do not reuse them between systems.
  • Older keys from Users → API tokens (previous versions) keep working unchanged; they are now managed on the API page.

Privacy

Cookies & local storage

Strictly necessary cookies are always active. Analytics and marketing use Google services and only start if you accept them — until then nothing is sent to Google. You can withdraw your consent here at any time.

Strictly necessary

Without them, sign-in, forms and your chosen language don’t work. They don’t require consent (§ 25(2) no. 2 TDDDG).

Always active
Name Purpose Duration Type
castreon-session Keeps your session: sign-in and chosen language 2 hours, renewed on every visit Cookie
XSRF-TOKEN Protects forms against forged requests 2 hours, renewed on every visit Cookie
remember_web_… Only if you tick “Remember me” at sign-in Until you sign out, max. 400 days Cookie
__cf_bm Cloudflare: tells visitors and bots apart, only when traffic is being checked 30 minutes Cookie · Cloudflare
castreon:consent Remembers your cookie choice 12 months Local storage
theme Customer account appearance: light, dark or system Until you change it Local storage

Analytics

Google Analytics 4 (Google Ireland Ltd.): which pages are visited, where visits come from and on which type of device — with pseudonymous identifiers, without storing your IP address. Helps us improve the website.

Name Purpose Duration Type
_ga Google Analytics: recognises the visitor (pseudonymous ID) 13 months Cookie · Google Analytics
_ga_VHWQRPHPEF Google Analytics: keeps the state of the visit 13 months Cookie · Google Analytics

Marketing

Google Ads (Google Ireland Ltd.): measures whether visits from Google ads lead to a trial or a plan, and allows Castreon ads to be shown on other websites (remarketing).

Name Purpose Duration Type
_gcl_au, _gcl_aw Google Ads: links the visit to the ad click (conversions) 90 days Cookie · Google Ads
IDE, test_cookie Google Ads: remarketing and ad measurement, on Google domains (doubleclick.net) Up to 13 months Cookie · Google (third party)