Skip to main content
Railway logo

Overview

Add Railway to any ModuleX agent or workflow. Manage Railway projects, services, environments, deployments, and environment variables against Railway’s public GraphQL API (backboard.railway.com/graphql/v2).
Categories: Developer Tools & Infrastructure · Cloud · Ci Cd · Auth: API Token · Actions: 20

Authentication

API Token Authentication

Authenticate using your Railway API token
1

Step 1

Sign in at https://railway.com and open your account settings
2

Step 2

Go to the ‘Tokens’ section under Account Settings
3

Step 3

Create a new token (account, workspace, or project scope)
4

Step 4

Paste the token below

Required Credentials

FieldDescriptionRequiredFormat
Railway API TokenYour Railway API token from account settingsYes-

Available Actions

Parameters

token_type
string
Railway token type. Use “account” for account, workspace, or OAuth tokens, or “project” for project tokens. (Default: account)
workspace_id
string
Workspace ID to list projects from
first
integer
Maximum number of projects to return
after
string
Cursor for pagination

Response

{
  "$defs": {
    "PageInfo": {
      "additionalProperties": false,
      "description": "Cursor-pagination metadata returned by list actions.",
      "properties": {
        "has_next_page": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Has Next Page"
        },
        "end_cursor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "End Cursor"
        }
      },
      "title": "PageInfo",
      "type": "object"
    },
    "ProjectSummary": {
      "additionalProperties": false,
      "description": "A single project row in ``list_projects``.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Description"
        },
        "created_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Created At"
        },
        "updated_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Updated At"
        }
      },
      "title": "ProjectSummary",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "projects": {
      "items": {
        "$ref": "#/$defs/ProjectSummary"
      },
      "title": "Projects",
      "type": "array"
    },
    "page_info": {
      "anyOf": [
        {
          "$ref": "#/$defs/PageInfo"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "count": {
      "default": 0,
      "title": "Count",
      "type": "integer"
    }
  },
  "required": [
    "success"
  ],
  "title": "ListProjectsOutput",
  "type": "object"
}

Parameters

project_id
string
required
Railway project ID
token_type
string
Railway token type. Use “account” for account, workspace, or OAuth tokens, or “project” for project tokens. (Default: account)

Response

{
  "$defs": {
    "ProjectDetail": {
      "additionalProperties": false,
      "description": "A project with its services and environments (``get_project``).",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Description"
        },
        "created_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Created At"
        },
        "updated_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Updated At"
        },
        "services": {
          "items": {
            "$ref": "#/$defs/ProjectService"
          },
          "title": "Services",
          "type": "array"
        },
        "environments": {
          "items": {
            "$ref": "#/$defs/ProjectEnvironment"
          },
          "title": "Environments",
          "type": "array"
        }
      },
      "title": "ProjectDetail",
      "type": "object"
    },
    "ProjectEnvironment": {
      "additionalProperties": false,
      "description": "An environment attached to a project in ``get_project``.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        }
      },
      "title": "ProjectEnvironment",
      "type": "object"
    },
    "ProjectService": {
      "additionalProperties": false,
      "description": "A service attached to a project in ``get_project``.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "icon": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Icon"
        }
      },
      "title": "ProjectService",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "project": {
      "anyOf": [
        {
          "$ref": "#/$defs/ProjectDetail"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "required": [
    "success"
  ],
  "title": "GetProjectOutput",
  "type": "object"
}

Parameters

name
string
required
Project name
token_type
string
Railway token type. Use “account” for account, workspace, or OAuth tokens, or “project” for project tokens. (Default: account)
description
string
Project description
workspace_id
string
Workspace ID to create the project in
is_public
boolean
Whether the project should be publicly visible
default_environment_name
string
Name for the default environment
pr_deploys
boolean
Whether to enable pull request deploys

Response

{
  "$defs": {
    "CreatedResource": {
      "additionalProperties": false,
      "description": "A freshly created resource carrying just id + name.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        }
      },
      "title": "CreatedResource",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "project": {
      "anyOf": [
        {
          "$ref": "#/$defs/CreatedResource"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "required": [
    "success"
  ],
  "title": "CreateProjectOutput",
  "type": "object"
}

Parameters

project_id
string
required
Railway project ID
token_type
string
Railway token type. Use “account” for account, workspace, or OAuth tokens, or “project” for project tokens. (Default: account)
name
string
Updated project name
description
string
Updated project description
is_public
boolean
Whether the project should be publicly visible
pr_deploys
boolean
Whether to enable pull request deploy environments

Response

{
  "$defs": {
    "UpdatedProject": {
      "additionalProperties": false,
      "description": "The project echoed back by ``update_project``.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Description"
        }
      },
      "title": "UpdatedProject",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "project": {
      "anyOf": [
        {
          "$ref": "#/$defs/UpdatedProject"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "required": [
    "success"
  ],
  "title": "UpdateProjectOutput",
  "type": "object"
}

Parameters

project_id
string
required
Railway project ID
token_type
string
Railway token type. Use “account” for account, workspace, or OAuth tokens, or “project” for project tokens. (Default: account)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "deleted": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Deleted"
    }
  },
  "required": [
    "success"
  ],
  "title": "DeleteProjectOutput",
  "type": "object"
}

Parameters

project_id
string
required
Railway project ID
workspace_id
string
required
Destination workspace ID
token_type
string
Railway token type. Use “account” for account, workspace, or OAuth tokens, or “project” for project tokens. (Default: account)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "transferred": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Transferred"
    }
  },
  "required": [
    "success"
  ],
  "title": "TransferProjectOutput",
  "type": "object"
}

Parameters

project_id
string
required
Railway project ID
token_type
string
Railway token type. Use “account” for account, workspace, or OAuth tokens, or “project” for project tokens. (Default: account)

Response

{
  "$defs": {
    "ProjectMember": {
      "additionalProperties": false,
      "description": "A single member row in ``list_project_members``.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Id"
        },
        "role": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Role"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        },
        "email": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Email"
        },
        "avatar": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Avatar"
        }
      },
      "title": "ProjectMember",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "members": {
      "items": {
        "$ref": "#/$defs/ProjectMember"
      },
      "title": "Members",
      "type": "array"
    },
    "count": {
      "default": 0,
      "title": "Count",
      "type": "integer"
    }
  },
  "required": [
    "success"
  ],
  "title": "ListProjectMembersOutput",
  "type": "object"
}

