openapi: 3.1.0
info:
  title: Passtru Public Developer API
  version: 2026-06-03
  summary: Public contract for Passtru app provisioning, verification sessions, webhooks, and receipt verification.
  description: |
    Contract-first public API for Passtru-native developer onboarding. The
    receipt verifier returns verified, failed, or unsupported summaries and can
    optionally mirror verified receipt state onto a session when a session-bound
    receipt nonce is supplied.

    Webhook deliveries use Standard Webhooks-compatible `webhook-id`,
    `webhook-timestamp`, and `webhook-signature` headers.
servers:
  - url: https://api.passtru.io/api/v1/public
    description: Production API address; use only with an authorized live app and confirmed enabled profile.
  - url: https://api.sandbox.passtru.io/api/v1/public
    description: Contract example address; confirm the available sandbox base URL with the integration owner.
  - url: http://localhost:8000/api/v1/public
    description: Local example address; use the port configured by your local API owner.
security:
  - developerUser: []
tags:
  - name: Apps
    description: Developer app lifecycle and credentials.
  - name: Sessions
    description: Verification session creation and reads.
  - name: Webhooks
    description: Public webhook test and replay utilities.
  - name: Receipts
    description: Receipt verification helpers.
paths:
  /apps:
    get:
      tags: [Apps]
      operationId: listPasstruApps
      summary: List developer apps
      parameters:
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/Cursor"
      responses:
        "200":
          description: Apps owned by the authenticated developer account.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PaginatedResponse"
    post:
      tags: [Apps]
      operationId: createPasstruApp
      summary: Create or validate a Passtru app
      parameters:
        - $ref: "#/components/parameters/RequiredIdempotencyKey"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/PasstruAppCreateRequest"
            examples:
              sandboxNeobank:
                $ref: "#/components/examples/SandboxNeobankAppCreate"
      responses:
        "201":
          description: App created. Client secret is returned only at create or rotate time.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PasstruAppCreateResponse"
        "409":
          $ref: "#/components/responses/Problem"
        "422":
          $ref: "#/components/responses/Problem"
  /apps/{app_id}:
    get:
      tags: [Apps]
      operationId: getPasstruApp
      summary: Get an app
      parameters:
        - $ref: "#/components/parameters/AppId"
      responses:
        "200":
          description: App metadata.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PasstruApp"
        "404":
          $ref: "#/components/responses/Problem"
  /apps/{app_id}/credentials:
    post:
      tags: [Apps]
      operationId: revealOrRotatePasstruAppCredentials
      summary: Reveal once or rotate app credentials
      parameters:
        - $ref: "#/components/parameters/AppId"
        - $ref: "#/components/parameters/IdempotencyKey"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CredentialRevealRequest"
      responses:
        "200":
          description: Credential state. Secret is absent after one-time reveal expiry.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CredentialRevealResponse"
        "410":
          $ref: "#/components/responses/Problem"
        "422":
          $ref: "#/components/responses/Problem"
  /apps/{app_id}/sessions:
    post:
      tags: [Sessions]
      operationId: createVerificationSession
      summary: Create a verification session
      description: |
        The path `app_id` is authoritative. The request body `app_id` must
        match the path value. Reusing an active
        `external_reference` for the same relying party returns
        `duplicate_active_reference` unless the request is an identical
        idempotent replay.
      security:
        - b2bBearer: []
      parameters:
        - $ref: "#/components/parameters/AppId"
        - $ref: "#/components/parameters/RequiredIdempotencyKey"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/VerificationSessionCreateRequest"
            examples:
              accountOpening:
                $ref: "#/components/examples/AccountOpeningSessionCreate"
      responses:
        "201":
          description: Session created or idempotently replayed.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/VerificationSessionCreateResponse"
        "400":
          $ref: "#/components/responses/Problem"
        "409":
          $ref: "#/components/responses/Problem"
    get:
      tags: [Sessions]
      operationId: listVerificationSessions
      summary: List app verification sessions
      description: Lists sessions recorded for the requested app id and authenticated relying party.
      security:
        - b2bBearer: []
      parameters:
        - $ref: "#/components/parameters/AppId"
        - $ref: "#/components/parameters/Limit"
        - $ref: "#/components/parameters/Cursor"
      responses:
        "200":
          description: Sessions for the requested app and authenticated relying party.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PaginatedResponse"
        "400":
          $ref: "#/components/responses/Problem"
  /apps/{app_id}/sessions/{session_id}:
    delete:
      tags: [Sessions]
      operationId: cancelVerificationSession
      summary: Cancel a verification session
      description: |
        Cancels a non-terminal app-scoped verification session. Replaying cancel
        for a session that is already `canceled` returns the canceled session.
        Canceling a `completed`, `failed`, or `expired` session returns
        `session_already_terminal`.
      security:
        - b2bBearer: []
      parameters:
        - $ref: "#/components/parameters/AppId"
        - $ref: "#/components/parameters/SessionId"
      responses:
        "200":
          description: Canceled session state.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/VerificationSession"
        "404":
          $ref: "#/components/responses/Problem"
        "409":
          $ref: "#/components/responses/Problem"
  /sessions/{session_id}:
    get:
      tags: [Sessions]
      operationId: getVerificationSession
      summary: Get a verification session
      security:
        - b2bBearer: []
      parameters:
        - $ref: "#/components/parameters/SessionId"
      responses:
        "200":
          description: Session state.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/VerificationSession"
        "404":
          $ref: "#/components/responses/Problem"
  /apps/{app_id}/webhooks/test:
    post:
      tags: [Webhooks]
      operationId: createTestWebhookEvent
      summary: Build a signed test webhook event
      parameters:
        - $ref: "#/components/parameters/AppId"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookTestRequest"
      responses:
        "200":
          description: Signed test event and public headers.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WebhookTestResponse"
  /apps/{app_id}/webhooks/replay:
    post:
      tags: [Webhooks]
      operationId: replayWebhookEvent
      summary: Replay a public webhook event
      parameters:
        - $ref: "#/components/parameters/AppId"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/WebhookReplayRequest"
      responses:
        "200":
          description: Replay payload.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/WebhookTestResponse"
        "400":
          $ref: "#/components/responses/Problem"
  /receipts/verify:
    post:
      tags: [Receipts]
      operationId: verifyReceipt
      summary: Verify a Passtru receipt
      security:
        - b2bBearer: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ReceiptVerifyRequest"
      responses:
        "200":
          description: Verified receipt status once receipt verification contracts are available.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ReceiptVerifyResponse"
        "400":
          $ref: "#/components/responses/Problem"
        "422":
          $ref: "#/components/responses/Problem"
