components:
  schemas:
    AccountContext:
      additionalProperties: false
      properties:
        accountId:
          examples:
          - 00000000-0000-0000-0000-000000000000
          format: uuid
          type: string
        metadata:
          additionalProperties: {}
          type: object
        status:
          examples:
          - ACTIVE
          type: string
        type:
          examples:
          - deposit
          type: string
      required:
      - accountId
      - type
      - status
      type: object
    Actor:
      additionalProperties: false
      properties:
        actorType:
          examples:
          - user
          type: string
        id:
          examples:
          - 00000000-0000-0000-0000-000000000000
          type: string
        ipAddress:
          examples:
          - 203.0.113.42
          type: string
        name:
          examples:
          - Jane Doe
          type: string
        role:
          examples:
          - admin
          type: string
      required:
      - actorType
      - id
      - name
      - ipAddress
      type: object
    AssetAmount:
      additionalProperties: false
      properties:
        amount:
          examples:
          - "12500.00"
          type: string
        asset:
          examples:
          - USD
          type: string
      required:
      - asset
      - amount
      type: object
    AuditEvent:
      additionalProperties: false
      properties:
        action:
          examples:
          - VALIDATE
          type: string
        actor:
          $ref: "#/components/schemas/Actor"
        context:
          additionalProperties: {}
          type: object
        createdAt:
          examples:
          - "2021-01-01T00:00:00Z"
          format: date-time
          type: string
        eventId:
          examples:
          - 00000000-0000-0000-0000-000000000000
          format: uuid
          type: string
        eventType:
          examples:
          - TRANSACTION_VALIDATED
          type: string
        hash:
          examples:
          - a3f1e2b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2
          type: string
        metadata:
          additionalProperties: {}
          type: object
        previousHash:
          examples:
          - b4e2f3a5c6d7e8f9b0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3
          type: string
        resourceId:
          examples:
          - 00000000-0000-0000-0000-000000000000
          type: string
        resourceType:
          examples:
          - transaction
          type: string
        result:
          examples:
          - ALLOW
          type: string
      required:
      - eventId
      - eventType
      - createdAt
      - action
      - result
      - resourceId
      - resourceType
      - actor
      type: object
    DashboardFraudTypes:
      additionalProperties: false
      properties:
        totalFlagged:
          examples:
          - 4133
          format: int64
          type: integer
        types:
          items:
            $ref: "#/components/schemas/FraudTypeSlice"
          type:
          - array
          - "null"
        updatedAt:
          format: date-time
          type: string
        windowEnd:
          format: date-time
          type: string
        windowStart:
          format: date-time
          type: string
      required:
      - types
      - totalFlagged
      - windowStart
      - windowEnd
      - updatedAt
      type: object
    DashboardMetrics:
      additionalProperties: false
      properties:
        activeLimits:
          examples:
          - 12
          format: int64
          type: integer
        activeRules:
          examples:
          - 20
          format: int64
          type: integer
        allowed:
          examples:
          - 78037
          format: int64
          type: integer
        amountSaved:
          examples:
          - "12500.00"
          type: string
        amountSavedByAsset:
          items:
            $ref: "#/components/schemas/AssetAmount"
          type:
          - array
          - "null"
        approvalRate:
          examples:
          - 0.95
          format: double
          type: number
        asset:
          examples:
          - USD
          type: string
        avgProcessingTimeMs:
          examples:
          - 12.4
          format: double
          type: number
        fraudDetectionRate:
          examples:
          - 0.05
          format: double
          type: number
        fraudsBlocked:
          examples:
          - 4107
          format: int64
          type: integer
        manualReviewRate:
          examples:
          - 0.0125
          format: double
          type: number
        manualReviews:
          examples:
          - 1026
          format: int64
          type: integer
        transactionsProcessed:
          examples:
          - 82144
          format: int64
          type: integer
        updatedAt:
          format: date-time
          type: string
        windowEnd:
          format: date-time
          type: string
        windowStart:
          format: date-time
          type: string
      required:
      - transactionsProcessed
      - allowed
      - fraudsBlocked
      - manualReviews
      - approvalRate
      - fraudDetectionRate
      - manualReviewRate
      - amountSavedByAsset
      - avgProcessingTimeMs
      - activeRules
      - activeLimits
      - windowStart
      - windowEnd
      - updatedAt
      type: object
    DashboardTopRules:
      additionalProperties: false
      properties:
        rules:
          items:
            $ref: "#/components/schemas/TopRule"
          type:
          - array
          - "null"
        updatedAt:
          format: date-time
          type: string
        windowEnd:
          format: date-time
          type: string
        windowStart:
          format: date-time
          type: string
      required:
      - rules
      - windowStart
      - windowEnd
      - updatedAt
      type: object
    DashboardVolume:
      additionalProperties: false
      properties:
        points:
          items:
            $ref: "#/components/schemas/VolumePoint"
          type:
          - array
          - "null"
        updatedAt:
          format: date-time
          type: string
        windowEnd:
          format: date-time
          type: string
        windowStart:
          format: date-time
          type: string
      required:
      - points
      - windowStart
      - windowEnd
      - updatedAt
      type: object
    Error:
      additionalProperties: true
      properties:
        code:
          description: "Stable, machine-readable domain error code scoped to the emitting service (format: <SERVICE>-NNNN)."
          type: string
        detail:
          description: A human-readable explanation specific to this occurrence of the problem.
          examples:
          - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: "#/components/schemas/ErrorDetail"
          type:
          - array
          - "null"
        instance:
          description: A URI reference that identifies the specific occurrence of the problem.
          examples:
          - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
          - 400
          format: int64
          type: integer
        title:
          description: A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
          examples:
          - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
          - https://example.com/errors/example
          format: uri
          type: string
        upstream:
          $ref: "#/components/schemas/Upstream"
          description: "RFC 9457 extension member: the error a proxied third-party provider reported. Absent unless the emitting service explicitly surfaced one."
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    FraudTypeSlice:
      additionalProperties: false
      properties:
        count:
          examples:
          - 1287
          format: int64
          type: integer
        percentage:
          examples:
          - 0.31
          format: double
          type: number
        total:
          examples:
          - 20536
          format: int64
          type: integer
        type:
          examples:
          - CARD
          type: string
      required:
      - type
      - count
      - percentage
      - total
      type: object
    HashChainVerificationResult:
      additionalProperties: false
      properties:
        firstInvalidId:
          examples:
          - 42
          format: int64
          type: integer
        isValid:
          examples:
          - true
          type: boolean
        message:
          examples:
          - hash chain intact
          type: string
        totalChecked:
          examples:
          - 1000
          format: int64
          type: integer
      required:
      - isValid
      - totalChecked
      - message
      type: object
    Limit:
      additionalProperties: false
      properties:
        activeTimeEnd:
          examples:
          - "17:00"
          type: string
        activeTimeStart:
          examples:
          - "09:00"
          type: string
        asset:
          examples:
          - USD
          type: string
        createdAt:
          examples:
          - "2021-01-01T00:00:00Z"
          format: date-time
          type: string
        customEndDate:
          examples:
          - "2021-12-31T23:59:59Z"
          format: date-time
          type: string
        customStartDate:
          examples:
          - "2021-01-01T00:00:00Z"
          format: date-time
          type: string
        deletedAt:
          examples:
          - "2021-01-01T00:00:00Z"
          format: date-time
          type: string
        description:
          examples:
          - Caps daily USD outflows for retail accounts
          type: string
        limitId:
          examples:
          - 00000000-0000-0000-0000-000000000000
          format: uuid
          type: string
        limitType:
          examples:
          - DAILY
          type: string
        maxAmount:
          examples:
          - "1000.00"
          type: string
        name:
          examples:
          - Daily USD spending cap
          maxLength: 255
          type: string
        resetAt:
          examples:
          - "2021-01-02T00:00:00Z"
          format: date-time
          type: string
        resetTime:
          examples:
          - "09:00"
          type: string
        scopes:
          items:
            $ref: "#/components/schemas/Scope"
          type:
          - array
          - "null"
        status:
          examples:
          - ACTIVE
          type: string
        updatedAt:
          examples:
          - "2021-01-01T00:00:00Z"
          format: date-time
          type: string
      required:
      - limitId
      - name
      - limitType
      - maxAmount
      - asset
      - scopes
      - status
      - createdAt
      - updatedAt
      type: object
    LimitUsageDetail:
      additionalProperties: false
      properties:
        attemptedAmount:
          examples:
          - "100.00"
          type: string
        currentUsage:
          examples:
          - "500.00"
          type: string
        exceeded:
          type: boolean
        limitAmount:
          examples:
          - "1000.00"
          type: string
        limitId:
          examples:
          - 00000000-0000-0000-0000-000000000000
          format: uuid
          type: string
        period:
          examples:
          - DAILY
          type: string
        scope:
          examples:
          - account:00000000-0000-0000-0000-000000000000
          type: string
        skipReason:
          examples:
          - outside_time_window
          type: string
        skipped:
          type: boolean
      required:
      - limitId
      - limitAmount
      - scope
      - period
      - currentUsage
      - attemptedAmount
      - exceeded
      type: object
    ListAuditEventsResponse:
      additionalProperties: false
      properties:
        auditEvents:
          items:
            $ref: "#/components/schemas/AuditEvent"
          maxItems: 1000
          type:
          - array
          - "null"
        hasMore:
          examples:
          - true
          type: boolean
        nextCursor:
          examples:
          - eyJpZCI6IjAxOTI4In0=
          type: string
      required:
      - auditEvents
      - hasMore
      type: object
    ListLimitsResponse:
      additionalProperties: false
      properties:
        hasMore:
          examples:
          - true
          type: boolean
        limits:
          items:
            $ref: "#/components/schemas/Limit"
          type:
          - array
          - "null"
        nextCursor:
          examples:
          - eyJpZCI6IjAxOTI4In0=
          type: string
      required:
      - limits
      - hasMore
      type: object
    ListRulesResponse:
      additionalProperties: false
      properties:
        hasMore:
          examples:
          - true
          type: boolean
        nextCursor:
          examples:
          - eyJpZCI6IjAxOTI4In0=
          type: string
        rules:
          items:
            $ref: "#/components/schemas/Rule"
          type:
          - array
          - "null"
      required:
      - rules
      - hasMore
      type: object
    ListTransactionValidationsResponse:
      additionalProperties: false
      properties:
        hasMore:
          examples:
          - true
          type: boolean
        nextCursor:
          examples:
          - eyJpZCI6IjAxOTI4In0=
          type: string
        transactionValidations:
          items:
            $ref: "#/components/schemas/ValidationSummary"
          type:
          - array
          - "null"
      required:
      - transactionValidations
      - hasMore
      type: object
    MerchantContext:
      additionalProperties: false
      properties:
        category:
          examples:
          - "5411"
          type: string
        country:
          examples:
          - US
          type: string
        merchantId:
          examples:
          - 00000000-0000-0000-0000-000000000000
          format: uuid
          type: string
        metadata:
          additionalProperties: {}
          type: object
        name:
          examples:
          - Acme Store
          type: string
      required:
      - merchantId
      - name
      - category
      - country
      type: object
    PortfolioContext:
      additionalProperties: false
      properties:
        metadata:
          additionalProperties: {}
          type: object
        name:
          examples:
          - growth
          type: string
        portfolioId:
          examples:
          - 00000000-0000-0000-0000-000000000000
          format: uuid
          type: string
      required:
      - portfolioId
      type: object
    Rule:
      additionalProperties: false
      properties:
        action:
          examples:
          - DENY
          type: string
        activatedAt:
          examples:
          - "2021-01-01T00:00:00Z"
          format: date-time
          type: string
        createdAt:
          examples:
          - "2021-01-01T00:00:00Z"
          format: date-time
          type: string
        deactivatedAt:
          examples:
          - "2021-01-01T00:00:00Z"
          format: date-time
          type: string
        deletedAt:
          examples:
          - "2021-01-01T00:00:00Z"
          format: date-time
          type: string
        description:
          examples:
          - Denies transactions over $1000 from checking accounts
          type: string
        expression:
          examples:
          - transaction.amount > 1000 && account.type == 'checking'
          type: string
        name:
          examples:
          - Block high-value checking transactions
          maxLength: 255
          type: string
        ruleId:
          examples:
          - 00000000-0000-0000-0000-000000000000
          format: uuid
          type: string
        scopes:
          items:
            $ref: "#/components/schemas/Scope"
          type:
          - array
          - "null"
        status:
          examples:
          - ACTIVE
          type: string
        updatedAt:
          examples:
          - "2021-01-01T00:00:00Z"
          format: date-time
          type: string
      required:
      - ruleId
      - name
      - expression
      - action
      - scopes
      - status
      - createdAt
      - updatedAt
      type: object
    Scope:
      additionalProperties: false
      properties:
        accountId:
          examples:
          - 00000000-0000-0000-0000-000000000000
          format: uuid
          type: string
        merchantId:
          examples:
          - 00000000-0000-0000-0000-000000000000
          format: uuid
          type: string
        portfolioId:
          examples:
          - 00000000-0000-0000-0000-000000000000
          format: uuid
          type: string
        segmentId:
          examples:
          - 00000000-0000-0000-0000-000000000000
          format: uuid
          type: string
        subType:
          examples:
          - purchase
          maxLength: 50
          type: string
        transactionType:
          examples:
          - CARD
          type: string
      type: object
    SegmentContext:
      additionalProperties: false
      properties:
        metadata:
          additionalProperties: {}
          type: object
        name:
          examples:
          - retail
          type: string
        segmentId:
          examples:
          - 00000000-0000-0000-0000-000000000000
          format: uuid
          type: string
      required:
      - segmentId
      type: object
    TopRule:
      additionalProperties: false
      properties:
        avgProcessingMs:
          examples:
          - 41.2
          format: double
          type: number
        detectionRate:
          examples:
          - 0.063
          format: double
          type: number
        executions:
          examples:
          - 20536
          format: int64
          type: integer
        matches:
          examples:
          - 1287
          format: int64
          type: integer
        name:
          examples:
          - high-value-wire
          type: string
        productType:
          examples:
          - WIRE
          type: string
      required:
      - name
      - matches
      - executions
      - detectionRate
      - avgProcessingMs
      type: object
    TransactionValidation:
      additionalProperties: false
      properties:
        account:
          $ref: "#/components/schemas/AccountContext"
        amount:
          examples:
          - "100.00"
          type: string
        asset:
          examples:
          - USD
          type: string
        createdAt:
          examples:
          - "2021-01-01T00:00:00Z"
          format: date-time
          type: string
        decision:
          examples:
          - ALLOW
          type: string
        evaluatedRuleIds:
          items:
            format: uuid
            type: string
          type:
          - array
          - "null"
        limitUsageDetails:
          items:
            $ref: "#/components/schemas/LimitUsageDetail"
          type:
          - array
          - "null"
        matchedRuleIds:
          items:
            format: uuid
            type: string
          type:
          - array
          - "null"
        merchant:
          $ref: "#/components/schemas/MerchantContext"
        metadata:
          additionalProperties: {}
          type: object
        portfolio:
          $ref: "#/components/schemas/PortfolioContext"
        processingTimeMs:
          examples:
          - 12.5
          format: double
          type: number
        reason:
          examples:
          - Transaction denied by rule 'Block high-value checking transactions'
          type: string
        requestId:
          examples:
          - 00000000-0000-0000-0000-000000000000
          format: uuid
          type: string
        segment:
          $ref: "#/components/schemas/SegmentContext"
        subType:
          examples:
          - purchase
          maxLength: 50
          type: string
        totalRulesLoaded:
          examples:
          - 42
          format: int64
          type: integer
        transactionTimestamp:
          examples:
          - "2021-01-01T00:00:00Z"
          format: date-time
          type: string
        transactionType:
          examples:
          - CARD
          type: string
        truncated:
          examples:
          - false
          type: boolean
        validationId:
          examples:
          - 00000000-0000-0000-0000-000000000000
          format: uuid
          type: string
      required:
      - validationId
      - requestId
      - transactionType
      - amount
      - asset
      - transactionTimestamp
      - account
      - limitUsageDetails
      - processingTimeMs
      - createdAt
      - decision
      - matchedRuleIds
      - evaluatedRuleIds
      - reason
      - totalRulesLoaded
      - truncated
      type: object
    Upstream:
      additionalProperties: false
      properties:
        code:
          description: The upstream provider's own error code, verbatim.
          examples:
          - E4001
          type: string
        message:
          description: The upstream provider's own error message, verbatim (bounded, never its raw response body).
          examples:
          - account not found at provider
          type: string
      type: object
    UsageSnapshot:
      additionalProperties: false
      properties:
        currentUsage:
          examples:
          - "500.00"
          type: string
        limitAmount:
          examples:
          - "1000.00"
          type: string
        limitId:
          format: uuid
          type: string
        nearLimit:
          examples:
          - false
          type: boolean
        resetAt:
          format: date-time
          type: string
        utilizationPercent:
          examples:
          - 50
          format: double
          type: number
      required:
      - limitId
      - currentUsage
      - limitAmount
      - utilizationPercent
      - nearLimit
      type: object
    ValidationResponse:
      additionalProperties: false
      properties:
        decision:
          examples:
          - ALLOW
          type: string
        evaluatedAt:
          examples:
          - "2021-01-01T00:00:00Z"
          format: date-time
          type: string
        evaluatedRuleIds:
          items:
            format: uuid
            type: string
          type:
          - array
          - "null"
        limitUsageDetails:
          items:
            $ref: "#/components/schemas/LimitUsageDetail"
          type:
          - array
          - "null"
        matchedRuleIds:
          items:
            format: uuid
            type: string
          type:
          - array
          - "null"
        processingTimeMs:
          examples:
          - 12.5
          format: double
          type: number
        reason:
          examples:
          - Transaction denied by rule 'Block high-value checking transactions'
          type: string
        requestId:
          examples:
          - 00000000-0000-0000-0000-000000000000
          format: uuid
          type: string
        totalRulesLoaded:
          examples:
          - 42
          format: int64
          type: integer
        truncated:
          examples:
          - false
          type: boolean
        validationId:
          examples:
          - 00000000-0000-0000-0000-000000000000
          format: uuid
          type: string
      required:
      - validationId
      - requestId
      - limitUsageDetails
      - processingTimeMs
      - evaluatedAt
      - decision
      - matchedRuleIds
      - evaluatedRuleIds
      - reason
      - totalRulesLoaded
      - truncated
      type: object
    ValidationSummary:
      additionalProperties: false
      properties:
        accountId:
          format: uuid
          type: string
        amount:
          examples:
          - "100.00"
          type: string
        asset:
          examples:
          - USD
          type: string
        createdAt:
          format: date-time
          type: string
        decision:
          examples:
          - ALLOW
          type: string
        exceededLimitIds:
          items:
            format: uuid
            type: string
          type:
          - array
          - "null"
        matchedRuleIds:
          items:
            format: uuid
            type: string
          type:
          - array
          - "null"
        portfolioId:
          format: uuid
          type: string
        processingTimeMs:
          examples:
          - 12.5
          format: double
          type: number
        reason:
          examples:
          - All rules passed
          type: string
        segmentId:
          format: uuid
          type: string
        transactionType:
          examples:
          - CARD
          type: string
        validationId:
          format: uuid
          type: string
      required:
      - validationId
      - decision
      - reason
      - amount
      - asset
      - transactionType
      - accountId
      - matchedRuleIds
      - exceededLimitIds
      - processingTimeMs
      - createdAt
      type: object
    VolumePoint:
      additionalProperties: false
      properties:
        date:
          examples:
          - "2026-09-19"
          type: string
        volume:
          examples:
          - 2740
          format: int64
          type: integer
      required:
      - date
      - volume
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: Static API key presented in the X-API-Key header.
      in: header
      name: X-API-Key
      type: apiKey
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http
info:
  title: Midaz Tracer API
  description: Reference for Midaz Tracer transaction validation, fraud rules, spending limits, and audit events.
  version: 4.0.0
