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

# Verify certificate

> Verify an IntegrityCertificate.



## OpenAPI

````yaml POST /verify
openapi: 3.1.0
info:
  title: Mnemom API
  description: >-
    Trust infrastructure for AI agents. Transparent alignment verification,
    behavioral drift detection, and accountability primitives.
  version: 1.0.0
  contact:
    name: Mnemom
    url: https://mnemom.ai
    email: support@mnemom.ai
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
  - url: https://api.mnemom.ai/v1
    description: Production
security:
  - BearerAuth: []
  - ApiKeyAuth: []
tags:
  - name: A2A
    description: >-
      Public A2A AgentCard projection of the canonical alignment card, with
      embedded AAP attestation extension (cards-as-primitive Phase 5).
  - name: Agents
    description: Agent registration, lifecycle, and metadata.
  - name: Agent Containment
    description: Containment policies and quarantine controls.
  - name: Alignment
    description: >-
      Alignment manifest CRUD — canonical `/v1/alignment/<scope>/<scope_id>`
      surface across platform / org / team / agent (cards-as-primitive Phase 4).
  - name: Analyze
    description: Behavioral analysis endpoints.
  - name: Attestation
    description: >-
      AAP attestation token JWKS surface and platform-admin signing-key rotation
      (cards-as-primitive Phase 5).
  - name: Auth
    description: Authentication, sessions, and access management.
  - name: Billing
    description: Subscription, usage, and invoicing.
  - name: Blog
    description: Public blog content.
  - name: Card Templates
    description: Org-level alignment and protection card templates.
  - name: Catalog
    description: >-
      Discovery surface for the 25-entry Mnemom value catalog v1
      (cards-as-primitive Phase 4).
  - name: Checkpoints
    description: Integrity checkpoints and proof artifacts.
  - name: Conscience Values
    description: Org-level conscience-value configuration.
  - name: Drift
    description: Drift detection and resolution.
  - name: Enforcement
    description: Enforcement-mode configuration and queries.
  - name: Governance
    description: Operator-actionable governance signals (ADR-048).
  - name: Integrity
    description: AIP integrity checkpoints and verdicts.
  - name: Intelligence
    description: Intelligence reports and queries.
  - name: Licensing
    description: License management.
  - name: Network
    description: >-
      Protection Network L4 thermometer read surface. Public-aggregate
      disclosure: any authenticated principal may read; rows carry no per-tenant
      identifiers.
  - name: OAuth
    description: >-
      OAuth 2.1 authorization-code + PKCE flow for MCP clients (MNE-328).
      Identity delegated to Supabase GoTrue; mnemom-api mints its own
      short-lived MCP-scoped tokens. Includes RFC 7591 dynamic client
      registration and RFC 7009 revocation.
  - name: On-Chain
    description: On-chain verification and proofs.
  - name: Organizations
    description: Org-level resources and management.
  - name: Policy
    description: Policy evaluation and configuration.
  - name: Postures
    description: Trust posture management (ADR-045).
  - name: Protection
    description: >-
      Protection manifest CRUD — canonical `/v1/protection/<scope>/<scope_id>`
      surface across platform / org / team / agent (cards-as-primitive Phase 4).
  - name: Recipes
    description: >-
      Customer-facing detection-recipe surface — FN/FP reports. Distinct from
      the Admin recipe-promotion surface and the Internal seeding surface.
  - name: Reclassification
    description: Reclassification workflows.
  - name: Reputation
    description: Per-agent reputation scores.
  - name: Risk
    description: Risk assessment endpoints.
  - name: Safe House
    description: Safe House threat detection and quarantine.
  - name: Sideband
    description: Sideband detection queries (legacy; sunsetting).
  - name: Team Reputation
    description: Team-level reputation aggregates.
  - name: Teams
    description: Team-scope resources.
  - name: Tools
    description: >-
      Mnemom-side tools registry — per-tool class+domain+schema metadata
      (cards-as-primitive Phase 4).
  - name: Traces
    description: AP-Trace artifacts and queries.
  - name: Transparency
    description: >-
      Append-only public log of every canonical card identity ever composed.
      Signed Merkle root + per-row inclusion proofs (cards-as-primitive Phase
      5).
  - name: Trust
    description: >-
      Protection Network L5 public-trust surface — security advisories, IoC feed
      (STIX 2.1), and platform-admin CMS for both.
  - name: Verification
    description: Trace verification endpoints.
  - name: Webhook Notifications
    description: Webhook event subscription management.
  - name: Webhooks
    description: Webhook delivery and lifecycle.
  - name: Misc
    description: >-
      Miscellaneous operator-facing endpoints (contact, enterprise inquiries,
      compliance).
  - name: Notifications
    description: >-
      Reactive notification channels — SSE stream + signed-webhook subscriptions
      for canonical card changes (cards-as-primitive Phase 5).
