> ## 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 filters within subscription

> Replace or clear the event filters on an existing webhook subscription.



## OpenAPI

````yaml /openapi-v1.yaml patch /v1/tx-subscriptions/{subscription_id}/filters
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 — 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}/filters:
    patch:
      tags:
        - subscriptions to transactions
      summary: Update filters within subscription
      description: >
        Replaces or clears the event filters on a subscription. Omit `filters`
        to leave the stored value unchanged, send `filters: null` to clear it,
        or send an object to replace it. A replacement is wholesale, not merged:
        an object that sets `exclude.types` but not `exclude.is_spam` clears any
        previously stored `is_spam` condition along with everything else that
        isn't in the new object.


        **See also:** [Resource
        IDs](https://developers.zerion.io/endpoints-and-schema#resource-ids)
      operationId: UpdateFiltersInSubscription
      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:
                filters:
                  $ref: '#/components/schemas/Filters'
      responses:
        '204':
          description: >-
            Successfully updated filters, including a no-op when the value was
            already unchanged
        '400':
          $ref: '#/components/responses/MalformedParameters'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  schemas:
    Filters:
      type: object
      nullable: true
      description: >
        Exclusion filters for the subscription. Conditions are combined with OR:
        an

        event matching any one of them is dropped and no webhook is delivered
        for it.

        Filters are absent from the response when none are set. What omitting
        the

        field or sending `null` means is specific to the request that carries it
        —

        see that operation's own description.


        Field paths below refer to the delivered webhook transaction payload,
        not to

        this subscription resource. A condition does not match an event lacking
        the

        value it compares, so an event with no `dapp` is not excluded by

        `protocol_ids`.
      required:
        - exclude
      properties:
        exclude:
          type: object
          description: Conditions that drop an event. At least one must be present.
          properties:
            types:
              type: array
              description: >
                Drop events by transaction type, matched against

                `attributes.operation_type` — not the resource-level `type`
                (always

                `"transactions"`), nor the per-act `acts[].type`.
              items:
                type: string
                example: send
            is_spam:
              type: boolean
              description: |
                Drop events classified as spam, delivered as
                `attributes.flags.is_trash`; there is no `is_spam` field in the
                payload. Only `true` is accepted.
              example: true
            protocol_ids:
              type: array
              description: >
                Drop events by protocol, matched against `relationships.dapp.id`
                only.
              items:
                type: string
                example: uniswap-v3
            addresses:
              type: array
              description: >
                Drop events by address, matched against `attributes.sent_from`
                and

                `attributes.sent_to` only.
              items:
                type: string
                example: '0x0000000000000000000000000000000000000001'
  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
    NotFoundResponse:
      description: Resource was not found
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    title:
                      type: string
                      description: Error short title
                      example: Resource was not found
                    detail:
                      type: string
                      description: Long description of the error
                      example: Requested resource was not found, try later
    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.

````