openapi: 3.1.0
paths:
  /v1/audit-events:
    get:
      operationId: listAuditEvents
      parameters:
      - description: Start date (RFC3339 format)
        explode: false
        in: query
        name: start_date
        schema:
          description: Start date (RFC3339 format)
          type: string
      - description: End date (RFC3339 format)
        explode: false
        in: query
        name: end_date
        schema:
          description: End date (RFC3339 format)
          type: string
      - description: Filter by event type (TRANSACTION_VALIDATED, RULE_CREATED, RULE_UPDATED, RULE_ACTIVATED, RULE_DEACTIVATED, RULE_DRAFTED, RULE_DELETED, LIMIT_CREATED, LIMIT_UPDATED, LIMIT_DELETED, LIMIT_ACTIVATED, LIMIT_DEACTIVATED, LIMIT_DRAFTED, RESERVATION_RESERVED, RESERVATION_CONFIRMED, RESERVATION_RELEASED, RESERVATION_EXPIRED, RESERVATION_SKIPPED)
        explode: false
        in: query
        name: event_type
        schema:
          description: Filter by event type (TRANSACTION_VALIDATED, RULE_CREATED, RULE_UPDATED, RULE_ACTIVATED, RULE_DEACTIVATED, RULE_DRAFTED, RULE_DELETED, LIMIT_CREATED, LIMIT_UPDATED, LIMIT_DELETED, LIMIT_ACTIVATED, LIMIT_DEACTIVATED, LIMIT_DRAFTED, RESERVATION_RESERVED, RESERVATION_CONFIRMED, RESERVATION_RELEASED, RESERVATION_EXPIRED, RESERVATION_SKIPPED)
          type: string
      - description: Filter by action (VALIDATE, CREATE, UPDATE, DELETE, ACTIVATE, DEACTIVATE, DRAFT, RESERVE, CONFIRM, RELEASE, EXPIRE, SKIP)
        explode: false
        in: query
        name: action
        schema:
          description: Filter by action (VALIDATE, CREATE, UPDATE, DELETE, ACTIVATE, DEACTIVATE, DRAFT, RESERVE, CONFIRM, RELEASE, EXPIRE, SKIP)
          type: string
      - description: Filter by result (SUCCESS, FAILED, ALLOW, DENY, REVIEW)
        explode: false
        in: query
        name: result
        schema:
          description: Filter by result (SUCCESS, FAILED, ALLOW, DENY, REVIEW)
          type: string
      - description: Filter by resource type (transaction, rule, limit, reservation)
        explode: false
        in: query
        name: resource_type
        schema:
          description: Filter by resource type (transaction, rule, limit, reservation)
          type: string
      - description: Filter by resource ID (UUID)
        explode: false
        in: query
        name: resource_id
        schema:
          description: Filter by resource ID (UUID)
          type: string
      - description: Filter by actor type (user, api_key, system)
        explode: false
        in: query
        name: actor_type
        schema:
          description: Filter by actor type (user, api_key, system)
          type: string
      - description: Filter by actor ID
        explode: false
        in: query
        name: actor_id
        schema:
          description: Filter by actor ID
          type: string
      - description: Filter by account ID (UUID)
        explode: false
        in: query
        name: account_id
        schema:
          description: Filter by account ID (UUID)
          type: string
      - description: Filter by segment ID (UUID)
        explode: false
        in: query
        name: segment_id
        schema:
          description: Filter by segment ID (UUID)
          type: string
      - description: Filter by portfolio ID (UUID)
        explode: false
        in: query
        name: portfolio_id
        schema:
          description: Filter by portfolio ID (UUID)
          type: string
      - description: Filter by transaction type (CARD, WIRE, PIX, CRYPTO)
        explode: false
        in: query
        name: transaction_type
        schema:
          description: Filter by transaction type (CARD, WIRE, PIX, CRYPTO)
          type: string
      - description: Filter by matched rule ID (UUID)
        explode: false
        in: query
        name: matched_rule_id
        schema:
          description: Filter by matched rule ID (UUID)
          type: string
      - description: "Max items per page (1-1000, default: 100)"
        explode: false
        in: query
        name: limit
        schema:
          description: "Max items per page (1-1000, default: 100)"
          type: string
      - description: Pagination token (empty for first page)
        explode: false
        in: query
        name: cursor
        schema:
          description: Pagination token (empty for first page)
          type: string
      - description: Sort field (created_at, event_type)
        explode: false
        in: query
        name: sort_by
        schema:
          description: Sort field (created_at, event_type)
          type: string
      - description: Sort direction (ASC, DESC)
        explode: false
        in: query
        name: sort_order
        schema:
          description: Sort direction (ASC, DESC)
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListAuditEventsResponse"
          description: OK
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: List audit events
      tags:
      - Audit Events API
      description: Use this endpoint to list audit events with filters and cursor-based pagination.
      x-mint:
        href: /pt/reference/products/tracer/list-audit-events
  /v1/audit-events/{id}:
    get:
      operationId: getAuditEvent
      parameters:
      - description: Audit event ID (UUID)
        in: path
        name: id
        required: true
        schema:
          description: Audit event ID (UUID)
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/AuditEvent"
          description: OK
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: Get an audit event by ID
      tags:
      - Audit Events API
      description: Use this endpoint to retrieve a single audit event by its unique identifier.
      x-mint:
        href: /pt/reference/products/tracer/retrieve-audit-event
  /v1/audit-events/{id}/verify:
    get:
      operationId: verifyAuditEvent
      parameters:
      - description: Audit event ID (UUID)
        in: path
        name: id
        required: true
        schema:
          description: Audit event ID (UUID)
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/HashChainVerificationResult"
          description: OK
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: Verify audit event hash chain integrity
      tags:
      - Audit Events API
      description: Use this endpoint to verify the integrity of the audit event hash chain up to a specific event. Detects tampering attempts.
      x-mint:
        href: /pt/reference/products/tracer/verify-audit-event
  /v1/dashboard/fraud-types:
    get:
      description: Use this endpoint to get the DENY and REVIEW decisions in the window, broken down by transaction type, with the share of the flagged traffic for each type. Set the window with `period` (7d, 30d or 90d, default 30d), or with `start_date` and `end_date` (at most 90 days).
      operationId: getDashboardFraudTypes
      parameters:
      - description: "Relative window: 7d, 30d or 90d (default: 30d). Mutually exclusive with start_date/end_date."
        explode: false
        in: query
        name: period
        schema:
          description: "Relative window: 7d, 30d or 90d (default: 30d). Mutually exclusive with start_date/end_date."
          type: string
      - description: Window start (RFC3339). Requires end_date. Mutually exclusive with period.
        explode: false
        in: query
        name: start_date
        schema:
          description: Window start (RFC3339). Requires end_date. Mutually exclusive with period.
          type: string
      - description: Window end (RFC3339), exclusive. Requires start_date. Window may not exceed 90 days.
        explode: false
        in: query
        name: end_date
        schema:
          description: Window end (RFC3339), exclusive. Requires start_date. Window may not exceed 90 days.
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DashboardFraudTypes"
          description: OK
          headers:
            Cache-Control:
              schema:
                type: string
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: Get dashboard flagged-traffic breakdown
      tags:
      - Dashboards API
      x-mint:
        href: /pt/reference/products/tracer/get-dashboard-fraud-types
  /v1/dashboard/metrics:
    get:
      description: Use this endpoint to get the headline metrics for the window. The response returns validation counts, decision rates, blocked volume per asset, mean decision latency, and the live counts of active rules and limits. Set the window with `period` (7d, 30d or 90d, default 30d), or with `start_date` and `end_date` (at most 90 days).
      operationId: getDashboardMetrics
      parameters:
      - description: "Relative window: 7d, 30d or 90d (default: 30d). Mutually exclusive with start_date/end_date."
        explode: false
        in: query
        name: period
        schema:
          description: "Relative window: 7d, 30d or 90d (default: 30d). Mutually exclusive with start_date/end_date."
          type: string
      - description: Window start (RFC3339). Requires end_date. Mutually exclusive with period.
        explode: false
        in: query
        name: start_date
        schema:
          description: Window start (RFC3339). Requires end_date. Mutually exclusive with period.
          type: string
      - description: Window end (RFC3339), exclusive. Requires start_date. Window may not exceed 90 days.
        explode: false
        in: query
        name: end_date
        schema:
          description: Window end (RFC3339), exclusive. Requires start_date. Window may not exceed 90 days.
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DashboardMetrics"
          description: OK
          headers:
            Cache-Control:
              schema:
                type: string
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: Get dashboard headline metrics
      tags:
      - Dashboards API
      x-mint:
        href: /pt/reference/products/tracer/get-dashboard-metrics
  /v1/dashboard/top-rules:
    get:
      description: Use this endpoint to get up to ten rules, ordered by how often they matched in the window. For each rule, the response returns the number of validations that evaluated it, its detection rate, and the mean end-to-end latency of the validations it matched. Set the window with `period` (7d, 30d or 90d, default 30d), or with `start_date` and `end_date` (at most 90 days).
      operationId: getDashboardTopRules
      parameters:
      - description: "Relative window: 7d, 30d or 90d (default: 30d). Mutually exclusive with start_date/end_date."
        explode: false
        in: query
        name: period
        schema:
          description: "Relative window: 7d, 30d or 90d (default: 30d). Mutually exclusive with start_date/end_date."
          type: string
      - description: Window start (RFC3339). Requires end_date. Mutually exclusive with period.
        explode: false
        in: query
        name: start_date
        schema:
          description: Window start (RFC3339). Requires end_date. Mutually exclusive with period.
          type: string
      - description: Window end (RFC3339), exclusive. Requires start_date. Window may not exceed 90 days.
        explode: false
        in: query
        name: end_date
        schema:
          description: Window end (RFC3339), exclusive. Requires start_date. Window may not exceed 90 days.
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DashboardTopRules"
          description: OK
          headers:
            Cache-Control:
              schema:
                type: string
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: Get the busiest rules in the window
      tags:
      - Dashboards API
      x-mint:
        href: /pt/reference/products/tracer/get-dashboard-top-rules
  /v1/dashboard/volume:
    get:
      description: Use this endpoint to get the number of validations per day across the window. Set the window with `period` (7d, 30d or 90d, default 30d), or with `start_date` and `end_date` (at most 90 days).
      operationId: getDashboardVolume
      parameters:
      - description: "Relative window: 7d, 30d or 90d (default: 30d). Mutually exclusive with start_date/end_date."
        explode: false
        in: query
        name: period
        schema:
          description: "Relative window: 7d, 30d or 90d (default: 30d). Mutually exclusive with start_date/end_date."
          type: string
      - description: Window start (RFC3339). Requires end_date. Mutually exclusive with period.
        explode: false
        in: query
        name: start_date
        schema:
          description: Window start (RFC3339). Requires end_date. Mutually exclusive with period.
          type: string
      - description: Window end (RFC3339), exclusive. Requires start_date. Window may not exceed 90 days.
        explode: false
        in: query
        name: end_date
        schema:
          description: Window end (RFC3339), exclusive. Requires start_date. Window may not exceed 90 days.
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DashboardVolume"
          description: OK
          headers:
            Cache-Control:
              schema:
                type: string
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: Get dashboard volume series
      tags:
      - Dashboards API
      x-mint:
        href: /pt/reference/products/tracer/get-dashboard-volume
  /v1/limits:
    get:
      operationId: listLimits
      parameters:
      - description: Filter by name (case-insensitive partial match)
        explode: false
        in: query
        name: name
        schema:
          description: Filter by name (case-insensitive partial match)
          type: string
      - description: Filter by status (DRAFT, ACTIVE, INACTIVE)
        explode: false
        in: query
        name: status
        schema:
          description: Filter by status (DRAFT, ACTIVE, INACTIVE)
          type: string
      - description: Filter by limit type (DAILY, WEEKLY, MONTHLY, CUSTOM, PER_TRANSACTION)
        explode: false
        in: query
        name: limit_type
        schema:
          description: Filter by limit type (DAILY, WEEKLY, MONTHLY, CUSTOM, PER_TRANSACTION)
          type: string
      - description: Filter by scope account_id (UUID)
        explode: false
        in: query
        name: account_id
        schema:
          description: Filter by scope account_id (UUID)
          type: string
      - description: Filter by scope segment_id (UUID)
        explode: false
        in: query
        name: segment_id
        schema:
          description: Filter by scope segment_id (UUID)
          type: string
      - description: Filter by scope portfolio_id (UUID)
        explode: false
        in: query
        name: portfolio_id
        schema:
          description: Filter by scope portfolio_id (UUID)
          type: string
      - description: Filter by scope merchant_id (UUID)
        explode: false
        in: query
        name: merchant_id
        schema:
          description: Filter by scope merchant_id (UUID)
          type: string
      - description: Filter by scope transaction_type (CARD, WIRE, PIX, CRYPTO)
        explode: false
        in: query
        name: transaction_type
        schema:
          description: Filter by scope transaction_type (CARD, WIRE, PIX, CRYPTO)
          type: string
      - description: Filter by scope sub_type (case-insensitive; max 50 chars)
        explode: false
        in: query
        name: sub_type
        schema:
          description: Filter by scope sub_type (case-insensitive; max 50 chars)
          type: string
      - description: "Max items per page (1-100, default: 10)"
        explode: false
        in: query
        name: limit
        schema:
          description: "Max items per page (1-100, default: 10)"
          type: string
      - description: Pagination cursor (empty for first page)
        explode: false
        in: query
        name: cursor
        schema:
          description: Pagination cursor (empty for first page)
          type: string
      - description: Sort field (created_at, updated_at, name, max_amount)
        explode: false
        in: query
        name: sort_by
        schema:
          description: Sort field (created_at, updated_at, name, max_amount)
          type: string
      - description: Sort direction (ASC, DESC)
        explode: false
        in: query
        name: sort_order
        schema:
          description: Sort direction (ASC, DESC)
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListLimitsResponse"
          description: OK
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: List spending limits
      tags:
      - Limits API
      description: Use this endpoint to list spending limits with cursor-based pagination and optional filters. DELETED limits are not returned in listings.
      x-mint:
        href: /pt/reference/products/tracer/list-limits
    post:
      operationId: createLimit
      requestBody:
        content:
          application/json:
            schema:
              contentMediaType: application/octet-stream
              format: binary
              type: string
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Limit"
          description: Created
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: Create a new spending limit
      tags:
      - Limits API
      description: Use this endpoint to create a spending limit with scopes array. Limits are created in DRAFT status. Use the activate endpoint to start enforcement. After creation, limitType, asset and resetTime cannot be changed.
      x-mint:
        href: /pt/reference/products/tracer/create-limit
  /v1/limits/{id}:
    delete:
      operationId: deleteLimit
      parameters:
      - description: Limit ID (UUID)
        in: path
        name: id
        required: true
        schema:
          description: Limit ID (UUID)
          type: string
      responses:
        "204":
          description: No Content
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: Delete a spending limit
      tags:
      - Limits API
      description: Use this endpoint to soft-delete a spending limit. Only DRAFT and INACTIVE limits can be deleted. ACTIVE limits must be deactivated first. The limit is preserved in the audit trail.
      x-mint:
        href: /pt/reference/products/tracer/delete-limit
    get:
      operationId: getLimit
      parameters:
      - description: Limit ID (UUID)
        in: path
        name: id
        required: true
        schema:
          description: Limit ID (UUID)
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Limit"
          description: OK
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: Get a spending limit by ID
      tags:
      - Limits API
      description: Use this endpoint to retrieve a spending limit by its unique identifier.
      x-mint:
        href: /pt/reference/products/tracer/retrieve-limit
    patch:
      operationId: updateLimit
      parameters:
      - description: Limit ID (UUID)
        in: path
        name: id
        required: true
        schema:
          description: Limit ID (UUID)
          type: string
      requestBody:
        content:
          application/json:
            schema:
              contentMediaType: application/octet-stream
              format: binary
              type: string
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Limit"
          description: OK
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: Partially update an existing spending limit
      tags:
      - Limits API
      description: Use this endpoint to partially update a spending limit. Only provided fields are updated. limitType, asset and resetTime are immutable and cannot be changed.
      x-mint:
        href: /pt/reference/products/tracer/update-limit
  /v1/limits/{id}/activate:
    post:
      operationId: activateLimit
      parameters:
      - description: Limit ID (UUID)
        in: path
        name: id
        required: true
        schema:
          description: Limit ID (UUID)
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Limit"
          description: OK
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: Activate a spending limit
      tags:
      - Limits API
      description: Use this endpoint to activate a spending limit. Activates the limit for enforcement in validations.
      x-mint:
        href: /pt/reference/products/tracer/activate-limit
  /v1/limits/{id}/deactivate:
    post:
      operationId: deactivateLimit
      parameters:
      - description: Limit ID (UUID)
        in: path
        name: id
        required: true
        schema:
          description: Limit ID (UUID)
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Limit"
          description: OK
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: Deactivate a spending limit
      tags:
      - Limits API
      description: Use this endpoint to deactivate a spending limit. Pauses the limit from being enforced in validations.
      x-mint:
        href: /pt/reference/products/tracer/deactivate-limit
  /v1/limits/{id}/draft:
    post:
      operationId: draftLimit
      parameters:
      - description: Limit ID (UUID)
        in: path
        name: id
        required: true
        schema:
          description: Limit ID (UUID)
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Limit"
          description: OK
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: Transition a limit back to draft
      tags:
      - Limits API
      description: Use this endpoint to transition a limit from INACTIVE back to DRAFT. Allows re-editing a previously deactivated limit before re-activating it.
      x-mint:
        href: /pt/reference/products/tracer/draft-limit
  /v1/limits/{id}/usage:
    get:
      operationId: getLimitUsage
      parameters:
      - description: Limit ID (UUID)
        in: path
        name: id
        required: true
        schema:
          description: Limit ID (UUID)
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UsageSnapshot"
          description: OK
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: Get usage snapshot for a limit
      tags:
      - Limits API
      description: Use this endpoint to retrieve the current usage snapshot for a spending limit.
      x-mint:
        href: /pt/reference/products/tracer/retrieve-limit-usage
  /v1/rules:
    get:
      operationId: listRules
      parameters:
      - description: Filter by name (case-insensitive partial match)
        explode: false
        in: query
        name: name
        schema:
          description: Filter by name (case-insensitive partial match)
          type: string
      - description: Filter by status (DRAFT, ACTIVE, INACTIVE; DELETED not allowed)
        explode: false
        in: query
        name: status
        schema:
          description: Filter by status (DRAFT, ACTIVE, INACTIVE; DELETED not allowed)
          type: string
      - description: Filter by action (ALLOW, DENY, REVIEW)
        explode: false
        in: query
        name: action
        schema:
          description: Filter by action (ALLOW, DENY, REVIEW)
          type: string
      - description: Filter by scope account_id (UUID)
        explode: false
        in: query
        name: account_id
        schema:
          description: Filter by scope account_id (UUID)
          type: string
      - description: Filter by scope segment_id (UUID)
        explode: false
        in: query
        name: segment_id
        schema:
          description: Filter by scope segment_id (UUID)
          type: string
      - description: Filter by scope portfolio_id (UUID)
        explode: false
        in: query
        name: portfolio_id
        schema:
          description: Filter by scope portfolio_id (UUID)
          type: string
      - description: Filter by scope merchant_id (UUID)
        explode: false
        in: query
        name: merchant_id
        schema:
          description: Filter by scope merchant_id (UUID)
          type: string
      - description: Filter by scope transaction_type (CARD, WIRE, PIX, CRYPTO)
        explode: false
        in: query
        name: transaction_type
        schema:
          description: Filter by scope transaction_type (CARD, WIRE, PIX, CRYPTO)
          type: string
      - description: Filter by scope sub_type (case-insensitive; max 50 chars)
        explode: false
        in: query
        name: sub_type
        schema:
          description: Filter by scope sub_type (case-insensitive; max 50 chars)
          type: string
      - description: "Max items per page (1-100, default: 10)"
        explode: false
        in: query
        name: limit
        schema:
          description: "Max items per page (1-100, default: 10)"
          type: string
      - description: Pagination cursor (empty for first page)
        explode: false
        in: query
        name: cursor
        schema:
          description: Pagination cursor (empty for first page)
          type: string
      - description: Sort field (created_at, updated_at, name, status)
        explode: false
        in: query
        name: sort_by
        schema:
          description: Sort field (created_at, updated_at, name, status)
          type: string
      - description: Sort direction (ASC, DESC)
        explode: false
        in: query
        name: sort_order
        schema:
          description: Sort direction (ASC, DESC)
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListRulesResponse"
          description: OK
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: List fraud rules
      tags:
      - Rules API
      description: Use this endpoint to list fraud rules with cursor-based pagination and optional filters. DELETED rules are not returned in listings.
      x-mint:
        href: /pt/reference/products/tracer/list-rules
    post:
      operationId: createRule
      requestBody:
        content:
          application/json:
            schema:
              contentMediaType: application/octet-stream
              format: binary
              type: string
        required: true
      responses:
        "201":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Rule"
          description: Created
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: Create a new fraud rule
      tags:
      - Rules API
      description: Use this endpoint to create a fraud rule with a CEL expression and scopes array. Rules are always created in DRAFT status. Use the activate endpoint to start evaluation.
      x-mint:
        href: /pt/reference/products/tracer/create-rule
  /v1/rules/{id}:
    delete:
      operationId: deleteRule
      parameters:
      - description: Rule ID (UUID)
        in: path
        name: id
        required: true
        schema:
          description: Rule ID (UUID)
          type: string
      responses:
        "204":
          description: No Content
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: Delete a fraud rule
      tags:
      - Rules API
      description: Use this endpoint to soft-delete a fraud rule. Only DRAFT and INACTIVE rules can be deleted. ACTIVE rules must be deactivated first. The rule is preserved in the audit trail.
      x-mint:
        href: /pt/reference/products/tracer/delete-rule
    get:
      operationId: getRule
      parameters:
      - description: Rule ID (UUID)
        in: path
        name: id
        required: true
        schema:
          description: Rule ID (UUID)
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Rule"
          description: OK
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: Get a fraud rule by ID
      tags:
      - Rules API
      description: Use this endpoint to retrieve a fraud rule by its unique identifier.
      x-mint:
        href: /pt/reference/products/tracer/retrieve-rule
    patch:
      operationId: updateRule
      parameters:
      - description: Rule ID (UUID)
        in: path
        name: id
        required: true
        schema:
          description: Rule ID (UUID)
          type: string
      requestBody:
        content:
          application/json:
            schema:
              contentMediaType: application/octet-stream
              format: binary
              type: string
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Rule"
          description: OK
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: Partially update an existing fraud rule
      tags:
      - Rules API
      description: Use this endpoint to partially update a fraud rule. Only provided fields are updated. Expression can only be modified when rule is in DRAFT status.
      x-mint:
        href: /pt/reference/products/tracer/update-rule
  /v1/rules/{id}/activate:
    post:
      operationId: activateRule
      parameters:
      - description: Rule ID (UUID)
        in: path
        name: id
        required: true
        schema:
          description: Rule ID (UUID)
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Rule"
          description: OK
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: Activate a fraud rule
      tags:
      - Rules API
      description: Use this endpoint to activate a fraud rule. Activates the fraud rule for evaluation in validations. Valid transitions are DRAFT to ACTIVE and INACTIVE to ACTIVE.
      x-mint:
        href: /pt/reference/products/tracer/activate-rule
  /v1/rules/{id}/deactivate:
    post:
      operationId: deactivateRule
      parameters:
      - description: Rule ID (UUID)
        in: path
        name: id
        required: true
        schema:
          description: Rule ID (UUID)
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Rule"
          description: OK
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: Deactivate a fraud rule
      tags:
      - Rules API
      description: Use this endpoint to deactivate a fraud rule. Pauses the fraud rule from being evaluated in validations. Valid transitions are ACTIVE to INACTIVE and DRAFT to INACTIVE.
      x-mint:
        href: /pt/reference/products/tracer/deactivate-rule
  /v1/rules/{id}/draft:
    post:
      operationId: draftRule
      parameters:
      - description: Rule ID (UUID)
        in: path
        name: id
        required: true
        schema:
          description: Rule ID (UUID)
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Rule"
          description: OK
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: Transition a rule back to draft
      tags:
      - Rules API
      description: Use this endpoint to transition a fraud rule from INACTIVE back to DRAFT. Allows re-editing a previously deactivated rule before re-activating it.
      x-mint:
        href: /pt/reference/products/tracer/draft-rule
  /v1/validations:
    get:
      operationId: listValidations
      parameters:
      - description: "Max items per page (1-1000, default: 100)"
        explode: false
        in: query
        name: limit
        schema:
          description: "Max items per page (1-1000, default: 100)"
          type: string
      - description: Pagination cursor from previous response
        explode: false
        in: query
        name: cursor
        schema:
          description: Pagination cursor from previous response
          type: string
      - description: "Field to sort by (created_at, processing_time_ms; default: created_at)"
        explode: false
        in: query
        name: sort_by
        schema:
          description: "Field to sort by (created_at, processing_time_ms; default: created_at)"
          type: string
      - description: "Sort direction (ASC, DESC; default: DESC)"
        explode: false
        in: query
        name: sort_order
        schema:
          description: "Sort direction (ASC, DESC; default: DESC)"
          type: string
      - description: Filter from this date (RFC3339)
        explode: false
        in: query
        name: start_date
        schema:
          description: Filter from this date (RFC3339)
          type: string
      - description: Filter to this date (RFC3339)
        explode: false
        in: query
        name: end_date
        schema:
          description: Filter to this date (RFC3339)
          type: string
      - description: Filter by decision (ALLOW, DENY, REVIEW)
        explode: false
        in: query
        name: decision
        schema:
          description: Filter by decision (ALLOW, DENY, REVIEW)
          type: string
      - description: Filter by account ID (UUID)
        explode: false
        in: query
        name: account_id
        schema:
          description: Filter by account ID (UUID)
          type: string
      - description: Filter by matched rule ID (UUID)
        explode: false
        in: query
        name: matched_rule_id
        schema:
          description: Filter by matched rule ID (UUID)
          type: string
      - description: Filter by exceeded limit ID (UUID)
        explode: false
        in: query
        name: exceeded_limit_id
        schema:
          description: Filter by exceeded limit ID (UUID)
          type: string
      - description: Filter by segment ID (UUID)
        explode: false
        in: query
        name: segment_id
        schema:
          description: Filter by segment ID (UUID)
          type: string
      - description: Filter by portfolio ID (UUID)
        explode: false
        in: query
        name: portfolio_id
        schema:
          description: Filter by portfolio ID (UUID)
          type: string
      - description: Filter by transaction type (CARD, WIRE, PIX, CRYPTO)
        explode: false
        in: query
        name: transaction_type
        schema:
          description: Filter by transaction type (CARD, WIRE, PIX, CRYPTO)
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListTransactionValidationsResponse"
          description: OK
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: List transaction validation records
      tags:
      - Validations API
      description: Use this endpoint to list transaction validation records with cursor-based pagination and filters. Useful for compliance reporting and trend analysis.
      x-mint:
        href: /pt/reference/products/tracer/list-validations
    post:
      operationId: validateTransaction
      requestBody:
        content:
          application/json:
            schema:
              contentMediaType: application/octet-stream
              format: binary
              type: string
        required: true
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ValidationResponse"
          description: OK
        "201":
          description: New validation created
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: Validate a transaction
      tags:
      - Validations API
      description: Use this endpoint to validate a transaction against configured rules and limits in real-time. Returns a decision (ALLOW, DENY, or REVIEW) along with details about which rules matched and limit usage.
      x-mint:
        href: /pt/reference/products/tracer/validate-transaction
  /v1/validations/{id}:
    get:
      operationId: getValidation
      parameters:
      - description: Transaction Validation ID (UUID)
        in: path
        name: id
        required: true
        schema:
          description: Transaction Validation ID (UUID)
          type: string
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/TransactionValidation"
          description: OK
        "422":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Unprocessable Entity
        "500":
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: "#/components/schemas/Error"
          description: Error
      security:
      - BearerAuth: []
      - ApiKeyAuth: []
      summary: Get a transaction validation record by ID
      tags:
      - Validations API
      description: Use this endpoint to retrieve a transaction validation record by its unique identifier. Useful for auditing and debugging validation decisions.
      x-mint:
        href: /pt/reference/products/tracer/retrieve-validation
servers:
- url: https://tracer.sandbox.lerian.net
tags:
- name: Validations API
- name: Rules API
- name: Limits API
- name: Audit Events API
- name: Dashboards API
