Railway webhooks
Railway webhooks are JSON POST requests that a project sends to your URL when a service's deployment status changes or a volume or CPU/RAM alert fires.
These pages cover the events Railway sends about your project. To receive other services' webhooks in an app you host on Railway, see how to receive and replay external webhooks in Railway.
How Railway webhooks work
Railway pushes each event as it happens, so you don't have to poll its API. One webhook covers every environment in the project. The body has type, details, resource, severity and timestamp, and resource names the workspace, project, environment, service and deployment. No version field or header is documented.
type names the event as <Resource>.<state>, such as Deployment.failed. Railway doesn't publish a full list: the names on these pages come from its webhook docs and its own agent skill, other deployment states aren't given as type values, and alert names aren't documented, so log anything you don't recognise. Its example pairs Deployment.failed with status: SUCCESS in details, so read the state from type. Discord and Slack URLs get a rewritten message instead of this format.
Key facts
Setting up Railway webhooks
- In your project, click Settings, open the Webhooks tab and enter your URL. Add a custom header with a long random value, optionally choose which events to receive, then click Save Webhook.
- Railway's MCP server and public API can also manage webhooks and their headers. Header values are write-only everywhere, so keep your own copy.
- Railway can't reach localhost, so test through a public URL.
hookdeck listen 3000 railwaygives you one and forwards requests to your machine. Click Test Webhook to send a sample with your headers and see the status your endpoint answered. - Railway documents no way to resend an event. After an outage, read current state from its public API.
Delivery behaviour
30 seconds per attempt; Test Webhook times out after 10 seconds Retries up to 3 with exponential backoff; any 2xx or 3xx counts as success, and the intervals aren't published After repeated failures paused for 24 hours after 100 failures to a URL within a 6-hour window Ordering not guaranteed delivery is best-effort and events aren't ordered Known failure modes
From Hookdeck's Railway guide →-
A failing URL is paused for a day
If a URL fails 100 times within 6 hours, Railway stops sending to it for 24 hours. Keep the endpoint thin, and read current state from the public API after an outage.
Retries and paused URLs → -
An event goes missing or arrives late
Railway doesn't guarantee delivery or order, and says to treat a webhook as a prompt to act. Read the deployment's current state from the public API when you need certainty.
Handle ordering → -
A handler drops a
typeit doesn't knowRailway doesn't list every
Choose and route events →typevalue, and alert names aren't documented. Route on the part before the dot, return200for anything you don't recognise, and log it. -
A preview deployment pages your team
A webhook fires for every environment in the project, including ephemeral ones. Check
Filter by environment →resource.environment.isEphemeralandresource.environment.namebefore you page anyone.
Railway webhook best practices
- Respond before you do the work.
Each attempt has 30 seconds. Check the header, store the body, return
200, and run anything slow in a background job. - Treat each event as a prompt. Delivery is best-effort and unordered. Read the deployment's current state from the public API when you need certainty.
- Route on the
typeprefix. Splittypeon the dot and handle the states you know. Acknowledge anything else and log it, because the list isn't published. - Filter by environment.
Webhooks fire for every environment in the project. Check
resource.environment.nameandisEphemeralbefore you page anyone. - Run the receiver in its own project. Railway suggests this for a receiver hosted on Railway, so an outage in the project you monitor can't take your alerting down with it.
- Alert on your endpoint's errors. Railway documents no notice when it pauses a URL. Watch your own error rate, so you notice long before 100 failures.
Common Railway webhook events
Deployments
Deployment.failed | Build or deploy step hits an error |
Deployment.crashed | Running service exits unexpectedly |
Deployment.oom_killed | Service is stopped for running out of memory |
Events by resource
| Resource | Events | Payloads |
|---|---|---|
Deployment | 3 | 0 |
In this hub
| Webhook events → | Every covered Railway event, with payloads where the registry has them. |
| MCP events → | How an agent subscribes to Railway events as MCP events. |
| Verify signatures → | Signature facts, verification code and common failures. |
| Production guide → | Production problems, such as timeouts and retries, and how to handle them. |
| Agent skill → | Install the webhook skill in your coding agent. npx skills add hookdeck/webhook-skills --skill railway-webhooks |
Keep an outage on your side from pausing your Railway webhook.
Event Gateway checks your custom header, accepts each event as it arrives, queues it and retries to your service on your schedule, so your downtime doesn't count as failures against your Railway URL.