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

# Validate a transaction

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



## OpenAPI

````yaml /en/openapi/v3-current/tracer.yaml post /v1/validations
openapi: 3.1.0
info:
  title: Midaz Tracer API
  description: >-
    Reference for Midaz Tracer transaction validation, fraud rules, spending
    limits, reservations, and audit events.
  version: 4.0.0
servers:
  - url: https://tracer.sandbox.lerian.net
security: []
tags:
  - name: Validations API
  - name: Rules API
  - name: Limits API
  - name: Reservations API
  - name: Audit Events API
paths:
  /v1/validations:
    post:
      tags:
        - Validations API
      summary: Validate a transaction
      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.
      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
      security:
        - BearerAuth: []
        - ApiKeyAuth: []
components:
  schemas:
    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
    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
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http
    ApiKeyAuth:
      description: Static API key presented in the X-API-Key header.
      in: header
      name: X-API-Key
      type: apiKey

````