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

# Lista las suscripciones

> Lista las suscripciones vivas del tenant autenticado, de más reciente a más antigua, con paginación keyset. Ninguna proyección de lectura transporta jamás el secreto de firma.



## OpenAPI

````yaml es/openapi/v3-current/streaming-hub.yaml get /v1/subscriptions
openapi: 3.1.0
info:
  title: Lerian Streaming Hub API
  version: v1.0.0
  contact:
    email: contact@lerian.studio
    name: Lerian Studio
    url: https://lerian.studio
  license:
    name: Lerian Studio General License
  description: >-
    La API de control-plane de Streaming Hub. Streaming Hub es el borde
    gestionado de entrega de eventos de Lerian: consume CloudEvents del backbone
    de streaming interno de la plataforma y los distribuye a los destinos
    externos propios de cada tenant — webhooks, Amazon SQS, RabbitMQ, Amazon
    EventBridge o una bandeja de entrada de tipo pull. Esta API permite a un
    tenant explorar el catálogo de eventos alimentado por el manifest, crear y
    gestionar suscripciones de entrega, verificar y rotar sus credenciales, leer
    la salud de entrega y hacer pull de los eventos a los que tiene derecho.


    Los errores usan un envelope plano `{"error":"<token>"}` (un token de baja
    cardinalidad y legible por máquina — nunca RFC 9457 problem+json). Las
    operaciones de mutación requieren un header `X-Idempotency` para semántica
    at-most-once; una petición reproducida (replay) devuelve la respuesta
    original byte a byte con `X-Idempotency-Replayed: true`. El catálogo y la
    superficie de eventos pull están acotados por tenant a través del JWT
    bearer; los endpoints operacionales de sonda (`/healthz`, `/readyz`,
    `/version`, `/runtime`, `/metrics`) no requieren autenticación. Streaming
    Hub es de código cerrado bajo la Lerian Studio General License.
servers:
  - url: https://streaming-hub.sandbox.lerian.net
security:
  - BearerAuth: []
tags:
  - name: Catalog
    description: >-
      Explora el catálogo de tipos de evento disponibles para suscripción,
      alimentado por el manifest.
  - name: Subscriptions
    description: >-
      Crea, lee, actualiza y elimina suscripciones de entrega, y gestiona el
      ciclo de vida de verificación del destino (ping, verify, credential,
      delegated grant, rotación de secreto, health).
  - name: Event Delivery
    description: >-
      Haz pull de los eventos a los que tienes derecho para una suscripción de
      tipo pull (lectura cursor-as-acknowledgment).
  - name: Admin
    description: >-
      Análisis forense de operador entre tenants. Requiere un scope de
      autorización de operador.
  - name: Operational
    description: >-
      Sondas de liveness, readiness, build, runtime y métricas sin
      autenticación.
paths:
  /v1/subscriptions:
    get:
      tags:
        - Subscriptions
      summary: Lista las suscripciones
      description: >-
        Lista las suscripciones vivas del tenant autenticado, de más reciente a
        más antigua, con paginación keyset. Ninguna proyección de lectura
        transporta jamás el secreto de firma.
      operationId: listSubscriptions
      parameters:
        - name: sink_kind
          in: query
          required: false
          description: Optional filter restricting results to one sink kind.
          schema:
            $ref: '#/components/schemas/SinkKind'
        - name: limit
          in: query
          required: false
          description: >-
            Page size, clamped to a server maximum. A non-positive value uses
            the server default.
          schema:
            type: integer
        - name: after
          in: query
          required: false
          description: >-
            Keyset cursor — the `id` of the last row from the previous page
            (subscriptions are ordered DESC by id).
          schema:
            type: string
      responses:
        '200':
          description: Una página de suscripciones.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSubscriptionsResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - BearerAuth: []
