> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modulex.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Railway Integration for AI Agents & Workflows

> Integrate Railway into workflows to list projects, manage services and environments, monitor deployments, trigger and roll back service deployments, and manage environment variables.

{/* Self-hosted logo — build-time vendored from modulex.json / Iconify (see scripts/lib/logo.js). */}

<img src="https://mintcdn.com/modulexaillc/df8MOr-hXotYLTh5/logos/placeholder.svg?fit=max&auto=format&n=df8MOr-hXotYLTh5&q=85&s=a4046f9cd6d738c81259050e9833913c" alt="Railway logo" width="72" height="72" data-path="logos/placeholder.svg" />

## 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`).

<Info>
  **Categories**: Developer Tools & Infrastructure · Cloud · Ci Cd · **Auth**: API Token · **Actions**: 20
</Info>

## Authentication

### API Token Authentication

Authenticate using your Railway API token

<Steps>
  <Step title="Step 1">
    Sign in at [https://railway.com](https://railway.com) and open your account settings
  </Step>

  <Step title="Step 2">
    Go to the 'Tokens' section under Account Settings
  </Step>

  <Step title="Step 3">
    Create a new token (account, workspace, or project scope)
  </Step>

  <Step title="Step 4">
    Paste the token below
  </Step>
</Steps>

#### Required Credentials

| Field             | Description                                  | Required | Format |
| ----------------- | -------------------------------------------- | -------- | ------ |
| Railway API Token | Your Railway API token from account settings | Yes      | `-`    |

## Available Actions

<AccordionGroup>
  <Accordion title="list_projects — List Railway projects visible to the provided token.">
    ### Parameters

    <ResponseField name="token_type" type="string">
      Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. (Default: `account`)
    </ResponseField>

    <ResponseField name="workspace_id" type="string">
      Workspace ID to list projects from
    </ResponseField>

    <ResponseField name="first" type="integer">
      Maximum number of projects to return
    </ResponseField>

    <ResponseField name="after" type="string">
      Cursor for pagination
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$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"
    }
    ```
  </Accordion>

  <Accordion title="get_project — Get a Railway project with its services and environments.">
    ### Parameters

    <ResponseField name="project_id" type="string" required>
      Railway project ID
    </ResponseField>

    <ResponseField name="token_type" type="string">
      Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. (Default: `account`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$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"
    }
    ```
  </Accordion>

  <Accordion title="create_project — Create a Railway project.">
    ### Parameters

    <ResponseField name="name" type="string" required>
      Project name
    </ResponseField>

    <ResponseField name="token_type" type="string">
      Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. (Default: `account`)
    </ResponseField>

    <ResponseField name="description" type="string">
      Project description
    </ResponseField>

    <ResponseField name="workspace_id" type="string">
      Workspace ID to create the project in
    </ResponseField>

    <ResponseField name="is_public" type="boolean">
      Whether the project should be publicly visible
    </ResponseField>

    <ResponseField name="default_environment_name" type="string">
      Name for the default environment
    </ResponseField>

    <ResponseField name="pr_deploys" type="boolean">
      Whether to enable pull request deploys
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$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"
    }
    ```
  </Accordion>

  <Accordion title="update_project — Update a Railway project name or description.">
    ### Parameters

    <ResponseField name="project_id" type="string" required>
      Railway project ID
    </ResponseField>

    <ResponseField name="token_type" type="string">
      Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. (Default: `account`)
    </ResponseField>

    <ResponseField name="name" type="string">
      Updated project name
    </ResponseField>

    <ResponseField name="description" type="string">
      Updated project description
    </ResponseField>

    <ResponseField name="is_public" type="boolean">
      Whether the project should be publicly visible
    </ResponseField>

    <ResponseField name="pr_deploys" type="boolean">
      Whether to enable pull request deploy environments
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$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"
    }
    ```
  </Accordion>

  <Accordion title="delete_project — Delete a Railway project.">
    ### Parameters

    <ResponseField name="project_id" type="string" required>
      Railway project ID
    </ResponseField>

    <ResponseField name="token_type" type="string">
      Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. (Default: `account`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "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"
    }
    ```
  </Accordion>

  <Accordion title="transfer_project — Transfer a Railway project to another workspace.">
    ### Parameters

    <ResponseField name="project_id" type="string" required>
      Railway project ID
    </ResponseField>

    <ResponseField name="workspace_id" type="string" required>
      Destination workspace ID
    </ResponseField>

    <ResponseField name="token_type" type="string">
      Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. (Default: `account`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "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"
    }
    ```
  </Accordion>

  <Accordion title="list_project_members — List members for a Railway project.">
    ### Parameters

    <ResponseField name="project_id" type="string" required>
      Railway project ID
    </ResponseField>

    <ResponseField name="token_type" type="string">
      Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. (Default: `account`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$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"
    }
    ```
  </Accordion>

  <Accordion title="create_environment — Create a Railway project environment.">
    ### Parameters

    <ResponseField name="project_id" type="string" required>
      Railway project ID
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Environment name
    </ResponseField>

    <ResponseField name="token_type" type="string">
      Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. (Default: `account`)
    </ResponseField>

    <ResponseField name="source_environment_id" type="string">
      Environment ID to clone from
    </ResponseField>

    <ResponseField name="ephemeral" type="boolean">
      Whether the environment is ephemeral
    </ResponseField>

    <ResponseField name="skip_initial_deploys" type="boolean">
      Whether to skip initial deploys for the environment
    </ResponseField>

    <ResponseField name="stage_initial_changes" type="boolean">
      Whether to stage initial changes instead of applying them immediately
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$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"
    }
    ```
  </Accordion>

  <Accordion title="delete_environment — Delete a Railway project environment.">
    ### Parameters

    <ResponseField name="environment_id" type="string" required>
      Railway environment ID
    </ResponseField>

    <ResponseField name="token_type" type="string">
      Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. (Default: `account`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "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"
    }
    ```
  </Accordion>

  <Accordion title="create_service — Create a Railway service from a GitHub repo or Docker image.">
    ### Parameters

    <ResponseField name="project_id" type="string" required>
      Railway project ID
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Service name
    </ResponseField>

    <ResponseField name="token_type" type="string">
      Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. (Default: `account`)
    </ResponseField>

    <ResponseField name="repo" type="string">
      GitHub repository in owner/name format to deploy from
    </ResponseField>

    <ResponseField name="image" type="string">
      Docker image to deploy, for example redis:7-alpine
    </ResponseField>

    <ResponseField name="branch" type="string">
      Git branch to deploy when using a repository source
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$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"
    }
    ```
  </Accordion>

  <Accordion title="delete_service — Delete a Railway service and all of its deployments.">
    ### Parameters

    <ResponseField name="service_id" type="string" required>
      Railway service ID
    </ResponseField>

    <ResponseField name="token_type" type="string">
      Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. (Default: `account`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "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"
    }
    ```
  </Accordion>

  <Accordion title="list_deployments — List deployments for a Railway service in an environment.">
    ### Parameters

    <ResponseField name="project_id" type="string" required>
      Railway project ID
    </ResponseField>

    <ResponseField name="service_id" type="string" required>
      Railway service ID
    </ResponseField>

    <ResponseField name="environment_id" type="string" required>
      Railway environment ID
    </ResponseField>

    <ResponseField name="token_type" type="string">
      Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. (Default: `account`)
    </ResponseField>

    <ResponseField name="first" type="integer">
      Maximum number of deployments to return
    </ResponseField>

    <ResponseField name="after" type="string">
      Cursor for pagination
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$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"
    }
    ```
  </Accordion>

  <Accordion title="get_deployment — Get details for a single Railway deployment.">
    ### Parameters

    <ResponseField name="deployment_id" type="string" required>
      Railway deployment ID
    </ResponseField>

    <ResponseField name="token_type" type="string">
      Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. (Default: `account`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$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"
    }
    ```
  </Accordion>

  <Accordion title="deploy_service — Trigger a deployment for a Railway service in an environment.">
    ### Parameters

    <ResponseField name="service_id" type="string" required>
      Railway service ID
    </ResponseField>

    <ResponseField name="environment_id" type="string" required>
      Railway environment ID
    </ResponseField>

    <ResponseField name="token_type" type="string">
      Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. (Default: `account`)
    </ResponseField>

    <ResponseField name="commit_sha" type="string">
      Specific Git commit SHA to deploy
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "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"
    }
    ```
  </Accordion>

  <Accordion title="restart_deployment — Restart a running Railway deployment without rebuilding.">
    ### Parameters

    <ResponseField name="deployment_id" type="string" required>
      Railway deployment ID
    </ResponseField>

    <ResponseField name="token_type" type="string">
      Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. (Default: `account`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "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"
    }
    ```
  </Accordion>

  <Accordion title="rollback_deployment — Roll a Railway service back to a previous deployment.">
    ### Parameters

    <ResponseField name="deployment_id" type="string" required>
      Railway deployment ID to roll back to (must have canRollback)
    </ResponseField>

    <ResponseField name="token_type" type="string">
      Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. (Default: `account`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "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"
    }
    ```
  </Accordion>

  <Accordion title="get_deployment_logs — Retrieve runtime logs for a Railway deployment.">
    ### Parameters

    <ResponseField name="deployment_id" type="string" required>
      Railway deployment ID
    </ResponseField>

    <ResponseField name="token_type" type="string">
      Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. (Default: `account`)
    </ResponseField>

    <ResponseField name="limit" type="integer">
      Maximum number of log lines to return
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$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"
    }
    ```
  </Accordion>

  <Accordion title="list_variables — List Railway environment variables for a service or shared environment.">
    ### Parameters

    <ResponseField name="project_id" type="string" required>
      Railway project ID
    </ResponseField>

    <ResponseField name="environment_id" type="string" required>
      Railway environment ID
    </ResponseField>

    <ResponseField name="token_type" type="string">
      Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. (Default: `account`)
    </ResponseField>

    <ResponseField name="service_id" type="string">
      Railway service ID. Omit for shared environment variables.
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "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"
    }
    ```
  </Accordion>

  <Accordion title="upsert_variable — Create or update a Railway environment variable.">
    ### Parameters

    <ResponseField name="project_id" type="string" required>
      Railway project ID
    </ResponseField>

    <ResponseField name="environment_id" type="string" required>
      Railway environment ID
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Variable name
    </ResponseField>

    <ResponseField name="value" type="string" required>
      Variable value
    </ResponseField>

    <ResponseField name="token_type" type="string">
      Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. (Default: `account`)
    </ResponseField>

    <ResponseField name="service_id" type="string">
      Railway service ID. Omit to create or update a shared variable.
    </ResponseField>

    <ResponseField name="skip_deploys" type="boolean">
      Whether to skip automatic redeploys after changing the variable
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "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"
    }
    ```
  </Accordion>

  <Accordion title="delete_variable — Delete a Railway environment variable.">
    ### Parameters

    <ResponseField name="project_id" type="string" required>
      Railway project ID
    </ResponseField>

    <ResponseField name="environment_id" type="string" required>
      Railway environment ID
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Variable name to delete
    </ResponseField>

    <ResponseField name="token_type" type="string">
      Railway token type. Use "account" for account, workspace, or OAuth tokens, or "project" for project tokens. (Default: `account`)
    </ResponseField>

    <ResponseField name="service_id" type="string">
      Railway service ID. Omit to delete a shared variable.
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "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"
    }
    ```
  </Accordion>
</AccordionGroup>

## 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.

## Related integrations

<CardGroup cols={3}>
  <Card title="Daytona" href="/integrations/tools/daytona" />

  <Card title="Netlify" href="/integrations/tools/netlify" />

  <Card title="Algolia" href="/integrations/tools/algolia" />
</CardGroup>

## Links

* [Railway](https://railway.com)