Parameters

project_id
string
required
Railway project ID
name
string
required
Environment name
token_type
string
Railway token type. Use “account” for account, workspace, or OAuth tokens, or “project” for project tokens. (Default: account)
source_environment_id
string
Environment ID to clone from
ephemeral
boolean
Whether the environment is ephemeral
skip_initial_deploys
boolean
Whether to skip initial deploys for the environment
stage_initial_changes
boolean
Whether to stage initial changes instead of applying them immediately

Response

{
  "$defs": {
    "CreatedResource": {
      "additionalProperties": false,
      "description": "A freshly created resource carrying just id + name.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        }
      },
      "title": "CreatedResource",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "environment": {
      "anyOf": [
        {
          "$ref": "#/$defs/CreatedResource"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "required": [
    "success"
  ],
  "title": "CreateEnvironmentOutput",
  "type": "object"
}

Parameters

environment_id
string
required
Railway environment ID
token_type
string
Railway token type. Use “account” for account, workspace, or OAuth tokens, or “project” for project tokens. (Default: account)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "deleted": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Deleted"
    }
  },
  "required": [
    "success"
  ],
  "title": "DeleteEnvironmentOutput",
  "type": "object"
}

Parameters

project_id
string
required
Railway project ID
name
string
required
Service name
token_type
string
Railway token type. Use “account” for account, workspace, or OAuth tokens, or “project” for project tokens. (Default: account)
repo
string
GitHub repository in owner/name format to deploy from
image
string
Docker image to deploy, for example redis:7-alpine
branch
string
Git branch to deploy when using a repository source

Response

{
  "$defs": {
    "CreatedResource": {
      "additionalProperties": false,
      "description": "A freshly created resource carrying just id + name.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Name"
        }
      },
      "title": "CreatedResource",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "service": {
      "anyOf": [
        {
          "$ref": "#/$defs/CreatedResource"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "required": [
    "success"
  ],
  "title": "CreateServiceOutput",
  "type": "object"
}

Parameters

service_id
string
required
Railway service ID
token_type
string
Railway token type. Use “account” for account, workspace, or OAuth tokens, or “project” for project tokens. (Default: account)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "deleted": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Deleted"
    }
  },
  "required": [
    "success"
  ],
  "title": "DeleteServiceOutput",
  "type": "object"
}

Parameters

project_id
string
required
Railway project ID
service_id
string
required
Railway service ID
environment_id
string
required
Railway environment ID
token_type
string
Railway token type. Use “account” for account, workspace, or OAuth tokens, or “project” for project tokens. (Default: account)
first
integer
Maximum number of deployments to return
after
string
Cursor for pagination

Response

{
  "$defs": {
    "DeploymentSummary": {
      "additionalProperties": false,
      "description": "A single deployment row in ``list_deployments``.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Id"
        },
        "status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Status"
        },
        "created_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Created At"
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Url"
        },
        "static_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Static Url"
        },
        "can_rollback": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Can Rollback"
        },
        "can_redeploy": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Can Redeploy"
        }
      },
      "title": "DeploymentSummary",
      "type": "object"
    },
    "PageInfo": {
      "additionalProperties": false,
      "description": "Cursor-pagination metadata returned by list actions.",
      "properties": {
        "has_next_page": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Has Next Page"
        },
        "end_cursor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "End Cursor"
        }
      },
      "title": "PageInfo",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "deployments": {
      "items": {
        "$ref": "#/$defs/DeploymentSummary"
      },
      "title": "Deployments",
      "type": "array"
    },
    "page_info": {
      "anyOf": [
        {
          "$ref": "#/$defs/PageInfo"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "count": {
      "default": 0,
      "title": "Count",
      "type": "integer"
    }
  },
  "required": [
    "success"
  ],
  "title": "ListDeploymentsOutput",
  "type": "object"
}

Parameters

deployment_id
string
required
Railway deployment ID
token_type
string
Railway token type. Use “account” for account, workspace, or OAuth tokens, or “project” for project tokens. (Default: account)

Response

{
  "$defs": {
    "DeploymentDetail": {
      "additionalProperties": false,
      "description": "The deployment detail returned by ``get_deployment``.",
      "properties": {
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Id"
        },
        "status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Status"
        },
        "created_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Created At"
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Url"
        },
        "static_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Static Url"
        },
        "can_rollback": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Can Rollback"
        },
        "can_redeploy": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Can Redeploy"
        }
      },
      "title": "DeploymentDetail",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "deployment": {
      "anyOf": [
        {
          "$ref": "#/$defs/DeploymentDetail"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "required": [
    "success"
  ],
  "title": "GetDeploymentOutput",
  "type": "object"
}

Parameters

service_id
string
required
Railway service ID
environment_id
string
required
Railway environment ID
token_type
string
Railway token type. Use “account” for account, workspace, or OAuth tokens, or “project” for project tokens. (Default: account)
commit_sha
string
Specific Git commit SHA to deploy

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "deployment_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Deployment Id"
    }
  },
  "required": [
    "success"
  ],
  "title": "DeployServiceOutput",
  "type": "object"
}