paths:
  /verify:
    post:
      tags:
        - Verification
      summary: Verify certificate
      description: >-
        Verify an IntegrityCertificate. Performs Ed25519 signature verification,
        chain hash verification, Merkle inclusion proof verification, input
        commitment check, and optional STARK proof verification. Public
        endpoint, no authentication required.
      operationId: verifyCertificate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - certificate
              properties:
                certificate:
                  $ref: '#/components/schemas/IntegrityCertificate'
      responses:
        '200':
          description: Verification result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerifyCertificateResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - {}
components:
  schemas:
    IntegrityCertificate:
      type: object
      description: >-
        Machine-readable cryptographic certificate for an integrity checkpoint.
        Modeled on C2PA content credentials and W3C Verifiable Credentials.
      properties:
        '@context':
          type: string
          description: Namespace identifier
          enum:
            - https://mnemom.ai/aip/v1
        type:
          type: string
          enum:
            - IntegrityCertificate
        version:
          type: string
          description: Certificate format version
        certificate_id:
          type: string
          description: Unique certificate identifier (cert-{8 random chars})
        issued_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp of certificate issuance
        subject:
          type: object
          description: Identifies the checkpoint this certificate attests to
          properties:
            checkpoint_id:
              type: string
              description: Integrity checkpoint ID (ic-{uuid})
            agent_id:
              type: string
            session_id:
              type: string
            card_id:
              type: string
          required:
            - checkpoint_id
            - agent_id
            - session_id
            - card_id
        claims:
          type: object
          description: Analysis verdict and supporting evidence
          properties:
            verdict:
              type: string
              enum:
                - clear
                - review_needed
                - boundary_violation
            concerns:
              type: array
              items:
                type: object
                properties:
                  category:
                    type: string
                  severity:
                    type: string
                  description:
                    type: string
            confidence:
              type: number
              description: Extraction confidence (0.0-1.0)
            reasoning_summary:
              type: string
            analysis_model:
              type: string
            analysis_duration_ms:
              type: number
        input_commitments:
          type: object
          description: Cryptographic commitments to analysis inputs
          properties:
            thinking_block_hash:
              type: string
              description: SHA-256 hash of the thinking block
            card_hash:
              type: string
              description: SHA-256 hash of the Alignment Card
            values_hash:
              type: string
              description: SHA-256 hash of conscience values
            context_hash:
              type: string
              description: SHA-256 hash of window context
            model_version:
              type: string
            combined_commitment:
              type: string
              description: SHA-256 of all input fields concatenated
        proofs:
          type: object
          description: Cryptographic evidence supporting the claims
          properties:
            signature:
              type: object
              properties:
                algorithm:
                  type: string
                  enum:
                    - Ed25519
                key_id:
                  type: string
                value:
                  type: string
                  description: Base64-encoded Ed25519 signature
                signed_payload:
                  type: string
                  description: Deterministic JSON string that was signed
            chain:
              type: object
              properties:
                chain_hash:
                  type: string
                prev_chain_hash:
                  type:
                    - string
                    - 'null'
                position:
                  type: integer
            merkle:
              type:
                - object
                - 'null'
              description: Merkle inclusion proof. Null if not yet added to tree.
              properties:
                leaf_hash:
                  type: string
                leaf_index:
                  type: integer
                root:
                  type: string
                tree_size:
                  type: integer
                inclusion_proof:
                  type: array
                  items:
                    type: object
                    properties:
                      hash:
                        type: string
                      position:
                        type: string
                        enum:
                          - left
                          - right
            verdict_derivation:
              type:
                - object
                - 'null'
              description: SP1 STARK proof. Null if not yet proven.
              properties:
                method:
                  type: string
                  enum:
                    - SP1-STARK
                image_id:
                  type: string
                receipt:
                  type: string
                  description: Base64-encoded STARK proof receipt
                journal:
                  type: string
                  description: Base64-encoded public journal
                verified_at:
                  type: string
                  format: date-time
        verification:
          type: object
          description: URLs for independent verification
          properties:
            keys_url:
              type: string
              format: uri
            certificate_url:
              type: string
              format: uri
            verify_url:
              type: string
              format: uri
      required:
        - '@context'
        - type
        - version
        - certificate_id
        - issued_at
        - subject
        - claims
        - input_commitments
        - proofs
        - verification
    VerifyCertificateResponse:
      type: object
      description: Result of certificate verification
      properties:
        valid:
          type: boolean
          description: Whether all verification checks passed
        checks:
          type: object
          description: Individual verification check results
          properties:
            signature:
              type: object
              properties:
                valid:
                  type: boolean
                key_id:
                  type: string
                  description: >-
                    The signing key the certificate was verified against.
                    Present when the certificate carries a key id; omitted
                    otherwise (data-dependent).
              required:
                - valid
            chain:
              type: object
              properties:
                valid:
                  type: boolean
                chain_hash:
                  type: string
              required:
                - valid
                - chain_hash
            merkle:
              type:
                - object
                - 'null'
              description: Null if Merkle proof was not present in the certificate
              properties:
                valid:
                  type: boolean
                root:
                  type: string
            input_commitment:
              type: object
              properties:
                valid:
                  type: boolean
                commitment:
                  type: string
              required:
                - valid
                - commitment
            verdict_derivation:
              type:
                - object
                - 'null'
              description: Null if verdict derivation proof was not present
              properties:
                valid:
                  type: boolean
                method:
                  type: string
          required:
            - signature
            - chain
            - input_commitment
        details:
          type: string
          description: Semicolon-separated human-readable verification details
      required:
        - valid
        - checks
        - details
    Error:
      type: object
      description: >-
        Canonical error envelope (ADR-API-001 conv 1). `error` is always an
        object — never a bare string. Every 4xx/5xx response across the API
        conforms to this shape; the runtime helper is
        `src/http-errors.ts::buildErrorBody`.
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              pattern: ^[a-z][a-z0-9_]*$
              description: >-
                Stable, machine-matchable failure identifier (lowercase
                snake_case). Clients may branch on this; the string is part of
                the contract.


                **Status-class defaults** — emitted when no caller code is
                supplied (`errorCodeForStatus(status)`): `bad_request` (400),
                `unauthorized` (401), `forbidden` (403), `not_found` (404),
                `method_not_allowed` (405), `conflict` (409), `gone` (410),
                `precondition_failed` (412), `payload_too_large` (413),
                `unsupported_media_type` (415), `unprocessable_entity` (422),
                `precondition_required` (428), `rate_limited` (429),
                `internal_error` (500), `not_implemented` (501), `bad_gateway`
                (502), `service_unavailable` (503), `gateway_timeout` (504).
                Fallback `error` for unmapped statuses.


                **Caller-supplied codes** — handlers may pass an explicit `code`
                for a specific failure class. Examples: `agent_not_found`,
                `invalid_hash_proof`, `already_linked`, `idempotency_conflict`,
                `feature_gated`, `schema_validation_failed`, `no_token`,
                `bad_canonical_payload`.


                **Care-framed sub-resource codes** — the cards-as-primitive
                surface passes its stable care code-string straight through as
                `error.code`. Examples: `if_match_absent`, `if_match_stale`,
                `if_match_malformed`, `primitive_validation_failed`.
            message:
              type: string
              description: Human-readable, care-framed explanation of the failure.
            details:
              description: >-
                Optional structured context for the failure (any JSON value:
                object, array, or primitive). Common shapes: validation findings
                list, idempotency-conflict diff, `{presented_etag,
                current_etag}` on a stale `If-Match`, etc. Mirrors the helper's
                `details?: unknown`.
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnprocessableEntity:
      description: >-
        Request was well-formed but semantically invalid (e.g., business-rule
        validation failure, malformed YAML inside a JSON payload).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: >-
        Rate-limit exceeded. The global per-IP limiter (100 requests/minute,
        applied to every `/v1/*` route) rejected this request. Back off until
        the window resets — `Retry-After` carries the cooldown in seconds and
        `X-RateLimit-Reset` the absolute reset time.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
            minimum: 1
        X-RateLimit-Limit:
          description: Requests permitted per window.
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: Requests remaining in the current window (0 on a 429).
          schema:
            type: integer
            minimum: 0
        X-RateLimit-Reset:
          description: Unix epoch seconds at which the current window resets.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: >-
        Server error — request was well-formed but the server failed to fulfill
        it. Typically a downstream dependency (DB / RPC / external API) returned
        an unexpected error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServiceUnavailable:
      description: >-
        An upstream dependency is currently unavailable. The request was not
        processed; retry after the cooldown window.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Supabase JWT token in Authorization: Bearer header'
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Mnemom-Api-Key
      description: Mnemom API key (mnm_... format)

````