Callaba
Callaba home

RTMP servers

RTMP servers provide managed ingest endpoints for OBS, encoders, and guest publishers. Configure the listening port, player buffer, and stream-key or IP access policy, then inspect live connection data.

Configure and run an ingest endpoint

All management calls require x-access-token. create and update configure the listen port, server_buflen, active state, and access policy. server_buflen is seconds: the default is 5, and accepted values are 1 through 120. Start and stop the saved listener with start and stop.

Read configuration and runtime state

getAll, getCount, and getById read server records; use getById when access records are required, because create and list responses can show access: []. getStatistics reports available bitrate, publisher and receiver counts, and client metadata. It creates the short-lived snapshots returned by getStatisticHistory; an Engine restart clears them.

Operational limits

The port must be free and reachable, and roles, access rules, and stream keys must match the connection. remove stops the server and clears associated HLS and DASH playback; it returns HTTP 201 with an empty body. Export statistics when longer retention or alerting is required.

10 endpoints
POST
/api/rtmp-servers/create
API token required

Create an RTMP ingest server with its listen port, player buffer, active state, and optional stream-key or IP access rules. Send the dashboard-issued JWT in the x-access-token header.

server_buflen is measured in seconds. The default is 5, and accepted values are 1 through 120.

When stream_control_type and access_settings are supplied, Callaba creates the access rules with the server. The create response can still contain access: []; call getById to read the populated access list.

Request examples

Choose a preset for open ingest, explicit stream keys, or fixed IP addresses. A vMix Script example is available for operator-driven provisioning.

Allow only specified stream keys

Use this pattern when publishers and receivers should authenticate with explicit RTMP stream keys instead of open ingest. It mirrors the dashboard preset that seeds one publisher key and one receiver key.

Allow only specified stream keys
curl --request POST \
  --url http://localhost/api/rtmp-servers/create \
  --header 'x-access-token: <your_api_token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "server_name": "Live Protected",
  "server_type": "SERVER_TYPE_RTMP",
  "server_port": 1945,
  "server_buflen": 5,
  "server_active": true,
  "stream_control_type": "CONTROL_ACCESS_STREAM_ID",
  "access_settings": [
    {
      "stream_id": "rtmp-stream-01",
      "role_name": "publisher"
    },
    {
      "stream_id": "rtmp-stream-01",
      "role_name": "receiver"
    }
  ]
}'
Allow only specified IP addresses

Use this pattern when the RTMP peers are known fixed hosts. The dashboard preset creates publisher and receiver rules keyed by host instead of stream id.

Allow only specified IP addresses
curl --request POST \
  --url http://localhost/api/rtmp-servers/create \
  --header 'x-access-token: <your_api_token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "server_name": "Live Allowlisted",
  "server_type": "SERVER_TYPE_RTMP",
  "server_port": 1945,
  "server_buflen": 5,
  "server_active": true,
  "stream_control_type": "CONTROL_ACCESS_IP_ADDRESS",
  "access_settings": [
    {
      "host": "127.0.0.1",
      "role_name": "publisher"
    },
    {
      "host": "127.0.0.1",
      "role_name": "receiver"
    }
  ]
}'
Request body parameters
Basic settings
server_name
string
Copy direct link

Dashboard label: Name.

The form defaults to Live. Validation requires a non-empty value and rejects slashes.

server_type
string
Copy direct link

Current validated API contract accepts SERVER_TYPE_RTMP.

server_active
boolean
Copy direct link

Dashboard label: Enable once created.

Enabled is the server state. Turning it off disconnects all publishers and receivers attached to the RTMP server.

Runtime settings
server_port
integer
Copy direct link

Dashboard label: Port.

The dashboard starts at 1945. The REST API accepts ports from 1 to 65535. Choose a free port that is reachable by your publishers and viewers.

server_buflen
integer
Copy direct link

Dashboard label: Buffer length (s).

This value is configured in seconds. The dashboard starts at 5 and the accepted range is 1 to 120.

This setting controls how much media the player buffers before playback starts.

Access control
stream_control_type
string
Copy direct link

Dashboard section: Allowed streams.

Controls whether the RTMP server validates incoming publishers and receivers by explicit stream key or by host allowlist. The live create flow currently uses values such as CONTROL_ACCESS_STREAM_ID and CONTROL_ACCESS_IP_ADDRESS.

