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.

3 events covered

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

Signature header
None (unsigned)
How events are identified
type field in the body
Body format
JSON
Envelope
type, details, resource, severity, timestamp
Agent skill
npx skills add hookdeck/webhook-skills --skill railway-webhooks

Verify Railway webhooks →

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 railway gives 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

  1. 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 →
  2. 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 →
  3. A handler drops a type it doesn't know

    Railway doesn't list every type value, and alert names aren't documented. Route on the part before the dot, return 200 for anything you don't recognise, and log it.

    Choose and route events →
  4. A preview deployment pages your team

    A webhook fires for every environment in the project, including ephemeral ones. Check resource.environment.isEphemeral and resource.environment.name before you page anyone.

    Filter by environment →

Railway webhook best practices

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

Deployment.failed · .crashed · .oom_killed

3 0

All 3 events →

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.

Not affiliated with Railway. Facts are compiled from public sources and linked inline.