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

# Re-verify and re-enable a subscription

> Re-runs the sink-appropriate probe (dispatched by sink kind) and, on a probe success, transitions the subscription back to `active` and clears any auto-disable in the same transaction. The row is transitioned in place — the id and signing secret are preserved. A classified probe failure is still a `200`. This route is naturally idempotent and requires no `X-Idempotency` header. The `webhook`, `sqs` and `eventbridge` sinks have registered verify probes. For an AWS sink this is the delegated-grant activation path, the alternative to an outbound credential on `PUT /v1/subscriptions/{id}/credential`, which probes every queue kind at write time. Any other sink kind returns `422 probe_unsupported_for_sink_kind`: a `rabbitmq` sink is probed on that credential PUT, which moves `verification_state` alone, and a `pull` subscription has no destination to probe.



## OpenAPI

````yaml /pt/openapi/v3-current/streaming-hub.yaml post /v1/subscriptions/{id}/verify
openapi: 3.1.0
info:
  title: Lerian Streaming Hub API
  version: 1.2.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.


    An RFC 9457 `application/problem+json` error body carries `title` and
    `status`. An error the hub raises adds `type`, `detail`, and a stable
    low-cardinality `code` you can branch on; a request the framework rejects
    before the operation runs, such as a malformed or schema-invalid one,
    carries no `code`. 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.
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: Dashboard
    description: >-
      The read-only operational dashboard: a consistent snapshot of ingestion,
      push delivery, and pull eligibility, plus the paged list of subscriptions
      that need attention. It never consumes events and never returns a secret.
  - 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}/verify:
    post:
      tags:
        - Subscriptions
      summary: Re-verify and re-enable a subscription
      description: >-
        Re-runs the sink-appropriate probe (dispatched by sink kind) and, on a
        probe success, transitions the subscription back to `active` and clears
        any auto-disable in the same transaction. The row is transitioned in
        place — the id and signing secret are preserved. A classified probe
        failure is still a `200`. This route is naturally idempotent and
        requires no `X-Idempotency` header. The `webhook`, `sqs` and
        `eventbridge` sinks have registered verify probes. For an AWS sink this
        is the delegated-grant activation path, the alternative to an outbound
        credential on `PUT /v1/subscriptions/{id}/credential`, which probes
        every queue kind at write time. Any other sink kind returns `422
        probe_unsupported_for_sink_kind`: a `rabbitmq` sink is probed on that
        credential PUT, which moves `verification_state` alone, and a `pull`
        subscription has no destination to probe.
      operationId: verifySubscription
      parameters:
        - $ref: '#/components/parameters/SubscriptionId'
      responses:
        '200':
          description: The probe ran; the body carries the classified result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProbeResult'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ProbeUnsupported'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '504':
          $ref: '#/components/responses/GatewayTimeout'
      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:
    ProbeResult:
      type: object
      additionalProperties: false
      description: >-
        The classified result of a synchronous probe (ping, verify, or
        credential write). A classified failure is still returned with HTTP
        `200` — the probe ran and produced a verdict. It carries no secret or
        endpoint.
      properties:
        outcome:
          $ref: '#/components/schemas/Outcome'
        statusCode:
          type: integer
          description: >-
            The target's protocol status. For webhook probes, the HTTP status
            (`0` when none applies, e.g. a transport error or a blocked
            endpoint). For queue-kind credential probes, always `0`.
          examples:
            - 200
        errorClass:
          type: string
          description: A frozen taxonomy token classifying a failure. Empty on success.
          examples:
            - ''
        detail:
          type: string
          description: >-
            Why the probe failed: the HTTP status the endpoint answered, the
            timeout, the transport cause, the failed AWS step with its AWS code,
            or the class token. Absent on success.
          examples:
            - endpoint answered HTTP 503
      required:
        - outcome
        - statusCode
        - errorClass
    Outcome:
      type: string
      description: The classified verdict of a synchronous probe.
      enum:
        - ok
        - failed
    Error:
      type: object
      description: >-
        RFC 9457 `application/problem+json` document. An error the hub raises
        carries `detail` and the stable `code` a client branches on; a request
        the framework rejects before the operation runs carries no `code`.
      properties:
        type:
          type: string
          format: uri
          description: >-
            A stable, versioned URI identifying the problem type
            (`https://errors.lerian.studio/v1/<code>`).
          examples:
            - https://errors.lerian.studio/v1/not_found
        title:
          type: string
          description: A short human-readable summary — the HTTP status text.
          examples:
            - Not Found
        status:
          type: integer
          description: The HTTP status code, mirrored in the body.
          examples:
            - 404
        detail:
          type: string
          description: A human explanation of this specific occurrence.
          examples:
            - subscription not found
        code:
          type: string
          description: >-
            The stable, low-cardinality, machine-readable token a client
            branches on (for example `not_found`, `unauthorized`,
            `idempotency_conflict`, `validation_error`). Absent when the
            framework rejects the request before the operation runs.
          examples:
            - not_found
        instance:
          type: string
          description: The trace id of the request, when the hub has one.
          examples:
            - 4bf92f3577b34da6a3ce929d0e0e4736
        errors:
          type: array
          description: >-
            When present, the entries name what was refused. On
            `unknown_event_type`, each entry names one refused event type and
            its schema major.
          items:
            type: object
            properties:
              location:
                type: string
                description: The refused field, with its position in a list.
                examples:
                  - event_types/2
              message:
                type: string
                description: Why the hub refused the value.
                examples:
                  - '"transaction.creatd" has no catalog entry at schema major 1'
      required:
        - title
        - status
  responses:
    Unauthorized:
      description: >-
        Authentication failed. `code` names the cause, for example `AUT-0006`
        (no token), `AUT-0007` (an expired, invalid, or malformed token), or
        `unauthorized` (no trusted tenant context).
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        The caller is authenticated but is not allowed to make this request.
        `code` names the cause, for example `AUT-1020` (the credential does not
        have the permission; `detail` names the refused `resource:action`) or
        `forbidden`.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: >-
        The resource is absent, soft-deleted, or owned by another tenant — a
        uniform `code` of `not_found` (no existence oracle).
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
    ProbeUnsupported:
      description: >-
        The sink kind has no registered probe for this operation — `code` is
        `probe_unsupported_for_sink_kind`.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalError:
      description: >-
        An infrastructure fault. `code` is `internal_error` and `detail` is
        scrubbed to the static `"internal error"` (the cause is logged, never
        returned). On a mutation that requires `X-Idempotency`, `code` can
        instead be `idempotency_outcome_unrecorded`: the mutation may have
        committed, and its outcome was not recorded. Read the resource before
        you send anything again.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
    ServiceUnavailable:
      description: >-
        Access Manager did not decide the request. `code` names the cause, for
        example `AUT-0033`. This is a transient condition, not a denial: wait
        the `Retry-After` seconds, then retry.
      headers:
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
    GatewayTimeout:
      description: >-
        Access Manager did not answer in time. `code` names the cause, for
        example `AUT-1021`. Retry the request.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
  headers:
    RetryAfter:
      description: The whole seconds to wait before a retry. Always at least `1`.
      schema:
        type: string
        examples:
          - '1'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        A bearer JWT issued by Access Manager. The `/v1` surface never reads a
        tenant from the body, path, or query. Machine callers obtain a token
        with the Access Manager client-credentials flow. The `/admin` surface
        authorizes against an operator scope and carries no tenant context.

````

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