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

# GET /v1/meta/webhook-keys — active Ed25519 public keys for verifying
inbound webhook signatures.

> Lifted from the GitHub pattern (`GET /meta` with `ssh_keys`).
During key rotation we publish BOTH the outgoing primary AND the
incoming secondary here, so receivers can pre-trust the new key
before we cut over. See `pegana_common::webhook_sign` for the
full rotation playbook.



## OpenAPI

````yaml https://api.pegana.xyz/openapi.json get /v1/meta/webhook-keys
openapi: 3.1.0
info:
  title: Pegana API
  description: >-
    The peg-risk oracle for Solana. Read real-time peg state, history, alerts,
    and delivery health across 26 active mainnet assets spanning 6 classes —
    LSTs, fiat / CDP / delta-neutral / yield-bearing / FX stables, and a
    leveraged synthetic. Some assets are flagged `monitoring_only` (beta): their
    alerts are live but the calibration is provisional. Public read endpoints
    require no API key but ARE rate-limited per IP (300/min global, 10/min on
    /v1/audit.csv); exceeding the limit returns 429 with a Retry-After header.
    User-scoped /v1/me/* routes require a JWT obtained via Telegram Login. Every
    state transition emits a public receipt at /v1/audit/{id} with the
    methodology version, frozen inputs, and an on-chain SPL Memo commit (SAS
    deferred per ADR-0004 — SPL Memo gives 90% of the value). EVERY error
    response across the API is JSON — the envelope is `{error, message, asset?}`
    (the `ApiError` schema); branch on the stable `error` code, never on
    `message`. Malformed request bodies surface as `{error:"invalid_body"}`. Any
    endpoint may also return 500 `{error:"internal"}` on an unexpected server
    error.
  contact:
    name: Rafael Souza
    email: raffxweb3@gmail.com
  license:
    name: MIT
    identifier: MIT
  version: 0.1.0
servers:
  - url: https://api.pegana.xyz
    description: Production
security: []
tags:
  - name: Health
    description: Liveness and readiness probes
  - name: Assets
    description: Public read access to asset state, history, and metadata
  - name: Alerts
    description: Global feed of state transitions
  - name: Stats
    description: Aggregate counters and delivery health
  - name: Auth
    description: Telegram Login Widget → JWT
  - name: Me
    description: Authenticated user profile and preferences
  - name: Subscriptions
    description: User alert subscriptions
  - name: Webhooks
    description: User-managed Ed25519-signed webhooks
  - name: WebSocket
    description: Live state stream
  - name: audit
    description: >-
      Public receipts for alerts — methodology version, inputs frozen, replay
      bundles. All endpoints public, no auth, cacheable. ADR-0006 four-state
      response on /v1/audit/:id (200/202/404/410); ADR-0014 bounds (90-day max,
      100-row max, 50k-row cap).
  - name: methodology
    description: >-
      Public lifecycle status of the active methodology — version + status
      (active/deprecated/broken) + optional fix_url when broken. Consumed by
      web/app/api/methodology to power the home-page trust strip.
  - name: peg
    description: >-
      Mint-keyed peg-signal feed for tokens.xyz / aggregator consumption.
      Public, no auth, cacheable. Honest beta status via `calibration` +
      `monitoring_only`; freshness via `as_of` + `stale`.
paths:
  /v1/meta/webhook-keys:
    get:
      tags:
        - Health
      summary: |-
        GET /v1/meta/webhook-keys — active Ed25519 public keys for verifying
        inbound webhook signatures.
      description: |-
        Lifted from the GitHub pattern (`GET /meta` with `ssh_keys`).
        During key rotation we publish BOTH the outgoing primary AND the
        incoming secondary here, so receivers can pre-trust the new key
        before we cut over. See `pegana_common::webhook_sign` for the
        full rotation playbook.
      operationId: webhook_keys
      responses:
        '200':
          description: Active webhook-signer public keys
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookKeysResponse'
components:
  schemas:
    WebhookKeysResponse:
      type: object
      required:
        - pubkeys_b64
        - recheck_after
      properties:
        pubkeys_b64:
          type: array
          items:
            type: string
          description: |-
            Base64-encoded Ed25519 public keys currently signing outbound
            webhooks. Index 0 is the **primary** (every new delivery is
            signed with this); index 1 (when present) is the **secondary**,
            active only during a rotation window. Receivers should trust
            ANY of the listed keys when verifying `x-pegana-signature`.
        recheck_after:
          type: string
          format: date-time
          description: |-
            Hint to refresh weekly — during a rotation this list flips
            from `[A]` → `[A, B]` → `[B]` over the rotation window. Polling
            at least once between deploys is enough to follow it.

````