> ## Documentation Index
> Fetch the complete documentation index at: https://developers.zerion.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update chain IDs within subscription

> Change which chains a webhook subscription monitors, replacing the current chain list.



## OpenAPI

````yaml /openapi-v1.yaml patch /v1/tx-subscriptions/{subscription_id}/chain_ids
openapi: 3.0.3
info:
  version: 1.0.0
  title: REST API
  description: REST-like API provides access to rich Zerion ecosystem.
  contact:
    name: Zerion API
    url: https://developers.zerion.io/
    email: api@zerion.io
servers:
  - description: Production API
    url: https://api.zerion.io
security:
  - APIKeyBasicAuth: []
tags:
  - name: wallets
    description: >-
      Operations related to wallets, such as portfolio charts, positions, and
      transactions.
  - name: wallet sets
    description: >-
      Operations on a wallet set, returning aggregated portfolio data across at
      most one EVM address and one Solana address queried together.
  - name: fungibles
    description: >-
      Operations related to fungible assets, such as list them all, search or
      get by ID.
  - name: chains
    description: Operations related to chains, such as list all chains.
  - name: swap
    description: Operations related to swapping and bridging assets.
  - name: gas
    description: Operations related to gas.
  - name: nfts
    description: >-
      Operations related to non fungible assets, such list them, search or get
      by ID.
  - name: dapps
    description: >-
      Operations related to decentralized applications, such as list them all,
      search or get by ID.
  - name: subscriptions to transactions
    description: Operations related to subscriptions to transactions.
paths:
  /v1/tx-subscriptions/{subscription_id}/chain_ids:
    patch:
      tags:
        - subscriptions to transactions
      summary: Update chain IDs within subscription
      description: >
        Updates the chains a subscription covers. The chain IDs you send replace
        the existing list rather than adding to it.


        **See also:** [Resource
        IDs](https://developers.zerion.io/endpoints-and-schema#resource-ids)
      operationId: UpdateChainIdsInSubscription
      parameters:
        - name: subscription_id
          in: path
          required: true
          description: ID of the subscription.
          schema:
            type: string
            example: 77e77447-1586-40e8-a75b-467ef939a0b1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                chain_ids:
                  type: array
                  description: >
                    Chain IDs to replace the subscription's current chain list
                    with. Only chains reporting both `supports_transactions` and
                    `supports_positions` in the `flags` of `GET /v1/chains/` are
                    accepted here.

                    Naming a chain that fails that gate returns `400` rather
                    than an empty result, with `detail` reading `chain <id> does
                    not support transactions`. That `detail` names the
                    endpoint's capability rather than the flag that failed, so
                    `bob` is refused with `chain bob does not support
                    transactions` even though it reports
                    `supports_transactions`. What it lacks is
                    `supports_positions`.

                    Leave the list empty to cover every chain that passes the
                    gate. Chains that fail it are left out silently, with no
                    error and no `meta` signal.
                  items:
                    type: string
                    description: A chain ID.
                    example: ethereum
      responses:
        '200':
          description: Chain IDs updated.
        '400':
          $ref: '#/components/responses/MalformedParameters'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  responses:
    MalformedParameters:
      description: Parameters are malformed
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    title:
                      type: string
                      description: Error short title
                      example: Parameter is malformed
                    detail:
                      type: string
                      description: Long description of the error
                      example: Some validation errors will be described here
    UnauthenticatedError:
      description: Unathenticated request
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    title:
                      type: string
                      description: Error short title
                      example: Unauthorized Error
                    detail:
                      type: string
                      description: Long description of the error
                      example: >-
                        The API key is invalid, please, make sure that you are
                        using a valid key
    TooManyRequests:
      description: Too many requests error
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    title:
                      type: string
                      description: Error short title
                      example: Too many requests
                    detail:
                      type: string
                      description: Long description of the error
                      example: Your request had been throttled
  securitySchemes:
    APIKeyBasicAuth:
      type: http
      scheme: basic
      description: >-
        To test endpoints here, paste your API key from the
        [Dashboard](https://dashboard.zerion.io/) into the username field and
        leave the password empty.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.