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

# Railway connection

> Learn how to configure a Railway Connection for Infisical.

Infisical supports the use of [API Tokens](https://docs.railway.com/guides/public-api#creating-a-token) to connect with Railway.

## Create a Railway API token

> [tab] Team Token
>
> A team token provides access to all resources within a team. It can't be used to access personal resources in Railway.
>
> **1. Click the profile image in the top-right corner and select 'Account Settings'**
>
> ![Dashboard Page](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/railway/railway-app-connection-account-settings.png)
>
> **2. In the personal settings sidebar, click on 'Tokens'**
>
> ![Account Settings Page](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/railway/railway-app-connection-account-settings-tokens.png)
>
> **3. Enter a token name and select a team**
>
> Make sure to provide a descriptive name and select the correct team.
>
> ![Enter Name and Select Team](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/railway/railway-app-connection-team-token-form.png)
>
> **4. Click on 'Create'**
>
> ![Create Token](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/railway/railway-app-connection-team-token-create.png)
>
> **5. Save the token**
>
> After clicking 'Create', your access token will be displayed. Save it securely for later use.
>
> ![Copy Token Modal](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/railway/railway-app-connection-team-token-created.png)

> [tab] Account Token
>
> If no team is selected, the token will be associated with your personal Railway account and will have access to all your individual and team resources.
>
> **1. Click the profile image in the top-right corner and select 'Account Settings'**
>
> ![Dashboard Page](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/railway/railway-app-connection-account-settings.png)
>
> **2. In the personal settings sidebar, click on 'Tokens'**
>
> ![Account Settings Page](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/railway/railway-app-connection-account-settings-tokens.png)
>
> **3. Enter a token name and select 'No workspace'**
>
> Provide a descriptive name and ensure no team is selected. This will create an account-level token.
>
> ![Enter Name](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/railway/railway-app-connection-account-token-form.png)
>
> **4. Click on 'Create'**
>
> ![Create Token](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/railway/railway-app-connection-account-token-create.png)
>
> **5. Save the token**
>
> After clicking 'Create', your access token will be shown. Save it for future use.
>
> ![Copy Token Modal](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/railway/railway-app-connection-account-token-created.png)

> [tab] Project Token
>
> Project tokens are limited to a specific environment within a project and can only be used to authenticate requests to that environment.
>
> **1. Open your Railway dashboard and click on a project**
>
> ![Dashboard Page](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/railway/railway-app-connection-project-token-dashboard.png)
>
> **2. On the project page, click 'Settings' in the top-right corner**
>
> ![Project Settings Page](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/railway/railway-app-connection-project-token-project.png)
>
> **3. In the left sidebar, scroll to the bottom and click on 'Tokens'**
>
> ![Project Token Settings Page](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/railway/railway-app-connection-project-token-settings.png)
>
> **4. Enter a token name and select an environment**
>
> Provide a descriptive name and select the appropriate environment for the token.
>
> ![Enter Name and Select environment](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/railway/railway-app-connection-project-token-form.png)
>
> **5. Click on 'Create'**
>
> ![Create Token](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/railway/railway-app-connection-project-token-create.png)
>
> **6. Save the token**
>
> After clicking 'Create', the access token will be displayed. Be sure to save it for later use.
>
> ![Copy Token Modal](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/railway/railway-app-connection-project-token-created.png)

## Create a Railway connection in Infisical

> [tab] Infisical UI
>
> **1. Navigate to App Connections**
>
> In your Infisical dashboard, navigate to the **Integrations** tab in the desired project, then select **App Connections**.
>
> ![App Connections Tab](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/general/add-connection.png)
>
> **2. Select Railway Connection**
>
> Click **+ Add Connection** and choose **Railway Connection** from the list of integrations.
>
> ![Select Railway Connection](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/railway/railway-app-connection-option.png)
>
> **3. Fill out the Railway Connection form**
>
> Complete the form by providing:
>
> * A descriptive name for the connection
> * An optional description
> * The type of token you created earlier
> * The token value from the previous step
>
>   ![Railway Connection Modal](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/railway/railway-app-connection-form.png)
>
> **4. Connection created**
>
> After submitting the form, your **Railway Connection** will be successfully created and ready to use with your Infisical project.
>
> ![Railway Connection Created](https://mintlify.s3.us-west-1.amazonaws.com/infisical/images/app-connections/railway/railway-app-connection-generated.png)

> [tab] API
>
> To create a Railway Connection via API, send a request to the [Create Railway Connection](https://infisical.com/docs/api-reference/endpoints/app-connections/railway/create.md) endpoint.
>
> ### Sample request
>
> ```bash Request theme={"dark"}
> curl    --request POST \
>         --url https://app.infisical.com/api/v1/app-connections/railway \
>         --header 'Content-Type: application/json' \
>         --data '{
>             "name": "my-railway-connection",
>             "method": "team-token",
>             "projectId": "7ffbb072-2575-495a-b5b0-127f88caef78",
>             "credentials": {
>                 "apiToken": "[TEAM TOKEN]"
>             }
>         }'
> ```
>
> ### Sample response
>
> ```bash Response theme={"dark"}
> {
>   "appConnection": {
>       "id": "e5d18aca-86f7-4026-a95e-efb8aeb0d8e6",
>       "name": "my-railway-connection",
>       "projectId": "7ffbb072-2575-495a-b5b0-127f88caef78",
>       "description": null,
>       "version": 1,
>       "orgId": "6f03caa1-a5de-43ce-b127-95a145d3464c",
>       "createdAt": "2025-04-23T19:46:34.831Z",
>       "updatedAt": "2025-04-23T19:46:34.831Z",
>       "isPlatformManagedCredentials": false,
>       "credentialsHash": "7c2d371dec195f82a6a0d5b41c970a229cfcaf88e894a5b6395e2dbd0280661f",
>       "app": "railway",
>       "method": "team-token",
>       "credentials": {}
>   }
> }
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.