access_settings
array
Copy direct link

Optional set of access rules to create together with the server.

For stream-key mode, each item typically contains stream_id and role_name. For IP-based mode, each item uses host and role_name.

Create RTMP server
curl --request POST \
  --url http://localhost/api/rtmp-servers/create \
  --header 'x-access-token: <your_api_token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "server_name": "Live",
  "server_type": "SERVER_TYPE_RTMP",
  "server_port": 1945,
  "server_buflen": 5,
  "server_active": true
}'
Response
Identity and runtime
_id
string
Copy direct link

Resource id returned when you create or list the RTMP server.

id
string
Copy direct link

Convenience alias for _id.

server_name
string
Copy direct link

Name stored for the RTMP server.

server_type
string
Copy direct link

Type of the server. The live product returns SERVER_TYPE_RTMP.

server_port
string
Copy direct link

Listening RTMP port returned by the product.

server_buflen
integer
Copy direct link

Configured RTMP buffer length.

server_active
boolean
Copy direct link

Current running state flag stored on the server object.

server_port_id
string
Copy direct link

Port document attached to the RTMP listener.

server_created
string
Copy direct link

Creation timestamp.

server_modified
string
Copy direct link

Last modification timestamp.

Access control
stream_control_type
string
Copy direct link

Access-control mode stored on the RTMP server, when provided.

access
array
Copy direct link

The live create response currently returns this as an empty array even when access_settings were submitted. Use getById to retrieve the populated related access records.

Operation result
success
boolean
Copy direct link

The model exposes success: true as a virtual field in successful responses.

Response: Create RTMP server
{
  "_id": "69c1fb0128c95839e0e022d5",
  "__v": 0,
  "access": [],
  "server_active": true,
  "server_buflen": 5,
  "server_created": "2026-03-24T02:46:25.044Z",
  "server_name": "Docs RTMP Server",
  "server_port": "1945",
  "server_type": "SERVER_TYPE_RTMP",
  "server_user_id": "69360341db559495f643de6a",
  "server_port_id": "69c1fb0128c95839e0e022d7",
  "server_modified": "2026-03-24T02:46:25.056Z",
  "id": "69c1fb0128c95839e0e022d5",
  "success": true
}
POST
/api/rtmp-servers/getCount
API token required
POST
/api/rtmp-servers/getAll
API token required
POST
/api/rtmp-servers/getById
API token required
POST
/api/rtmp-servers/getStatistics
API token required
GET
/api/rtmp-servers/:serverPort/getStatisticHistory
API token required
POST
/api/rtmp-servers/update
API token required
POST
/api/rtmp-servers/start
API token required
POST
/api/rtmp-servers/stop
API token required
DELETE
/api/rtmp-servers/remove
API token required
Workflow examples and help
REST solution recipe

Accept RTMP publishers and inspect live bitrate

Provision an RTMP entry point with the required access policy, start it, and read current and recent process statistics from the same server resource.

  1. Create RTMP ingestChoose the listen port, buffer, and open, stream-id, or IP access pattern.POST /api/rtmp-servers/create
  2. Start the serverEnable the entry point before connecting OBS, an encoder, or another publisher.POST /api/rtmp-servers/start
  3. Read live statisticsInspect current bitrate and connection data, then use history for recent samples.POST /api/rtmp-servers/getStatistics

A successful create response confirms configuration, not media health. Start the resource, then verify its runtime statistics before sending production traffic.

REST solution recipe

Issue guest RTMP publishing and receiving access

Create a temporary open server for guest-selected stream keys, or create explicit publisher and receiver records for controlled keys or fixed hosts, then verify connections from live statistics.

  1. Create open or controlled ingestSelect allow-all, stream-key, or IP control and include publisher and receiver roles when access_settings are required.POST /api/rtmp-servers/create
  2. Read the populated access listUse getById because the create response may not populate the related access records.POST /api/rtmp-servers/getById
  3. Verify publishers and receiversConfirm current bitrate, role counts, client addresses, and geographic enrichment for the expected guests.POST /api/rtmp-servers/getStatistics

CONTROL_ACCESS_ALLOW_ALL lets guests connect with a chosen stream key; it is not authentication. For production, prefer CONTROL_ACCESS_STREAM_ID or CONTROL_ACCESS_IP_ADDRESS with role-specific access_settings and retire temporary guest access after the event.

Ask AI