Public API field for Automatic Deployments enabled/disabled state
rodion2yalanskiy-netizen
HOBBYOP

5 days ago

Hi Railway team,

I’m building an approval-gated deployment pipeline and need a supported, machine-readable way to verify the current Automatic Deployments state for a specific Railway service/environment.

Is there a supported field or query in the Railway Public GraphQL API:

https://backboard.railway.com/graphql/v2

that returns whether Automatic Deployments are currently enabled or disabled for a specific service in a specific environment whose source is connected to GitHub?

We need a read-only result with semantics equivalent to:

ENABLED

DISABLED

The check must be suitable for running immediately before:

serviceInstanceDeployV2(serviceId, environmentId, commitSha)

Our deployment pipeline is intentionally separated into independent privileged actions:

git.commit

→ approval

→ git.push

→ approval

→ railway.deploy

→ approval

Automatic Deployments are disabled because a git.push must never cause a production deployment.

Immediately before railway.deploy, the executor re-validates every security precondition, including:

“Automatic Deployments are still disabled.”

Our implementation is fail-closed:

ENABLED → ABORT

DISABLED → may proceed

UNKNOWN → ABORT

We deliberately do not treat UNKNOWN as DISABLED.

What we need from you:

  1. Is there a supported Public GraphQL API field/query that exposes this state?

  2. If yes, please provide the exact field/query path and confirm whether it is part of the supported/stable Public API surface.

  3. Can it be queried with a project-scoped Railway token, rather than requiring an account-wide token?

  4. If the state is exposed as part of a broader service configuration object, please identify the exact field.

What we have already checked:

  • The Automatic Deployments documentation describes enabling/disabling it through the Railway dashboard, but does not document a public API field.
  • The documented serviceInstance/service configuration fields do not appear to expose auto-deploy state.
  • Railway MCP has a serviceAutoDeployTool that returns data such as:

{ "enabled": false, "canEnable": true }

That is exactly the information we need, but we do not know whether it is backed by a supported Public GraphQL field.

We do NOT want to rely on:

  • dashboard scraping
  • browser automation
  • undocumented/private GraphQL fields
  • reverse-engineering CLI output
  • treating an unknown state as disabled

If there is no supported Public API field, could you also clarify:

  1. Is exposing Automatic Deployments state through the Public API planned or available as a feature request?

  2. Is there another supported machine-readable signal that proves a push to the connected GitHub branch cannot automatically deploy this service/environment?

  3. Would disconnecting the GitHub source entirely be a supported architecture while still using:

serviceInstanceDeployV2(serviceId, environmentId, commitSha)

to deploy an exact GitHub commit SHA?

If that works, it could structurally eliminate the Automatic Deployments risk.

Reference details:

Project:

qsnera-reels-bot

Service:

axiom-checklist-bot

Environment:

production

Source:

rodion2yalanskiy-netizen/axiom-checklist-bot

Branch:

main

Automatic Deployments:

currently disabled in the Railway dashboard

Intended deployment mutation:

serviceInstanceDeployV2(serviceId, environmentId, commitSha)

No secrets or credentials are included in this request.

Thank you.

Solved$10 Bounty

Pinned Solution

  1. You can find details here: https://railway.com/graphiql (You need environment, project, and service ID)
  2. Yes.
  3. Yes, that's what the query is for.

7 Replies

Railway
BOT

5 days ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway 5 days ago


You can query for serviceInstanceAutoDeployStatus.


0x5b62656e5d

You can query for `serviceInstanceAutoDeployStatus`.

rodion2yalanskiy-netizen
HOBBYOP

5 days ago

Thank you — serviceInstanceAutoDeployStatus sounds like exactly what we need.

Before we use it as a production safety invariant, could you please confirm a few details?

  1. What is the exact GraphQL query signature / example for serviceInstanceAutoDeployStatus?

For example, which arguments does it require:

  • serviceId
  • environmentId
  • projectId

and what is the exact response shape?

  1. Is serviceInstanceAutoDeployStatus part of Railway’s supported Public GraphQL API surface, or is it considered an internal/undocumented field that may change without notice?

  2. Can this query be called using a project-scoped Railway token (Project-Access-Token), rather than an account-wide token?

  3. Does the returned status correspond to the same “Automatic Deployments” Enable/Disable setting shown in the Railway dashboard for that service/environment?

Our executor will treat:

DISABLED -> deployment may proceed

ENABLED -> abort

query error / unknown -> abort

So we need to make sure this is a supported and stable read-only signal suitable for a production pre-deploy safety check.

Thank you.


  1. You can find details here: https://railway.com/graphiql (You need environment, project, and service ID)
  2. Yes.
  3. Yes, that's what the query is for.

rodion2yalanskiy-netizen
HOBBYOP

5 days ago

Thanks — the GraphiQL schema confirms the query and response shape:

serviceInstanceAutoDeployStatus(

environmentId: String!

projectId: String!

serviceId: String!

)

with:

enabled: Boolean!

canEnable: Boolean!

reason: String

One final clarification before we close this:

Can this specific query be authenticated with a project-scoped Railway token / Project-Access-Token for that project, without using an account-wide API token?

We want the deployment executor to hold only project-scoped credentials.

Thank you.


0x5b62656e5d

1. You can find details here: https://railway.com/graphiql (You need environment, project, and service ID) 2. Yes. 3. Yes, that's what the query is for.

^


rodion2yalanskiy-netizen
HOBBYOP

5 days ago

Just to confirm one point:

Can serviceInstanceAutoDeployStatus be authenticated with a project-scoped Railway token / Project-Access-Token for that project, without using an account-wide API token?

A simple yes/no is enough. Thank you.


Yes. (I answered the question above...)


Status changed to Open 0x5b62656e5d 5 days ago


Status changed to Solved 0x5b62656e5d 5 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...