Skip to content

Commit b0050de

Browse files
authored
Merge branch 'railwayapp:main' into main
2 parents 4b749c8 + b56bc98 commit b0050de

31 files changed

Lines changed: 170 additions & 113 deletions

contentlayer.config.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { defineDocumentType, makeSource } from "contentlayer/source-files";
22
import remarkAutoLinkHeadings from "remark-autolink-headings";
33
import remarkGfm from "remark-gfm";
44
import remarkSlug from "remark-slug";
5+
import { execSync } from "child_process";
56

67
const Page = defineDocumentType(() => ({
78
name: "Page",
@@ -24,6 +25,20 @@ const Page = defineDocumentType(() => ({
2425
type: "string",
2526
resolve: doc => `/${doc._raw.flattenedPath}`,
2627
},
28+
lastModified: {
29+
type: "date",
30+
resolve: doc => {
31+
const filePath = `src/docs/${doc._raw.flattenedPath}.md`;
32+
try {
33+
const result = execSync(`git log -1 --format=%cI -- "${filePath}"`, {
34+
encoding: "utf-8",
35+
}).trim();
36+
return result || new Date().toISOString();
37+
} catch {
38+
return new Date().toISOString();
39+
}
40+
},
41+
},
2742
},
2843
}));
2944

public/static/faq.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"How do I verify my account?",
1717
"Why do I need to verify?"
1818
],
19-
"answer": "Your account requires additional information to use the Trial plan. Make sure to link a GitHub account and a Credit Card to pass the verification check.",
20-
"link": ""
19+
"answer": "Without verification, your Trial account will have some network restrictions. Link a GitHub account or Credit Card to verify your account and unlock full network access.",
20+
"link": "https://docs.railway.com/reference/pricing/free-trial#full-vs-limited-trial"
2121
},
2222
"region": {
2323
"category": "general",

redirects.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ const redirects = [
9999
destination: "/reference/errors",
100100
permanent: true,
101101
},
102+
{
103+
source: "/reference/teams",
104+
destination: "/reference/workspaces",
105+
permanent: true,
106+
},
102107
];
103108

