Application
Real-time Logs
Establish a Server-Sent Events (SSE) connection to receive your application’s realtime feed (logs, live metrics, status, deploy progress). Upon connection, the 200 most recent log lines are sent, followed by new updates. The connection can be maintained for up to 10 minutes.
Real-time Logs
The API Playground is disabled for this endpoint due to the nature of SSE connections, which are not universally supported by browsers.
The API key for your account. You can find this in your account settings.
Parameters
The ID of the application whose logs you want to monitor. This ID can be found in the URL of your application’s management panel.
Response
Indicates whether the call was successful..
success if successful, error if not.code field along with the error status, detailing the cause.
If the request is successful, the response will be a text/event-stream stream containing the application’s realtime feed.
Each connection lasts up to 10 minutes. Each account may hold 5 concurrent realtime connections (REALTIME_MAX_CONNECTIONS) and each application 30 across all users (REALTIME_MAX_CONNECTIONS_APP); exceeding either returns 429.
Server-Sent Events (SSE) Structure
The response is a continuous stream intext/event-stream format. Each message is composed of an event field and a data field. Shapes vary by event, so parse payloads defensively.
Event Types
system: Protocol-level signals. Thedataline is a single uppercase code:REALTIME_CONNECTING | <sseId>on connect, then any ofREALTIME_TIMEOUT,REALTIME_DISCONNECTED,REALTIME_RECONNECT, orREALTIME_ERROR.logs: A single log line whose first character is a stream-id byte:\x01(stdout) or\x02(stderr). Readdata.charCodeAt(0)(1 = stdout, 2 = stderr), thendata.slice(1)for the text. A line without that prefix byte is stdout.status: Live container metrics as a JSON string, about one frame per second. The first frame of each (re)connection is complete:{ cpu, cpuLimit, ram: [usedMB, limitMB], status, netIO: { i, o, new: { i, o } }, bIO: { i, o }, uptime }(uptimeis the start time as epoch ms;netIO.newis bytes per second). Every later frame is lean, carrying only{ cpu, ram, netIO, bIO }— merge each onto the last complete frame, keeping the previouscpuLimit,status, anduptime. While this stream is open, prefer it over pollingGET /v2/apps/{app_id}/status, which can be up to about a minute stale for an app with an open realtime stream.error: Carries an error code such asCONTAINER_NOT_FOUND.
\x01 / \x02 stand for the raw stdout / stderr prefix bytes.
Real-time Logs

