> ## 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.

# Get a subscription

> Returns one subscription scoped to the authenticated tenant. An absent, soft-deleted, or cross-tenant id returns a uniform `404 not_found` (no existence oracle). The response never carries the signing secret.



## OpenAPI

````yaml en/openapi/v3-current/streaming-hub.yaml get /v1/subscriptions/{id}
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: >-
    The Streaming Hub control-plane API. Streaming Hub is Lerian's managed
    event-delivery edge: it consumes CloudEvents from the platform's internal
    streaming backbone and fans them out to a tenant's own external destinations
    — webhooks, Amazon SQS, RabbitMQ, Amazon EventBridge, or a pull inbox. This
    API lets a tenant browse the manifest-fed event catalog, create and manage
    delivery subscriptions, verify and rotate their credentials, read delivery
    health, and pull entitled events.


    Errors use a flat `{"error":"<token>"}` envelope (a low-cardinality,
    machine-readable token — never RFC 9457 problem+json). Mutating operations
    require an `X-Idempotency` header for at-most-once semantics; a replayed
    request returns the original response byte-for-byte with
    `X-Idempotency-Replayed: true`. The catalog and the pull events surface are
    tenant-scoped through the bearer JWT; the operational probe endpoints
    (`/healthz`, `/readyz`, `/version`, `/runtime`, `/metrics`) are
    unauthenticated. Streaming Hub is closed source under the Lerian Studio
    General License.
servers:
  - url: https://streaming-hub.sandbox.lerian.net
security:
  - BearerAuth: []
tags:
  - name: Catalog
    description: Browse the manifest-fed catalog of event types available for subscription.
  - name: Subscriptions
    description: >-
      Create, read, update, and delete delivery subscriptions, and drive the
      destination verification lifecycle (ping, verify, credential, delegated
      grant, secret rotation, health).
  - name: Event Delivery
    description: >-
      Pull entitled events for a pull-sink subscription
      (cursor-as-acknowledgment read).
  - name: Admin
    description: Cross-tenant operator forensics. Requires an operator authorization scope.
  - name: Operational
    description: Unauthenticated liveness, readiness, build, runtime, and metrics probes.
paths:
  /v1/subscriptions/{id}:
    get:
      tags:
        - Subscriptions
      summary: Get a subscription
      description: >-
        Returns one subscription scoped to the authenticated tenant. An absent,
        soft-deleted, or cross-tenant id returns a uniform `404 not_found` (no
        existence oracle). The response never carries the signing secret.
      operationId: getSubscription
      parameters:
        - $ref: '#/components/parameters/SubscriptionId'
      responses:
        '200':
          description: The subscription.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - BearerAuth: []
components:
  parameters:
    SubscriptionId:
      name: id
      in: path
      required: true
      description: The unique identifier of the subscription (UUIDv7).
      schema:
        type: string
        format: uuid
  schemas:
    SubscriptionResponse:
      type: object
      additionalProperties: false
      properties:
        subscription:
          $ref: '#/components/schemas/Subscription'
      required:
        - subscription
    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
    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
    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: >-
        Authentication failed, or there is no trusted tenant context. `error` is
        `unauthorized` (uniform body — no reason is leaked).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        The authorization decision point denied the request. The body is plain
        text (not the JSON error envelope).
      content:
        text/plain:
          schema:
            type: string
    NotFound:
      description: >-
        The resource is absent, soft-deleted, or owned by another tenant — a
        uniform `error` of `not_found` (no existence oracle).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalError:
      description: >-
        An infrastructure fault. `error` is `internal_error` (sanitized; detail
        is logged, never returned).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        A bearer JWT issued by plugin-auth (lib-auth). The tenant identity is
        resolved from the validated token claims; the `/v1` surface never reads
        a tenant from the body, path, or query. Machine callers obtain a token
        via the plugin-auth client-credentials flow. The `/admin` surface
        authorizes against an operator scope and carries no tenant context.

````