Railway
Projects, services, deployments, logs and variables (GraphQL)
Managed auth
Authentication
Methods your end users can connect with. Credentials are stored encrypted, and secret values are never shown again or returned by the API.
API key
Your users enter
- API token (account or workspace)SecretRequired
Where to find them
- In railway.com/account/tokens create a new token and give it a name.
- In “Workspace” choose the specific workspace (it will only see its projects; recommended) or “No workspace” for an account token, with access to everything of yours and all your workspaces.
- Click “Create” and copy the token: it is shown only once. Project tokens (the ones under “Settings” → “Tokens” of each project) do not work here.
OAuth 2.0
PKCEYour OAuth appBring your own OAuth app: register one with Railway, then create a custom auth config with its client ID and secret and our redirect URI. Setup guide
Registering the OAuth app
- In Railway open the workspace settings → “Developer” → “New OAuth App” (you must be a workspace admin).
- Name it “Maua.Culturewire”, choose the “Web” type (confidential) and, in “Redirect URIs”, paste the redirect URI shown below.
- Copy the “Client ID” and the “Client secret” (it is shown only once). When connecting, Railway lets you choose which workspaces are shared; the scopes shown below are requested on every connection.
Default scopes
openidemailprofileoffline_accessworkspace:member
Tools (4)
Railway API request
RAILWAY_SEND_REQUESTAuthenticated call to the Railway API (https://backboard.railway.com). Any endpoint of the API is allowed. The API is GraphQL (POST /graphql/v2): use RAILWAY_SEND_GRAPHQL_REQUEST, e.g. { apiToken { workspaces { id name } } } (with “Connect with Railway”: { me { workspaces { id name } } }), { projects(workspaceId: "…") { edges { node { id name } } } }, { deployments(first: 10, input: { projectId: "…", serviceId: "…", environmentId: "…" }) { edges { node { id status createdAt staticUrl } } } }, { deploymentLogs(deploymentId: "…", limit: 200) { timestamp severity message } }, { buildLogs(deploymentId: "…", limit: 200) { timestamp message } }, { variables(projectId: "…", environmentId: "…", serviceId: "…") } (returns the values in plain text), mutation { deploymentRestart(id: "…") }, mutation { deploymentRollback(id: "…") }, mutation { serviceInstanceRedeploy(serviceId: "…", environmentId: "…") }, mutation { variableUpsert(input: { projectId: "…", environmentId: "…", serviceId: "…", name: "KEY", value: "…" }) }…
Required scopes
No scopes required
Input
Railway API request input Name Type Description methodstringHTTP methodOne of: GET,POST,PUT,PATCH,DELETEDefault:"GET"pathrequiredstringPath relative to the API base URL, or a full URL on the same API (e.g. a next-page link) queryobjectQuery string parameters bodyunknownJSON body formobjectBody as application/x-www-form-urlencoded instead of JSON body_base64stringBinary body, base64 (at most 960000 characters) content_typestringContent-Type of body_base64 headersobjectExtra headers such as Accept. Authentication is added automatically. Railway GraphQL request
RAILWAY_SEND_GRAPHQL_REQUESTRuns a GraphQL query or mutation against the Railway API and returns its data and errors.
Required scopes
No scopes required
Input
Railway GraphQL request input Name Type Description queryrequiredstringGraphQL query or mutation variablesobjectGraphQL variables Projects, services and environments
RAILWAY_LIST_PROJECTSProjects of the workspaces accessible with the token (or of a specific one) with their services and environments (IDs and names), which are then used in deployment, log and variable queries.
Required scopes
No scopes required
Input
Projects, services and environments input Name Type Description workspacestringWorkspace ID (empty: all accessible with the token) Status of a project's services
RAILWAY_GET_PROJECT_STATUSFor each environment, each service of the project with its latest deployment: status (SUCCESS, FAILED, CRASHED, BUILDING, DEPLOYING, SLEEPING…), date, URL, region and replicas; use it to see at a glance what is down or deploying.
Required scopes
No scopes required
Input
Status of a project's services input Name Type Description projectrequiredstringProject ID (RAILWAY_LIST_PROJECTS lists them) environmentstringName or ID of an environment (empty: all)

