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

# Ping a webhook subscription

> Runs a synchronous, signed webhook probe through the production delivery path and returns the classified result. A successful ping flips a `webhook` subscription from `pending_verification` to `active`. A classified probe failure is still a `200` (the probe ran and produced a verdict). This route is naturally idempotent and requires no `X-Idempotency` header. A queue subscription has no ping probe and returns `422 probe_unsupported_for_sink_kind`.



## OpenAPI

````yaml en/openapi/v3-current/streaming-hub.yaml post /v1/subscriptions/{id}/ping
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 follow RFC 9457 `application/problem+json`: every hub-owned error
    body carries `type`, `title`, `status`, `detail`, and a stable
    low-cardinality `code` you can branch on. For `5xx` responses the `detail`
    is scrubbed to a static `"internal error"` so no internal cause leaks.
    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}/ping:
    post:
      tags:
        - Subscriptions
      summary: Ping a webhook subscription
      description: >-
        Runs a synchronous, signed webhook probe through the production delivery
        path and returns the classified result. A successful ping flips a
        `webhook` subscription from `pending_verification` to `active`. A
        classified probe failure is still a `200` (the probe ran and produced a
        verdict). This route is naturally idempotent and requires no
        `X-Idempotency` header. A queue subscription has no ping probe and
        returns `422 probe_unsupported_for_sink_kind`.
      operationId: pingSubscription
      parameters:
        - $ref: '#/components/parameters/SubscriptionId'
      responses:
        '200':
          description: The probe ran; the body carries the classified attempt 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'
      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,
        endpoint, or detail string.
      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:
            - ''
      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 returned for every
        hub-owned error across the `/v1` and `/admin` surfaces. The stable
        `code` is what a client branches on; `detail` is a caller-safe
        explanation and, for any `5xx`, is centrally scrubbed to `"internal
        error"` so no internal cause can leak. (A `403` from the authorization
        decision point ahead of the hub is the one exception — its body is plain
        text.)
      properties:
        type:
          type: string
          format: uri
          description: >-
            A stable, versioned URI identifying the problem type
            (`https://errors.lerian.studio/v1/<code>`), or `about:blank` for
            problems without a hub-assigned 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 caller-safe human explanation of this specific occurrence. For
            `5xx` responses this is always the static string `"internal error"`.
          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`). Empty for huma-native
            validation faults.
          examples:
            - not_found
      required:
        - type
        - title
        - status
  responses:
    Unauthorized:
      description: >-
        Authentication failed, or there is no trusted tenant context. `code` is
        `unauthorized` (uniform body — no reason is leaked).
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        The authorization decision point denied the request. The body is emitted
        by lib-auth ahead of the hub and is currently plain text (not
        `application/problem+json`).
      content:
        text/plain:
          schema:
            type: string
    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).
      content:
        application/problem+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.

````