Parameters

deployment_id
string
required
Railway deployment ID
token_type
string
Railway token type. Use “account” for account, workspace, or OAuth tokens, or “project” for project tokens. (Default: account)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "restarted": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Restarted"
    }
  },
  "required": [
    "success"
  ],
  "title": "RestartDeploymentOutput",
  "type": "object"
}

Parameters

deployment_id
string
required
Railway deployment ID to roll back to (must have canRollback)
token_type
string
Railway token type. Use “account” for account, workspace, or OAuth tokens, or “project” for project tokens. (Default: account)

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "rolled_back": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Rolled Back"
    }
  },
  "required": [
    "success"
  ],
  "title": "RollbackDeploymentOutput",
  "type": "object"
}

Parameters

deployment_id
string
required
Railway deployment ID
token_type
string
Railway token type. Use “account” for account, workspace, or OAuth tokens, or “project” for project tokens. (Default: account)
limit
integer
Maximum number of log lines to return

Response

{
  "$defs": {
    "DeploymentLog": {
      "additionalProperties": false,
      "description": "A single log entry in ``get_deployment_logs``.",
      "properties": {
        "timestamp": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Timestamp"
        },
        "message": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Message"
        },
        "severity": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Severity"
        }
      },
      "title": "DeploymentLog",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "logs": {
      "items": {
        "$ref": "#/$defs/DeploymentLog"
      },
      "title": "Logs",
      "type": "array"
    },
    "count": {
      "default": 0,
      "title": "Count",
      "type": "integer"
    }
  },
  "required": [
    "success"
  ],
  "title": "GetDeploymentLogsOutput",
  "type": "object"
}

Parameters

project_id
string
required
Railway project ID
environment_id
string
required
Railway environment ID
token_type
string
Railway token type. Use “account” for account, workspace, or OAuth tokens, or “project” for project tokens. (Default: account)
service_id
string
Railway service ID. Omit for shared environment variables.

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "variables": {
      "additionalProperties": true,
      "title": "Variables",
      "type": "object"
    },
    "count": {
      "default": 0,
      "title": "Count",
      "type": "integer"
    }
  },
  "required": [
    "success"
  ],
  "title": "ListVariablesOutput",
  "type": "object"
}

Parameters

project_id
string
required
Railway project ID
environment_id
string
required
Railway environment ID
name
string
required
Variable name
value
string
required
Variable value
token_type
string
Railway token type. Use “account” for account, workspace, or OAuth tokens, or “project” for project tokens. (Default: account)
service_id
string
Railway service ID. Omit to create or update a shared variable.
skip_deploys
boolean
Whether to skip automatic redeploys after changing the variable

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "upserted": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Upserted"
    }
  },
  "required": [
    "success"
  ],
  "title": "UpsertVariableOutput",
  "type": "object"
}

Parameters

project_id
string
required
Railway project ID
environment_id
string
required
Railway environment ID
name
string
required
Variable name to delete
token_type
string
Railway token type. Use “account” for account, workspace, or OAuth tokens, or “project” for project tokens. (Default: account)
service_id
string
Railway service ID. Omit to delete a shared variable.

Response

{
  "additionalProperties": false,
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Error"
    },
    "deleted": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Deleted"
    }
  },
  "required": [
    "success"
  ],
  "title": "DeleteVariableOutput",
  "type": "object"
}

Limits & Quotas

  • Transport: every action is a single POST to the GraphQL endpoint https://backboard.railway.com/graphql/v2.
  • Rate limits: Railway applies request-rate and complexity limits to the public API; see the official API docs for current values.
  • Error model: the GraphQL endpoint answers HTTP 200 even for logical errors, returning them in a top-level errors array. These, along with non-2xx responses and timeouts, are caught and returned as success=False + error rather than raising. Plan for retries on the agent side based on the error string.

Daytona

Netlify

Algolia