---
title: "Updates a network's configuration.
Currently supports updating RPC URLs only. Can be extended to support other fields."
method: PATCH
path: "/api/v1/networks/{network_id}"
tags: ["Networks"]
---

# Updates a network's configuration.
Currently supports updating RPC URLs only. Can be extended to support other fields.

`PATCH /api/v1/networks/{network_id}`

## Path parameters

- `network_id` string, required

## Request body

- UpdateNetworkRequest — Request structure for updating a network configuration. Currently supports updating RPC URLs only. Can be extended to support other fields.
  - `rpc_urls` RpcUrlEntry[] — List of RPC endpoint configurations for connecting to the network. Supports multiple formats: - Array of strings: `["https://rpc.example.com"]` (defaults to weight 100) - Array of RpcConfig objects: `[{"url": "https://rpc.example.com", "weight": 100}]` - Mixed array: `["https://rpc1.com", {"url": "https://rpc2.com", "weight": 100}]` Must be non-empty and contain valid HTTP/HTTPS URLs if provided.
    - union — Schema-only type representing a flexible RPC URL entry. Used for OpenAPI documentation to show that rpc_urls can accept either strings or RpcConfig objects. This is NOT used for actual deserialization - the custom deserializer handles the conversion. This type exists solely for schema generation.
      - string — Simple string format (e.g., "https://rpc.example.com") Defaults to weight 100.
      - RpcConfig — Configuration for an RPC endpoint. This struct contains only persistent configuration (URL and weight). Health metadata (failures, pause state) is managed separately via `RpcHealthStore`.
        - `url` string, required — The RPC endpoint URL.
        - `weight` integer, required — The weight of this endpoint in the weighted round-robin selection. Defaults to [`DEFAULT_RPC_WEIGHT`]. Should be between 0 and 100.

## Response `200`

Network updated successfully

- ApiResponseNetworkResponse
  - `data` object — Network response model for API endpoints. This flattens the internal NetworkRepoModel structure for API responses, making network-type-specific fields available at the top level.
    - `average_blocktime_ms` integer — Estimated average time between blocks in milliseconds
    - `chain_id` integer — EVM-specific: Chain ID
    - `explorer_urls` string[] — List of Explorer endpoint URLs
    - `features` string[] — EVM-specific: Network features (e.g., "eip1559")
    - `horizon_url` string — Stellar-specific: Horizon URL
    - `id` string, required — Unique identifier composed of network_type and name, e.g., "evm:mainnet"
    - `is_testnet` boolean — Flag indicating if the network is a testnet
    - `name` string, required — Name of the network (e.g., "mainnet", "sepolia")
    - `network_type` 'evm' | 'solana' | 'stellar', required — Network type enum for relayers
    - `passphrase` string — Stellar-specific: Network passphrase
    - `required_confirmations` integer — EVM-specific: Required confirmations
    - `rpc_urls` RpcConfig[] — List of RPC endpoint configurations
      - `url` string, required — The RPC endpoint URL.
      - `weight` integer, required — The weight of this endpoint in the weighted round-robin selection. Defaults to [`DEFAULT_RPC_WEIGHT`]. Should be between 0 and 100.
    - `symbol` string — EVM-specific: Native token symbol
    - `tags` string[] — List of arbitrary tags for categorizing or filtering networks
  - `error` string
  - `metadata` PluginMetadata
    - `logs` LogEntry[], nullable
      - `level` 'log' | 'info' | 'error' | 'warn' | 'debug' | 'result', required
      - `message` string, required
    - `traces` unknown[], nullable
      - unknown
  - `pagination` PaginationMeta
    - `current_page` integer, required
    - `per_page` integer, required
    - `total_items` integer, required
  - `success` boolean, required

## Other responses

- `400` — Bad Request - invalid network type or request data
- `401` — Unauthorized
- `404` — Not Found
- `500` — Internal Server Error

## Changes

- **2026-01-12** `41cbb68dc72d` — 1 info
  - endpoint added
- **2025-10-31** `5487da58bf15` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/openzeppelin/apis/openzeppelin-relayer-api/changes/api/v1/networks/:network_id/patch.md)

---

[API](https://skmtc.dev/openzeppelin/apis/openzeppelin-relayer-api.md) · [All operations](https://skmtc.dev/openzeppelin/apis/openzeppelin-relayer-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openzeppelin/openzeppelin-relayer-api/revisions/e6e7514284f5/schema)
