---
title: "Creates a new relayer."
method: POST
path: "/api/v1/relayers"
tags: ["Relayers"]
---

# Creates a new relayer.

`POST /api/v1/relayers`

## Request body

- CreateRelayerRequest — Request model for creating a new relayer
  - `custom_rpc_urls` RpcConfig[]
    - `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.
  - `id` string
  - `name` string, required
  - `network` string, required
  - `network_type` 'evm' | 'solana' | 'stellar', required — Network type enum for relayers
  - `notification_id` string
  - `paused` boolean, required
  - `policies` union — Policy types for create requests - deserialized based on network_type from parent request
    - RelayerEvmPolicy — EVM-specific relayer policy configuration
      - `eip1559_pricing` boolean, nullable
      - `gas_limit_estimation` boolean, nullable
      - `gas_price_cap` integer, nullable
      - `include_revert_data` boolean, nullable
      - `min_balance` integer, nullable
      - `private_transactions` boolean, nullable
      - `whitelist_receivers` string[], nullable
    - RelayerSolanaPolicy — Solana-specific relayer policy configuration
      - `allowed_accounts` string[], nullable
      - `allowed_programs` string[], nullable
      - `allowed_tokens` SolanaAllowedTokensPolicy[], nullable
        - `decimals` integer
        - `max_allowed_fee` integer
        - `mint` string, required
        - `swap_config` SolanaAllowedTokensSwapConfig — Solana token swap configuration
          - `max_amount` integer — Maximum amount of tokens to swap. Optional.
          - `min_amount` integer — Minimum amount of tokens to swap. Optional.
          - `retain_min_amount` integer — Minimum amount of tokens to retain after swap. Optional.
          - `slippage_percentage` number, float — Conversion slippage percentage for token. Optional.
        - `symbol` string
      - `disallowed_accounts` string[], nullable
      - `fee_margin_percentage` number, float, nullable
      - `fee_payment_strategy` 'user' | 'relayer' — Solana fee payment strategy Determines who pays transaction fees: - `User`: User must include fee payment to relayer in transaction (for custom RPC methods) - `Relayer`: Relayer pays all transaction fees (recommended for send transaction endpoint) Default is `User`.
      - `max_allowed_fee_lamports` integer, nullable
      - `max_signatures` integer, nullable
      - `max_tx_data_size` integer, nullable
      - `min_balance` integer, nullable
      - `swap_config` RelayerSolanaSwapConfig — Solana swap policy configuration
        - `cron_schedule` string — Cron schedule for executing token swap logic to keep relayer funded. Optional.
        - `jupiter_swap_options` JupiterSwapOptions — Jupiter swap options
          - `dynamic_compute_unit_limit` boolean
          - `priority_fee_max_lamports` integer — Maximum priority fee (in lamports) for a transaction. Optional.
          - `priority_level` string — Priority. Optional.
        - `min_balance_threshold` integer — Min sol balance to execute token swap logic to keep relayer funded. Optional.
        - `strategy` 'jupiter-swap' | 'jupiter-ultra' | 'noop' — Solana swap strategy
    - RelayerStellarPolicy — Stellar-specific relayer policy configuration
      - `allowed_tokens` StellarAllowedTokensPolicy[], nullable
        - `asset` string, required
        - `max_allowed_fee` integer
        - `metadata` StellarTokenMetadata
          - `canonical_asset_id` string, required
          - `decimals` integer, required
          - `kind` union, required
            - 'native'
            - object
              - …
            - object
              - …
        - `swap_config` StellarAllowedTokensSwapConfig — Stellar token swap configuration
          - `max_amount` integer — Maximum amount of tokens to swap. Optional.
          - `min_amount` integer — Minimum amount of tokens to swap. Optional.
          - `retain_min_amount` integer — Minimum amount of tokens to retain after swap. Optional.
          - `slippage_percentage` number, float — Conversion slippage percentage for token. Optional.
      - `concurrent_transactions` boolean, nullable
      - `fee_margin_percentage` number, float, nullable
      - `fee_payment_strategy` 'user' | 'relayer' — Stellar fee payment strategy Determines who pays transaction fees: - `User`: User must include fee payment to relayer in transaction (for custom RPC methods) - `Relayer`: Relayer pays all transaction fees (recommended for send transaction endpoint)
      - `max_fee` integer, nullable
      - `min_balance` integer, nullable
      - `slippage_percentage` number, float, nullable
      - `swap_config` RelayerStellarSwapConfig — Stellar swap policy configuration
        - `cron_schedule` string — Cron schedule for executing token swap logic to keep relayer funded. Optional.
        - `min_balance_threshold` integer — Min XLM balance (in stroops) to execute token swap logic to keep relayer funded. Optional.
        - `strategies` StellarSwapStrategy[] — DEX strategies to use for token swaps, in priority order. Strategies are tried sequentially until one can handle the asset.
      - `timeout_seconds` integer, nullable
  - `signer_id` string, required

## Response `201`

Relayer created successfully

- ApiResponseRelayerResponse
  - `data` object — Relayer response model for API endpoints
    - `address` string
    - `custom_rpc_urls` MaskedRpcConfig[] — Custom RPC URLs with sensitive path/query parameters masked for security. The domain is visible to identify providers (e.g., Alchemy, Infura) but API keys embedded in paths are hidden.
      - `url` string, required — The RPC endpoint URL with path/query masked.
      - `weight` integer, required — The weight of this endpoint in the weighted round-robin selection.
    - `disabled_reason` union — Reason for a relayer being disabled by the system This represents persistent state, converted from HealthCheckFailure when disabling
      - object — Nonce synchronization failed during initialization
        - `details` string, required — Nonce synchronization failed during initialization
        - `type` 'NonceSyncFailed', required
      - object — RPC endpoint validation failed
        - `details` string, required — RPC endpoint validation failed
        - `type` 'RpcValidationFailed', required
      - object — Balance check failed (below minimum threshold)
        - `details` string, required — Balance check failed (below minimum threshold)
        - `type` 'BalanceCheckFailed', required
      - object — Sequence number synchronization failed (Stellar)
        - `details` string, required — Sequence number synchronization failed (Stellar)
        - `type` 'SequenceSyncFailed', required
      - object — Multiple failures occurred simultaneously
        - `details` string[], required — Multiple failures occurred simultaneously
        - `type` 'Multiple', required
    - `id` string, required
    - `name` string, required
    - `network` string, required
    - `network_type` 'evm' | 'solana' | 'stellar', required — Network type enum for relayers
    - `notification_id` string
    - `paused` boolean, required
    - `policies` union — Policy types for responses - these don't include network_type tags since the network_type is already available at the top level of RelayerResponse
      - EvmPolicyResponse — EVM policy response model for OpenAPI documentation
        - `eip1559_pricing` boolean
        - `gas_limit_estimation` boolean
        - `gas_price_cap` integer
        - `include_revert_data` boolean
        - `min_balance` integer
        - `private_transactions` boolean
        - `whitelist_receivers` string[]
      - StellarPolicyResponse — Stellar policy response model for OpenAPI documentation
        - `allowed_tokens` StellarAllowedTokensPolicy[]
          - `asset` string, required
          - `max_allowed_fee` integer
          - `metadata` StellarTokenMetadata
            - `canonical_asset_id` string, required
            - `decimals` integer, required
            - `kind` union, required
              - …
          - `swap_config` StellarAllowedTokensSwapConfig — Stellar token swap configuration
            - `max_amount` integer — Maximum amount of tokens to swap. Optional.
            - `min_amount` integer — Minimum amount of tokens to swap. Optional.
            - `retain_min_amount` integer — Minimum amount of tokens to retain after swap. Optional.
            - `slippage_percentage` number, float — Conversion slippage percentage for token. Optional.
        - `concurrent_transactions` boolean
        - `fee_margin_percentage` number, float
        - `fee_payment_strategy` 'user' | 'relayer' — Stellar fee payment strategy Determines who pays transaction fees: - `User`: User must include fee payment to relayer in transaction (for custom RPC methods) - `Relayer`: Relayer pays all transaction fees (recommended for send transaction endpoint)
        - `max_fee` integer
        - `min_balance` integer
        - `slippage_percentage` number, float
        - `swap_config` RelayerStellarSwapConfig — Stellar swap policy configuration
          - `cron_schedule` string — Cron schedule for executing token swap logic to keep relayer funded. Optional.
          - `min_balance_threshold` integer — Min XLM balance (in stroops) to execute token swap logic to keep relayer funded. Optional.
          - `strategies` StellarSwapStrategy[] — DEX strategies to use for token swaps, in priority order. Strategies are tried sequentially until one can handle the asset.
        - `timeout_seconds` integer
      - SolanaPolicyResponse — Solana policy response model for OpenAPI documentation
        - `allowed_accounts` string[]
        - `allowed_programs` string[]
        - `allowed_tokens` SolanaAllowedTokensPolicy[]
          - `decimals` integer
          - `max_allowed_fee` integer
          - `mint` string, required
          - `swap_config` SolanaAllowedTokensSwapConfig — Solana token swap configuration
            - `max_amount` integer — Maximum amount of tokens to swap. Optional.
            - `min_amount` integer — Minimum amount of tokens to swap. Optional.
            - `retain_min_amount` integer — Minimum amount of tokens to retain after swap. Optional.
            - `slippage_percentage` number, float — Conversion slippage percentage for token. Optional.
          - `symbol` string
        - `disallowed_accounts` string[]
        - `fee_margin_percentage` number, float
        - `fee_payment_strategy` 'user' | 'relayer' — Solana fee payment strategy Determines who pays transaction fees: - `User`: User must include fee payment to relayer in transaction (for custom RPC methods) - `Relayer`: Relayer pays all transaction fees (recommended for send transaction endpoint) Default is `User`.
        - `max_allowed_fee_lamports` integer
        - `max_signatures` integer
        - `max_tx_data_size` integer
        - `min_balance` integer
        - `swap_config` RelayerSolanaSwapConfig — Solana swap policy configuration
          - `cron_schedule` string — Cron schedule for executing token swap logic to keep relayer funded. Optional.
          - `jupiter_swap_options` JupiterSwapOptions — Jupiter swap options
            - `dynamic_compute_unit_limit` boolean
            - `priority_fee_max_lamports` integer — Maximum priority fee (in lamports) for a transaction. Optional.
            - `priority_level` string — Priority. Optional.
          - `min_balance_threshold` integer — Min sol balance to execute token swap logic to keep relayer funded. Optional.
          - `strategy` 'jupiter-swap' | 'jupiter-ultra' | 'noop' — Solana swap strategy
    - `signer_id` string, required
    - `system_disabled` boolean
  - `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
- `401` — Unauthorized
- `409` — Relayer with this ID already exists
- `500` — Internal Server Error

---

[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)