components:
  schemas:
    SinkKind:
      type: string
      description: >-
        The delivery destination kind. `webhook` posts signed HTTPS requests;
        `pull` exposes an inbox read over `GET /v1/events`; `sqs`, `rabbitmq`,
        and `eventbridge` fan out to the named queue or bus.
      enum:
        - webhook
        - pull
        - sqs
        - rabbitmq
        - eventbridge
    ListSubscriptionsResponse:
      type: object
      additionalProperties: false
      properties:
        subscriptions:
          type: array
          items:
            $ref: '#/components/schemas/Subscription'
        next_cursor:
          type: string
          description: >-
            Keyset cursor for the next page (the id of the last row). Non-empty
            only on a full page; an empty string marks the final page.
          examples:
            - 0192f1a0-0000-7000-8000-00000000c002
      required:
        - subscriptions
        - next_cursor
    Subscription:
      type: object
      additionalProperties: false
      description: >-
        The non-secret projection of a subscription. It never carries the
        signing secret or any credential material.
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the subscription (UUIDv7).
          examples:
            - 0192f1a0-0000-7000-8000-00000000c001
        name:
          type: string
          description: The human label supplied at create.
          examples:
            - orders-webhook
        sink_kind:
          $ref: '#/components/schemas/SinkKind'
        endpoint:
          type: string
          description: The destination address (per sink kind).
          examples:
            - https://hooks.example.com/ingest
        event_types:
          type: array
          description: >-
            The event types the subscription delivers. Omitted when none are
            pinned.
          items:
            type: string
          examples:
            - - account.created
              - account.updated
        schema_major:
          type: integer
          description: >-
            The pinned schema major, when set. Omitted when the subscription
            follows the base topic.
          examples:
            - 2
        signature_version:
          type: integer
          description: The webhook signature scheme version.
          examples:
            - 1
        plan_tier:
          type: string
          description: The subscription's plan tier.
          examples:
            - standard
        enabled:
          type: boolean
          description: >-
            The operator on/off flag. Independent of `verification_state`; both
            must hold for delivery.
          examples:
            - true
        verification_state:
          $ref: '#/components/schemas/VerificationState'
        created_at:
          type: string
          format: date-time
          description: Creation timestamp (UTC, RFC 3339).
          examples:
            - '2026-01-15T12:00:00Z'
        updated_at:
          type: string
          format: date-time
          description: Last-update timestamp (UTC, RFC 3339).
          examples:
            - '2026-01-15T12:00:00Z'
      required:
        - id
        - name
        - sink_kind
        - endpoint
        - signature_version
        - plan_tier
        - enabled
        - verification_state
        - created_at
        - updated_at
    Error:
      type: object
      additionalProperties: false
      description: >-
        The flat error envelope used across the `/v1` and `/admin` surfaces. It
        carries a single low-cardinality, machine-readable token and never leaks
        secret material or internal detail. (A `403` from the authorization
        decision point is the one exception — its body is plain text.)
      properties:
        error:
          type: string
          description: The machine-readable error token.
          examples:
            - not_found
      required:
        - error
    VerificationState:
      type: string
      description: >-
        The subscription's position in the destination verification state
        machine. Only an `active` subscription is deliverable. A `webhook` sub
        is born `active`; a queue sub is born `pending_verification` and reaches
        `active` on a successful credential probe. `degraded` and `disabled`
        signal an impaired or auto-disabled destination that a successful
        `verify` returns to `active`.
      enum:
        - pending_verification
        - active
        - degraded
        - disabled
  responses:
    Unauthorized:
      description: >-
        La autenticación falló, o no hay contexto de tenant confiable. `error`
        es `unauthorized` (cuerpo uniforme — no se revela ninguna razón).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        El punto de decisión de autorización denegó la petición. El cuerpo es
        texto plano (no el envelope de error JSON).
      content:
        text/plain:
          schema:
            type: string
    InternalError:
      description: >-
        Un fallo de infraestructura. `error` es `internal_error` (sanitizado; el
        detalle se registra, nunca se devuelve).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Un JWT bearer emitido por plugin-auth (lib-auth). La identidad del
        tenant se resuelve a partir de los claims validados del token; la
        superficie `/v1` nunca lee un tenant del cuerpo, del path ni de la
        query. Los llamadores de máquina obtienen un token vía el flujo
        client-credentials de plugin-auth. La superficie `/admin` autoriza
        contra un scope de operador y no lleva contexto de tenant.

````