components:
  securitySchemes:
    developerUser:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Passtru developer console user session.
    b2bBearer:
      type: http
      scheme: bearer
      bearerFormat: PASSTRU_SP
      description: Relying-party API credential.
  parameters:
    AppId:
      name: app_id
      in: path
      required: true
      schema:
        type: string
    SessionId:
      name: session_id
      in: path
      required: true
      schema:
        type: string
        format: uuid
    Limit:
      name: limit
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 20
    Cursor:
      name: cursor
      in: query
      required: false
      schema:
        type: string
      description: Opaque cursor returned as `page.next_cursor` by the previous list response.
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      schema:
        type: string
        maxLength: 255
      description: Stable key for retry-safe credential rotation. Required when `rotate` is true; reusing the key with a different request body returns 409.
    RequiredIdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      schema:
        type: string
        maxLength: 255
      description: Stable key for retry-safe creates. Reusing the key with a different request body returns 409.
  responses:
    Problem:
      description: Problem Details error.
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ProblemDetails"
  examples:
    SandboxNeobankAppCreate:
      value:
        display_name: Meridian Checking Sandbox
        environment: sandbox
        capabilities: [login, idv, private_attribute_check, document_release, receipt_verification]
        redirect_uris: ["http://localhost:3000/api/passtru/callback"]
        allowed_origins: ["http://localhost:3000"]
        native_callback_schemes: ["meridian://"]
        deep_link_domains: ["demo.meridian.local"]
        webhook_endpoint: "https://hooks.meridian.example/api/passtru/webhooks"
        webhook_subscriptions:
          - verification_session.completed
          - verification_session.failed
          - receipt.verification.completed
    AccountOpeningSessionCreate:
      value:
        app_id: app_2x8uQpT0m7
        external_reference: applicant_001
        mode: hosted
        requested_checks:
          - identity
          - login_with_passtru
          - private_attribute_placeholder
          - document_release
          - receipt_verification
        redirect_url: "http://localhost:3000/api/passtru/callback"
        webhook_endpoint: "https://hooks.meridian.example/api/passtru/webhooks"
        metadata:
          demo_flow: meridian_checking
  schemas:
    ProblemDetails:
      type: object
      additionalProperties: false
      required: [title, status, detail, code, retryable, docs_url, errors]
      properties:
        type:
          type: string
          default: https://docs.passtru.io/errors/problem
        title:
          type: string
        status:
          type: integer
          minimum: 400
          maximum: 599
        detail:
          type: string
        code:
          type: string
        retryable:
          type: boolean
        instance:
          type: [string, "null"]
        request_id:
          type: [string, "null"]
        docs_url:
          type: string
          format: uri
        errors:
          type: array
          items:
            type: object
    CursorPageInfo:
      type: object
      additionalProperties: false
      required: [limit, has_more]
      properties:
        limit:
          type: integer
          minimum: 1
          maximum: 100
        has_more:
          type: boolean
        next_cursor:
          type: [string, "null"]
    PaginatedResponse:
      type: object
      additionalProperties: false
      required: [object, data, page]
      properties:
        object:
          const: list
        data:
          type: array
          items: {}
        page:
          $ref: "#/components/schemas/CursorPageInfo"
    AuditSummary:
      type: object
      additionalProperties: false
      properties:
        created_by:
          type: [string, "null"]
        last_event:
          type: [string, "null"]
        last_event_at:
          type: [string, "null"]
          format: date-time
        idempotency_key:
          type: [string, "null"]
        request_digest:
          type: [string, "null"]
    PasstruApp:
      type: object
      additionalProperties: false
      required:
        - id
        - object
        - environment
        - display_name
        - status
        - capabilities
        - redirect_uris
        - allowed_origins
        - native_callback_schemes
        - deep_link_domains
        - webhook_subscriptions
        - created_at
        - updated_at
        - credential_state
        - audit_summary
      properties:
        id:
          type: string
        object:
          const: passtru_app
        environment:
          $ref: "#/components/schemas/PublicEnvironment"
        display_name:
          type: string
        status:
          $ref: "#/components/schemas/PublicAppStatus"
        capabilities:
          type: array
          items:
            type: string
        redirect_uris:
          type: array
          items:
            type: string
        allowed_origins:
          type: array
          items:
            type: string
        native_callback_schemes:
          type: array
          items:
            type: string
        deep_link_domains:
          type: array
          items:
            type: string
        webhook_endpoint:
          type: [string, "null"]
        webhook_subscriptions:
          type: array
          items:
            type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        created_by:
          type: [string, "null"]
        last_session_at:
          type: [string, "null"]
          format: date-time
        credential_state:
          $ref: "#/components/schemas/PublicCredentialState"
        audit_summary:
          $ref: "#/components/schemas/AuditSummary"
    PasstruAppCreateRequest:
      type: object
      additionalProperties: false
      required: [display_name]
      properties:
        display_name:
          type: string
          minLength: 1
          maxLength: 200
        environment:
          $ref: "#/components/schemas/PublicEnvironment"
        capabilities:
          type: array
          items:
            type: string
        redirect_uris:
          type: array
          maxItems: 20
          items:
            type: string
        allowed_origins:
          type: array
          maxItems: 20
          items:
            type: string
        native_callback_schemes:
          type: array
          maxItems: 20
          items:
            type: string
        deep_link_domains:
          type: array
          maxItems: 20
          items:
            type: string
        webhook_endpoint:
          type: [string, "null"]
          maxLength: 2048
        webhook_subscriptions:
          type: array
          maxItems: 32
          items:
            type: string
        validate_only:
          type: boolean
          default: false
    PasstruAppCreateResponse:
      type: object
      additionalProperties: false
      required: [app, client_id, validate_only]
      properties:
        app:
          $ref: "#/components/schemas/PasstruApp"
        client_id:
          type: string
        client_secret:
          type: [string, "null"]
        client_secret_expires_at:
          type: [string, "null"]
          format: date-time
        validate_only:
          type: boolean
        problem:
          anyOf:
            - $ref: "#/components/schemas/ProblemDetails"
            - type: "null"
    CredentialRevealRequest:
      type: object
      additionalProperties: false
      properties:
        rotate:
          type: boolean
          default: false
        confirm_rotation:
          type: boolean
          default: false
    CredentialRevealResponse:
      type: object
      additionalProperties: false
      required: [app_id, client_id, state, revealed_once]
      properties:
        app_id:
          type: string
        client_id:
          type: string
        client_secret:
          type: [string, "null"]
        state:
          $ref: "#/components/schemas/PublicCredentialState"
        revealed_once:
          type: boolean
        expires_at:
          type: [string, "null"]
          format: date-time
        problem:
          anyOf:
            - $ref: "#/components/schemas/ProblemDetails"
            - type: "null"
    VerificationSessionCreateRequest:
      type: object
      additionalProperties: false
      required: [app_id]
      properties:
        app_id:
          type: string
        external_reference:
          type: [string, "null"]
          maxLength: 255
        mode:
          enum: [hosted, iframe, inline]
          default: hosted
        requested_checks:
          type: array
          items:
            type: string
        redirect_url:
          type: [string, "null"]
          maxLength: 2048
        parent_origin:
          type: [string, "null"]
          maxLength: 2048
        webhook_endpoint:
          type: [string, "null"]
          maxLength: 2048
        metadata:
          type: object
    VerificationSession:
      type: object
      additionalProperties: false
      required:
        - id
        - object
        - app_id
        - environment
        - status
        - terminal
        - mode
        - requested_checks
        - foundation_placeholders
        - receipt_summary
        - expires_at
        - created_at
        - updated_at
      properties:
        id:
          type: string
        object:
          const: verification_session
        app_id:
          type: string
        environment:
          $ref: "#/components/schemas/PublicEnvironment"
        external_reference:
          type: [string, "null"]
        status:
          $ref: "#/components/schemas/PublicSessionStatus"
        terminal:
          type: boolean
        mode:
          enum: [hosted, iframe, inline]
        requested_checks:
          type: array
          items:
            type: string
        foundation_placeholders:
          type: object
        document_release:
          anyOf:
            - $ref: "#/components/schemas/DocumentReleaseEligibility"
            - type: "null"
        receipt_summary:
          $ref: "#/components/schemas/ReceiptSummary"
        handoff:
          anyOf:
            - $ref: "#/components/schemas/VerificationHandoff"
            - type: "null"
        expires_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        completed_at:
          type: [string, "null"]
          format: date-time
        canceled_at:
          type: [string, "null"]
          format: date-time
        last_webhook_event_id:
          type: [string, "null"]
        problem:
          anyOf:
            - $ref: "#/components/schemas/ProblemDetails"
            - type: "null"
    VerificationSessionCreateResponse:
      allOf:
        - $ref: "#/components/schemas/VerificationSession"
        - type: object
          required: [receipt_nonce]
          properties:
            receipt_nonce:
              type: string
              minLength: 1
    VerificationHandoff:
      type: object
      additionalProperties: false
      properties:
        url:
          type: [string, "null"]
        token_type:
          enum: [sdk, hosted, iframe]
        token:
          type: [string, "null"]
          description: Inline SDK token. Present only for inline mode.
        expires_at:
          type: [string, "null"]
          format: date-time
    ReceiptSummary:
      type: object
      additionalProperties: false
      required: [status]
      properties:
        status:
          enum: [unsupported, pending, verified, failed]
        mode:
          type: [string, "null"]
        unsupported_reason:
          type: [string, "null"]
        verified_at:
          type: [string, "null"]
          format: date-time
        problem:
          anyOf:
            - $ref: "#/components/schemas/ProblemDetails"
            - type: "null"
    ReceiptVerifyRequest:
      type: object
      additionalProperties: false
      required: [receipt]
      properties:
        receipt:
          type: object
        expected_audience:
          type: [string, "null"]
        nonce:
          type: [string, "null"]
        session_id:
          type: [string, "null"]
          maxLength: 64
    SessionBindingResult:
      type: object
      additionalProperties: false
      required: [mirrored]
      properties:
        mirrored:
          type: boolean
        problem:
          type: [string, "null"]
          enum: [session_not_found, session_receipt_mismatch, null]
    ReceiptVerifyResponse:
      type: object
      additionalProperties: false
      required: [status, receipt_summary]
      properties:
        status:
          enum: [verified, unsupported, failed]
        receipt_summary:
          $ref: "#/components/schemas/ReceiptSummary"
        session_binding:
          $ref: "#/components/schemas/SessionBindingResult"
        problem:
          anyOf:
            - $ref: "#/components/schemas/ProblemDetails"
            - type: "null"
    WebhookTestRequest:
      type: object
      additionalProperties: false
      properties:
        event_type:
          type: string
          default: verification_session.completed
        endpoint:
          type: [string, "null"]
          maxLength: 2048
    WebhookReplayRequest:
      type: object
      additionalProperties: false
      required: [event_id]
      properties:
        event_id:
          type: string
          minLength: 1
          maxLength: 255
    WebhookTestResponse:
      type: object
      additionalProperties: false
      required: [event, headers, raw_body_sha256]
      properties:
        event:
          $ref: "#/components/schemas/WebhookEvent"
        headers:
          type: object
          additionalProperties:
            type: string
        raw_body_sha256:
          type: string
        problem:
          anyOf:
            - $ref: "#/components/schemas/ProblemDetails"
            - type: "null"
    WebhookEvent:
      type: object
      additionalProperties: false
      required: [id, object, type, api_version, app_id, environment, created_at, attempt, data, delivery]
      properties:
        id:
          type: string
        object:
          const: webhook_event
        type:
          type: string
        api_version:
          type: string
        app_id:
          type: string
        environment:
          $ref: "#/components/schemas/PublicEnvironment"
        created_at:
          type: string
          format: date-time
        attempt:
          type: integer
          minimum: 0
        data:
          type: object
        session:
          anyOf:
            - $ref: "#/components/schemas/VerificationSession"
            - type: "null"
        receipt_summary:
          anyOf:
            - $ref: "#/components/schemas/ReceiptSummary"
            - type: "null"
        delivery:
          $ref: "#/components/schemas/WebhookDelivery"
        replay_of:
          type: [string, "null"]
        request_id:
          type: [string, "null"]
    WebhookDelivery:
      type: object
      additionalProperties: false
      required: [status, attempts]
      properties:
        status:
          enum: [pending, delivered, failed, permanently_failed]
        attempts:
          type: integer
          minimum: 0
        next_retry_at:
          type: [string, "null"]
          format: date-time
        last_error:
          type: [string, "null"]
    DocumentReleaseEligibility:
      type: object
      additionalProperties: false
      required: [document_id, object, eligible]
      properties:
        document_id:
          type: string
        object:
          const: document_release_eligibility
        eligible:
          type: boolean
        trust_class:
          type: [string, "null"]
        mime_types:
          type: array
          items:
            type: string
        max_bytes:
          type: [integer, "null"]
          minimum: 0
        blocked_reason:
          type: [string, "null"]
        manual_fallback:
          type: boolean
    GeneratedDocumentDownloadGrant:
      type: object
      additionalProperties: false
      required: [id, status]
      properties:
        id:
          type: string
        status:
          enum: [pending, ready, expired, redeemed, blocked]
        expires_at:
          type: [string, "null"]
          format: date-time
        problem:
          anyOf:
            - $ref: "#/components/schemas/ProblemDetails"
            - type: "null"
    GeneratedDocument:
      type: object
      additionalProperties: false
      required: [id, object, release_session_id, app_id, environment, contract_version, status, document_type, mime_type, size_bytes]
      properties:
        id:
          type: string
        object:
          const: generated_document
        release_session_id:
          type: string
        app_id:
          type: string
        environment:
          $ref: "#/components/schemas/PublicEnvironment"
        contract_version:
          type: string
        status:
          enum: [pending, ready, blocked, expired]
        document_type:
          type: string
        mime_type:
          type: string
        size_bytes:
          type: integer
          minimum: 0
        download_grant:
          anyOf:
            - $ref: "#/components/schemas/GeneratedDocumentDownloadGrant"
            - type: "null"
        expires_at:
          type: [string, "null"]
          format: date-time
        problem:
          anyOf:
            - $ref: "#/components/schemas/ProblemDetails"
            - type: "null"
    ReleaseSession:
      type: object
      additionalProperties: false
      required: [id, object, app_id, environment, contract_version, top_origin, descriptor_hash, status, requested_items, confirmed_items, grants, receipt_summary, expires_at, created_at, updated_at]
      properties:
        id:
          type: string
        object:
          const: release_session
        app_id:
          type: string
        environment:
          $ref: "#/components/schemas/PublicEnvironment"
        contract_version:
          type: string
        top_origin:
          type: string
        frame_origin:
          type: [string, "null"]
        descriptor_hash:
          type: string
        descriptor_summary:
          type: object
        status:
          enum: [pending, approved, denied, expired, blocked]
        requested_items:
          type: array
          items:
            type: object
        confirmed_items:
          type: array
          items:
            type: object
        grants:
          type: array
          items:
            $ref: "#/components/schemas/ReleaseGrant"
        receipt_summary:
          $ref: "#/components/schemas/ReceiptSummary"
        expires_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        problem:
          anyOf:
            - $ref: "#/components/schemas/ProblemDetails"
            - type: "null"
    ReleaseGrant:
      type: object
      additionalProperties: false
      required: [id, object, release_session_id, app_id, environment, contract_version, grant_type, status, origin_binding, descriptor_hash, item, expires_at, created_at]
      properties:
        id:
          type: string
        object:
          const: release_grant
        release_session_id:
          type: string
        app_id:
          type: string
        environment:
          $ref: "#/components/schemas/PublicEnvironment"
        contract_version:
          type: string
        grant_type:
          enum: [document_bytes, generated_document, attribute_proof]
        status:
          enum: [pending, ready, expired, redeemed, blocked]
        origin_binding:
          type: string
        frame_binding:
          type: [string, "null"]
        descriptor_hash:
          type: string
        item:
          type: object
        document_release:
          anyOf:
            - $ref: "#/components/schemas/DocumentReleaseEligibility"
            - type: "null"
        expires_at:
          type: string
          format: date-time
        redeemed_at:
          type: [string, "null"]
          format: date-time
        created_at:
          type: string
          format: date-time
        problem:
          anyOf:
            - $ref: "#/components/schemas/ProblemDetails"
            - type: "null"
    ReleaseOutcome:
      type: object
      additionalProperties: false
      required: [id, object, release_session_id, app_id, environment, contract_version, status, released, target, receipt_summary, created_at]
      properties:
        id:
          type: string
        object:
          const: release_outcome
        release_session_id:
          type: string
        grant_id:
          type: [string, "null"]
        app_id:
          type: string
        environment:
          $ref: "#/components/schemas/PublicEnvironment"
        contract_version:
          type: string
        status:
          enum: [released, denied, expired, blocked, failed]
        reason_code:
          type: [string, "null"]
        released:
          type: boolean
        target:
          type: object
        receipt_summary:
          $ref: "#/components/schemas/ReceiptSummary"
        created_at:
          type: string
          format: date-time
        problem:
          anyOf:
            - $ref: "#/components/schemas/ProblemDetails"
            - type: "null"
    DescriptorEntityProposal:
      type: object
      additionalProperties: false
      required: [object, contract_version, descriptor_hash, entities, field_groups, proposals, reason_codes, caps]
      properties:
        object:
          const: descriptor_entity_proposal
        contract_version:
          type: string
        descriptor_hash:
          type: string
        entities:
          type: array
          items:
            type: object
        field_groups:
          type: array
          items:
            type: object
        proposals:
          type: array
          items:
            type: object
        confidence:
          type: [number, "null"]
          minimum: 0
          maximum: 1
        reason_codes:
          type: array
          items:
            type: string
        caps:
          type: object
        problem:
          anyOf:
            - $ref: "#/components/schemas/ProblemDetails"
            - type: "null"
    PublicEnvironment:
      enum: [sandbox, live]
    PublicAppStatus:
      enum: [active, suspended, revoked]
    PublicCredentialState:
      enum: [not_created, ready, revealed, rotated, expired, locked]
    PublicSessionStatus:
      enum: [created, requires_action, processing, waiting_for_webhook, completed, failed, canceled, expired]
