Railway Logs API

GraphQL log surface for builds, deployments, environments, and HTTP traffic. Available both as point-in-time queries (buildLogs, deploymentLogs, environmentLogs, httpLogs) and as real-time GraphQL subscriptions over WebSocket at wss://backboard.railway.com/graphql/v2.

GitHub
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/railway-app:railway-app-logs-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

AsyncAPI Specification

railway-app-asyncapi.yml Raw ↑
asyncapi: '2.6.0'
id: 'urn:com:railway:backboard:graphql:subscriptions'
info:
  title: Railway GraphQL Subscriptions (WebSocket)
  version: '1.0.0'
  description: |
    AsyncAPI 2.6 description of Railway's **real-time log streaming** surface.

    Unlike many providers in this catalog, Railway **does** publish a documented
    public WebSocket transport. Railway's GraphQL Public API is served over both
    HTTP (queries and mutations) and WebSocket (subscriptions):

      - HTTP:      https://backboard.railway.com/graphql/v2
      - WebSocket: wss://backboard.railway.com/graphql/v2

    GraphQL subscriptions are delivered over the WebSocket endpoint using the
    standard GraphQL-over-WebSocket protocol (graphql-transport-ws / graphql-ws).
    This is the transport the `railway logs` CLI command uses to stream logs in
    real time, and the same one community tools such as `railway-chord` use to
    egress Railway logs into external sinks.

    This document models the four documented log subscription streams:
    buildLogs, deploymentLogs, environmentLogs, and httpLogs. Queries and
    mutations (the request/response half of the API) are modeled in the
    companion GraphQL SDL at `graphql/railway-app-schema.graphql`.
  contact:
    name: API Evangelist
    email: kin@apievangelist.com
    url: https://apievangelist.com
  license:
    name: API documentation - Railway Terms of Service
    url: https://railway.com/legal/terms
  x-transport-notes:
    transport: GraphQL subscriptions over WebSocket
    subprotocol: graphql-transport-ws / graphql-ws
    protocol: wss
    direction: server-to-client (push after client-initiated subscribe)
    endpoint: 'wss://backboard.railway.com/graphql/v2'
    isWebSocket: true
    source: https://docs.railway.com/reference/public-api
defaultContentType: application/json
servers:
  backboard:
    url: backboard.railway.com/graphql/v2
    protocol: wss
    description: |
      Railway GraphQL WebSocket endpoint. Clients open a WebSocket using a
      GraphQL-over-WebSocket subprotocol, send a `connection_init` with the
      Bearer token, then `subscribe` to one of the log streams below. The
      server pushes `next` messages carrying batches of log entries until the
      client sends `complete` or the socket closes.
    security:
      - bearerAuth: []
channels:
  deploymentLogs:
    description: |
      Real-time runtime logs for a single deployment. Opened via the GraphQL
      `subscription deploymentLogs(deploymentId: String!)`.
    subscribe:
      operationId: streamDeploymentLogs
      summary: Stream runtime deployment logs.
      message:
        $ref: '#/components/messages/LogEntry'
  buildLogs:
    description: |
      Real-time build logs for a deployment. Opened via the GraphQL
      `subscription buildLogs(deploymentId: String!)`.
    subscribe:
      operationId: streamBuildLogs
      summary: Stream build logs.
      message:
        $ref: '#/components/messages/LogEntry'
  environmentLogs:
    description: |
      Real-time logs across every service in an environment. Opened via the
      GraphQL `subscription environmentLogs(environmentId: String!)`.
    subscribe:
      operationId: streamEnvironmentLogs
      summary: Stream environment-wide logs.
      message:
        $ref: '#/components/messages/LogEntry'
  httpLogs:
    description: |
      Real-time HTTP request logs for a deployment. Opened via the GraphQL
      `subscription httpLogs(deploymentId: String!)`.
    subscribe:
      operationId: streamHttpLogs
      summary: Stream HTTP request logs.
      message:
        $ref: '#/components/messages/LogEntry'
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: 'Railway API token'
      description: |
        Railway account, workspace, or OAuth token. Passed in the WebSocket
        `connection_init` payload as `{ "Authorization": "Bearer <TOKEN>" }`.
  messages:
    LogEntry:
      name: LogEntry
      title: Log entry
      summary: A single log line pushed on a subscription stream.
      contentType: application/json
      payload:
        $ref: '#/components/schemas/LogEntry'
      examples:
        - name: infoLine
          summary: An informational log line
          payload:
            timestamp: '2026-07-02T18:24:14Z'
            message: 'Starting Container'
            severity: 'INFO'
  schemas:
    LogEntry:
      type: object
      required:
        - timestamp
        - message
      properties:
        timestamp:
          type: string
          format: date-time
          description: When the log line was emitted.
        message:
          type: string
          description: The log message text.
        severity:
          type: string
          enum:
            - INFO
            - WARN
            - ERROR
            - DEBUG
          description: Log severity, when classified.
        tags:
          type: object
          description: Structured tags attached to the log line (service, deployment, etc.).
        attributes:
          type: object
          description: Additional structured attributes parsed from the log line.