> ## 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 expiration time within subscription

> Set or remove the expiration time of an existing webhook subscription.



## OpenAPI

````yaml /openapi-v1.yaml patch /v1/tx-subscriptions/{subscription_id}/expires_at
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}/expires_at:
    patch:
      tags:
        - subscriptions to transactions
      summary: Update expiration time within subscription
      description: >
        Sets when a subscription expires. Send an RFC 3339 timestamp to move the
        expiry earlier or later, or `null` to make the subscription never
        expire. At the expiry time the subscription is deleted along with its
        wallets, not paused. `GET` shows a subscription that never expires as
        `"expires_at": "9999-12-31T23:59:59Z"`.


        The new value must be at least 1 minute in the future. On the free plan
        (keys of organizations without a paid plan, and `dev` keys that don't
        belong to an organization), you can only move the expiry earlier or send
        the value already stored: a later value or `null` returns `403`.


        An unknown, deleted or already expired subscription returns `404`, so an
        expired subscription can't be brought back.


        **See also:** [Resource
        IDs](https://developers.zerion.io/endpoints-and-schema#resource-ids)
      operationId: UpdateExpiresAtInSubscription
      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
              required:
                - expires_at
              properties:
                expires_at:
                  type: string
                  format: date-time
                  nullable: true
                  description: >
                    New expiry time, as an RFC 3339 timestamp with an offset
                    (`Z` or `+03:00`), or `null` for never. Required: omitting
                    the field returns `400`. A malformed value, or one earlier
                    than 1 minute from now, returns `400`.
                  example: '2026-12-31T00:00:00Z'
      responses:
        '204':
          description: >-
            Expiry updated. Also returned when the new value matches the stored
            one.
        '400':
          $ref: '#/components/responses/MalformedParameters'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '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
    ForbiddenResponse:
      description: Your API key isn't allowed to make this change
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    title:
                      type: string
                      description: Error short title
                      example: Forbidden
                    detail:
                      type: string
                      description: Long description of the error
                      example: unpaid keys can only move expires_at earlier
    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.

````

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