---
title: "Create or update a WebSocket node"
method: PUT
path: "/provider/nodes/ws"
tags: ["Provider"]
---

# Create or update a WebSocket node

`PUT /provider/nodes/ws`

Creates or updates a WebSocket RPC node for one of the authenticated provider's plans. The URL must be a public wss:// endpoint (loopback, private, and link-local hosts are rejected) that accepts eth_subscribe("newHeads"); the server dials the node to verify before persisting. Returns the upserted node set to a healthy status.

## Request body

- ProviderWSNodeInput
  - `plan_id` integer, required — Plan ID the WebSocket node belongs to (must be owned by the provider).
  - `chain_id` string, required — Chain ID the node serves, e.g. 137.
  - `url` string, required — Public wss:// endpoint URL; must accept eth_subscribe("newHeads").

## Response `200`

WebSocket node upserted

- ProviderUpsertWSNodeResponse
  - `message` string
  - `node_ws` object
  - `status` string — healthy on success.

## Other responses

- `400` — Invalid request body, non-public URL, or failed newHeads acceptance screening
- `401` — Unauthorized
- `403` — Provider not resolved
- `404` — Plan not found (or not owned by the caller's provider)
- `409` — URL already registered to another plan
- `500` — Internal server error

## Changes

- **2026-09-01** `9afeec0a1706` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/routemesh/apis/routemesh-api/changes/provider/nodes/ws/put.md)

---

[API](https://skmtc.dev/routemesh/apis/routemesh-api.md) · [All operations](https://skmtc.dev/routemesh/apis/routemesh-api/llms.txt) · [OpenAPI document](https://skmtc.dev/routemesh/apis/routemesh-api/revisions/c3b583616868?raw)