104109
const hashRedirects = [

src/docs/guides/cli.md

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -96,23 +96,23 @@ In situations where user input or interaction isn't possible, such as in CI/CD p
9696

9797
A [Project Token](/guides/public-api#project-token) is set via the `RAILWAY_TOKEN` environment variable.
9898

99-
An [Account](/guides/public-api#personal-token) or [Team](/guides/public-api#team-token) Token is set via the `RAILWAY_API_TOKEN` environment variable.
99+
An [Account](/guides/public-api#using-an-account-token) or [Workspace](/guides/public-api#using-a-workspace-token) Token is set via the `RAILWAY_API_TOKEN` environment variable.
100100

101-
**Note:** You can only use one type of token at a time. If both are set, the `RAILWAY_TOKEN` variable will take precedence.
101+
**Note:** If both environment variables are set, `RAILWAY_TOKEN` takes precedence. This allows you to use a project token for specific deployments while having a broader account token configured.
102102

103103
#### Project Tokens
104104

105-
You can use [Project Tokens](/guides/public-api#project-token) to authenticate project-level actions.
105+
You can use [Project Tokens](/guides/public-api#project-token) to authenticate project-level actions within a single environment.
106106

107-
Project Tokens allow the CLI to access all the project-level actions in the environment set when the token was created.
107+
Project tokens are scoped to a specific environment within a project. If you need to perform actions across multiple environments, use an account or workspace token instead.
108108

109-
Some actions you can perform with a project token include -
109+
Some actions you can perform with a project token include:
110110

111111
- Deploying code - `railway up`
112112
- Redeploying a deployment - `railway redeploy`
113113
- Viewing build and deployment logs - `railway logs`
114114

115-
Some actions you **cannot** perform with a project token include -
115+
Some actions you **cannot** perform with a project token include:
116116

117117
- Creating a new project - `railway init`
118118
- Printing information about the user - `railway whoami`
@@ -126,26 +126,32 @@ RAILWAY_TOKEN=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX railway up
126126

127127
#### Account Tokens
128128

129-
Account Tokens come in two types - [Personal Account Tokens](/reference/public-api#personal-token) and [Team Tokens](/reference/public-api#team-token).
129+
You can use [Account Tokens](/guides/public-api#using-an-account-token) to authenticate all CLI actions across all your resources and workspaces. This is the broadest scope—all CLI commands are available with an account token.
130130

131-
You can use Account Tokens to authenticate all CLI actions across all workspaces.
131+
Some actions you can **only** perform with an account token include:
132132

133-
However, you can only use Team tokens to authenticate actions on projects within the workspace the token was scoped to when it was created.
133+
- Printing information about the user - `railway whoami`
134+
- Linking to projects in any of your workspaces - `railway link`
134135

135-
Some actions you can perform with a personal account token include -
136+
Use the token by setting the `RAILWAY_API_TOKEN` environment variable and then running `railway <command>`.
136137

137-
- Creating a new project - `railway init`
138-
- Printing information about the user - `railway whoami`
138+
```bash
139+
RAILWAY_API_TOKEN=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX railway whoami
140+
```
141+
142+
#### Workspace Tokens
143+
144+
You can use [Workspace Tokens](/guides/public-api#using-a-workspace-token) to authenticate CLI actions on projects within a specific workspace. Use this when you want to share a token with teammates without giving access to your other workspaces.
139145

140-
Some actions you **cannot** perform with [Team Token](/reference/public-api#team-token) include -
146+
Some actions you **cannot** perform with a workspace token include:
141147

142148
- Printing information about the user - `railway whoami`
143-
- Linking to another workspace - `railway link`
149+
- Linking to projects outside the token's workspace - `railway link` (you can still link to other projects within the workspace)
144150

145151
Use the token by setting the `RAILWAY_API_TOKEN` environment variable and then running `railway <command>`.
146152

147153
```bash
148-
RAILWAY_API_TOKEN=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX railway whoami
154+
RAILWAY_API_TOKEN=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX railway up
149155
```
150156

151157
## Common Examples of CLI Usage
@@ -156,17 +162,17 @@ Below are some of the most commonly used CLI commands. Find a complete list of C
156162

157163
To associate a project and environment with your current directory:
158164

159-
<Image src="https://res.cloudinary.com/railway/image/upload/v1631917786/docs/railway-link_juslvt.png"
160-
alt="Screenshot of Railway"
165+
<Image src="https://res.cloudinary.com/railway/image/upload/v1770156020/docs/railway-link-2026_dwz6mi.png"
166+
alt="Screenshot of railway link command"
161167
layout="intrinsic"
162-
width={389} height={116} quality={80} />
168+
width={824} height={294} quality={80} />
163169

164170
```bash
165171
# Link to a project
166172
railway link
167173
```
168174

169-
This prompts you to select a team, project, and environment to associate with
175+
This prompts you to select a workspace, project, and environment to associate with
170176
your current directory. Any future commands will be run against this project and environment.
171177

172178
### Link to a Service
@@ -189,7 +195,7 @@ Create a new project directly from the command line.
189195
railway init
190196
```
191197

192-
This prompts you to name your project and select a team to create the project in.
198+
This prompts you to name your project and select a workspace to create the project in.
193199

194200
### Local Development
195201

src/docs/guides/create.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Note that your template will not be available on the template marketplace, nor w
3535

3636
It's now possible to specify a private GitHub repo when creating a template.
3737

38-
This feature is intended for use among [Teams](/reference/teams) and [Organizations](/reference/teams). Users supporting a subscriber base may also find this feature helpful to distribute closed-source code.
38+
This feature is intended for use among [Teams](/reference/workspaces) and [Organizations](/reference/workspaces). Users supporting a subscriber base may also find this feature helpful to distribute closed-source code.
3939

4040
To deploy a template that includes a private repo, look for the `GitHub` panel in the `Account Integrations` section of [General Settings](https://railway.com/account). Then select the `Edit Scope` option to grant Railway access to the desired private repos.
4141

src/docs/guides/environments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ When enabled, a temporary environment is spun up to support the Pull Request dep
5151

5252
#### How Come my GitHub PR Won't Deploy?
5353

54-
Railway will not deploy a PR branch from a user who is not in your team or invited to your project without their associated GitHub account.
54+
Railway will not deploy a PR branch from a user who is not in your workspace or invited to your project without their associated GitHub account.
5555

5656
#### Domains in PR Environments
5757

src/docs/guides/optimize-usage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ Visit the <a href="https://railway.com/workspace/usage" target="_blank">Workspac
1313

1414
<Image src="https://res.cloudinary.com/railway/image/upload/v1743193518/docs/usage-limits_pqlot9.png" alt="Usage Limits Modal" layout="responsive" width={1200} height={1075} />
1515

16-
#### Setting Limits for Teams
16+
#### Setting Limits for Workspaces
1717

18-
If you want to set a usage limit for your team, use the account switcher in the top left corner of your dashboard to access the team's usage page.
18+
If you want to set a usage limit for a different workspace that you are an admin of, use the account switcher in the top left corner of your dashboard to access that workspace's usage page.
1919

2020
### Custom Email Alert
2121

src/docs/guides/projects.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ Each project generates a project invite link. To invite someone via a link:
4949

5050
## Transferring Projects
5151

52-
Depending on your plan, you can transfer Projects to other users or Teams.
52+
Projects can be transferred between workspaces or to other users. Both the source and destination must have an active [Hobby or Pro plan](/reference/pricing#plans) subscription.
5353

54-
#### Hobby User to Hobby User
54+
#### Transferring to Another User
5555

56-
To transfer a project from one Hobby User to another Hobby User, you must first [add the user as a member](#inviting-members) in the project.
56+
To transfer a project to another user, you must first [add the user as a member](#inviting-members) of the project.
5757

5858
You can then transfer the project to the new member by selecting the three dots next to the user and choosing `Transfer Ownership`.
5959

@@ -62,15 +62,15 @@ alt="Screenshot of Project Transfer Menu"
6262
layout="intrinsic"
6363
width={411} height={253} quality={80} />
6464

65-
The transferee receives an email requesting to transfer the project.
65+
The recipient receives an email to confirm the transfer. They have 24 hours to accept.
6666

67-
#### Hobby User to Team || Team to Team
67+
#### Transferring Between Workspaces
6868

69-
You can transfer a Project in your Hobby workspace to a Team (or between Teams) in which you are an Admin. Inside your project, visit the `Settings` page and click the `Transfer Project` button to view the project transfer modal.
69+
You can transfer a project to another workspace that you're a member of. Inside your project, visit the `Settings` page and click the `Transfer Project` button to view the project transfer modal.
7070

7171
<Image src="https://res.cloudinary.com/railway/image/upload/v1692378671/project-transfer_iukfwb.png" alt="Project Transfer" layout="responsive" height={968} width={1240} />
7272

73-
Note: If you do not see the Transfer Project section in your Project Settings, you may not be an Admin of the Team to which you wish to transfer the Project. See the [reference page for Teams](/reference/teams#inviting-members) for more information on team member permissions.
73+
Note: You must be an Admin of the project to initiate a transfer. The destination workspace must have an active Hobby or Pro subscription. See the [Workspaces reference](/reference/workspaces#inviting-members) for more information on workspace roles.
7474

7575
## Viewing Recent Activity
7676

src/docs/guides/public-api.md

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,28 @@ https://backboard.railway.com/graphql/v2
3030

3131
### Creating a Token
3232

33-
To use the API, you will need an API token. There are three types of tokens you can create.
33+
To use the API, you will need an API token. There are three types of tokens you can create in the Railway dashboard. If you're building an application that authenticates users, you can also use OAuth.
3434

35-
#### Team Tokens and Account Tokens
35+
#### Choosing a Token Type
3636

37-
You can create an API token from the [tokens page](https://railway.com/account/tokens) in your account settings.
37+
| Token Type | Scope | Best For |
38+
|------------|-------|----------|
39+
| Account token | All your resources and workspaces | Personal scripts, local development |
40+
| Workspace token | Single workspace | Team CI/CD, shared automation |
41+
| Project token | Single environment in a project | Deployments, service-specific automation |
42+
| OAuth | User-granted permissions | Third-party apps acting on behalf of users |
3843

39-
<Image src="https://res.cloudinary.com/railway/image/upload/v1667386744/docs/new-token-form_rhrbw8.png"
44+
#### Account Tokens and Workspace Tokens
45+
46+
You can create a workspace or account token from the [tokens page](https://railway.com/account/tokens) in your account settings.
47+
48+
<Image src="https://res.cloudinary.com/railway/image/upload/v1770147536/docs/new_token_2026_v4yrmw.png"
4049
alt="New token form"
4150
layout="responsive"
42-
width={1618 } height={378} quality={80} />
51+
width={1674} height={374} quality={80} />
4352

44-
- **Team token** - Select a team in the `Team` dropdown to create a token tied to a team. A team token has access to all the team's resources, and cannot be used to access your personal resources on Railway. Feel free to share this token with your teammates.
45-
- **Account token** - If you do not select a team, the token will be tied to your Railway account and will have access to all your resources including the teams you are a part of. Do not share this token with anyone else.
46-
47-
_Note that Teams are a Pro feature._
53+
- **Account token**: If you select "No workspace", the token will be tied to your Railway account. This is the broadest scope. The token can perform any API action you're authorized to do across all your resources and workspaces. Do not share this token with anyone else.
54+
- **Workspace token**: Select a specific workspace in the dropdown to create a token scoped to that workspace. A workspace token has access to all the workspace's resources, and cannot be used to access your personal resources or other workspaces on Railway. You can share this token with your teammates.
4855

4956
#### Project Token
5057

@@ -72,21 +79,21 @@ curl --request POST \
7279
--data '{"query":"query { me { name email } }"}'
7380
```
7481

75-
**Note:** This query **cannot** be used with a team or project token because the data returned is scoped to your personal account.
82+
**Note:** This query **cannot** be used with a workspace or project token because the data returned is scoped to your personal account.
7683

77-
#### Using a Team Token
84+
#### Using a Workspace Token
7885

79-
If you have a team token, you can use it to authenticate requests to a specific team. The query below should return the team name and ID:
86+
If you have a workspace token, you can use it to authenticate requests scoped to that workspace. The query below should return the workspace name and ID:
8087

8188
```bash
8289
curl --request POST \
8390
--url https://backboard.railway.com/graphql/v2 \
84-
--header 'Team-Access-Token: <TEAM_TOKEN_GOES_HERE>' \
91+
--header 'Authorization: Bearer <WORKSPACE_TOKEN_GOES_HERE>' \
8592
--header 'Content-Type: application/json' \
86-
--data '{"query":"query { team(id: \"<TEAM_ID_GOES_HERE>\") { name id } }"}'
93+
--data '{"query":"query { workspace(workspaceId: \"<WORKSPACE_ID_GOES_HERE>\") { name id } }"}'
8794
```
8895

89-
**Note:** This query **can** also be used with an account token as long as you are a member of the team.
96+
**Note:** This query **can** also be used with an account token as long as you are a member of the workspace.
9097

9198
#### Using a Project Token
9299

@@ -100,6 +107,8 @@ curl --request POST \
100107
--data '{"query":"query { projectToken { projectId environmentId } }"}'
101108
```
102109

110+
**Note:** Project tokens use the `Project-Access-Token` header, not the `Authorization: Bearer` header used by account, workspace, and OAuth tokens.
111+
103112
## Viewing the Schema
104113

105114
Use popular tools like [Postman](https://www.postman.com/) or [Insomnia](https://insomnia.rest/) to connect to the API and query the schema. Simply set up your connection with the endpoint and Authorization token, and fetch the schema.
@@ -116,12 +125,18 @@ Alternatively, you can use our [GraphiQL playground](https://railway.com/graphiq
116125

117126
<Image src="https://res.cloudinary.com/railway/image/upload/v1694611003/rw-graphiql_zs2l28.png" alt="GraphiQL Playground" layout="responsive" width={6568} height={3886} quality={80} />
118127

119-
Make sure to set an Authorization header with an [auth token](/reference/public-api#authentication). Click the "Headers" tab at the bottom of the GraphiQL page and enter this json, using your own token:
128+
Make sure to set a header with your [authorization token](/reference/public-api#authentication). Click the "Headers" tab at the bottom of the GraphiQL page and enter this json, using your own token based on your use case:
120129

130+
For an account or workspace token:
121131
```json
122132
{ "Authorization": "Bearer <API_TOKEN_GOES_HERE>" }
123133
```
124134

135+
For a project token:
136+
```json
137+
{ "Project-Access-Token": "<PROJECT_TOKEN_GOES_HERE>" }
138+
```
139+
125140
## Tips and Tricks
126141

127142
### Resource IDs

src/docs/guides/storage-buckets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ You can use up to **50 GB-month** during the trial. Bucket usage counts against
281281

282282
### Limited Trial
283283

284-
Buckets are not available in the [Limited Trial](/reference/pricing/free-trial#full-vs-limited-trial).
284+
Buckets are available in the [Limited Trial](/reference/pricing/free-trial#full-vs-limited-trial), but services accessing them will have some [network restrictions](/reference/pricing/free-trial#full-vs-limited-trial).
285285

286286
### Hobby
287287

0 commit comments

Comments
 (0)